Can Machines Dream?
Last night just before bedtime my 4-year-old told me a story about how to rob a shark. It had to do with a toothpick and some elaborate way of using it for the robbery to succeed. When I asked: what if you don’t have a toothpick, he took a while to ponder, then, with a grim face, said: then you cannot rob him, you must have a toothpick. It was a well-formed story as language usage was concerned however utterly false. In a sense, he was daydreaming.
A Martian who learned our language, but does not possess the real-world experience we have, may find this story completely plausible, as it was consistent and did not contain any linguistic errors. In the philosophy of language terms, my boy was producing a valid utterance even though it was completely false. You see, valid utterances do not promise to be true.
Large Language Models
The last two years have seen explosive growth in the realm of artificial intelligence (AI), specifically in Large Language Models. Anyone not living under a rock has met those models in one way or another (e.g. ChatGPT by OpenAI, Claude by Anthropic, Bard from Google, and many many more). The popular media has been beside itself with praise, predictions, and future predicaments ushered in by the new technology. From stating all jobs are going to be obsolete, to killer robots that would decimate humanity. But, as the British saying goes: “Today’s newspapers are tomorrow’s fish and chip paper”. However, before we sound the all-clear signal we’d have to slightly touch on how those models actually work under the hood.
Large Language Models (LLMs) work by processing and generating human-like text based on patterns they have learned from vast amounts of data. They use neural networks, particularly transformer architectures, to understand and generate language. These models are trained on diverse text datasets, learning the statistical relationships between words, phrases, and sentences. When given a prompt (i.e. a question, or any kind of text), they predict and generate the next words based on this training, allowing them to create coherent and contextually relevant responses. The operative word being statistical.
As LLMs are merely predicting the next token (tokens are parts of words, you can simplistically think about them as syllables, even though that is not entirely accurate) based on the learned textual corpus (e.g. newspapers, scientific articles, books, Wikipedia, and so on). But it comes with a catch. As LLMs generate linguistically valid text, they sometimes (research states 20%-50% of the time on average, and in some cases much more) hallucinate.
The Hallucinating AI
LLM hallucinations are basically texts that describe something that is clearly false, yet linguistically valid. Let’s say we asked the LLM to describe a village that never existed. Most LLMs would happily respond with a (false) geographical and historical description of the village in a way most people, unaware the village is completely fictional, could never discern to be a hallucination. But that’s the least of our problems. What if an LLM provides a wrong (but confident) answer to a medical or legal question? And they do, to a great extent.
Lately, Google has (prematurely) released an LLM-based version of their search engine where instead of searching the web and getting links to relevant pages you are asking a question and getting an answer. It quickly backfired.
People who asked the new AI system for better Pizza and healthy diets got detailed recommendations suggesting adding glue to their Pizza and including rocks in their daily diet. Not very trustworthy to say the least.
Yet, some researchers claim that LLMs can actually reason, think and that AGI (Artificial General Intelligence) and self-conscious AIs are right around the corner, if not already here. Others remain highly skeptical (you may want to read Yann LeCun’s – one of the forefathers of deep neural networks -take on the subject). While this discussion is an ongoing one I’d like to suggest a fresh point of view that shuns both critics and praises alike.
I think LLMs are dreaming.
The Dreaming Robot
If we assume an LLM has grasped the essence of some language, i.e. the understanding of the meaning of its output, then we must look at the hallucination as one possible state, not as a problem to be resolved (nor one that can theoretically be solved). If we truly want to compare LLMs to the human mind (which I beg to differ, however, stick with me for the next hat trick), we need to accept the fact that, similar to the human mind, they have an imagination, i.e. can come up with plausible “stories”, linguistically well-formed and consistent, that are not grounded in reality.
Remember my 4-year-old?
If a child or an author of a sci-fi piece of fiction describes a lucid dream, or a possible world that does not exist we do not call him hallucinatory, but rather praise him for his vivid imagination and creativity.
Why do we then complain about LLM hallucinations?
Because LLMs cannot differentiate imagination from reality.
If an LLM describes a village that never existed, and your next question is: is that village real? The LLM would tell you (in many cases) that it is. You can continue to make sure by further crucifying the LLM but it will usually continue to stick to its own version of the “truth”. In psychiatric terms, we would call such a person (or entity in our case) hallucinatory.
The human mind on the other hand does not fall for such shenanigans as it has an internal mechanism that allows it to discern dreams from reality (weighting reality over dreamscape), while LLMs do not.
We can try to ground LLM output texts in reality (using a technique called RAG), but as recent research has shown, that is not going to end up well, especially in areas requiring zero imaginary content (e.g. law, finance, etc.).
Such brain mechanisms were shown to be tightly coupled with personal relevance, which in turn stems from the sense of self (how can you have personally relevant content without one). Such tight coupling between the conscious self and the ability to discern fiction from reality suggests that the reality classification mechanism must rely on self-awareness, and self-awareness is something LLMs do not possess (even though they sometimes output texts that are a facade of what a person would say should he or she be self-aware).
Moreover, self-awareness and consciousness are deeply intertwined with our physical bodies. Some research claims consciousness is no more than our body-mind’s mechanism reporting to “ourselves” that everything is fine (or not), i.e. is comprised of the aggregation of our internal and external sensory activity, something LLMs do not have, and would not evolve into having in their current incarnation as transformers.
It seems it would take yet another technological leap (or a number of such) beyond the current underlying transformer architecture to get us there. Meanwhile, LLMs would continue to dream up hallucinations mixed with reality and there is absolutely nothing we can do about it. So, as exciting as current AI technology may seem, and it has its share of excitement, it is not AGI, nor would be anytime soon. Humanity is safe, at least for now.
It’s astonishing how [LLMs] work, if you train them at scale, but it’s very limited. We see today that those systems hallucinate, they don’t really understand the real world. They require enormous amounts of data to reach a level of intelligence that is not that great in the end. And they can’t really reason. They can’t plan anything other than things they’ve been trained on. So they’re not a road towards what people call “AGI.” I hate the term. They’re useful, there’s no question. But they are not a path towards human-level intelligence.
Yann LeCun,
Meta’s chief AI scientist
and one of the forefathers of deep neural networks,
Feburary 2024
