← Latest papers
🤖 AI

Tensor Memory: Fixed-Size Recurrent State for Long-Horizon Transformers

This paper introduces Tensor Memory, a lightweight module that augments Transformers with a fixed-size, recurrent 3D memory tensor to decouple state capacity from sequence length while preserving spatial inductive biases for improved long-horizon video understanding and occlusion-sensitive reasoning.

Original authors: Kabir Swain, Sijie Han, Daniel Karl I. Weidele, Mauro Martino, Antonio Torralba

Published 2026-05-28
📖 4 min read☕ Coffee break read

Original authors: Kabir Swain, Sijie Han, Daniel Karl I. Weidele, Mauro Martino, Antonio Torralba

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to remember a long, complex story, like a movie with hundreds of scenes.

The Problem: The "Infinite Scroll" Memory
Current AI models (Transformers) work a bit like a person trying to remember a movie by keeping every single frame they've ever seen on a giant, ever-expanding table in front of them.

  • The Issue: As the movie gets longer, the table gets huge. It becomes expensive to manage, and the person gets overwhelmed trying to find specific details among thousands of scattered frames.
  • The Weakness: If a character in the movie is hidden behind a tree (occlusion) for a while, the AI has to look back through all those scattered frames to guess where the character is. It doesn't have a single, organized "mental map" of where things are right now.

The Solution: The "Smart Filing Cabinet"
The authors propose a new module called Tensor Memory. Think of this as giving the AI a small, fixed-size 3D filing cabinet (a voxel grid) that sits next to its brain. No matter how long the movie or document is, the cabinet stays the same size.

Here is how it works, step-by-step:

  1. Writing to the Cabinet (The "Soft Drop"):
    Instead of shoving a note into a specific, rigid drawer, the AI predicts where in the 3D space of the cabinet the information belongs. It then "drops" the information like a soft, glowing cloud (a Gaussian volume) around that spot.

    • Analogy: Imagine dropping a drop of ink into a sponge. It doesn't just hit one fiber; it spreads out slightly, filling the area around the target. This allows the AI to be flexible about exactly where it puts the memory.
  2. Updating the Cabinet (The "Recurrence"):
    The cabinet isn't static. It has a built-in mechanism (like a gentle, local breeze) that mixes the new information with what was already there. This allows the AI to update its "belief" about the scene. If a character was behind a tree and then walks out, the cabinet updates to reflect the new reality without needing to re-read the whole movie.

  3. Reading from the Cabinet (The "Targeted Search"):
    When the AI needs to remember something, it doesn't scan the whole table of frames. It predicts a coordinate (a specific X, Y, Z spot) in the cabinet and "sniffs" that area to pull out the relevant context.

    • Analogy: Instead of flipping through every page of a book to find a name, you go straight to the index, find the page number, and read that specific line.
  4. The Safety Valve (The "Gate"):
    The system has a smart switch (a "gate") that decides whether to use the cabinet at all. If the task is simple and doesn't need long-term memory, the gate closes, and the AI ignores the cabinet to save energy. If the task is hard (like tracking a hidden object), the gate opens, and the AI leans on the cabinet.

Why This Matters (According to the Paper)
The authors tested this idea on three main things:

  • Language: On a text dataset (WikiText-2), using this cabinet helped the AI understand long sentences much better, reducing its confusion (perplexity) significantly compared to standard models.
  • Images: When trying to reconstruct missing parts of an image, the AI with the cabinet did a slightly better job at keeping the structure correct.
  • Video: In a video game-like task (UCF-101), the AI with the cabinet was better at recognizing actions, especially because it could maintain a "state" of the scene even when objects were temporarily hidden.

The Trade-off
The paper admits there is a cost. Because the AI has to constantly update this 3D grid, it takes longer to train (the "wall-clock time" was much higher for video tasks). However, the benefit is that the AI no longer needs an infinitely growing table of past tokens; it has a compact, persistent, and organized way to remember the world.

In short, Tensor Memory gives Transformers a small, fixed-size "world model" they can write to and read from, allowing them to handle long, complex stories without getting lost in a sea of data.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →