On the Power of Differentiable Learning versus PAC and SQ Learning

Emmanuel Abbe, Pritish Kamath, Eran Malach, Colin Sandon, Nathan Srebro

TL;DR

This paper provides a theoretical characterization of the learning power of differentiable learning (SGD and GD). It reveals that the ability of these methods to solve complex problems depends on the interplay between numerical gradient precision and batch size: with high enough precision, they are as powerful as general PAC learning, but with low precision, they are restricted to the more limited Statistical Query (SQ) framework.

What Problem Does This Paper Address?

In modern machine learning, "differentiable learning"—training models like neural networks using Stochastic Gradient Descent (SGD)—is the dominant paradigm. However, we still lack a complete theoretical understanding of its fundamental limits.

Theoretical computer science usually categorizes learning into two main frameworks:

  1. Probably Approximately Correct (PAC) Learning: The gold standard, where an algorithm can look at individual data samples to learn a concept.
  2. Statistical Query (SQ) Learning: A more restrictive model where the learner cannot see individual samples but can only ask for the average value of a function over the entire data distribution (plus some noise).

Previous research showed that SGD with a batch size of 1 is as powerful as PAC learning. Conversely, training with "population gradients" (infinite batch size) is only as powerful as SQ learning. This paper addresses the massive gap in between: What happens with the mini-batches used in real-world practice? How does the numerical precision of our hardware affect what can be learned?

Methods

The authors bridge the gap between SGD and traditional learning theory by introducing an intermediate model called mini-batch Statistical Queries (bSQ). In this model, queries are answered using an empirical average over a mini-batch of size $b$, subject to some precision $\rho$.

The core of their proof relies on two sophisticated "simulations":

  • Sample Extraction: They develop a novel algorithm to "extract" individual samples from mini-batch averages. If the precision $\rho$ is fine enough relative to the batch size $b$ (specifically $b\rho < 1/8$), a learner can use high-precision queries to isolate the contribution of a single sample from the batch.
  • Differentiable Simulation: They show how to construct a specific differentiable model (a neural network) such that its gradients encode the answers to these bSQ queries.

To ensure the weights don't "drift" uncontrollably during training, they utilize a specific piecewise linear activation function (shown in Figure 1 below) that has flat regions, allowing parts of the network to act as stable "memory" or "clocks."

Figure 1: Activation function used in Theorems 1a and 1d

Datasets

As this is a purely theoretical paper focused on computational complexity and learning theory, no empirical datasets were used for training or evaluation. The results are proved mathematically for any distribution $D$ over an input space $\mathcal{X}$.

Key Insights and Ideas

  • The Precision-Batch Size Tradeoff: The "power" of SGD isn't fixed; it's a sliding scale. If your precision is high ($b\rho$ is small), you are in the PAC regime. If your precision is low ($b\rho^2$ is large), you are trapped in the SQ regime.
  • Logarithmic Precision is Enough: To reach PAC-level power, you don't need infinite precision. You only need a number of bits that grows logarithmically with the batch size. This suggests that even with standard floating-point precision, SGD is theoretically very powerful.
  • GD can be PAC: Surprisingly, even full-batch Gradient Descent (which has no stochasticity) can simulate PAC learning if the precision is high enough relative to the total sample size $m$. This challenges the common intuition that the "noise" in SGD is the only thing that provides power beyond simple averages.
  • Programmable Gradients: The paper demonstrates that gradients can be used as a general-purpose communication channel to implement complex, sample-based algorithms within a standard optimization loop.

Key Results

The paper's findings are summarized in several formal theorems (Theorems 1a-1d), which can be simplified into the following regimes for bSGD:

  • High Precision Regime ($\rho < 1/8b$): bSGD $\approx$ PAC. Differentiable learning can simulate any sample-based algorithm.
  • Low Precision Regime ($b\rho^2 > C \log(Tp/\delta)$): bSGD $\approx$ SQ. Differentiable learning is provably no more powerful than the SQ model.
  • Universality: Regardless of batch size, bSGD can always simulate SQ learning.

These relationships are elegantly summarized in the paper's informal hierarchy: $$PAC \preceq bSGD(b) \preceq SQ$$ where the left side becomes an equality with high precision and the right side becomes an equality with low precision.

Limitations and Future Work

The authors are careful to note that while they prove SGD can simulate any PAC algorithm, their constructions are highly "unnatural." They require extremely specific architectures and initializations that do not resemble how we initialize deep networks in practice (e.g., Xavier or Kaiming initialization).

Future Directions: * Closing the Gap: There is still an intermediate regime (between $1/\rho$ and $\log(n)/\rho^2$) where the exact power of bSGD remains unknown. * Restricted Initializations: A major open question is how the power of differentiable learning changes if we impose "realistic" constraints, such as requiring the network output to be near zero at initialization. * Hierarchical Learning: Exploring if specific architectural choices (like depth or convolutions) naturally favor certain types of learning problems over others within these theoretical bounds.

Summary updated

Abstract

We study the power of learning via mini-batch stochastic gradient descent (SGD) on the population loss, and batch Gradient Descent (GD) on the empirical loss, of a differentiable model or neural network, and ask what learning problems can be learnt using these paradigms. We show that SGD and GD can always simulate learning with statistical queries (SQ), but their ability to go beyond that depends on the precision $ρ$ of the gradient calculations relative to the minibatch size $b$ (for SGD) and sample size $m$ (for GD). With fine enough precision relative to minibatch size, namely when $b ρ$ is small enough, SGD can go beyond SQ learning and simulate any sample-based learning algorithm and thus its learning power is equivalent to that of PAC learning; this extends prior work that achieved this result for $b=1$. Similarly, with fine enough precision relative to the sample size $m$, GD can also simulate any sample-based learning algorithm based on $m$ samples. In particular, with polynomially many bits of precision (i.e. when $ρ$ is exponentially small), SGD and GD can both simulate PAC learning regardless of the mini-batch size. On the other hand, when $b ρ^2$ is large enough, the power of SGD is equivalent to that of SQ learning.
BibTeX
@inproceedings{abbe2021power,
  author = {Emmanuel Abbe and Pritish Kamath and Eran Malach and Colin Sandon and Nathan Srebro},
  title = {{On the Power of Differentiable Learning versus PAC and SQ Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=WYrC0Aentah},
}
Figure