Research / Publications / RR-2026-042
AISpectral Theory

Spectral bias in sparse attention: why transformers learn low frequencies first

A closed-form account of how block-sparse attention patterns shape what a model can learn — and in which order.

Cover image for Spectral bias in sparse attention: why transformers learn low frequencies firstPhoto · Unsplash
AbstractTransformers trained with block-sparse attention exhibit a pronounced spectral bias: low-frequency components of the target are fit orders of magnitude faster than high-frequency ones. We model sparse attention as a circulant operator and show that the learning rate of each Fourier mode is proportional to the corresponding eigenvalue, yielding a closed-form bound on the effective receptive field.

1Introduction

Neural networks are known to learn smooth functions before oscillatory ones, a phenomenon called spectral bias [1]. Whether this bias survives in attention-based architectures — and how sparsity patterns modulate it — has remained largely empirical.

Our central observation is that a fixed sparse mask M \in \{0,1\}^{n\times n} with banded structure is, up to boundary effects, a circulant matrix. Its spectrum is therefore given explicitly by the discrete Fourier transform of its first row.

2Setup

Let X \in \mathbb{R}^{n \times d} be the input sequence and consider the linearised attention update

\frac{d}{dt}\, f_t(X) \;=\; -\,\eta\, (M \odot K)\, \big(f_t(X) - y\big),
(1)

where K is the neural tangent kernel restricted to the attention block [2]. Writing M = F^{*} \Lambda F with F the unitary DFT matrix, each mode \hat f_k evolves independently.

Theorem 1.

Under the circulant approximation, the residual in Fourier mode k decays as

|\hat r_k(t)| = |\hat r_k(0)|\, \exp\!\big(-\eta\,\lambda_k\,\kappa\, t\big), \qquad \lambda_k = \sum_{j=-w}^{w} e^{-2\pi i jk/n}.

3Main result

The eigenvalues \lambda_k form a Dirichlet kernel, whose first zero sets an effective receptive field. Modes with |k| > n/(2w+1) are learned at most O(1/w) as fast as k=0.

4Experiments

We train 125M-parameter models on 20B tokens under four sparsity regimes [3] and report the frequency at which 90% of residual energy is removed.

Pattern Window w k_{90} pred. k_{90} meas. PPL
Dense — 512 497 18.41
Banded 64 124 131 18.77
Banded + global 32 203 198 18.52
Strided 16 31 35 20.06

The eigenvalues can be computed in a few lines:

import numpy as np

def mask_spectrum(n: int, w: int) -> np.ndarray:
    # first row of the banded circulant mask
    row = np.zeros(n); row[:w + 1] = 1; row[-w:] = 1
    return np.fft.fft(row).real

5Discussion

The analysis suggests a simple design rule: to preserve a frequency band up to k^\star, choose w \gtrsim n / (2k^\star). Adding a small number of global tokens lifts the zero-frequency floor and explains the strong performance of hybrid patterns [4].

§References

  1. Rahaman, N. et al. On the Spectral Bias of Neural Networks. ICML, 2019.
  2. Jacot, A., Gabriel, F., Hongler, C. Neural Tangent Kernel. NeurIPS, 2018.
  3. Child, R. et al. Generating Long Sequences with Sparse Transformers. arXiv:1904.10509, 2019.
  4. Gray, R. M. Toeplitz and Circulant Matrices: A Review. Now Publishers, 2006.