Track
If you've trained a neural network, you've probably called optimizer.step() thousands of times. You know it uses the computed gradients to update the model's weights and reduce the training loss, and that's usually the end of the story.
But nested learning asks you to look at the optimizer differently. It interprets adaptive optimizers like Adam as learning processes with their own evolving state. Nested Learning was introduced by Google Research in the NeurIPS 2025 paper "Nested Learning: The Illusion of Deep Learning Architectures."
In this article, we'll explore what nested learning is, how it works, why it matters, and how the Hope architecture puts it into practice. If you've trained a model with Adam or SGD before, you already have the background needed to follow along.
TL;DR
- Nested Learning is a machine learning paradigm from Google Research that treats a model as a set of nested optimization problems learning at different speeds, rather than one architecture trained by a separate optimizer.
- It targets catastrophic forgetting: the problem where fine-tuning on new data overwrites what a model already knew, which is the main thing that makes continual learning hard.
- The core shift is treating the architecture and the optimizer as the same kind of thing, different levels of learning that update at different rates, so new information can enter through fast components without erasing slow, stable knowledge.
- Hope is the paper's proof-of-concept architecture: a self-modifying variant of Titans paired with a Continuum Memory System (CMS), where memory modules update across a spectrum of speeds instead of a fixed short-term/long-term split.
- In the paper's tests, Hope beat baselines like Titans, Samba, and a standard transformer on language modeling and common-sense reasoning, and held up on long-context retrieval and continual learning.
- It's early-stage research. There's no official implementation and no
pip install, only community reproductions on GitHub, so treat it as a direction to watch rather than something production-ready.
Master Deep Learning in Python
What Is Nested Learning?
Nested Learning is a machine learning paradigm that treats a single model not as one architecture trained by a separate optimizer, but as a set of nested optimization problems that each learn at their own speed. It reframes the model's architecture and its training algorithm as the same kind of thing, different levels of learning that run and adapt at the same time.
It organizes a machine learning system into multiple learning levels that operate at different timescales.
- The parameter level learns slowly across thousands of training steps.
- The memory level decides what information to retain across recent inputs.
- The optimizer level learns how to update the levels below it.
Higher levels can influence how lower levels behave, which is what makes the structure hierarchical rather than just modular.
Key principles of nested learning
Nested learning follows these four key principles:
- Architecture and optimization are part of the same learning system. In Nested Learning, the optimizer becomes part of the learning process and can adapt over time.
- Different components learn at different speeds. A model's core parameters might update slowly over thousands of examples, while a short-term context mechanism updates with every new input, and a memory system updates somewhere in between.
- Depth comes from nested learning processes. Traditional deep learning creates depth by adding layers. Nested Learning creates depth by stacking multiple levels of learning and adaptation, where parameters, memory systems, optimizers, and update mechanisms can all learn at different timescales.
- Learning can continue after deployment. Components such as memory systems and learning mechanisms can continue adapting during inference, too.
Nested learning vs traditional deep learning
For years, we’ve relied on deep learning architecture, where data flows through a neural network, measures how wrong the model's predictions are (called the loss), and runs an optimizer that adjusts the model's parameters to reduce that error.
You repeat this until the model is good enough. Then you freeze the parameters and deploy the model. From that point on, it doesn't learn from new inputs, doesn't adapt to shifts in the data, and doesn't improve with use.
Nested Learning changes that. Along with the model's parameters, memory modules, optimizers, and other components also continue learning over time.
|
Factor |
Traditional deep learning |
Nested learning |
|
Depth |
Depth comes from stacking neural network layers. |
Depth comes from nesting learning processes inside other learning processes. |
|
Learning |
Learning primarily happens during training. |
Learning occurs during training and continues after deployment. |
|
Optimizer |
A fixed tool that updates model weights. |
An adaptive component that can learn and update its own rules. |
|
Memory |
Encoded in model parameters and short-term context. |
Exists across multiple levels and timescales. |
|
Inference |
Model weights are fixed. |
Certain components may continue adapting during inference. |
Why Nested Learning Matters
A model learns new information by updating its parameters, but those same updates can overwrite knowledge it learned earlier. This phenomenon is known as catastrophic forgetting.
Researchers have introduced techniques such as freezing layers, regularization methods like Elastic Weight Consolidation (EWC), and replay buffers to preserve previous knowledge while learning new tasks. But these approaches are designed to protect a model from forgetting, not to fundamentally change how learning happens.
Nested Learning argues that this single-timescale approach is one of the reasons continuous learning remains so difficult. Instead of relying on a single set of parameters to absorb every new piece of information, it spreads adaptation across multiple learning levels.
Different levels adapt at different speeds, making it possible to incorporate new information without constantly rewriting older knowledge. This idea is partly inspired by how human cognition works. After all, not all learning happens at the same pace:
- Reflexes can adapt almost instantly.
- Short-term memories form over minutes or hours.
- Beliefs, habits, and expertise may take months or years to develop.
How Nested Learning Works
Nested Learning organizes a machine learning system into levels, each a distinct learning process with its own role and update speed. To understand how they work, it helps to walk through each one and see how they connect.

