A Computable Definition of the Spectral Bias

Jonas Kiessling, Filip ThorAAAI 2022

Abstract

Neural networks exhibit a well-documented "spectral bias," prioritizing the learning of low-frequency patterns over high-frequency details. While this phenomenon is central to understanding why deep learning models generalize rather than merely memorizing noise, it has lacked a formal, computable metric applicable to high-dimensional or non-uniform data. This paper introduces a quantitative Spectral Bias (SB) score based on the Fraction of Variance Unexplained (FVU). We present two computational methods: a Fourier-based approach for low-dimensional grid data and a novel Monte Carlo-based approach for arbitrary distributions. Our results demonstrate that the SB score effectively tracks frequency-dependent learning dynamics, confirming that spectral bias persists even as total error decreases.

Introduction

It is a "folk theorem" in deep learning that neural networks are biased toward smooth, low-frequency functions. This spectral bias is a double-edged sword: it provides an implicit regularization that aids generalization, but it also explains why networks struggle to capture sharp details or rapid oscillations. Historically, measuring this bias relied on qualitative visualizations or specialized Fourier analysis limited to simple synthetic setups. This work fills the gap by providing a mathematical definition and practical algorithms to calculate a standard "Spectral Bias (SB) score" for complex, real-world scenarios.

Defining the Spectral Bias Score

The proposed metric is built upon the Fraction of Variance Unexplained (FVU), which represents prediction error normalized by the target's variance. By decomposing this error into two frequency-based components—$E_{low}$ (low-frequency error) and $E_{high}$ (high-frequency error)—the Spectral Bias (SB) is defined as:

$$SB = \frac{E_{high} - E_{low}}{E_{high} + E_{low}}$$

An SB score of 0 indicates an unbiased network learning all frequencies equally, while a score approaching 1 signifies a model that has exclusively captured low-frequency components while ignoring high-frequency details. A critical aspect of this definition is the data-driven selection of the cut-off frequency ($\omega_0$), defined as the point where exactly half of the target function's variance is contained in the lower frequencies.

Computational Methods

To make this metric computable across different domains, the authors propose two distinct methods:

  1. Method 1 (DFT-based): Utilizing the Discrete Fourier Transform, this method is computationally efficient via FFT but is restricted to data on equidistant grids and suffers from the curse of dimensionality.
  2. Method 2 (Convolution & Monte Carlo): This novel approach uses a "sinc" function convolution in the spatial domain to act as a low-pass filter. By estimating integrals through Monte Carlo sampling, this method scales linearly with dimensionality ($d$) and works on arbitrary data distributions, though it carries an $O(N^2)$ base complexity.

Results and Validation

The authors validated the metric using synthetic 1D functions and 2D image regression tasks. In 1D tests, the network's fitting process clearly illustrates the spectral bias: the model first approximates the general trend (low frequency) before slowly resolving the oscillations (high frequency).

Evolution of model fitting over 10,000 epochs. The network captures low-frequency trends early (20-100 epochs) before resolving high-frequency oscillations (10,000 epochs).

Quantitatively, the SB score remains high (often between 0.7 and 0.8) throughout much of the training process, even as the total error drops. This confirms that high-frequency errors remain the dominant component of total error during optimization. Furthermore, the two proposed computational methods show remarkable agreement, validating the Monte Carlo approach as a reliable proxy for traditional Fourier analysis.

Spectral Bias (SB) score over training epochs. Method 1 (DFT) and Method 2 (Monte Carlo) show high agreement, quantifying the persistent bias toward low frequencies.

Conclusion

This work provides the first rigorous "ruler" for measuring spectral bias in neural networks. By formalizing the SB score, researchers can now quantify how different architectures, depths, and regularization techniques affect a model's ability to capture multi-scale information. While the $O(N^2)$ complexity of the Monte Carlo method and the challenges of high-dimensional density estimation remain areas for future improvement, this metric offers a vital tool for the empirical study of deep learning dynamics.

Summary updated

BibTeX
@inproceedings{kiessling2022computable,
  author = {Jonas Kiessling and Filip Thor},
  title = {{A Computable Definition of the Spectral Bias}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i7.20677},
}
Figure