On the Statistical Mechanisms of Distributional Compositional Generalization

Jingwen Fu, Nanning Zheng

Introduction

Distributional Compositional Generalization (DCG) refers to the ability of an AI system to handle novel combinations of known concepts—for instance, recognizing a "red triangle" after only being trained on "red rectangles" and "blue triangles." While humans naturally excel at this, machine learning models often struggle because DCG fundamentally violates the standard Independent and Identically Distributed (IID) assumption, which dictates that training and test data must come from the same distribution.

Previous attempts to solve this issue, such as disentanglement or group invariance, have lacked a unified statistical theory to explain why certain methods succeed while others fail. This paper introduces a rigorous statistical framework to address two fundamental questions: Can a solution for one DCG problem apply to another? And what specific statistical properties indicate an algorithm's capacity for knowledge composition?

A New Statistical Framework

To answer these questions, the authors shift their focus from specific model architectures to the underlying statistical mechanisms of the learning process. They introduce three core theoretical components:

  1. The Invariant Measure ($\mu$-measure): The authors propose a mathematical baseline that remains constant across different learning algorithms. This measure reveals a critical insight: unless an algorithm is highly adaptive to the data, improving performance on one compositional task typically incurs a "trade-off" (performance degradation) on another.
  2. Error Decoupling: The framework mathematically separates the generalization error into two distinct parts. The IID Error arises simply from having insufficient training samples, while the Compositional Generalization (CG) Error stems from the model's inability to deduce how concepts combine.
  3. A Novel Generalization Bound: The authors derive a new upper bound for generalization error driven by two factors: Compatibility (how well the algorithm's internal bias aligns with the composition rule) and Mutual Information (how much the algorithm's output reflects the underlying rule).

Experimental Validation

Rather than relying on opaque, large-scale datasets, the authors validated their theory using a controlled, synthetic environment to precisely measure rule complexity. They constructed a "toy" dataset consisting of two 1,000-word sets and generated 64 distinct compositional rules (e.g., repeating words in specific sequences).

To test the theory, they evaluated two configurations of GPT-2 (a 4-layer "Small" and a 6-layer "Large" model), which were pre-trained on different schedules to simulate varying inductive biases.

Key Insights and Results

  • Adaptivity and Trade-offs: The $\mu$-measure demonstrates that "non-trade-off" improvements—enhancing performance on one task without penalizing another—are only possible if the learning algorithm is highly sensitive and adaptive to the training data.
  • The Role of Compatibility: Success in DCG is not merely a function of model size or complexity; it is heavily dependent on the compatibility ($\tau$) between the algorithm and the composition rule. If the rule and the algorithm are incompatible, the error bound increases significantly.
  • Tighter Generalization Bounds: Compared to the classic Ben-David et al. (2010) bound for out-of-distribution theory, the authors' new bound is significantly tighter in scenarios dominated by the learning algorithm's influence. As rule complexity increased in the GPT-2 experiments, the theoretical bound accurately tracked the empirical rise in CG Error, a dynamic that older theories failed to capture.
  • Theoretical Backing for Data-Centric AI: The findings highlight a clear correlation between the Mutual Information ($I_{A,\beta}$) of the algorithm and its average performance across all 64 tasks. This statistical dependence between the algorithm's output and the composition rule is a primary driver of generalization, providing strong theoretical support for data-centric AI and suggesting that data engineering is just as critical as model architecture.

Limitations and Future Directions

While the mathematical foundations of this framework are robust, the empirical validation is currently limited to synthetic word-sequence tasks. Scaling this theory to high-dimensional, real-world data—such as complex video understanding or robotic manipulation—remains a significant hurdle.

Furthermore, the framework assumes the existence of a definable "rule prediction function" ($\beta$). In many real-world, black-box deep learning scenarios, identifying the exact composition rule the model is attempting to learn is incredibly difficult. Moving forward, the authors suggest that these insights could pave the way for new "co-design" strategies, where network architectures and data collection protocols are jointly engineered to maximize the compatibility identified in this theoretical framework.

Summary updated

BibTeX
@inproceedings{fu2025statistical,
  author = {Jingwen Fu and Nanning Zheng},
  title = {{On the Statistical Mechanisms of Distributional Compositional Generalization}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=37NsgZkyWH},
}
Figure