Reproduce “Scatterbrain: Unifying Sparse and Low-rank Attention Approximation” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Beidi Chen, Tri Dao, Eric Winsor, Zhao Song, Atri Rudra, Christopher Ré

Scatterbrain introduces a unified framework for sparse and low-rank attention approximation, demonstrating up to 2.1x lower approximation error and enhanced end-to-end performance on various tasks, while achieving up to 12x better memory efficiency than full attention. The method from Stanford University and collaborators enables more efficient Transformer models for processing long sequences.

Key insights

  • Sparse attention excels with peaked softmax distributions, while low-rank attention performs better with diffuse distributions, highlighting their complementary nature.
  • An ideal sparse + low-rank combination, as shown by Robust PCA, yields significantly lower approximation error than either method alone, especially for matrices with mid-range entropy.
  • A generative model theory indicates that sparse and low-rank structures naturally arise when input elements form clusters, requiring adaptive approximation based on softmax temperature.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.