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

A General Theory for Compositional Generalization

Jingwen Fu, Zhizheng Zhang, Yan Lu, Nanning ZhengarXiv 2024 · DOI

Introduction

Compositional Generalization (CG) is the hallmark of human intelligence—the ability to recognize or generate novel combinations of known concepts. For instance, a human who understands "red square" and "blue circle" can immediately conceptualize a "blue square" without prior exposure. While intuitive for humans, deep learning models notoriously struggle with this task. Most current models rely on the Independent and Identically Distributed (IID) assumption, where training and test data are drawn from the same distribution. CG, by definition, requires generalizing to a non-IID distribution.

Historically, research into CG has been fragmented, with researchers developing task-specific "hacks" for natural language processing, robotics, or computer vision. This paper moves beyond these narrow approaches to propose a unified, task-agnostic theoretical framework for Compositional Generalization.

A Formal Framework for Compositional Generalization

The authors begin by establishing a formal definition of CG that applies across domains. Their framework relies on two primary components:

  1. Well-defined Concepts: Samples must originate from a set of predetermined, identifiable concepts.
  2. Compositional Rules: There must be a clear, measurable bijection (a "compositional rule") that dictates how these concepts are systematically combined to generate novel samples.

By formalizing these components, the authors treat CG as a mathematical problem rather than a domain-specific challenge, allowing for the derivation of fundamental limits.

The No Free Lunch Theorem for CG

One of the paper's most significant contributions is the proof of a "No Free Lunch" (NFL) theorem specifically for Compositional Generalization. Using mathematical induction, the authors demonstrate that across the entire spectrum of possible compositional rules, no single learning algorithm can be consistently superior.

This theorem implies a fundamental trade-off: if an algorithm is designed to excel at one type of composition (e.g., additive combinations), it must necessarily perform poorly on others. This finding suggests that the search for a "universal" CG algorithm is futile. Instead, effective generalization requires making specific assumptions about the task at hand and incorporating domain knowledge into the model's design.

Information-Theoretic Generalization Bounds

To quantify a model's success, the authors derive a new generalization bound based on information theory. Unlike standard bounds that focus on model complexity (such as VC dimension), this new bound incorporates the Mutual Information between the learning algorithm’s output and the underlying compositional rule.

Essentially, the bound measures how much the model "knows" about the logic of the rule. The authors suggest that an effective CG solution is one that minimizes the mutual information between the model and the specific composition rule given the training data. In simpler terms, the model needs to learn the general logic of the rule rather than memorizing specific training samples.

The Generative Effect: Why CG is Hard

The paper introduces a crucial distinction between two types of compositional logic:

  • Independent Rule Mechanisms (IRM): In these scenarios, the "whole" is simply the sum of its parts. For example, changing the color of an object does not change its shape. The authors prove that IRM problems are theoretically solvable if the model has universal approximation capabilities.
  • The Generative Effect: This occurs when combining concepts creates interdependent or non-linear results (e.g., multiplication, where the product depends on both factors in a way that isn't a simple summation). The authors identify the Generative Effect as the "unavoidable challenge" for AI, as it represents a much higher level of complexity than IRM.

Validation via Synthetic Distributions

As a theoretical work, the paper validates its findings using synthetic "toy" distributions. These experiments focused on two scenarios:

  1. Function Space Dominated: Where the model's architecture has an inherent bias toward certain solutions.
  2. Learning Algorithm Dominated: Where the training process itself determines which solution the model selects.

The results showed that the authors' proposed bound was significantly "tighter" and more accurate than previous benchmarks, such as the Ben-David et al. (2010) bound for domain adaptation. Specifically, the new bound successfully tracked the actual decrease in generalization error as more training data was introduced, whereas older theoretical bounds failed to capture the influence of the learning algorithm's dynamics.

Conclusion and Limitations

The "General Theory" presented in this paper provides the mathematical "rules of the game" for Compositional Generalization. While it does not provide a specific recipe for a winning model, it clarifies what an effective solution must look like: it must lean into task-specific assumptions and minimize mutual information with the rule logic.

The primary limitation remains the "Generative Effect Wall." While the theory identifies this challenge, solving it remains the frontier for the next generation of CG research. Furthermore, while the solvability proofs provide a strong theoretical foundation, they often assume a regime of "infinite data" for support distributions, which remains a hurdle for practical, low-data applications.

Summary updated

BibTeX
@misc{fu2024general,
  author = {Jingwen Fu and Zhizheng Zhang and Yan Lu and Nanning Zheng},
  title = {{A General Theory for Compositional Generalization}},
  year = {2024},
  eprint = {2405.11743},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.11743},
}
Figure