NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

When does compositional structure yield compositional generalization? A kernel theory.

Samuel Lippl, Kim Stachenfeld

TL;DR

This paper provides a mathematical framework using kernel theory to explain why "disentangled" representations don't always guarantee that a model can handle new combinations of familiar concepts. The authors identify a fundamental constraint called conjunction-wise additivity and reveal how training data biases lead to specific failure modes—memorization leaks and shortcut biases—in both kernel models and deep neural networks.

What Problem Does This Paper Address?

Humans possess a remarkable ability called compositional generalization: if you know what a "pink" object looks like and you know what an "elephant" is, you can instantly imagine a "pink elephant" despite never having seen one. For AI, this remains a significant hurdle.

While researchers have long suspected that "disentangled" representations (where different features like color and shape are stored separately) are the key to unlocking this capability, the results in practice have been inconsistent. Sometimes disentanglement helps; sometimes it doesn't. This paper tackles the "why" by moving beyond empirical observation to a formal theory. The authors ask: Under what exact conditions does a compositionally structured representation actually lead to successful generalization?

Overview of the kernel theory framework, illustrating compositional generalization, structured representations, and conjunction-wise additivity.

Methods

To make the problem mathematically tractable, the authors utilize kernel theory. Kernel models serve as a simplified proxy for neural networks, particularly those operating in the "kernel regime" (often associated with very wide architectures or specific initialization scales).

  1. Formal Definition: They define "compositionally structured representations" as those where the similarity between two inputs depends only on how many components they share.
  2. Representational Salience ($S$): They introduce a new metric to quantify how strongly a representation encodes individual components versus complex combinations (conjunctions).
  3. Theoretical Proofs: They derive a theorem showing that these models are restricted to conjunction-wise additivity. This means the model's output is always a sum of values assigned to specific combinations of features it saw during training.
  4. Empirical Validation: They test their theory against modern architectures, including Convolutional Neural Networks (CNNs), Residual Networks (ResNets), and Vision Transformers (ViTs).

Datasets

The study uses a mix of synthetic and image-based tasks designed to isolate compositional behavior:

  • Symbolic Addition: Adding hidden values associated with different components.
  • Context Dependence: Tasks where a "context" cue determines which feature the model should attend to.
  • Transitive Equivalence: A relational task (e.g., if A=B and B=C, then A=C).
  • Compositional MNIST/CIFAR-10: Variants where images are concatenated to represent multi-component inputs.
  • DSprites: A standard benchmark for disentangled representation learning, used here to see if the theory holds for "real-world" learned representations.
Experimental splits for the symbolic addition task, demonstrating interpolation and extrapolation challenges.

Key Insights and Ideas

  • The Additivity Trap: Because kernel models are "conjunction-wise additive," they are fundamentally incapable of solving certain tasks, like transitive equivalence. They can only generalize if the task itself can be broken down into a sum of parts seen during training.
  • Memorization Leak: This occurs when a model relies too much on the "full conjunction" (the specific pair of features) rather than the individual parts. Even if the model learns the training data perfectly, it will "under-generalize" on new combinations because it "leaked" some of its predictive power into memorizing specific training examples.
  • Shortcut Bias: In context-heavy tasks, if the context itself is a strong predictor of the label in the training set, the model will take a "shortcut" and ignore the actual features. This leads to a total failure when the model meets a novel context-feature combination.
  • The Curse of Depth: Interestingly, the paper shows that as random-weight networks get deeper, they tend to represent higher-order conjunctions more strongly. This makes them act more like a "lookup table," which improves training performance but destroys compositional generalization.

Key Results

  • Theory-Model Alignment: The kernel theory accurately predicted the behavior of CNNs, ResNets, and ViTs. When these models were trained on additive tasks, their test-set predictions were distorted by exactly the proportional factor predicted by the "memorization leak" theory.
  • Relational Failure: As predicted, models in the kernel regime failed completely on transitive equivalence. However, the authors found that models in the "rich regime" (where the network actively learns new features) could solve it by developing specialized, sparse units.
  • Salience Matters: By manipulating the spatial distance between digits in a "Compositional MNIST" task, the authors changed the representational salience. Closer digits led to more "conjunctive" representations and, consequently, worse generalization—confirming the theory's link between geometry and performance.

Limitations and Future Work

  • Quantitative vs. Qualitative: While the theory captures the behavior and trends of deep networks, it does not yet provide tight quantitative bounds on their exact accuracy.
  • Beyond the Kernel Regime: The theory is most accurate for models that don't change their internal representations much during training. Future work is needed to extend this to the "feature learning" regime where most modern LLMs operate.
  • Scale and Complexity: The tasks studied are relatively simple. Testing these insights on Large Language Models (LLMs) or complex multi-modal models is a logical next step.
  • Input Formats: The current framework assumes categorical components; extending this to continuous data or variable-length sequences (like text) remains an open challenge.

Summary updated

BibTeX
@inproceedings{lippl2025when,
  author = {Samuel Lippl and Kim Stachenfeld},
  title = {{When does compositional structure yield compositional generalization? A kernel theory.}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=FPBce2P1er},
}
Figure