TNT: Improving Chunkwise Training for Test-Time Memorization

Zeman Li, Ali Behrouz, Yuan Deng, Peilin Zhong, Praneeth Kacham, Mahdi Karami, Meisam Razaviyayn, Vahab Mirrokni · DOI

Introduction

While Transformers have become the standard for modern artificial intelligence, their quadratic complexity presents a significant hurdle for processing long sequences. Deep Memory Modules, such as Titans and TTT, have emerged as a compelling alternative. These recurrent neural networks (RNNs) "memorize" context by dynamically updating a small internal neural network. However, these models face a persistent efficiency paradox: achieving high performance requires frequent updates on small data segments (chunks), which severely underutilizes modern GPU/TPU hardware and leads to prohibitively slow training.

To address this, the TNT (Titans iNside Titans) framework introduces a hierarchical training paradigm that decouples training speed from inference performance. By combining global long-range memory with parallelized local memories, TNT achieves massive speedups while maintaining or exceeding the accuracy of state-of-the-art baselines.

The Bottlenecks of Deep Memory RNNs

The authors identify three primary bottlenecks that have historically limited the scalability of deep memory models:

  1. The Efficiency-Performance Conflict: High accuracy in deep memory models typically necessitates a small "chunksize" (e.g., updating memory every 16–64 tokens). Unfortunately, small chunks are memory-bound, failing to leverage the full computational throughput of accelerators and resulting in slow wall-clock training times.
  2. The Retrieval Mismatch: During training, these models are optimized to map keys to values. However, at inference, they are queried using query vectors. This shift between the training and inference domains often leads to performance degradation.
  3. Fixed Resolution Inflexibility: Models trained with a specific chunksize often become over-specialized, performing poorly if a different resolution is required at test time.

The TNT Architecture: Hierarchical Memory and Periodic Resets

TNT overcomes these limitations through a structural and procedural overhaul of the deep memory paradigm. The core innovation is a hierarchical memory system that separates long-range context from fine-grained local details.

The TNT architecture featuring global and local memory modules.

As illustrated in the architecture diagram above, TNT utilizes a single Global Memory module to process large, hardware-friendly chunks (2048+ tokens) and multiple Local Memory modules to handle high-resolution details.

A critical component of this system is the use of Periodic State Resets. By resetting local memory states at the start of each sequence shard, the authors break the sequential dependencies inherent in traditional RNNs. This enables massive context parallelization, allowing different parts of a long sequence to be processed simultaneously across multiple devices. To resolve the retrieval mismatch, TNT also incorporates a Q-K Projection layer, which projects query vectors onto the subspace of previously seen keys before querying the memory.

Two-Stage Training Strategy

TNT employs a clever two-stage training process to maximize both speed and accuracy:

  • Stage 1 (Efficiency): The model is pre-trained using large chunks to maximize hardware throughput and move the workload from being memory-bound to compute-bound.
  • Stage 2 (Performance): A brief fine-tuning phase (adding only ~5% extra compute) adapts the local modules to high-resolution, small chunksizes, "sharpening" the model for inference.

Experimental Results

The 150M parameter models were trained on 10 billion tokens of web and book data and evaluated on standard benchmarks including C4, FineWeb, and PG19 for language modeling, and PIQA and HellaSwag for common-sense reasoning.

Training time and speedup comparisons across different models and configurations.

As shown in the performance table above, TNT delivers a dramatic improvement in training efficiency. Specifically, TNT achieved a 17.37x speedup compared to the most accurate Titans baseline when reaching the same target loss. In terms of accuracy, TNT Stage 2 reached an average perplexity of 23.09, outperforming both the base Titans (25.07) and vanilla Transformers (23.58). On common-sense reasoning tasks, TNT achieved 40.9% average accuracy, surpassing the Gated Transformer (39.7%) and base Titans (39.0%).

Conclusion and Future Work

TNT demonstrates that it is possible to decouple training resolution from inference resolution, allowing researchers to train models "coarsely" for speed and refine them later for precision. While TNT already outperforms standard Transformers and other RNNs in reasoning tasks, future work will focus on closing the perplexity gap with advanced Gated Transformers and scaling the framework to multi-billion parameter models. Additionally, the development of custom CUDA or Triton kernels could further unlock the potential of this linear-scaling architecture.

Summary updated

BibTeX
@inproceedings{li2026tnt,
  author = {Zeman Li and Ali Behrouz and Yuan Deng and Peilin Zhong and Praneeth Kacham and Mahdi Karami and Meisam Razaviyayn and Vahab Mirrokni},
  title = {{TNT: Improving Chunkwise Training for Test-Time Memorization}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=rajioNWfRs},
}
Figure