The parameter level
Parameters are the weights inside the neural network that store what the model has learned from its training data. During training, the optimizer updates these weights after every batch using the computed gradients.
Each update is small, so meaningful changes happen gradually over many training steps. As a result, the parameter level learns stable, long-term knowledge but is slow to adapt to new information.
The memory level
The memory level captures information from recent inputs that the parameter level is too slow to learn.
Rather than storing everything it sees, it retains the most useful information and discards the rest. This allows the model to adapt to a new context without immediately updating its long-term knowledge.
The optimizer level
The optimizer decides how the model's parameters should be updated during training. It uses the gradients computed from the model's predictions to determine the size and direction of each update.
Adaptive optimizers such as Adam do more than use the current gradient. They also keep track of recent gradients and use that history when computing the next parameter update.
If Adam already does this, what does Nested Learning add?
The difference is in what can be learned. In standard deep learning, the rules governing how Adam updates its state are fixed before training starts and never change. Adam adapts the parameters, but nothing adapts Adam.
Nested Learning introduces a meta-learning process above the optimizer that can evaluate how the optimizer is performing and modify its rules over time. The optimizer stops being fixed infrastructure and becomes something that can itself improve.
How the levels interact
These different levels don't work independently. Information flows between them, and each level influences how the others learn over time.
- The parameter level gradually builds long-term knowledge through training.
- The memory level provides recent context that helps the system respond to new information more quickly.
- The optimizer determines how the parameters are updated.
Together, the levels allow the model to balance short-term adaptation with long-term learning.
The Hope Architecture
Hope is the paper's proof-of-concept architecture, a self-modifying variant of the Titans architecture that Google built to test whether nested learning actually works in practice. It pairs a memory that can rewrite its own update rules with a Continuum Memory System, so it can keep learning at several different speeds instead of freezing after training.
Self-modifying Titans
Titans contain memory modules for storing information that the model considers surprising or important. Instead of relying only on its parameters, the model carries useful information forward through these memory modules.
Hope goes one step further. As new data comes in, the memory modules continue updating. The system also adjusts the rules it uses for future updates. That's why the architecture is called self-modifying.
Continuum Memory System
Most memory architectures split memory into two buckets: short-term and long-term. Information either lives in a fast, temporary store or gets consolidated into stable long-term storage. Hope replaces that binary split with a continuum, a spectrum of memory modules that update at different speeds.
Some memory components update rapidly and capture recent information. Others change more slowly and preserve stable knowledge accumulated over longer periods. That means new information can enter through the fast-updating layers without immediately disrupting slower, more stable memory.
How Hope performs
The paper evaluated Hope on language modeling, long-context reasoning, continual learning, and knowledge incorporation, using different baselines for different tasks. Language modeling and common-sense reasoning were benchmarked against Titans, Samba, and a standard transformer, while the long-context retrieval tasks compared Hope and Titans against TTT and Mamba2.
On language modeling and common-sense reasoning benchmarks, Hope achieved lower perplexity and higher accuracy than all three baselines.

