avatarJames Marinero, MSc, MBA

Summary

The author reflects on the nature of dreams and memory consolidation in the human brain, drawing parallels to the potential improvements in artificial intelligence, specifically Large Language Models (LLMs), by implementing processes akin to human sleep stages, particularly Stage 3, to enhance their learning and memory capabilities.

Abstract

The author muses on a recent dream involving long-forgotten classmates, which leads to a broader contemplation of how the human brain consolidates memories during sleep, especially in Stage 3. This introspection prompts the author to explore whether similar processes could benefit Large Language Models (LLMs) in artificial intelligence. The article discusses the author's experiences with AI tools like ChatGPT and Bard, delving into the concept of AI "hallucinations" and the limitations of current LLMs in terms of conceptual understanding and insight. The author then presents Bard's perspective on how LLMs might undergo a "consolidation" phase, analogous to human sleep, to refine their knowledge and improve performance. This includes mechanisms for memory consolidation, error correction, and model optimization, which could potentially reduce biases and enhance the accuracy of AI outputs. The article concludes with the author's speculation on the future of AI development, considering the technical feasibility and ethical implications, while acknowledging the role of AI in writing the article itself.

Opinions

  • The author has a long-standing interest in IT but is not a specialist in LLMs, identifying as a semi-informed observer and user.
  • There is a noted skepticism towards Google's Bard, despite its use for research assistance, due to the company's abandonment of its "Do no evil" mantra.
  • The author questions the ability of LLMs to truly conceptualize or have insights, drawing a clear distinction between predictive capabilities and the human

Artificial Intelligence

A Musing Morning With The Bard And LLMs

As I age, my dreams are becoming more strange and poking further back into my life and I wondered…

The human brain, land of mystery. Credit: By Jensflorian — Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=39237155

The puzzle

Why did I dream about almost all my classmates in my physics undergrad cohort? It was a strange experience and quite vivid. People I had not thought of in maybe 40 years were in attendance — but not as they then were. In my dream, they had all aged appropriately.

How weird is that? Then in my pre-rising reverie (rising as in getting up from bed — I rarely get an early morning tent-pole these days), I wondered for the thousandth time what the hell my brain was doing when I slept. And I thought of classmate Mary Barter — tall, blonde, brown boots — where is she now? Nothing happened then or now — we rarely spoke — but I had remembered her and can quite easily visualise her now, as she then was.

Aging aside, I’ve wondered for years whether the brain re-indexes itself as I sleep. I often find that I’m best at crosswords during breakfast, when the brain has been rested. Is that significant?

And now, here I am at my desk starting a story that has been on my mind for a few days. Pondering. I’ll get some background info and then see what I and my muse can come up with as we explore together the mysteries of memory, insight, and artificial intelligence.

Background

For more than a year I’ve been a regular user of ChatGPT for research purposes, but recently I tried the paid version because the outdated data of version 3.5 circa January 2022 was just no good. I quickly stopped subbing for the paid version as I didn’t find it worthwhile. I decided to try Bard (Google/Alphabet).

As much as I dislike the Google scene and their dropping the ‘Do no evil’ mantra, I have to be realistic. So, for the past few weeks, I have been using Bard for research assistance. It has its frustrations, but I have adjusted and learned how to coax it past occasional preachiness and condescension.

I have a long background in IT but none in Large Language Models (LLMs) other than as a semi-informed observer — and user.

Conjunction

I decided to find out how much Bard could tell me about LLMs in a way that I could understand, and how the human brain worked when it was asleep. Yes, that’s a tall order, especially the workings of the human brain about which relatively little is understood.

I downloaded the info, which you too can easily get for free from Bard and I will not bore you with the details of human sleep except to say that Bard identified four stages of sleep. No doubt all are important, but it was Stage 3 that interested me particularly and this is what Bard described:

Stage Three: The Dream Zone: Now comes the realm of dreams! Brain waves surge into theta and alpha frequencies again, accompanied by bursts of rapid eye movement (REM). This is when your brain is most active, weaving stories and consolidating memories. Dreams can be vivid and strange, a reflection of your subconscious and recent experiences. — Bard

And we may not be the only creatures that dream. I’ve seen dogs undergoing REM and paw-twitching when asleep. Have you?

Can LLMs benefit from a Stage 3 process?

My next step was to ask Bard to speculate on whether LLM performance could be improved by undergoing processes that are similar to Stage 3 sleep in human beings.

