arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.27686cs.CVcs.AI
收藏

张量记忆:用于长程Transformer的固定大小循环状态

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

Massachusetts Institute of Technology, Cambridge, MA, USA(麻省理工学院);IBM Research, Cambridge, MA, USA(IBM研究院);University of Toronto, Toronto, Canada(多伦多大学)

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

AI总结:

提出张量记忆模块,通过固定大小的3D循环张量状态增强Transformer,以解耦状态容量与输入长度,并保持空间归纳偏置,适用于长程视频理解。

摘要:

Transformer通过将空间和时间展平为长令牌序列来处理图像和视频。虽然注意力和KV缓存保留了过去的特征,但其内存随序列长度增长,并且缺乏显式的、持久化的空间状态,这使得长程视频理解和遮挡敏感推理变得困难。我们提出张量记忆,一种轻量级模块,通过固定大小的循环3D记忆张量增强Transformer块:令牌通过可微的软写入将内容沉积为围绕预测连续3D位置的高斯加权体积到体素网格中,记忆通过高效的局部交互算子和门控循环动态更新,令牌通过连续采样和门控残差融合读取上下文。由于记忆张量大小固定,张量记忆将状态容量与输入长度解耦,同时保持空间归纳偏置。我们在标准语言、图像和视频基准测试以及一个旨在隔离持久状态何时有益的受控玩具诊断套件上评估该模块;它与标准Transformer训练流程集成,可以附加到现有块或从中移除,而无需其他架构更改。

英文摘要:

Transformers process images and videos by flattening space and time into long token sequences. While attention and KV caching preserve past features, their memory grows with sequence length and they lack an explicit, persistent spatial state, making long-horizon video understanding and occlusion-sensitive reasoning difficult. We propose Tensor Memory, a lightweight module that augments Transformer blocks with a fixed-size recurrent 3D memory tensor: tokens write into a voxel grid via a differentiable soft write that deposits content as a Gaussian-weighted volume around a predicted continuous 3D location, the memory is updated with an efficient local interaction operator and gated recurrent dynamics, and tokens read back context via continuous sampling with gated residual fusion. Because the memory tensor has a constant size, Tensor Memory decouples state capacity from input length while preserving a spatial inductive bias. We evaluate the module on standard language, image, and video benchmarks and on a controlled toy diagnostic suite designed to isolate when persistent state is beneficial; it integrates with standard Transformer training pipelines and can be attached to or removed from existing blocks without other architectural changes.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