Contrasting random and learned features in deep Bayesian linear regression

Jacob A. Zavatone-Veth, William L. Tong, Cengiz PehlevanarXiv 2022

Abstract

This study explores the theoretical "generalization gap" between deep models that learn their features versus those that utilize fixed random features. By analyzing deep Bayesian linear networks, we demonstrate that while both models exhibit "double descent" behavior, true feature learning allows neural networks to bypass the performance-killing bottlenecks that plague random feature models. We quantify the advantage of training all layers (NN) over training only the readout (RF) and show how architectural choices like depth and width interact with the ability to learn under varying prior conditions.

Introduction

In modern deep learning theory, neural networks are often studied in the "kernel limit," where networks are assumed to be infinitely wide. In this regime, the mathematical complexity simplifies, but the network effectively stops "learning" features, behaving instead like a fixed kernel method. This raises a fundamental question: what is the specific benefit of feature learning? Does training every layer improve generalization compared to training only the last layer of a deep random feature model? This research addresses these questions by comparing simple linear regression, deep random feature (RF) models, and deep neural networks (NN) under a unified Bayesian framework.

Theoretical Framework

To calculate learning curves—mathematical descriptions of how generalization error changes with data volume and network width—the authors employ the replica trick from statistical mechanics. The models are studied in the thermodynamic limit, where the number of data points ($p$), input dimension ($d$), and hidden layer widths ($n$) all go to infinity while their ratios remain fixed.

A critical distinction is made between quenched disorder (fixed, "frozen" hidden weights in RF models) and annealed disorder (trainable, "fluid" weights in NNs). The study utilizes synthetic, high-dimensional isotropic Gaussian data generated by a "teacher" linear model corrupted by additive noise to maintain analytical tractability.

The Bottleneck Advantage and Double Descent

Both RF and NN models exhibit "sample-wise double descent" in the presence of label noise, where error peaks when the number of samples roughly equals the number of parameters. However, a key divergence occurs at the "model-wise" level.

In Random Feature models, if a hidden layer is narrower than the input dimension, the generalization error can explode. In contrast, NNs do not show this divergence. Because NNs can learn, they effectively "navigate" around narrow bottlenecks that would otherwise destroy the performance of a fixed-feature model. The authors prove that training all layers yields a strictly better generalization error than training only the readout, although this advantage diminishes as the network becomes extremely wide.

Generalization error as a function of sample size (α) and width (γ_min), illustrating the double descent peaks and the impact of noise (η).

Prior Mismatch and Depth Effects

The study finds that the optimal network width is heavily dependent on the "prior mismatch"—the relationship between the initial weight guess and the true target.

  • If the prior is "smaller" than the true target, wider networks are consistently better.
  • If the prior is "larger" than the target, RF models exhibit a specific "sweet spot" width. For NNs, this sweet spot disappears; it is optimal to be either as wide or as narrow as possible.

Increasing depth generally exacerbates generalization error if the prior variance is too low, but depth can be optimized if the prior variance is high. This suggests that the benefits of depth are contingent on the alignment of the model's initialization with the underlying data structure.

Impact of prior variance (σ²) and network depth (ℓ) on generalization error across different sample ratios (α).

Discussion and Limitations

While deep linear networks capture the essential dynamics of feature learning and the avoidance of architectural bottlenecks, they lack the expressivity of non-linear activations (e.g., ReLU) used in practical applications. Furthermore, the reliance on isotropic Gaussian data ignores the complex structures, such as manifolds, found in real-world datasets. Future research should extend these Bayesian approaches to non-linear networks and more realistic data distributions to confirm if the bottleneck-avoidance property of learned features remains a robust advantage in complex settings.

Summary updated

BibTeX
@misc{zavatoneveth2022contrasting,
  author = {Jacob A. Zavatone-Veth and William L. Tong and Cengiz Pehlevan},
  title = {{Contrasting random and learned features in deep Bayesian linear regression}},
  year = {2022},
  eprint = {2203.00573},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.00573},
}
Figure