Skip to main content
QUICK REVIEW

[Paper Review] Sparse Attention as Compact Kernel Regression

Saul Santos, Nuno Gonçalves|arXiv (Cornell University)|Jan 30, 2026
Domain Adaptation and Few-Shot LearningComputer Science0 citations
TL;DR

The paper formalizes a kernel-regression view of sparse attention, showing that sparsemax and alpha-entmax arise from Epanechnikov-like compact kernels, and demonstrates competitive performance of kernel-based Memory Mosaics across language modeling, in-context learning, and length generalization.

ABSTRACT

Recent work has revealed a link between self-attention mechanisms in transformers and test-time kernel regression via the Nadaraya-Watson estimator, with standard softmax attention corresponding to a Gaussian kernel. However, a kernel-theoretic understanding of sparse attention mechanisms is currently missing. In this paper, we establish a formal correspondence between sparse attention and compact (bounded support) kernels. We show that normalized ReLU and sparsemax attention arise from Epanechnikov kernel regression under fixed and adaptive normalizations, respectively. More generally, we demonstrate that widely used kernels in nonparametric density estimation -- including Epanechnikov, biweight, and triweight -- correspond to $α$-entmax attention with $α= 1 + \frac{1}{n}$ for $n \in \mathbb{N}$, while the softmax/Gaussian relationship emerges in the limit $n o \infty$. This unified perspective explains how sparsity naturally emerges from kernel design and provides principled alternatives to heuristic top-$k$ attention and other associative memory mechanisms. Experiments with a kernel-regression-based variant of transformers -- Memory Mosaics -- show that kernel-based sparse attention achieves competitive performance on language modeling, in-context learning, and length generalization tasks, offering a principled framework for designing attention mechanisms.

Motivation & Objective

  • Motivate sparse attention as a principled alternative to dense softmax by grounding it in nonparametric kernel regression.
  • Characterize how compact-support kernels induce sparsity and locality in attention.
  • Develop and analyze kernel-based attention variants within Memory Mosaics.
  • Provide a unified framework connecting top-k, fixed-normalization, and adaptive sparse attention mechanisms.

Proposed method

  • Review the Nadaraya-Watson kernel-regression view of attention and relate softmax to Gaussian kernels.
  • Map normalized ReLU, sparsemax, and alpha-entmax to Epanechnikov and related compact kernels with adaptive bandwidth.
  • Show that alpha-entmax with alpha = 1 + 1/r corresponds to kernels K_h(u) ∝ [1 - ||u||^2 / h^2]^r with r = 1/(alpha - 1).
  • Introduce anchored compact kernels such as top-k uniform, top-k softmax, and ReLUmax, linking them to kNN and margin-based sparsity.
  • Present Memory Mosaics as a kernel-regression-based transformer variant and describe how keys/values are formed and used in the Nadaraya-Watson update.

Experimental results

Research questions

  • RQ1How do compact (bounded-support) kernels relate to sparse attention mechanisms like sparsemax and alpha-entmax?
  • RQ2Can we characterize existing sparse attention methods (top-k, fixed normalization) within a unified kernel-regression framework?
  • RQ3Do kernel-based sparse attention variants in Memory Mosaics provide competitive performance on language modeling, in-context learning, and length generalization tasks?
  • RQ4What new attention transformations (e.g., ReLUmax) emerge from kernel design, and how do they behave in practice?

Key findings

  • Sparsemax attention corresponds to auto-normalized Epanechnikov kernel regression with an adaptive bandwidth.
  • Alpha-entmax attention with alpha > 1 corresponds to compact-support polynomial kernels with r = 1/(alpha - 1), encompassing Epanechnikov, biweight, and triweight kernels.
  • Top-k and fixed-normalization sparse attention fit within the same kernel-regression framework, linking top-k softmax to kNN regression and normalized ReLU to fixed-bandwidth Epanechnikov regression.
  • A new transformation, ReLUmax, anchors the kernel support near the maximum similarity and avoids degenerate zero denominators.
  • Experiments with Memory Mosaics show kernel-based sparse attention achieving competitive performances on language modeling, in-context learning, and length generalization, with adaptive sparse kernels often outperforming fixed sparsity baselines.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.