Learning curves of generic features maps for realistic datasets with a teacher-student model

Bruno Loureiro, Cédric Gerbelot, Hugo Cui, Sebastian Goldt, Florent Krzakala, Marc Mézard, Lenka Zdeborová

TL;DR

This paper extends the classic "teacher-student" theoretical framework to predict the learning curves of realistic datasets and complex feature maps. By introducing a "Gaussian covariate model," the authors provide a rigorous mathematical formula that accurately describes how training and test errors evolve, even when the underlying data isn't perfectly Gaussian.

The Problem: Bridging the "Reality Gap"

In theoretical machine learning, researchers often use a teacher-student model to understand how a model (the student) learns from labels generated by another model (the teacher). Historically, this framework relied on a massive oversimplification: the assumption that input data is independent and identically distributed (i.i.d.) Gaussian noise.

While this makes the math solvable, it creates a "reality gap." Real-world data—like images of cats or handwritten digits—has complex structures and correlations that Gaussian noise lacks. Consequently, many practitioners viewed teacher-student results as "toy" theories. This paper addresses that gap by asking: Can we create a version of this model that actually works for realistic datasets and modern feature maps (like those in deep neural networks)?

Methods: The Gaussian Covariate Model

The authors introduce the Gaussian covariate teacher-student model. The key innovation is allowing the teacher and student to act on different "feature spaces" with arbitrary covariance structures.

Teacher-student feature map setup
  1. The Model: They define two vectors, $\mathbf{u}$ (what the teacher sees) and $\mathbf{v}$ (what the student sees), which are jointly Gaussian. This allows them to model scenarios where the student only has access to a transformed version of the data (e.g., a specific layer of a neural network), mapping an input $\mathbf{x}$ through distinct transformations $\varphi_t$ and $\varphi_s$.
  2. Mathematical Rigor: They use two distinct paths to find the solution: Gordon’s Gaussian min-max inequalities (for a rigorous proof) and the replica method from statistical physics (for a heuristic but powerful alternative).
  3. The Formula: They derive a set of "self-consistent equations" that output the asymptotic training and generalization errors based on the covariance of the features and the choice of loss function (like Ridge or Logistic regression).

Datasets and Validation

The authors validate their theory by comparing its predictions against simulations on several well-known datasets:

  • MNIST: Handwritten digits (even vs. odd classification).
  • Fashion-MNIST: Clothing items (above vs. below the waist classification).
  • CIFAR-10: Used indirectly via a dcGAN (Deep Convolutional Generative Adversarial Network) to generate realistic-looking synthetic images where the underlying distribution is known.

Key Insights and Results

  • The Gaussian Equivalence Conjecture: The most striking insight is that for a wide class of feature maps, the learning performance on real data is asymptotically captured by a Gaussian model with the same first and second moments (mean and covariance).
  • Closed-Form Accuracy: The formulas provided yield a precise match for simulations across various feature maps, including random projections, scattering transforms, and pre-trained neural network layers.
Learning curves for different feature maps
  • Ridge Regression is Robust: For Ridge regression (squared loss), the theory is incredibly accurate on real data. This is because Ridge regression is primarily sensitive to the second-order statistics of the data, which the Gaussian model captures perfectly.
  • Predicting the "Double Descent": The model accurately predicts the "interpolation peak"—the point where the number of samples equals the number of parameters and error typically spikes—on real datasets.
  • Tracking Feature Evolution: The authors show they can predict the learning curves of a model as it trains. For example, they tracked how a neural network learns a "low-rank" representation of Fashion-MNIST over 200 epochs, and the theory matched the empirical results throughout the process.
  • GAN Validation: On GAN-generated CIFAR-10 data, the theory and simulations were virtually indistinguishable, proving that if the data generation process follows a latent Gaussian structure, the theory is exact.

Limitations and Future Work

  • Non-Gaussian Deviations: The main limitation is that for classification tasks on raw, non-synthetic data, the Gaussian approximation isn't perfect. The "tails" of real-world data distributions (higher-order statistics) can lead to different generalization behaviors than the theory predicts, making classification slightly harder to model perfectly than regression.
  • The "Teacher" Choice: On real data, we don't actually have a "teacher" model; we just have labels. The authors used a "linear interpolating teacher" as a proxy, which works well for Ridge regression but might be too simple for more complex tasks.
  • Future Directions: The authors suggest that finding more sophisticated "teachers" that better mimic the labeling process of real datasets could close the remaining gap for classification tasks. They also aim to extend this to multi-layer architectures where every layer is learned simultaneously.

Summary updated

BibTeX
@inproceedings{loureiro2021learning,
  author = {Bruno Loureiro and Cédric Gerbelot and Hugo Cui and Sebastian Goldt and Florent Krzakala and Marc Mézard and Lenka Zdeborová},
  title = {{Learning curves of generic features maps for realistic datasets with a teacher-student model}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure