From ABCs to AI: Unravelling the Magic of Large Language Models
Robot boy sitting in class ready to learn

From ABCs to AI: Unravelling the Magic of Large Language Models

Welcome back to my weekly cyber security blog and I hope you all had a wonderful week.?It is undeniable that AI is fast becoming an integral part of our society. As the technology continues to develop and improve, we are starting to see the emerging signs of the changes this will bring to our economy and society. While Artificial Intelligence and Machine Learning have existed as scientific fields of study for decades, ChatGPT has made generative AI a household name. It is this type of technology that organisations are adding to their products and business processes at an accelerating rate. Last week I wrote about the new speech capability of Large Language Models (LLMs), and how they had gone from generating text and conversing with us on-screen to talking to humans verbally in real time. However, to help ensure the safe use of AI, it is helpful to understand more about it. Over the next few weeks my friends, we will explore this from both the technology and cyber security perspectives, beginning this week with the basics of how the technology works and how it is trained. Next week, we will look at prompting and cyber threats, and then the possible future direction of the tech. This series of posts will ask, how well LLMs reasoning can be understood by humans, and as the use of the technology expands into new fields, how much can we trust them?

From Alphabet to Algorithms

I think of the origin of LLMs like a pyramid.

  1. At the bottom we have the broad field of artificial intelligence which deals with all kinds of intelligent machines.
  2. The second layer is machine learning, this focuses on machines learning how to recognise patterns in data, if the machine can see a pattern then it can apply that pattern to new data to make observations and predictions.
  3. The third layer is called deep learning, which provides the basis for LLMs to learn. They are (sort of) based on the structure of the human brain and divided into multiple layers. I picture this as a production line, each step (layer) takes in data, finds the patterns, filters it, and passes it onto the next. As the data passes through each layer the network learns more. So, for example, the top layer recognised oval shape, and the final layer recognised a human face.
  4. At the top we have the LLM itself. The deep learning algorithms enable LLMs to analyse massive amount of text data and identify patterns in how words are used and how they relate to each other. This allows LLMs to perform various language tasks, like generating text, translating languages, and answering questions.?

Making the magic box

There is a three stage training process to create an LLM capable of understand and responding to language in a useful and sophisticated way.

  1. Unsupervised learning – The model is exposed to huge amount of text to learn about the relationship between words, and from this it learns to predict the next word. Think of this like a child in school reading the words on a page, although in the case of ChatGPT, it is estimated the model read trillions of words. In this phase, the model learns to predict words along with grammar and syntax, it also acquires a significant amount of world knowledge from the data it ingests.
  2. Supervised learning –? In this second phase, we take our pre-trained model and retrain it again using high quality labelled data. This is like giving the model a series of questions and the corresponding correct answers. This way the model learns to become helpful and to answer questions and respond to prompts in a useful way. If the first phase can be thought of a a child reading words on a page, the second phase is the child being given exercises by their teacher to practice their spelling and comprehension.
  3. Reinforcement learning – The final phase of training LLMs is similar to our child taking a practice test in class and getting feedback on how they did. The model is given a series of tasks to complete and assessed on its performance, being rewarded for correct responses and penalised for poor ones. This allows the model to be refined and develop good behaviour, such as not responding with offensive or dangerous answers.?

So far we’ve covered the basics of what an LLM is and how intelligent systems are trained. We must keep in mind what makes AI different, it’s trained rather than programmed like traditional software. This is also why an LLM can be described as a magic box, we can see what goes in and what comes out, but these models are incredible complex, so it is not always possible for us to understand why they produced certain output. Also as the training data for LLMs came from the internet, it contains unknown biases.

The challenge of controlling and fully understanding LLMs (LLM transparency) are very active areas of AI research. However, this unpredictability also gives rise to different forms of cyber attacks against an LLM which I will cover next week. As researchers continue to improve model transparency, we as end users must consider the risk when using them and adding them into our businesses. I recently started using Google Gemini and was impressed with the inbuilt function to run a Google search on the output of the model and automatically highlight its more “questionable” output. This is a great example of maintaining human oversight over the models output and not blindly trusting them. As the benefits of these models become clearer, along with the risks involved, it is incumbent on us to make sure we consider both.

I believe in our cyber security community and that by sharing and helping each other that we can all be safer. So, everything above is just my opinion, what’s yours? Please share in the comments below and stay safe.

Paul Liversidge

Trusted sales/ commercial leader facilitating increased sales revenue | Localisation industry expert | Professional sales process optimisation | Business Development | Proven sales leader |

9 个月

An interesting insight, Jonathan Freedman, thank you for creating it in a concise way. I'm pleased to see the reference to human oversight of these models, or at least the output. Humans-in-the-loop is very important in my line of work, which includes utilizing LLMs for translating some client content into other languages. As good as AI is, leveraging it with professional human linguists that do understand the art of nuance, style and context, including esoteric terminology, is critical for us to achieve the desired quality #translation output for our clients. However, as you mentioned, these LLM models are incredibly complex, and I can't help but think that human oversight is so much more critical than in my world when it comes to much larger data sets with less confined parameters, given we can potentially find ourselves with output that has been produced with no knowledge as to how/why, other than within the model itself. Also, I am curious as to what constitutes a 'reward' for an LLM and how it recognises that reward. Looking forward to the next instalment.

Thank you Jonathan Freedman for a good reminder of the foundations for all of the noise. It's easy to get sucked into the vortex of nonsense around AI and forget that humans built this tech (which is an impressive achievement) and with applied common sense we can control its evolution, application and security. No doubt abuse looms large - that's how we beasts function in all walks of life so AI will be no exception. Look forward to rest of this series. ??

要查看或添加评论,请登录

Jonathan Freedman的更多文章

社区洞察

其他会员也浏览了