## In variational Bayes

A formalism for learning and inference in variational Bayes approximation, borrowing bits from statistical mechanics, and leveraging message passing in graphical models. AFAICT it’s synonymous with ELBO, the evidence lower bound.

Free energy comes as, AFAICT, two flavours, *Bethe* and *Helmholtz*. See your favourite variational Bayes text for more.

## Is this also some kind of universal learning scheme?

The point of writing this thing is to work out whether there is an insight int use of Free Energy to analyze brains, or not.

Not “free as in speech” or “free as in beer”, nor “free energy” in the sense of perpetual motion machines, zero point energy or pills that turn your water into petroleum.

My question is – how much more credible than these latter examples is the “free energy principle” as a unifying, uh, *thing* for learning systems?

The chief pusher of this wheelbarrow appears to be Karl Friston.

He starts his *Nature Reviews Neuroscience* with this statement of the principle:

The free-energy principle says that any self-organizing system that is at equilibrium with its environment must minimize its free energy.

Is that “must” in

the sense of moral obligation, or is it

a testable conservation law of some kind?

If the latter, self-organising in what sense? What class of equilibrium? For which definition of the free energy? What is our chief experimental evidence for this hypothesis? Rather than a no-nonsense unpacking of these, the article goes on to meander through an ocean fashionable other stuff (The Bayesian Brain Hypothesis) which I have not yet trawled for salient details, so I don’t realy know about that at this point.

Fortunately we do get a definition of free energy itself, with a diagram, which

…shows the dependencies among the quantities that define free energy. These include the internal states of the brain \(\mu(t)\) and quantities describing its exchange with the environment: sensory signals (and their motion) \(\bar{s}(t) = [s,s',s''…]^T\) plus action \(a(t)\). The environment is described by equations of motion, which specify the trajectory of its hidden states. The causes \(\vartheta \supset {\bar{x}, \theta, \gamma }\) of sensory input comprise hidden states \(\bar{x} (t),\) parameters \(\theta\), and precisions \(\gamma\) controlling the amplitude of the random fluctuations \(\bar{z}(t)\) and \(\bar{w}(t)\). Internal brain states and action minimize free energy \(F(\bar{s}, \mu)\), which is a function of sensory input and a probabilistic representation \(q(\vartheta|\mu)\) of its causes. This representation is called the recognition density and is encoded by internal states \(\mu\).

The free energy depends on two probability densities: the recognition density \(q(\vartheta|\mu)\) and one that generates sensory samples and their causes, \(p(\bar{s},\vartheta|m)\). The latter represents a probabilistic generative model (denoted by \(m\)), the form of which is entailed by the agent or brain…

\[F = -<\ln p(\bar{s},\vartheta|m)>_q + -<\ln q(\vartheta|\mu)>_q\]

This, on the other hand, seems to be option 1: Any right thinking brain, seeking to avoid the vice of slothful and decadent perception after the manner of heathens, foreigners, and compulsive masturbators, would do well to seek to maximise its free energy before partaking of a stimulating and refreshing physical recreation such as a game of cricket.

Presumably if I drill deeper, this will be related back to other definitions, precise types of energies employed etc, the predictions to be made and experiments done, though.

See also: Exergy, Landauer’s Principle, the Slate Star Codex Friston dogpile, based on a nice exposition by Wolfgang Schwarz.

Compare an contrast another Bayesian model of human problem-solving, by Noah Goodman and Joshua Tenenbaum.

## Refs

- FrJo05: B.J. Frey, Nebojsa Jojic (2005) A comparison of algorithms for inference and learning in probabilistic graphical models.
*IEEE Transactions on Pattern Analysis and Machine Intelligence*, 27(9), 1392–1416. DOI - XiJR03: Eric P. Xing, Michael I. Jordan, Stuart Russell (2003) A Generalized Mean Field Algorithm for Variational Inference in Exponential Families. In Proceedings of the Nineteenth Conference on Uncertainty in Artificial Intelligence (pp. 583–591). San Francisco, CA, USA: Morgan Kaufmann Publishers Inc.
- LCHR06: Yann LeCun, Sumit Chopra, Raia Hadsell, M. Ranzato, F. Huang (2006) A tutorial on energy-based learning.
*Predicting Structured Data*. - WaJo05: M. Wainwright, M. Jordan (2005) A variational principle for graphical models. In New Directions in Statistical Signal Processing (Vol. 155). MIT Press
- JGJS99: Michael I. Jordan, Zoubin Ghahramani, Tommi S. Jaakkola, Lawrence K. Saul (1999) An Introduction to Variational Methods for Graphical Models.
*Machine Learning*, 37(2), 183–233. DOI - YeFW05: Jonathan S. Yedidia, W.T. Freeman, Y. Weiss (2005) Constructing free-energy approximations and generalized belief propagation algorithms.
*IEEE Transactions on Information Theory*, 51(7), 2282–2312. DOI - WaJo08: Martin J. Wainwright, Michael I. Jordan (2008)
*Graphical models, exponential families, and variational inference*(Vol. 1). - Beng09: Yoshua Bengio (2009) Learning deep architectures for AI.
*Foundations and Trends® in Machine Learning*, 2(1), 1–127. DOI - Mont11: Andrea Montanari (2011)
*Lecture Notes for Stat 375 Inference in Graphical Models* - Fris13: Karl Friston (2013) Life as we know it.
*Journal of The Royal Society Interface*, 10(86). DOI - WaKP13: Chaohui Wang, Nikos Komodakis, Nikos Paragios (2013) Markov Random Field modeling, inference & learning in computer vision & image understanding: A survey.
*Computer Vision and Image Understanding*, 117(11), 1610–1627. DOI - JoWe02: Michael I. Jordan, Yair Weiss (2002) Probabilistic inference in graphical models.
*Handbook of Neural Networks and Brain Theory*. - CaCa05: Tommaso Castellani, Andrea Cavagna (2005) Spin-Glass Theory for Pedestrians.
*Journal of Statistical Mechanics: Theory and Experiment*, 2005(05), P05012. DOI - Fris10: Karl Friston (2010) The free-energy principle: a unified brain theory?
*Nature Reviews Neuroscience*, 11(2), 127. DOI - YeFW03: J.S. Yedidia, W.T. Freeman, Y. Weiss (2003) Understanding Belief Propagation and Its Generalizations. In Exploring Artificial Intelligence in the New Millennium (pp. 239–236). Morgan Kaufmann Publishers