It’s AGI, seriously
I know, the title sounds like clickbait. If you're skeptical about reading this, allow me this paragraph to state my thesis. My goal is to argue that current AI models are building blocks upon which we may develop Artificial General Intelligence. This doesn’t mean we’re on a direct path to superintelligence, but the current hype around recent progress is not unjustified.
On the nature of Large Language Models
LLMs, of course. Not just LLMs, but let's start with them. In a recent interview, Ilya Sutskever (Chief Scientist at OpenAI), shared a remarkable thought:
"What does it mean to predict the next token? This is a deeper question than it seems. Predicting the next token well means to understand the underlying reality that leads to the creation of that token."
From our current understanding of AI, one of the problems in developing AGI is "what should its cost function be (if there is one)?" Ilya’s statement may imply that we have found one. It may not be perfect, and perhaps it won’t lead to the development of an intelligence that is a reflection of our own, but it's a candidate.
I want to emphasize another aspect: predicting the next token is not just about generating the next word in a conversation. It is the act of an agent deciding the next action to take. If you've played around with LLM programming (or you've been on Twitter lately), you probably know what I'm referring to.
In recent months, but especially since the release of GPT-4, there's been an explosion of projects that essentially involve programmed pipelines around an LLM. I believe these programs should be thought of as something new: primitive hosts that provide agency to an intelligence. Let me break it down.
It turns out, when you prompt an LLM in a certain way, you can tell it about a series of actions it may perform to improve its answers. The best example is the plugin system ChatGPT added a few weeks ago. The way this system works is quite fascinating.
Each plugin is literally just an OpenAPI specification for an external service (searching the web, querying Wolfram Alpha, evaluating some code...). In the background, OpenAI creates a custom prompt (a.k.a. the system message, fed to the model at the start of a session) with these specifications. It goes something like this: "As an assistant, you have a series of actions you may perform to best help the user. This is what each action does, and how you should use it if you choose to...", followed by the API descriptions and format provided by the plugin specs.
Just with this, GPT-4 will begin to produce outputs in its conversations requesting for these actions to be performed. In the backend, the actions are executed, and the API responses are fed back to the model. This may even loop a few times, but eventually, it produces an output with a final answer (requesting no further actions), which is what the user receives.
This is just an example of a general framework for interacting with LLMs. Recent literature has studied formal approaches on how to prompt a model to generate a reasoning loop that involves the execution of actions and the observation of the results for reflection and self-actualization. Check out the papers on ReAct or MRKL if you aren’t familiar, or have a look at projects built with langchain and similar libraries.
As I mentioned earlier, I believe programs that implement these reasoning loops could be thought of as primitive hosts that enable features required to achieve general intelligence.
Towards an Artificial Brain
How can we computationally model a brain? This question is the core of an entire subfield of neuroscience, so what I'm going to propose is an almost insulting reduction of the question.
By brain, I don’t mean the human brain, but rather something that may be compared with it in terms of capabilities. I'll focus on what I think are four fundamental properties such a thing should have:
1. Real-time input from the external world (stimuli)
2. A reasoning loop generating actions with a goal based on the current context
3. The ability to execute these actions and observe the results
4. A permanent (or long-term) memory which enables self-actualization
If we can work with this definition for now, I want to argue that we may be very close to materializing it. Not as a single model, but rather as a system of different agents interacting with each other, with an LLM (or more) at the top coordinating them.
We have ever-improving models for speech-to-text, image-to-text, and video-to-text. These models would play the role of decoding external stimuli, feeding them to the rest of the system.
An LLM (or a several), would process these inputs, executing a reasoning loop as earlier described. We have only scratched the surface in terms of formalizing these processes, I suspect a true general intelligence would have not one, but multiple specialized loops carried by different agents focused on different aspects of cognition.
For executing actions, the system will need a host (or body) that allows it to interact with the outside world. By observing the result of these actions, the system could learn and actualize its behavior to better achieve its goals.
What are these goals? For humans, we don’t have a concrete answer. For artificial systems, we know that the cost function is what creates and prioritizes these goals. For LLMs, predicting the next token is the cost function. The training dataset and the system message set the actual goal(s).
The final point is about memory and self-actualization. The current architectures for LLMs conflict with this property in two ways. First, they have static memory — the neuron weights that are set during the training process. Second, training is an activity that occurs strictly before execution. When the training phase is completed and the model is running, weights are not updated. In a way, these are two sides of the same coin. However, within a single context window (or session), current LLMs do exhibit these properties.
There are two ways LLMs may evolve past this: with a large enough context window or with an external system for memory persistence and retrieval. The former is straightforward. If we can make the context window large enough, we could have a system able to process enough information to last a lifetime. This seems unlikely, though, as we'd be talking about absurd numbers (on the order of trillions of tokens), and the quadratic space complexity in the current models for attention in transformers doesn't help (although there's significant efforts to improve this).
Regarding external memory, I want to draw attention to a project that's recently gone viral on Twitter and Github: BabyAGI. The idea of this project is to use a text embedding database to build a permanent memory for an agent that is constantly generating and executing new tasks. This post is long enough, so I won't go into detail on how it works. But beyond being a novelty, the results we can observe when it runs are remarkable. It's not there yet, the process for how a true AGI should use such a permanent memory, and what areas should be triggered (retrieved) based on the current context would need to be much more sophisticated than what we have today. I believe the next big breakthrough may come from this direction.
Wrapping up
What does this all mean? Honestly, I don’t know. This is just an enthusiast's attempt to put together and understand the recent developments in the field.
There seem to be two main takes on where we stand. There’s those who believe that the pieces are falling into place and we’re at the doorstep of the singularity, and on the other side the ones who think we’re freaking out about a novelty that is nowhere close to solving AI. To the latter group, I hope this text may have provided a perspective on why the idea is perhaps not that crazy. And to the former, maybe it’s helped paint a somewhat concrete picture on what the next steps could look like.
Historically, there's been a tendency to move the goalposts when defining AI. As we’ve reached previous milestones (chess, image processing, natural language…), and we’ve understood what it takes to model them, we concluded that the solutions were simpler than we imagined, and decided that these feats can’t be enough to define true intelligence. With every leap forward, this becomes harder to justify. As Sam Altman recently said: “we’ve reached the point where definitions really matter.”
We won’t know what it truly takes to create intelligence until we actually do it. We may enter a new AI winter before we make the next breakthrough. But it could be that what we have today is the base upon which we’ll achieve AGI. And there are paths forward that we're only beginning to explore.
We are, perhaps for the first time, in a position where we can discuss the modeling of true intelligence in terms of real, current technology. The number of conceptual black boxes that we need to use in our models is approaching zero.