Overview
This post from zhichai.net discusses two Google Research architectures—Titans and MIRAS—aimed at solving the long-context memory problem in Transformers. The central claim: by combining the speed of recurrent models with attention's global insight, and by learning *at test time*, AI can scale context windows to 2 million tokens.
Key points
1. The Transformer bottleneck
- Self-attention computes \(Attention(Q, K, V) = softmax(\frac{QK^T}{\sqrt{d_k}})V\); at N = 2 million tokens, the \(QK^T\) matrix requires O(N²) space and time.
- Existing alternatives trade performance for speed:
- Linear RNNs compress context into a fixed-size state (O(N)) but lose details.
- State-space models (SSMs) improve information flow but still miss long-range dependencies.
- Core component: a Neural Long-Term Memory Module—a multi-layer perceptron (MLP) updated dynamically at inference time via Test-Time Training, rather than a static recurrent vector.
- MAC (Memory as Context) variant: distills long-term memory into a historical summary passed to attention layers alongside short-term input, preserving key context without re-reading everything.
- Surprise Metric: quantifies deviation of new input from stored memory, e.g. \(Surprise = D_{KL}(P_{new} \| P_{memory})\); low surprise → short-term storage, high surprise → committed to long-term memory.
- Reported to scale to 2 million tokens, beating baselines on needle-in-a-haystack tasks.
- YAAD: uses Huber Loss for robustness to outliers.
- MONETA: generalized norms to tightly regulate attention and forgetting.
- MEMORA: probabilistic (Bayesian) memory updates, \(P(m_t | x_t) \propto P(x_t | m_{t-1}) P(m_{t-1})\).
- At NeurIPS 2025, Jeff Dean, asked by narrative whether Google regretted publishing the Transformer (a jab referencing a Hinton remark), answered no—sharing it benefited the world.
- The post frames Titans + MIRAS as part of Google's broader momentum (Nano Banana, Gemini 3 Pro).
2. Titans: dynamic long-term memory
3. MIRAS: a unified framework for sequence modeling
MIRAS decomposes any sequence model into four design pillars: 1. Memory architecture — from vectors to dynamic MLPs. 2. Attention bias — internal optimization objective determining what the model prioritizes. 3. Retention gate — controls forgetting, e.g. \(Gate = \sigma(W \cdot [h_t, m_{t-1}])\). 4. Memory algorithm — update objective, from MSE to non-Euclidean losses.Derived models:
The post reports these models outperform linear-recurrent rivals like Mamba 2 and rival much larger models on very long contexts.
4. Industry context
Takeaway
The post argues the future of AI memory lies in adaptive, test-time learning—models that selectively store surprising information and compress the rest—rather than ever-larger attention matrices. Suggested applications include legal document review, longitudinal medical records, and conversational agents with lifelong memory.
References
1. Titans & MIRAS: Helping AI Have Long-Term Memory — Google Research Blog 2. Titans: A New Architecture for Long-Term Memory in Sequence Models — arXiv:2501.00663 3. MIRAS: A Unified Framework for Sequence Modeling — arXiv:2504.13173 4. Transformer Limitations and Beyond: A Survey on Long-Context Modeling — NeurIPS 2025 Proceedings 5. Test-Time Training: Enabling Adaptive Inference in LLMs — Google DeepMind Whitepaper