The dominant trend in artificial intelligence has been the pursuit of monolithic models—single, massive neural networks trained to handle every possible scenario. However, as Yilun Du and Leslie Pack Kaelbling argue in Compositional Generative Modeling: A Single Model is Not All You Need, this approach hits a wall of diminishing returns when faced with the combinatorial explosion of the real world. We cannot train a model on every possible combination of objects, relations, and constraints.
Instead, a growing body of research suggests a more modular path: representing concepts as energy functions that can be mathematically summed to create complex, novel behaviors without retraining.
The Energy Landscape of a Concept
To understand why this works, we must first view a "concept" not as a category label, but as a landscape. In an Energy-Based Model (EBM), a concept is a function $E(x)$ that assigns a scalar value to any input $x$. Low energy represents high compatibility with the concept, while high energy represents a violation.
As Igor Mordatch proposed in Concept Learning with Energy-Based Models, this shift from "how-to" generators to "verifiers" is transformative. If you have an energy function for "red" and another for "square," the energy function for a "red square" is simply the sum of the two. The minima of this combined landscape naturally correspond to objects that satisfy both constraints simultaneously.
Summation as Logical Conjunction
The mathematical elegance of this approach lies in the relationship between probability and energy. In physics and statistics, the probability of a state is often proportional to $e^{-E(x)}$. When we assume two concepts are independent, their joint probability is the product of their individual probabilities:
$$P(A \text{ and } B) = P(A) \times P(B) \propto e^{-E_A(x)} \times e^{-E_B(x)} = e^{-(E_A(x) + E_B(x))}$$
This reveals a fundamental principle: Adding energy functions is equivalent to a logical AND operation.
This principle allows for zero-shot composition. Nan Liu and Yilun Du demonstrated in Learning to Compose Visual Relations that by modeling spatial relationships (like "on top of" or "to the left of") as independent EBMs, a system can generate images satisfying complex, interlocking requirements that holistic models like DALL-E often conflate. Similarly, Matthias Fey and Tailin Wu showed in ZeroC that complex visual symbols can be recognized by summing the energy of their constituent parts and relations.
Composing with Diffusion Scores
While EBMs provide the theoretical framework, sampling from them can be difficult. Modern research has bridged this gap using Diffusion Models. A diffusion model learns a "score function"—the gradient of the log-density of the data. Since the score is the gradient of the negative energy ($\nabla \log p(x) \approx -\nabla E(x)$), composing diffusion models follows the same additive logic.
In Compositional Diffusion-Based Continuous Constraint Solvers, Zhutian Yang shows that independent diffusion models trained on specific robotic constraints (like "avoid collision" or "reach goal") can be composed at inference time by summing their predicted score gradients. This allows a robot to solve novel, multi-constraint tasks without ever having seen that specific combination during training.
This "score composition" has been applied across domains:
- Trajectory Planning: Julia Briden and Richard Linares used it for spacecraft descent in TrajDiffuser.
- Motion Generation: Hehe Fan and Yi Yang enabled complex human motion synthesis using logical operators like AND and NOT in EnergyMoGen.
- Long-Form Text: Jen-Yuan Huang developed PRISM, which decomposes long prompts into semantic segments and merges their noise predictions via energy-based composition.
Generalization through Extrapolation
The most powerful aspect of this direction is its ability to generalize to the "unseen." Traditional models struggle with out-of-distribution combinations. However, as shown in Compositional Risk Minimization by Divyat Mahajan and Pascal Vincent, modeling data through additive energy distributions allows a system to mathematically extrapolate. By learning the independent energy terms for individual attributes, the system can accurately predict the likelihood of pairings it never encountered in its training set.
This modularity even extends to problem-solving. Alexandru Oarga and Yilun Du demonstrated in Generalizable Reasoning through Compositional Energy Minimization that global problem landscapes can be constructed by summing the energy of local rules. A model trained on simple, small-scale constraints can thus generalize to solve much larger, more complex problem instances at inference time.
Summary: A Programming Language for Generative AI
By treating generative models as energy functions, we move away from "black box" generation toward a form of probabilistic programming. We can "reduce, reuse, and recycle" pre-trained models (Du et al., 2023), fusing them together (He et al., 2026) to satisfy new requirements. The core intuition is simple: if you can define the "energy" of the parts, you can define the "energy" of the whole through simple addition.