atlas

Research map / Architectures and efficiency / Attention and transformers

LevAttention: Time, Space and Streaming Efficient Algorithm for Heavy Attentions

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Linear attention approximations · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that large attention scores of f(x)=|x|^p attention can be found via a universal key set of size independent of n (leverage/Lewis-weight sensitivities), and proposes LevAttention, training ViTs that attend only to leverage-score-selected keys.

Problem

Computing softmax-like attention matrices costs O(n^2 d) time, which is prohibitive for long contexts; the paper asks whether all large attention entries can be identified in time linear in n without data assumptions.

Approach

Large attention scores are bounded by f-sensitivities of the key matrix, so a universal set U of keys (those with sensitivity at least epsilon, e.g., high leverage scores) of size independent of n contains all large attention targets for any query; this set can be found in streaming/parallel fashion, and ViTs can be trained to attend only to top-32 leverage-score keys per head.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace full softmax attention with top-32 leverage-score selection at inferenceS/16 pretrained with softmax · ImageNet-1k validationaccuracy: 76.47% -> 13.3%Hurt
Replace squared row norm selection with leverage-score selection for top-32 keys at inferenceS/16 pretrained with softmax · ImageNet-1k validationaccuracy: 3.3% -> 13.3%Helped
Train with leverage-score selection instead of applying it only at inferenceS/16 · ImageNet-1k validationaccuracy: 13.3% -> 68.30%Helped
Increase selected keys from top-32 to top-64 (ablation)S/16 trained with LevAttention · ImageNet-1k validationaccuracy: 68.30% -> 72.48%Helped
Replace full softmax attention with top-32 leverage-score selection at inferenceL/16 pretrained with softmax · ImageNet-1k validationaccuracy: 78.83% -> 48.58%Hurt
Replace squared row norm selection with leverage-score selection for top-32 keys at inferenceL/16 pretrained with softmax · ImageNet-1k validationaccuracy: 8.9% -> 48.58%Helped
Train with leverage-score selection instead of applying it only at inferenceL/16 · ImageNet-1k validationaccuracy: 48.58% -> 75.12%Helped
Increase selected keys from top-32 to top-64 (ablation)L/16 trained with LevAttention · ImageNet-1k validationaccuracy: 75.12% -> 77.27%Helped
Increase selected keys from top-32 to top-128 (ablation)L/16 trained with LevAttention · ImageNet-1k validationaccuracy: 75.12% -> 77.17%Helped
Replace full softmax attention with top-32 leverage-score selection at inferenceL/8 pretrained with softmax · ImageNet-1k validationaccuracy: 79.47% -> 0.8%Hurt
Train with leverage-score selection instead of applying it only at inferenceL/8 · ImageNet-1k validationaccuracy: 0.8% -> 71.96%Helped
Increase selected keys from top-32 to top-64 (ablation)L/8 trained with LevAttention · ImageNet-1k validationaccuracy: 71.96% -> 74.64%Helped

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1k

Benchmarks: ImageNet-1k

Metrics: top-1 validation accuracy

Baselines: softmax attention row norm selection random key selection

Builds on: Lewis weights online leverage scores PolySketchFormer ViT

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy