# An Energy-Based Mechanism for Compositional Behavior

arXiv: https://arxiv.org/abs/2512.04745 · HTML: https://mlsanity.com/paper/2512.04745/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 26 of its 106 references that are in the map.
- First posted on arXiv 4 Dec 2025.

## Builds on (most cited first, 26 of 26)

- [Asynchronous Methods for Deep Reinforcement Learning](https://mlsanity.com/paper/1602.01783/) (2016)
- [A Survey on Mixture of Experts in Large Language Models](https://mlsanity.com/paper/2407.06204/) (2024)
- [On the Properties of the Softmax Function with Application in Game Theory and Reinforcement Learning](https://mlsanity.com/paper/1704.00805/) (2017)
- [Learning to Fly -- a Gym Environment with PyBullet Physics for Reinforcement Learning of Multi-agent Quadcopter Control](https://mlsanity.com/paper/2103.02142/) (2021)
- [safe-control-gym: a Unified Benchmark Suite for Safe Learning-based Control and Reinforcement Learning in Robotics](https://mlsanity.com/paper/2109.06325/) (2021)
- [How to Reuse and Compose Knowledge for a Lifetime of Tasks: A Survey on Continual Learning and Functional Composition](https://mlsanity.com/paper/2207.07730/) (2022)
- [Deep Neural Network Structures Solving Variational Inequalities](https://mlsanity.com/paper/1808.07526/) (2018)
- [Maximum-Entropy Multi-Agent Dynamic Games: Forward and Inverse Solutions](https://mlsanity.com/paper/2110.01027/) (2021)
- [Contrastive Active Inference](https://mlsanity.com/paper/2110.10083/) (2021)
- [Why do similarity matching objectives lead to Hebbian/anti-Hebbian networks?](https://mlsanity.com/paper/1703.07914/) (2017)
- [Collective behavior from surprise minimization](https://mlsanity.com/paper/2307.14804/) (2023)
- [A biologically plausible neural network for Slow Feature Analysis](https://mlsanity.com/paper/2010.12644/) (2020)
- [A General Framework for Interpretable Neural Learning based on Local Information-Theoretic Goal Functions](https://mlsanity.com/paper/2306.02149/) (2023)
- [Online Markov decision processes with Kullback-Leibler control cost](https://mlsanity.com/paper/1401.3198/) (2014)
- [Diversity-enabled sweet spots in layered architectures and speed-accuracy trade-offs in sensorimotor control](https://mlsanity.com/paper/1909.08601/) (2019)
- [Free-Energy Machine for Combinatorial Optimization](https://mlsanity.com/paper/2412.09285/) (2024)
- [Probabilistic design of optimal sequential decision-making algorithms in learning and control](https://mlsanity.com/paper/2201.05212/) (2022)
- [Modeling and Contractivity of Neural-Synaptic Networks with Hebbian Learning](https://mlsanity.com/paper/2204.05382/) (2022)
- [Time-Varying Convex Optimization: A Contraction and Equilibrium Tracking Approach](https://mlsanity.com/paper/2305.15595/) (2023)
- [Positive Competitive Networks for Sparse Reconstruction](https://mlsanity.com/paper/2311.03821/) (2023)
- [Distributionally Robust Free Energy Principle for Decision-Making](https://mlsanity.com/paper/2503.13223/) (2025)
- [Network dynamics of innovation processes](https://mlsanity.com/paper/1707.04239/) (2017)
- [Dynamical systems and forward-backward algorithms associated with the sum of a convex subdifferential and a monotone cocoercive operator](https://mlsanity.com/paper/1403.6312/) (2014)
- [Learning with Delayed Payoffs in Population Games using Kullback-Leibler Divergence Regularization](https://mlsanity.com/paper/2306.07535/) (2023)
- [Free-Gate: Planning, Control And Policy Composition via Free Energy Gating](https://mlsanity.com/paper/2412.06636/) (2024)
- [What the flock knows that the birds do not: exploring the emergence of joint agency in multi-agent active inference](https://mlsanity.com/paper/2511.10835/) (2025)

## Built on by (most cited first, 2 of 2)

- [Energy-Based Dynamical Models for Neurocomputation, Learning, and Optimization](https://mlsanity.com/paper/2604.05042/) (2026)
- [Predictive Coding with Bayesian Priors via Proximal Gradients](https://mlsanity.com/paper/2606.08374/) (2026)

## Abstract (arXiv)

Flexible intelligence relies on the ability to reuse previously acquired behaviors and combine them differently as circumstances change. In biological and artificial systems, this ability is often attributed to gating mechanisms that determine how much each available behavior should contribute at a given time. Yet these gating rules, the dynamics that compute them, and the neural circuits that may implement them are usually introduced separately, leaving unclear whether they reflect a common underlying principle. Here, we show that they can all be derived from a single variational principle for behavioral composition. The resulting mechanism naturally gives rise to softmax gating, evolves as an energy-based dynamical system with guaranteed convergence, and admits a recurrent neural network instantiation featuring context-dependent and local interactions. Across collective behavior, human decision-making, and layered control, the same mechanism reproduces characteristic behavioral patterns, provides interpretable accounts of how different behaviors are combined, and matches or outperforms established approaches. These results provide a unified account of how behavioral composition can emerge from a common principle, with implications for understanding flexible behavior in natural systems and for designing artificial agents that can adapt by recombining existing capabilities.
