Compositional sparsity of learnable functions

Tomaso Poggio, M. D. FraserBulletin 2024

This paper, published in the Bulletin of the American Mathematical Society, provides a theoretical foundation for why deep learning works so well, centering on a concept the authors call "compositional sparsity."

TL;DR

The authors argue that "compositional sparsity"—the property of a function being composed of many simpler functions that each only look at a few inputs—is the secret sauce of deep learning. They prove that all efficiently computable functions possess this property, allowing deep neural networks to bypass the "curse of dimensionality" and suggesting a path toward AI-driven mathematical theorem proving.

What Problem Does This Paper Address?

For decades, a central mystery in AI has been why deep neural networks are so effective at high-dimensional tasks like vision and language. Standard approximation theory suggests a "curse of dimensionality": to approximate a smooth function of $d$ variables to within an error $\epsilon$, a "shallow" (two-layer) network typically requires a number of parameters that grows exponentially with $d$ (specifically $O(\epsilon^{-d/s})$).

In practice, we use inputs with millions of dimensions (like pixels in an image), yet networks with a manageable number of parameters succeed. The authors tackle the fundamental question: What specific property of the functions we care about (the "target functions") allows deep networks to learn them efficiently without hitting this exponential wall?

Methods

The paper is a theoretical perspective that synthesizes results from approximation theory, learning theory, and computational complexity.

  1. Defining Compositional Sparsity: The authors define a function as "compositionally sparse" if it can be represented as a Directed Acyclic Graph (DAG) where each node is a constituent function that depends on only a small, constant number of inputs ($d_0$).
  2. Approximation Analysis: They compare the parameter requirements of shallow vs. deep networks. They show that if a deep network's architecture matches the DAG of a compositionally sparse function, the required number of parameters grows linearly with the dimension $d$, rather than exponentially.
  3. Complexity Link: They establish a formal link between Borel-Turing computability and compositional sparsity, arguing that anything a computer can do efficiently, a deep sparse network can approximate efficiently.
  4. Generalization Bounds: They use Rademacher complexity to show that sparsity doesn't just help with approximation; it also dramatically reduces the "estimation error," meaning the network is less likely to overfit and more likely to generalize to new data.

Datasets

Not discussed in the paper. As a theoretical work, it relies on mathematical proofs and references to existing architectures (like CNNs and Transformers) rather than new empirical benchmarks.

Key Insights and Ideas

  • The Equivalence Principle: The most striking insight is that efficiently computable functions are equivalent to compositionally sparse functions. If a process (like protein folding or sentence construction) can be computed in polynomial time, it must have a sparse compositional structure that a deep network can exploit.
  • Architecture as a Mirror: Deep networks succeed because their layers can mirror the hierarchy of the target function. CNNs do this via "hardwired" local filters (spatial sparsity). Transformers, the authors conjecture, "learn" this sparse graph through self-attention, dynamically selecting which few "tokens" are relevant to the current step.
  • Why Humans Can Do Math: The authors link their theory to Timothy Gowers’s ideas on why humans find proofs. Mathematical proofs are themselves compositionally sparse: each new statement typically follows from only a few previous lemmas or axioms, not the entire body of mathematical knowledge at once.
  • Bypassing the Curse: By breaking a massive $d$-dimensional problem into a sequence of small $d_0$-dimensional problems, deep networks turn an exponential complexity into a summation of small constants.

Key Results

  • Parameter Efficiency: For a compositionally sparse function, a deep network requires $N_{deep} = O(\sum_{v \in V} \epsilon^{-d_v/s_v})$ parameters. Since $d_v$ (the number of inputs per node) is small and constant, this avoids the exponential dependence on the total input dimension $d$.
  • Generalization Boost: The contribution of a sparse layer to Rademacher complexity is reduced by a factor of $\sqrt{k/n}$ (where $k$ is the number of non-zero weights per row and $n$ is the total number of weights). This explains why sparse models generalize better.
  • The "Math Bot" Potential: The authors conclude that if a computer program can prove a theorem, a deep network can, in principle, learn to do the same by training on sequences of logical tokens, provided it can discover the underlying sparse compositional graph.

Limitations and Future Work

  • The Discovery Problem: While the paper proves that a sparse representation exists for computable functions, it acknowledges that we don't yet fully understand how optimization algorithms (like SGD) successfully find these sparse graphs during training, especially in Transformers where the graph isn't hardwired.
  • Intermediate Supervision: The authors note an open question: how well can Transformers recover a sparse graph when the training data only shows the final output, rather than all the intermediate steps of the computation?
  • Engineering Hurdles: While the principle of compositional sparsity suggests theorem proving is possible for AI, the authors admit significant engineering and design challenges remain before "math bots" can propose deep new conjectures or complex proofs.

Summary updated

BibTeX
@article{poggio2024compositional,
  author = {Tomaso Poggio and M. D. FRASER},
  title = {{Compositional sparsity of learnable functions}},
  journal = {Bulletin},
  year = {2024},
  doi = {10.1090/bull/1820},
}
Figure