Tensor Cache: Eviction-conditioned Associative Memory for Transformers
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Autoregressive Transformer KV caches grow linearly with context length; sliding-window caching bounds memory but discards evicted tokens entirely, so relevant evidence outside the window becomes inaccessible. We introduce Tensor Cache, a two-level cache that pairs sliding-window softmax attention as a first-level cache (L1) with a fixed-size outer-product fast-weight memory as a second-level cache (L2) fed by KV pairs evicted from the window. Recent tokens remain in exact local attention; evicted pairs are compressed into a per-layer matrix A and read by future queries through a single matrix multiplication, exploiting the linear-attention identity qt(ki otimes vi)=langle qt,kirangle vi. A learned scalar gate fuses the L1 and L2 outputs, and per-head decay and write-rate parameters are trained end-to-end. The outer-product memory and the read identity are well-known; our contribution is their use as an L2 cache fed exclusively by sliding-window evictions, plus identifying that the common chunked-mean training shortcut A!leftarrow!λ A!+!η(bar k!otimes!bar v) silently introduces C2-C spurious cross-token outer products per chunk, and closing the gap with a parallel weighted-sum scan equivalent to per-token writes within float32 epsilon. Across systems scaling, controlled associative recall, long-context language modeling, and memory-capacity diagnostics, Tensor Cache improves the memory--quality frontier over bounded-state baselines.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 25 of its 31 references that are in the map. First posted on arXiv 21 May 2026.
Builds on
25 of 31 references.
Closest ancestors · 4
Same direction, newest first
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2024Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inference14 Feb
- 2023CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving11 Oct
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttention12 Sep
Other references · 21
- 2017Attention Is All You Needcited by 60,361
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
- 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 717
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
9 more
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
- 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
- 2024xLSTM: Extended Long Short-Term Memorycited by 327
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 204
- 2022Recurrent Memory Transformercited by 203
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 200
- 2016Using Fast Weights to Attend to the Recent Pastcited by 170
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decoding
- 2026Bridging KV-Cache Quantization and Linear Attention: From Theory to Pretrained Weight Migration
- 2026AttSVD:Prompt-Adaptive Low-Rank KV Cache Compression via Attention-Guided SVD
- 2025End-to-End Transformer Acceleration Through Processing-in-Memory Architectures
- 2024GoldFinch: High Performance RWKV/Transformer Hybrid with Linear Pre-Fill and Extreme KV-Cache Compression
- 2026How Much Cache Does Reasoning Need? Depth-Cache Tradeoffs in KV-Compressed Transformers
- 2026Towards Tight Bounds for Streaming Attention
- 2026KV Cache Compression Through the Lens of Transform Coding