We know that one problem with LLMs is that the current crop is liable to ‘hallucination’ — inventing data, references, and hallucinatory content.

Could a Stage 3 process reduce the propensity of LLMs to hallucinate? I’ll leave aside the question as to the comparison between LLM hallucinations and the strange happenings in our own dreams. That’s maybe for another day.

Anyway, I chatted to Bard, musing about Stage 3 and LLMs, always bearing in mind that LLMs cannot conceptualise — they are predictive only, although that predictive ability may stretch many thousands of words ahead. They cannot create abstract concepts. For example, without knowing the background, could an LLM have envisioned Einstein’s famous thought experiment, where he imagined himself riding on a light wave?

No, an LLM as presently constructed could not have had that insight and very few humans could have originated either. That kind of insight is very important in science and my lack of it is why I’m now banging away at this keyboard.

The musing

Me:

Consider Stage 3 and consolidation in the context of an LLM. Could regular ‘consolidation’ work with LLMs, and if so, how might that be achieved?

Bard:

Traditionally, stage 3 sleep in humans refers to deep sleep characterized by slow brain waves and physical restoration. In the context of LLMs, “stage 3” could represent a period of focused internal processing and refinement following their initial training. This could involve:

  • Memory consolidation: Strengthening the connections between learned concepts and relationships within the LLM’s internal knowledge base. Imagine it like revisiting and reorganizing notes after attending a lecture.
  • Error correction: Identifying and rectifying any biases or factual inconsistencies present in the LLM’s knowledge due to its training data. Think of it as catching typos and rewriting sentences for clarity.
  • Model optimization: Fine-tuning the LLM’s internal parameters to improve its efficiency and accuracy on specific tasks. Picture it as athletes practicing specific skills to enhance their performance.

Regular Consolidation for LLMs:

Regularly implementing such “stage 3” consolidation phases for LLMs could offer several benefits:

  • Improved accuracy and reliability: By continuously refining its knowledge and correcting errors, the LLM would become more trustworthy and less prone to generating misleading or biased outputs.
  • Enhanced adaptability: The LLM could better adjust to new information and situations by readily integrating them into its existing knowledge base.
  • Reduced training time and resource consumption: By addressing biases and optimizing performance internally, the need for frequent retraining with large datasets might be reduced.

Achieving Consolidation in LLMs:

Several approaches could be used to implement regular consolidation in LLMs:

  • Periodic retraining on curated datasets: Instead of retraining on massive datasets, the LLM could be exposed to smaller, targeted datasets specifically designed to address identified weaknesses or introduce new information. [akin to sleeping?]
  • Internal reinforcement learning: The LLM could be equipped with mechanisms to self-evaluate its outputs and identify areas for improvement. It could then use this feedback to refine its internal knowledge base without external intervention. [ditto]
  • Meta-learning approaches: The LLM could be trained to “learn how to learn,” enabling it to adapt its learning strategies and optimize its internal processes independently.

Visualization of Consolidation:

Imagine the LLM’s knowledge base as a vast network of interconnected nodes representing concepts and relationships. During consolidation, these nodes would be strengthened, pruned, and reorganized to create a more robust and efficient knowledge structure.

The Future of LLM Consolidation:

Regular consolidation holds immense potential for the future of LLMs. By continuously refining their knowledge and performance, LLMs can become even more valuable tools in various fields, from scientific research and creative writing to education and healthcare. As research in this area progresses, we can expect even more innovative approaches to LLM consolidation, paving the way for even more powerful and versatile language models. End of Bard output

An important aspect not covered here is validation. How do we validate our knowledge? By debate and by checking against other sources, certainly. But don’t forget that we are notoriously unreliable witnesses — ask any policeman. How do we agree on what is ‘true’ and can we reasonably expect AI to make that decision? I’m getting off track here but anyway, you might say ‘AI has access to a camera’, it must be right. But it’s not that simple if you consider the use of video assistant referees in sports. Enough!

Back to reality

I thought that the response was quite good given the limited extent of my understanding. However, one paragraph struck me in particular:

  • Memory consolidation: Strengthening the connections between learned concepts and relationships within the LLM’s internal knowledge base. Imagine it like revisiting and reorganizing notes after attending a lecture

What structure/mechanism does the human brain have to do this? Surely it must be short-term memory? Not so, it’s too short to hold a day’s worth of input:

Short-term memory (or “primary” or “active memory”) is the capacity for holding a small amount of information in an active, readily available state for a short interval. For example, short-term memory holds a phone number that has just been recited. The duration of short-term memory (absent rehearsal or active maintenance) is estimated to be on the order of seconds. The commonly cited capacity of 7 items, found in Miller’s Law, has been superseded by 4±1 items. In contrast, long-term memory holds information indefinitely. (Wikipedia)

It seems that there is a third process operating (at least that’s what Bard told me). The hippocampus at the base of our skulls constantly replays short-term memory during the day, creating the initial links in long-term memory which are reinforced during stage 3 sleep.

When I think about my own brain, I am aware of being preoccupied after what I’ll call ‘a memory-worthy event’; during that preoccupation I can be a little tetchy, feeling overloaded, feeling as if I need to sleep. That may be why since I was in school I needed to take a nap during the day to ‘recharge’, waking up refreshed after as little as a few minutes. And yes, I was punished in school for falling asleep in early afternoon lessons.

Can we translate that to an LLM?

I asked Bard and the response was, to my way of thinking, pretty good.

Me:

Propose ways in which a process such as you outlined with the hippocampus could be realised in an LLM

Bard:

Implementing a process similar to the human hippocampus in an LLM holds great promise for boosting its learning, memory, and performance. Here are some potential approaches:

1. Replay and Refinement Mechanisms:

  • Internal Attention: Train the LLM to selectively “replay” important information by allocating internal attention to specific parts of its learned representations. This could involve techniques like gating mechanisms or self-attention.
  • Variational Inference: Utilize probabilistic models to introduce noise and variations during replay, encouraging the LLM to refine its representations and generalize better.
  • Meta-Learning: Equip the LLM with the ability to learn how to learn, allowing it to optimize its replay strategies and improve its internal memory management.

2. Consolidation-like Processes for Long-Term Storage:

  • Synaptic Pruning: Implement mechanisms similar to synaptic pruning in the human brain, where less relevant connections are weakened or removed over time, focusing resources on core memories.
  • Knowledge Distillation: Transfer refined and compressed representations of the LLM’s knowledge to a separate, dedicated long-term memory store. This could involve techniques like teacher-student learning or knowledge graphs.
  • Hierarchical Network Architectures: Build LLMs with multiple layers, where lower layers represent short-term information and higher layers hold consolidated, long-term knowledge.

3. Leveraging Sleep-like Inactivity:

  • Scheduled Downtime: Allocate periods of controlled inactivity for the LLM, mimicking sleep in humans. During this time, the LLM could analyze and consolidate internal representations without external input.
  • Simulated Replay and Consolidation: Implement algorithms that mimic the brain’s replay and consolidation processes during downtime, even if the LLM itself is not physically “sleeping.”
  • External Memory Access: Design LLMs that can periodically access and update external knowledge repositories during downtime, similar to how the human brain interacts with the environment during sleep.

Challenges and Considerations:

Implementing these approaches effectively presents several challenges:

  • Computational overhead: Replay and consolidation processes can be computationally expensive, requiring careful balancing with real-time performance.
  • Data efficiency: Ensuring proper learning and consolidation with limited training data requires careful algorithm design and optimization.
  • Interpretability and control: Understanding and controlling the internal processes of the LLM becomes even more complex with additional memory management mechanisms.

Overall, incorporating hippocampus-inspired processes holds significant potential for improving LLM capabilities. By addressing the challenges and refining the approaches, we can unlock the next level of intelligent artificial systems. End of Bard output

There you have it

Is it a clever answer? Well, I guess it’s just a replay of what it knows, but isn’t that what we all do when we explain something? But would it enable AI to conceptualise, have insight, and become a practical Artificial General Intelligence? That’s yet another question for another day.

Can it be implemented technically? I’ll just point out (without getting into discussions about ‘soul’, consciousness, and self-awareness) that our brain is basically a chemical device. We should be able to develop and implement an analog, given enough time.

Think about it. Wonder about how you dream, what they mean, and what purpose they serve — if you can remember any, because not everyone can. And I have one very vivid dream still in my conscious memory from over 40 years ago!

Finally, I’ll just say that the more I know about AI, the less I like the look of the future.

I have no affiliation with Google and I am not an Alphabet shareholder. And yes, artificial intelligence was used to write this article, where indicated!

Artificial Intelligence
Psychology
ChatGPT
Bard Ai
Large Language Models
Recommended from ReadMedium