The more telling results came from tasks that require the model to retrieve a specific piece of information buried inside a long context. The paper tested multiple variants of increasing difficulty: pass-key retrieval, number retrieval, and the hardest variant, word-level retrieval. Hope outperformed the baselines across all variants, with the CMS design specifically contributing to the long-context gains.
The architecture also performs well on continual learning benchmarks. When trained across sequences of tasks that typically cause catastrophic forgetting, Hope retains more previously learned knowledge than the comparison models reported in the paper.
Nested Learning vs Other Continual Learning Approaches
Nested Learning isn't the first attempt to address catastrophic forgetting. For years, researchers have proposed continual learning techniques to let models retain previously learned knowledge while learning new tasks. Let’s see the key differences across proposed approaches.
|
Approach |
Elastic Weight Consolidation (EWC) |
Progressive Neural Networks |
Experience Replay |
Nested Learning |
|
Core mechanism |
Adds a regularization term to slow down updates to weights that were important for previous tasks. |
Adds a new dedicated network for each new task, with lateral connections to previously learned networks, so knowledge can transfer forward. |
Stores and replays samples from previous tasks alongside new tasks during training. |
Organizes learning into multiple interacting levels operating at different timescales |
|
How it prevents forgetting |
Preserves previous tasks' weights; earlier knowledge is retained while learning new tasks. |
Earlier networks are frozen and saved. New tasks get their own network, so there's no interference. |
Mixing past examples into current training. |
Levels update at different frequencies, so new information enters through fast components without immediately displacing stable knowledge in slower ones. |
|
Computational overhead |
Low to moderate |
High |
Moderate to high, scales with the size of the replay buffer. |
Still being evaluated |
|
Scalability |
Moderate; protecting more parameters over time can reduce the model's ability to learn new tasks. |
Limited because the model size grows with every new task |
Effective but requires maintaining replay buffers |
Designed to scale, but still early-stage research. |
|
Maturity |
Well established |
Well established |
Widely used |
Early-stage research |
Methods like EWC, Progressive Neural Networks, and Experience Replay are neural networks that slow down forgetting during training. The underlying architecture remains largely the same.
Nested Learning rethinks the architecture itself, so that learning happens across multiple levels and timescales: fast-changing memory handles recent experience, while slower-changing parameters capture long-term knowledge.
Nested Learning in Practice
Unofficial community reproductions have started appearing on GitHub, giving researchers a way to experiment with the architecture and attempt to reproduce the published results.
That said, Nested learning has no official integrations with major deep learning frameworks, and you can't simply pip install nested learning and add it to an existing PyTorch or JAX project. Building and evaluating these models still requires working directly with research code.
But the direction is focused on community adoption. So watch for Hope or Continuum Memory System (CMS) modules to be integrated into mainstream frameworks and adopted in production systems.
Final Thoughts
Nested Learning challenges one of the core assumptions behind modern deep learning. Instead of making models more capable by stacking more layers, it explores whether intelligence can emerge from multiple learning processes operating at different timescales.
That shift also changes how we think about optimization. Traditional deep learning treats the model architecture and the learning algorithm as separate components. Nested Learning brings them closer together with the aim of making learning itself hierarchical.
It's still the early days. Nested Learning remains an active area of research, and many of its ideas will need broader validation before they become part of mainstream machine learning. If you'd like to build a stronger foundation in the concepts behind nested learning, including neural networks, optimization, and memory mechanisms, I recommend checking out our comprehensive Deep Learning in Python track.
Nested Learning FAQs
What is continuous learning in LLM?
Continuous learning in LLMs is the ability of a model to keep learning from new data without forgetting its previous knowledge. Most LLMs don't do this well out of the box. When you fine-tune them on new information, they tend to overwrite old knowledge. Continuous learning research is specifically about solving that.
Does nested learning require multiple machine learning models?
Not necessarily. Nested learning is more about organizing learning tasks into multiple levels than using multiple models. Some implementations use a single model with nested training stages or hierarchical representations, while others combine several specialized models.
Is nested learning computationally expensive?
It can be, but not always significantly so. The additional cost comes from maintaining and updating the higher-level learning process alongside the model's regular training. Modern nested learning architectures like Hope are designed with efficiency in mind, making them practical for many research environments. However, deploying nested learning in production is still an open area.
When should you avoid using nested learning?
If your data distribution isn't going to change and you just need strong performance on a fixed benchmark, nested learning adds complexity without much payoff. It's also worth avoiding when interpretability matters a lot. The more the learning process adapts itself, the harder it becomes to explain what the model is actually doing and why.
How do you choose between nested learning and transfer learning?
They're solving different problems. Transfer learning takes what a model learned in one domain and applies it to another. It’s a one-time adaptation. Nested learning is about building a system that keeps adapting over time as new information arrives. If you have a fixed target task, transfer learning is simpler and usually sufficient. If your environment is dynamic and the model needs to stay current, nested learning is more appropriate.
Srujana is a freelance tech writer with the four-year degree in Computer Science. Writing about various topics, including data science, cloud computing, development, programming, security, and many others comes naturally to her. She has a love for classic literature and exploring new destinations.


