Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

LoLA: Low-Rank Linear Attention With Sparse Caching

About

The per-token cost of transformer inference scales with context length, preventing its application to lifelong in-context learning. Linear attention is an efficient alternative that maintains a constant memory footprint, even on infinite context lengths. While this is a potential candidate for lifelong learning, it falls short in memory capacity. In this paper, we propose LoLA, a training-free augmentation to linear attention that boosts associative recall. LoLA distributes past key-value pairs from context into three memory systems: (i) recent pairs in a local sliding window cache; (ii) difficult-to-memorize pairs in a sparse, global cache; and (iii) generic pairs in the recurrent hidden state of linear attention. We show through ablations that our self-recall error metric is crucial to efficiently manage long-term associative memories. On pass-key retrieval tasks, LoLA improves the base model's performance from 0.6% to 97.4% accuracy. This is achieved with a 4.6x smaller cache than Llama-3.1 8B on 4K context length. LoLA also outperforms other 1B and 8B parameter subquadratic models on zero-shot commonsense reasoning tasks.

Luke McDermott, Robert W. Heath Jr., Rahul Parhi• 2025

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningWinoGrande
Accuracy73.6
1581
Commonsense ReasoningPIQA
Accuracy81.6
400
Commonsense ReasoningARC Challenge--
259
Commonsense ReasoningARC-E
Accuracy66.2
249
ReasoningARC Easy
Accuracy82.5
242
Commonsense ReasoningWinoGrande
Accuracy73.6
94
Commonsense ReasoningMMLU
Accuracy57.6
90
Common Sense ReasoningHellaSwag
Accuracy79.8
85
Commonsense ReasoningHellaSwag
Normalized Accuracy79.8
66
Multi-task Language UnderstandingMMLU
Top-1 Accuracy57.6
46
Showing 10 of 27 rows

Other info

Follow for update