arXiv:2610.20922cs.AIOct 2026

Manuscript Offprint

arXiv:2610.20922

Defining and Generating Compositional Structure

Eric Elmoznino, Tejas Kasetty, Blaise Agüera y Arcas, Yoshua Bengio, Guillaume Lajoie

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Compositional structure is pervasive in nature and across scales: atoms combine into molecules, molecules into cells, and cells into organisms, while further compositional hierarchies appear within each level. More broadly, compositionality — the reuse and recombination of parts into novel structures — is a fundamental source of interesting complexity in both natural and artificial systems. Yet despite its importance, and despite our apparent ease in recognizing it, mathematical accounts capturing what we intuitively mean by compositional structure remain limited. Here, we fill this gap by formalizing a simple idea: compositional structure emerges when parts, considered together, reveal shared structure that is not captured when those parts are modeled separately. We express this idea using algorithmic information theory — the mathematics of information and compression — which provides a natural way to identify structure in arbitrary data without specifying in advance what that structure must look like. Applied across scales, our definition informs where and how compositional structure emerges within an object. Using tractable approximations, we then invert the framework to generate compositional objects: we specify the desired form of their compositional structure without prescribing their particular content, and optimize directly over strings and images. The resulting objects exhibit readily recognizable hierarchical reuse and part–whole organization, suggesting that the definition captures compositional structure rather than merely complexity, regularity, or shared information. Finally, we discuss implications for machine learning, including a new perspective on depth in neural architectures and principles for constructing compositional data curricula capable of supporting open-ended learning.

Keywords compositionality, complexity, structure, compression, machine learning

1 Introduction

“Each portion of matter can be conceived as a garden full of plants, and as a pond full of fish. But each branch of the plant, each member of the animal, each drop of its humors, is also such a garden or such a pond.”

— Gottfried Wilhelm Leibniz, (Leibniz, 1898)

Compositional structure is everywhere, and at every scale. Atoms combine into molecules, molecules into cells, cells into organs, and organs into organisms. Each of these levels in turn contains further rich hierarchies; cells and organs, too, are intricately organized assemblies of interacting parts. Compositionality applies to more abstract spaces as well: music develops motifs into phrases and movements; programs build modules from modules and functions from functions; concepts are built from other concepts; technologies are built from more granular technologies (Arthur, 2009); scientific theories inherit and reorganize earlier ideas; and a well-designed curriculum continually recombines prior knowledge into more sophisticated skills. Across all these examples, complexity does not arise from an undifferentiated collection of elements, but from parts being reused and recombined into new structures. In this broad sense, compositionality is a signature of both life and intelligence, and arguably one of the principal sources of interesting complexity in the universe (Agüera y Arcas, 2025).

*Correspondence to: eric.elmoznino@gmail.com

Code is provided at https://github.com/EricElmoznino/defining_and_generating_compositional_structure

PREPRINT

Despite how readily we recognize such examples, it remains difficult to say precisely what makes them compositional. Familiar descriptions — that the whole is more than the sum of its parts, or that the meaning of a complex expression depends on its structure and the meanings of its constituents — are suggestive but do not by themselves provide a general quantitative measure (Pagin and Westerstahl, 2010). More formal approaches in machine learning typically begin with a prescribed set of semantic constituents and a rule for reconstructing the whole from them. Some define these constituents using known generative factors or object slots (Wiedemer et al., 2024, 2023), while others restrict their combination to a particular operation, such as a linear map or a prescribed hierarchy (Andreas, 2019; Trager et al., 2023). These approaches are useful when the parts and their modes of combination are already known, but they make compositionality relative to externally supplied semantics or a restricted form of composition (Elmoznino et al., 2024). They therefore do not fully answer the broader question: for an arbitrary object, what intrinsic compositional structure emerges across its parts, how much of it is present, and how is it organized across scales?

Our starting point is that compositional structure emerges when parts, considered together, reveal shared structure that is not captured when those parts are modeled separately. Here, a model represents the structure in an object: the regularities and patterns that provide a shorter explanation of the data. If the model of the whole contains something genuinely new beyond the models of the parts, then those parts share some pattern or organization that becomes apparent only through their combination. This is what we call novel compositional structure. A cell viewed in isolation reveals its internal organization; a collection of cells viewed together may additionally reveal a tissue, with spatial arrangements and collective mechanisms absent from any one cell. The same principle can be applied recursively: tissues form organs, motifs form phrases, and functions form higher-level functions. Repeating the comparison at different locations and scales produces a profile of where an object's compositional structure emerges. Section 2 develops this idea and tests it against several intuitive cases.

To make this precise, we use algorithmic information theory: a mathematics of information expressed through description length and compression. The shortest two-part description of an object separates a model, which captures its compressible structure, from the residual information needed to specify the object given that model. We compare these structure-bearing models across parts and wholes, measuring how much additional information is needed to describe the model of the whole from the models of its parts. This lets us speak rigorously about parts, structure, and novelty without specifying in advance what the structure must be. The distinction is between form and content: our quantities describe where and how structure is composed while remaining agnostic to the particular structures or patterns involved. Section 3 formalizes the definition, extends it to multiscale compositional structure profiles, and develops tractable approximations.

A quantitative definition also lets us look at the problem in reverse: instead of measuring the compositional structure of a given object, we can specify a desired profile and search for objects that exhibit it. We demonstrate this in Section 4 by optimizing directly over strings and images. Without prescribing their particular content, the objective produces strings with nested patterns and images with coherent, hierarchical visual organization reminiscent of abstract art. These experiments serve both as a method for generating structured data and as a concrete test of the definition. The generated objects display recognizable reuse, hierarchy, and part-whole organization rather than mere randomness or repetition.

Finally, we consider what this perspective suggests for machine learning. Natural data often builds structure on top of structure across many scales, matching the inductive bias of deep architectures whose successive layers build increasingly abstract features from earlier ones. Compositional structure can also grow through time: new data may reuse, extend, or reorganize what came before. This suggests principles not only for choosing architectures, but for ordering experience into curricula in which each stage builds maximally on prior structure, and for gathering new data that continually expands what a learner can represent. We close by developing these connections between depth, curricula, and open-ended learning to our definition of compositional structure in Section 5.

References (49)