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
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.
Under the circulant approximation, the residual in Fourier mode k decays as
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
- Rahaman, N. et al. On the Spectral Bias of Neural Networks. ICML, 2019.
- Jacot, A., Gabriel, F., Hongler, C. Neural Tangent Kernel. NeurIPS, 2018.
- Child, R. et al. Generating Long Sequences with Sparse Transformers. arXiv:1904.10509, 2019.
- Gray, R. M. Toeplitz and Circulant Matrices: A Review. Now Publishers, 2006.
