Escaping mediocrity: how two-layer networks learn hard generalized linear models

Luca Arnaboldi, Florent Krzakala, Bruno Loureiro, Ludovic Stephan

TL;DR

This paper investigates how two-layer neural networks learn challenging "hard" generalized linear models using Stochastic Gradient Descent (SGD). They show that while increasing network width offers only a constant factor improvement in sample complexity, a deterministic approximation of the learning process accurately predicts the time it takes for the network to overcome initial "mediocrity" (flat learning landscapes), suggesting stochasticity plays a minimal role in this crucial phase.

What Problem Does This Paper Address?

The paper tackles the problem of understanding the sample complexity of learning specific types of generalized linear models with two-layer neural networks using SGD. The focus is on a particularly challenging scenario where the initial landscape of the learning problem is "flat" or "mediocre," meaning that the gradient of the loss function provides little information about the direction of the true target. This "mediocrity" significantly slows down the learning process, requiring a large number of samples ($n = O(d \log d)$ in high dimensions) to escape. The authors aim to provide precise theoretical insights into this escape time, particularly how it's affected by network width and the role of stochasticity in SGD.

Methods

The authors employ a theoretical approach based on the high-dimensional limit ($d \to \infty$) of SGD. They reduce the complex dynamics of the two-layer network to a lower-dimensional stochastic process by focusing on "sufficient statistics" – specifically, the weights of the second layer and correlation matrices of the first layer weights. This reduction allows them to derive deterministic Ordinary Differential Equations (ODEs) that describe the evolution of these statistics. They then analyze the "exit time" of this process from the initial mediocre region. A key aspect of their method is the comparison between the full stochastic process and its deterministic approximation, as well as the analysis of how network width (number of hidden units, $p$) influences the learning dynamics.

Datasets

Not discussed in the paper. The paper focuses on theoretical analysis and simulations based on synthetic data generated according to the model described in equation (1) and (2).

Key Insights and Ideas

  • Mediocrity is a bottleneck: The paper highlights that the "mediocrity" of the initial loss landscape, characterized by many flat directions, is the primary bottleneck for learning these hard models with SGD.
  • Width offers limited gains: Increasing the width of the two-layer network (overparameterization) improves convergence by only a constant factor, not by changing the fundamental scaling of sample complexity ($O(d \log d)$). This is a significant finding, as overparameterization is often assumed to be a cure-all for optimization difficulties.
  • Deterministic approximation is sufficient for escape time: Surprisingly, a deterministic ODE approximation of the SGD dynamics accurately captures the "exit time" from the mediocre region. This suggests that the inherent stochasticity of SGD, while present, does not play a crucial role in overcoming this initial flat landscape.
  • Phase retrieval as a testbed: The authors use the "phase retrieval" problem (a specific type of generalized linear model) as a concrete example to study these phenomena, demonstrating its relevance as a hard learning problem.

Key Results

  • The paper provides precise analytical formulas for the sample complexity (exit time) required for two-layer networks to learn a quadratic target function in the high-dimensional limit.
  • They show that for a fixed width $p$, the sample complexity scales as $O(d \log d)$.
  • For arbitrary width $p \ge 1$, the exit time is a monotonically decreasing function of $p$, but the leading order dependence on the dimension $d$ remains $O(d \log d)$, indicating that width does not fundamentally change the scaling.
  • Numerical simulations confirm that the deterministic ODE approximation provides a good prediction of the exit time, even for finite-sized networks and when stochastic corrections are considered.

Limitations and Future Work

  • Specific target function: The analysis is primarily focused on a quadratic target function. While the authors suggest their conclusions might extend to other activations with similar properties (information exponent 2), a broader analysis for more general activations would be valuable.
  • High-dimensional limit: The theoretical results are derived in the high-dimensional limit ($d \to \infty$). While simulations show good agreement for finite $d$, understanding the behavior in lower dimensions might reveal different phenomena.
  • Initial conditions: While the paper analyzes random initialization, exploring the impact of different initialization strategies on escaping mediocrity could be an interesting avenue.
  • Dynamics after escaping mediocrity: The paper focuses on the "escaping mediocrity" phase. The dynamics after escaping this phase, where the second layer weights are trained, can differ significantly and is noted as being outside the scope of this manuscript.

Summary updated

BibTeX
@inproceedings{arnaboldi2023escaping,
  author = {Luca Arnaboldi and Florent Krzakala and Bruno Loureiro and Ludovic Stephan},
  title = {{Escaping mediocrity: how two-layer networks learn hard generalized linear models}},
  booktitle = {OPT @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=kyQq0vIUBw},
}
Figure