How Do Vision Transformers Remember Past Frames? Scaling Memory Independently of the Backbone

MeT adds recurrent state memory to vision transformers, allowing memory capacity to scale independently of the backbone. It substantially outperformed equally sized ViTs on THUMOS14 and SSv2.
← All posts
온
온틀 리서치
2026년 12월 01일 Updated 2026.12.02 34 min read views 7

MeT (Memory Transformer), developed by researchers at Huazhong University of Science and Technology and the University of Salerno, gives vision transformers (ViTs) a memory component that can grow independently of the backbone. Traditionally, making a model more capable meant increasing its width or depth. MeT adds a third scaling dimension: recurrent state width. Increasing this dimension alone improves accuracy, while the memory carried through a video stream stays fixed in size, however long the stream gets.

The Problem This Paper Addresses

Time is one of the hardest parts of video understanding. A photograph contains all the information available to the model, but understanding a video frame requires recalling what happened a moment earlier. A single image cannot tell you whether someone is picking up a bowl or putting it down.

Approaches to this problem have broadly fallen into three groups. The first is spatiotemporal attention, which mixes multiple frames through attention. It performs well, but retaining past frames in full makes costs grow sharply as the sequence gets longer. The second caches past activations for later reuse, but that cache also grows with the history. The third uses recurrence to compress the past into a summary vector or a few slots and pass it to the next segment.

MeT asks a slightly different question: “Can we insert persistent visual state directly into the process of building spatial features, making memory capacity an independent scaling dimension?” Most existing approaches treat memory as an attachment outside the backbone. The backbone extracts features first, and a separate module organizes temporal information on top. MeT brings memory inside the backbone.

The Core Idea

Think of conventional approaches as a clerk who watches a video and then writes a summary in a notebook. MeT instead lets traces of earlier scenes blend into the current view as the model watches. Memory becomes part of seeing, rather than something produced afterward.

Specifically, MeT inserts “token memory” between ViT blocks. Each frame is represented by one CLS token and multiple patch tokens. At each memory stage, the current spatial features update a recurrent state for each token—the hidden state of a GRU—and the result is fed back into the token features through a residual readout. The key is that the recurrent state width d is completely separate from the spatial backbone width D. The GRU maps its input into a d-dimensional state, and the readout maps it back to D dimensions. Increasing d therefore expands memory capacity without changing the backbone.

Each update uses only the current input and the previous state. Because it never looks at future frames, MeT supports causal, frame-by-frame inference, and its state does not grow with the number of frames: it is bounded. Whether a video runs for 10 minutes or 1 hour, the amount of memory carried forward stays the same. The state resets to zero when a new video begins.

The researchers compared four memory block designs: RG-LRU, which combines local temporal mixing with gated retention; Window Attention, which directly accesses the most recent eight frames; Slot Memory, which uses eight slots shared across tokens; and PreLN-GRU, which wraps a GRU with LayerNorm. They tested all four at the midpoint of a ViT-Small backbone—block 6 of 12—with both patch and CLS tokens as inputs. PreLN-GRU scored highest, reaching 42.07 mAP on THUMOS14 and 52.06 Top-1 on SSv2. It beat the runner-up on each metric by 1.30 mAP and 1.69 Top-1, respectively. MeT adopts PreLN-GRU as its standard design.

Where memory is inserted, and at how many stages, also mattered. Input comparisons on ViT-Small showed that retaining patch history outperformed retaining only CLS history on both benchmarks, with patch and CLS tokens together performing best. Interestingly, moving a single memory stage deeper, from block 6 to blocks 9 or 12, increased THUMOS14 mAP but reduced SSv2 Top-1, with a loss of up to 5.75 Top-1 at the deepest insertion point. This favored placing memory at an intermediate depth, allowing subsequent spatial mixing to integrate the memory readout. In experiments distributing memory across multiple stages, a four-stage layout at blocks 3, 6, 9, and 12 achieved the highest THUMOS14 mAP. It also came within 0.41 points of the SSv2 Top-1 score achieved by placing memory in every block, while reducing state size by 72.7%. This four-stage layout became the default for MeT-Small and MeT-Base.

How the Experiments Were Designed

The researchers chose two benchmarks with different demands. THUMOS14 tests frame-level online action recognition, or causal action recognition, measuring frame-level mAP across 20 classes at 4Hz using only current and past observations. Training uses 200 validation videos, and evaluation uses 213 test videos. In other words, the model must judge the present without knowing the future, as it would in a live stream. SSv2 (Something-Something v2), by contrast, is a clip-level video classification task with 174 classes. Its official split contains 168,913 training videos and 24,777 validation videos. One frame is sampled from each of 32 temporal segments. The dataset is known for actions where temporal order determines the answer, such as “pushing something from left to right.”

Using both tasks serves a deliberate purpose. THUMOS14 tests causal streaming capabilities, while SSv2 tests reasoning about temporal order. The comparisons were also controlled for fairness. TRecViT, standard ViT, and MeT all used the same ViT-Large backbone to isolate the temporal modeling approach; only VideoMamba-M retained its own Mamba backbone. Feature-stream baselines, including CMeRT, MiniROAD, MAT, TeSTra, and Colar, trained their modules on frozen features from a ViT-Large that had already been trained on the task.

Efficiency was measured on a single RTX PRO 5000 Blackwell GPU. The metrics to watch are State/stream, the state or cache carried per video; per-frame latency, the average time to process one frame under causal framewise inference; and GPU peak, the allocated VRAM when processing four 32-frame clips together. These metrics show how much memory and time each accuracy gain costs. One caveat matters here: latency and State/stream assume causal framewise inference. Non-causal methods that process the whole clip at once—VideoMamba, Frame2Freq, and DejaVid—therefore have dashes (—) in those table cells. Even numbers in the same column are not directly comparable if the inference settings differ.

Results and What They Mean

Start with the largest gains. Compared with an equally sized ViT-Large, MeT-Large improved THUMOS14 mAP by 6.69 points (42.53→49.22) and SSv2 Top-1 by 26.91 points (31.57→58.48). These are improvements on two different benchmarks, not a single result. The 26.91-point SSv2 gap deserves particular care. A standard ViT has no temporal modeling and simply averages CLS features over time, leaving it poorly equipped for a task where temporal order is essential: ViT-Large reaches just 31.57 Top-1. The large gap therefore reflects both MeT’s strength and the static frame model’s fundamental mismatch with the task. A fairer comparison is TRecViT-Large, which performs temporal recurrence using the same backbone. MeT-Large still leads it by 2.28 mAP on THUMOS14 (46.94→49.22).

The efficiency figures are the paper’s strongest selling point. MeT-Large uses 92.7% less persistent state than TRecViT-Large and runs causal framewise inference approximately 3.0 times faster: 6.18ms versus 18.46ms per frame. The smaller model offers an even more striking tradeoff. MeT-Small (25.82M) uses less than 1/10 of ViT-Large’s parameters and per-frame FLOPs, yet beats it on both benchmarks: 44.93 versus 42.53 on THUMOS14, and 55.66 versus 31.57 on SSv2. On SSv2, it also outperforms every non-MeT baseline. MeT-Base (102.36M) beats TRecViT-Large on both benchmarks with approximately 27% of its parameters and 26% of its per-frame FLOPs.

The experiments also confirmed the two scaling trends central to the paper’s argument. Increasing only the GRU hidden width d while keeping the backbone fixed steadily improved accuracy, with almost no change in per-frame latency. Scaling up the model itself brought further gains, even when memory width was held constant. These trends appeared across three model sizes and fifteen capacity settings, with accuracy averaged over three seeds. That supports treating memory as a resource that can scale independently.

Limitations and Open Questions

Start with a tradeoff the authors’ tables make clear: insertion depth and layout affected the two tasks differently. Deeper memory insertion improved THUMOS14 but hurt SSv2, and the four-stage layout did not achieve its best THUMOS14 mAP and best SSv2 score under the same setting. The optimal placement therefore depends on the task. It is hard to argue that one configuration is best for every video task.

The evaluation scope also deserves attention. The reported comparisons focus on THUMOS14 and SSv2. Both impose meaningful demands, but they do not cover the full range of video understanding, including long-form video, multi-object tracking, and longer temporal dependencies. As discussed earlier, the huge gains against a “same-size” ViT also reflect that baseline’s structural weakness. Comparisons with temporal models such as TRecViT are a fairer measure than the headline improvement alone.

Two questions remain for me. First, how far does the trend of “more memory capacity, higher accuracy” extend? The excerpts do not reveal where it saturates. Second, THUMOS14 and SSv2 involve relatively short windows of around 32 frames. These results alone do not establish whether bounded state can preserve accuracy over extremely long videos spanning thousands of frames.

Comparison with Other Approaches

Within the landscape laid out by the paper, the distinctions are clear. Spatiotemporal attention is powerful because it accesses an entire clip at once, but it is either non-causal or incurs costs that scale with sequence length. Activation caching reuses past features, but its cache grows. Memory-token and slot-based recurrence pass summaries forward, but capacity is tied to the number of retained vectors. Most of these approaches place memory in an external module that organizes past evidence for a task readout.

MeT’s distinction is to couple memory directly to multiple depths where spatial features are being formed, making persistent context part of the backbone. It also separates recurrent width from spatial feature width, allowing the capacity of the dynamic visual state to be adjusted independently of spatial model capacity. Its closest rival, TRecViT, also uses per-token recurrence with the same ViT-Large backbone. The central finding of Tables 5 and 6 is that MeT’s hierarchical token states and residual readouts achieve much smaller persistent state and faster causal inference.

