TL;DR
- The gist: Google Research has unveiled Titans, a new neural architecture that uses test-time training to let models learn and memorize data in real-time during inference.
- Key specs: The architecture achieves effective recall at context windows exceeding 2 million tokens, significantly outperforming GPT-4 on the BABILong benchmark for retrieval tasks.
- Why it matters: Titans substantially mitigates catastrophic forgetting observed in prior linear RNNs on long-context benchmarks.
- The trade-off: While potentially computationally heavier than static inference models like IBM Granite, Titans might offer superior expressivity for complex tasks like legal discovery or genomic analysis.
Google Research has unveiled “Titans,” a new neural architecture that challenges the fundamental rigidity of current AI models by allowing them to “learn to memorize” in real-time during inference.
Unlike traditional Transformers that rely on static weights or Recurrent Neural Networks (RNNs) that use fixed-state decay, Titans employs a “Neural Memory” module. This component actively updates its own parameters as data streams in, effectively treating the context window as a continuous training loop rather than a static buffer.
Demonstrating effective recall at context windows exceeding 2 million tokens, the architecture significantly outperforms GPT-4 on the BABILong benchmark. This “Needle-in-a-Haystack” test challenges models to retrieve specific data points from extensive documents, a task where standard models often fail.
Promo
The ‘Neural Memory’ Paradigm Shift
Current AI architectures face a fundamental trade-off between context length and computational efficiency. Transformers, the dominant architecture behind models like GPT-4 and Claude, rely on an attention mechanism that scales quadratically with sequence length. This makes extremely long contexts computationally prohibitive.
Conversely, linear RNNs like Mamba compress context into a fixed-state vector. While this allows for infinite length, it often results in “catastrophic forgetting” as new data overwrites old information. Titans introduces a third path: “Test-Time Training” (TTT).
Rather than freezing the model’s weights after the initial training phase, the Titans architecture allows the memory module to continue learning during inference. By treating the context window as a dataset, the model runs a mini-gradient descent loop on the incoming tokens. This updates its internal parameters to better represent the specific document it is processing.
As the Google Research team explains, “instead of compressing information into a static state, this architecture actively learns and updates its own parameters as data streams in.”
Through this active learning process, the model adapts its compression strategy dynamically, prioritizing information that is relevant to the current task rather than applying a one-size-fits-all decay function.
To manage computational overhead, Titans employs a “Surprise Metric” based on gradient error. When processing a new token, the model calculates the difference between its prediction and the actual input. A high error indicates “surprise”, meaning the information is novel and should be memorized. A low error suggests the information is redundant or already known.
Using a concrete example, the researchers note that “if the new word is ‘cat’ and the model’s memory state already expects an animal word, the gradient (surprise) is low. It can safely skip memorizing.”
Such selective memorization mimics biological efficiency, allowing the system to discard routine data while retaining critical anomalies or new facts.
Complementing this active learning is an adaptive “Forgetting Mechanism.” Acting as a gate, this function applies weight decay to the memory parameters when the narrative context shifts significantly. By balancing the intake of surprising new data with the controlled release of obsolete information, Titans maintains a high-fidelity representation of the context.
This prevents the model from succumbing to the noise that plagues fixed-state models. The Nested Learning paradigm defines the theoretical basis for this approach:
“Nested Learning reveals that a complex ML model is actually a set of coherent, interconnected optimization problems nested within each other or running in parallel.”
“Each of these internal problems has its own context flow, its own distinct set of information from which it is trying to learn.”
This theoretical foundation posits that architecture and optimization are two sides of the same coin. By viewing the model as a hierarchy of optimization problems, Titans can leverage deep computational depth in its memory module. This solves the “catastrophic forgetting” issue that has long limited the utility of recurrent networks.
Extreme Context & Benchmarks
Most notably, this active memory system handles context windows that break traditional architectures. Google’s benchmarks show that Titans maintains effective recall at context lengths exceeding 2,000,000 tokens. Most widely-used production LLMs, such as GPT-4o, cap out at around 128k tokens, though a few cutting-edge models now reach ~1M.
In the challenging “Needle-in-a-Haystack” (NIAH) tests, which measure a model’s ability to retrieve a specific fact buried in a large volume of unrelated text, Titans demonstrated significant superiority over linear RNN baselines. On the “Single Needle” task with synthetic noise (S-NIAH-PK) at an 8k token length, the Titans MAC variant achieved 98.8% accuracy, compared to just 31.0% for Mamba2.
Performance on natural language data was similarly robust. On the WikiText version of the test (S-NIAH-W), Titans MAC scored 88.2%, while Mamba2 struggled at 4.2%. Such results suggest that while linear RNNs are efficient, their fixed-state compression loses critical fidelity when dealing with the complex, noisy data found in real-world documents.
Benchmark Performance: Titans vs. State-of-the-Art Baselines
Emphasizing capabilities beyond simple keyword search, the Google Research team notes that “the model isn’t simply taking notes; it’s understanding and synthesizing the entire story.” By updating its weights to minimize the surprise of the entire sequence, the model builds a structural understanding of the narrative arc. This allows it to retrieve information based on semantic relationships rather than just token matching.
Google provides a detailed breakdown of the architecture’s defining feature: its memory module. Unlike traditional Recurrent Neural Networks (RNNs), which are typically constrained by a fixed-size vector or matrix memory, essentially a static container that can easily become overcrowded or noisy as data accumulates, Titans introduces a novel neural long-term memory module.
This module functions as a deep neural network in its own right, specifically utilizing a multi-layer perceptron (MLP). By structuring memory as a learnable network rather than a static store, Titans achieves significantly higher expressive power. This architectural shift enables the model to ingest and summarize vast volumes of information dynamically.
Instead of simply truncating older data or compressing it into a low-fidelity state to make room for new inputs, the MLP memory module synthesizes the context, ensuring that critical details and semantic relationships are preserved even as the context window expands into the millions of tokens.
Beyond retrieval accuracy, Titans also shows promise in general language modeling efficiency. At the 340 million parameter scale, the Titans MAC varianbencht achieved a perplexity of 25.43 on the WikiText dataset. Such performance surpasses both the Transformer++ baseline (31.52) and the original Mamba architecture (30.83).
This indicates that the active memory updates provide a better representation of language probability distributions than static weights alone. Ali Behrouz, a lead researcher on the project, highlights the theoretical implications of this design, stating that “Titans are capable of solving problems beyond TC0, meaning that Titans are theoretically more expressive than Transformers and most modern linear recurrent models in state tracking tasks.”
Such expressivity enables Titans to handle state-tracking tasks, such as following the changing variables in a long code file or tracking the plot points of a novel, that often confuse simpler recurrent models.
Efficiency: MIRAS vs. The Market
To formalize these architectural innovations, Google has introduced the MIRAS framework. Unifying various sequence modeling approaches, including Transformers, RNNs, and Titans, the model operates under the umbrella of “associative memory.”
According to Google, the MIRAS framework deconstructs sequence modeling into four fundamental design choices. The first is the Memory Architecture, which dictates the structural form used to store information, ranging from simple vectors and matrices to the deep multi-layer perceptrons found in Titans. This is paired with Attentional Bias, an internal learning objective that governs how the model prioritizes incoming data, effectively deciding what is significant enough to memorize.
To manage capacity, the framework employs a Retention Gate. MIRAS reinterprets traditional “forgetting mechanisms” as specific forms of regularization, ensuring a stable balance between learning new concepts and retaining historical context. Finally, the Memory Algorithm determines the specific optimization rules used to update the memory state, completing the cycle of active learning.

