Memory Transformer
Native Scalable Memory Models with Transformers
Making native visual memory an independently scalable architectural resource, establishing two scaling trends with compact states and low computational overhead
1 Huazhong University of Science and Technology2 University of Salerno
Abstract
We introduce Memory Transformer (MeT), a novel method for native visual memory modeling that opens a new scaling dimension for vision Transformers. Its hierarchical memory maintains recurrent states updated from spatial features and returned through residual readouts, making persistent context an intrinsic part of the representation hierarchy. A separate hidden-state width controls memory capacity independently of backbone width and depth, while the retained state remains bounded as the input sequence grows. MeT reveals two complementary scaling trends: increasing memory capacity consistently improves accuracy at a fixed spatial backbone, and larger models deliver further gains at matched memory widths. Studies spanning three model sizes and fifteen capacity configurations demonstrate these gains with compact states and low computational overhead relative to same-size ViTs; per-frame latency remains nearly unchanged during memory scaling. On THUMOS14 and SSv2, MeT-Large outperforms state-of-the-art methods in accuracy, improving mAP and Top-1 accuracy over same-size ViTs by 6.69 and 26.91, respectively, with comparable parameter counts, GFLOPs, and GPU peak. Compared with TRecViT-Large, MeT-Large uses 92.7% less persistent state and provides approximately 3.0× faster causal framewise inference. MeT establishes native visual memory as an independently scalable architectural resource, opening a direct route to stronger visual models.
Two axes of scaling
- MeT
- ViT
Measured accuracy at fixed backbone and memory layout. MeT backbones are initialized from official ImageNet-1K-pretrained ViT weights. Controlled comparisons at matched spatial backbone sizes. At each size, the MeT and ViT backbones are initialized from the same official ImageNet-1K-pretrained ViT weights. The paper describes the experimental setup and evaluation protocol for each benchmark.
Accuracy gains and resource ratios
Resources relative to same-size ViT
Measured values
MeT-Large over ViT-Large · THUMOS14
MeT-Large over ViT-Large · SSv2
MeT-Large vs. TRecViT-Large · THUMOS14
Causal inference vs. TRecViT-Large · THUMOS14
Architecture
Persistent state at multiple feature depths
MeT interleaves ViT blocks with recurrent memory stages. A pre-normalized GRU updates token states, and residual readouts bring their history into the current features. Intermediate stages carry patch and CLS history into subsequent spatial blocks, while the final stage refines the CLS representation for prediction. The recurrent width H controls how much state each token carries.
Experiments
Memory scaling raises accuracy at nearly constant latency
Across fifteen configurations, wider recurrent states improve accuracy at each backbone size. Increasing memory width changes measured THUMOS14 latency by at most 0.03 ms per frame within each size. MeT-Small exceeds ViT-Large on both benchmarks with less than one-tenth of its parameters and per-frame FLOPs.
Visual showcases
Recognizing actions over time
Compare ViT-Large, TRecViT-Large, and MeT-Large on THUMOS14 for causal online action recognition at the frame level and on SSv2 for clip-level video classification.
THUMOS14
Play each clip to follow its recorded 4 Hz action scores. Green shading marks ground-truth action intervals.
Something-Something V2 (SSv2)
The predictions and softmax scores are clip-level results from 32 sampled frames.
More information
Contact
Hi, I’m Ziyang Xu, a second-year Ph.D. student at Huazhong University of Science and Technology. My research spans visual generation, perception, and memory, with a current focus on memory modeling for foundation models.
I’m looking for internships and startup opportunities in this area. If you’re excited about building foundation models with scalable memory and exploring their applications, please get in touch through my homepage.
Citation
BibTeX
Coming soon