ONTLE’s Take

One job of ONTLE’s AI PM is to follow project activity over weeks—daily standups, Slack threads, evolving documents—and determine whether the latest report aligns with a decision made last week. A common implementation today rereads a long trail of past logs and feeds them into the context for every judgment. As conversations grow, so does the history that must be included, driving up both cost and latency. The principle MeT demonstrates in video—updating recurrent state using only the current input and previous state, while keeping its size independent of input length—offers a way to think about this exact problem.

Consider a concrete scenario. Three weeks into a launch project, an AI PM needs to determine whether a bug reported by QA today stems from a decision deferred last week. Borrowing MeT’s design, the PM would carry a fixed-size state for each project, updating it with each new event and using it to make judgments, instead of reinserting three weeks of logs every time. Because state size is independent of input length, per-frame latency—or here, decision latency—would remain nearly constant as the project grows. And just as MeT scales memory capacity separately from backbone size, a similar separation could keep the reasoning model unchanged while expanding the state that holds project context to capture longer dependencies.

The boundary is clear, though. MeT is a vision architecture built around visual tokens and GRU states; it is not directly equivalent to context management in a language agent. What transfers here is the design philosophy, not the code: carry memory as bounded state instead of repeatedly injecting external logs, and treat its capacity as a scaling dimension independent of reasoning capability. The implication is that this approach could help flatten the cost and latency curves of PM agents following long-running projects.

A Checklist for Practitioners

  • Design memory capacity and model size as separate scaling dimensions. MeT separates recurrent state width d from backbone width D and depth L, allowing accuracy to improve by increasing d alone. Check whether context capacity and reasoning capability are unnecessarily tied together in your system.
  • Measure whether state grows with input length. Bounded state is MeT’s central advantage. If the state carried forward grows linearly with the stream, it will become an obstacle to long-duration processing.
  • Measure latency while increasing capacity. MeT reports almost no change in per-frame latency as memory capacity scales. Expanding capacity without tracking latency can undermine performance in production.
  • Expect insertion depth and the number of stages to affect tasks differently. In this paper, deeper insertion helped THUMOS14 but hurt SSv2. Validate placement for each task rather than applying one layout everywhere.
  • Account for a baseline’s structural limitations when interpreting gains. The large gap over ViT on SSv2 reflects ViT’s lack of temporal modeling. Before citing “+N points over a same-size model,” check whether the baseline is equipped to handle the task.
  • Distinguish measurements made under causal streaming from those made with whole-clip processing. Latency and state metrics assume causal framewise inference. Sharing a table with non-causal methods does not make them directly comparable.
Is MeT only for vision, or could it work with language models too?

This paper targets vision transformers (ViTs) and evaluates only video tasks. Per-token GRU recurrence and residual readouts could conceptually be mapped to language tokens, but the paper does not test that transfer, so these results do not establish language-model performance. The defensible takeaway is the design principle of bounded state with independently scalable capacity.

What exactly is being compared in “92.7% less state” and “approximately 3 times faster”?

Both compare MeT-Large with TRecViT-Large on THUMOS14. MeT-Large uses 5.66MB of persistent state versus TRecViT-Large’s 77.46MB, approximately 92.7% less. Causal framewise inference takes 6.18ms versus 18.46ms, making it approximately 3.0 times faster. These figures are not comparisons with standard ViT or other baselines.

Why is the improvement particularly large on SSv2?

SSv2 is a dataset where the temporal order of actions determines the answer. Standard ViT has no temporal modeling and simply averages frame features, putting it at a structural disadvantage on this task (ViT-Large Top-1 31.57). The 26.91-point gap to MeT-Large’s 58.48 reflects both MeT’s strength and the mismatch between a static frame model and the task. TRecViT-Large (54.31), which uses temporal recurrence with the same backbone, is a fairer comparison.

Under what conditions was PreLN-GRU the best of the four memory designs?

The comparison used the same recipe with both patch and CLS tokens at block 6 of a 12-block ViT-Small backbone (Table 1). Under these conditions, PreLN-GRU scored 42.07 mAP on THUMOS14 and 52.06 Top-1 on SSv2, outperforming RG-LRU, Window Attention, and Slot Memory. This comparison alone does not establish whether the ranking holds for other backbones or insertion depths.

Does keeping state bounded hurt accuracy?

Compressing the past naturally raises concerns about information loss. Within the scope of this paper—THUMOS14 and SSv2, with around 32 frames—bounded state still allowed MeT to outperform equally sized ViT and TRecViT models in accuracy. The reported results do not yet establish whether that balance holds for extremely long videos spanning thousands of frames.

References