By breaking down sequence modeling into these four components, MIRAS demystifies the “magic” of attention mechanisms. It reclassifies them as just one type of associative memory with specific bias and retention settings. Researchers can thus mix and match components, potentially leading to hybrid architectures that combine the precision of attention with the efficiency of recurrence.
Architectural Paradigm Shift: The MIRAS Framework
Dynamic, high-capacity memory contrasts sharply with the prevailing trend in Edge AI, where the goal is often to shrink static models for local deployment. For instance, the Granite 4.0 Nano launch by IBM introduced models as small as 350 million parameters designed to run on laptops.
While IBM’s strategy focuses on making static intelligence ubiquitous and cheap, Google’s Titans approach aims to make the model itself smarter and more adaptable. This applies even if it requires the computational overhead of updating weights during inference.
Computational overhead, or the “Context Gap,” remains the primary hurdle for Titans. Updating memory parameters in real-time is computationally more expensive than the static inference used by models like Granite or Llama. However, for applications requiring deep understanding of large-scale datasets, such as legal discovery, genomic analysis, or codebase refactoring, the ability to “learn” the document may prove more valuable than raw inference speed.
Serving as the first implementation of this self-modifying vision, the “Hope” architecture was introduced as a proof-of-concept in the Nested Learning paper. As the industry continues to push for longer contexts and deeper reasoning, architectures like Titans that blur the line between training and inference may define the next generation of foundation models.

