Life and the Second Law

Beyond its application in neuroscience, Karl Friston’s free energy principle appeals to the physicist in me, because it starts from a very elegant homeostatic (and autopoetic) argument.

It is based on the assumptions that (1) living organisms can be described as stochastic dynamical systems which are (approximately) ergodic, i.e. which possess some kind of attractor, and that (2) these systems are isolated from their environment via a Markov blanket, i.e. that there is a separation of the world into internal, external and boundary (sensory and active) states.

But how do such systems form? There are nice articles from Prof. Friston and colleagues, showing that these systems emerge under very generic circumstances (i.e. Life as We Know It, A Free Energy Principle for a Particular Physics).

Besides these works, there are exciting developments in the field of non-equilibrium thermodynamics related to the question of how living and adaptive systems form. An emerging view seems to be that in contrast to the widely held belief that life is an improbable “fight against entropy”, as it was coined by Erwin  Schrödinger in 1944, it is rather just the opposite. The seemingly unlikely, delicate structures of life might have just emerged to facilitate nature’s drive to increase entropy, following the second law of thermodynamics.

One of the likely origins of this misconception might be the way that entropy is usually described in everyday language, namely as “disorder”. This is only part of the truth. I will try to explain this more clearly by first giving an intuitive introduction to the concept of entropy and the second law of thermodynamics. Building on this, I will try to give a more formal definition, which can be used to develop some intuition on why spontaneously emerging ordered states, which allow a system to dissipate energy stored in macroscopic variables into heat, thereby increasing entropy, might actually be thermodynamically favoured, and thus very likely. Then I will try to (quickly) summarise or at least point to some relevant recent work in the field of non-equilibrium thermodynamics trying to understand the origin of life. Finally, I will argue (vaguely), that the emerging, living systems have to fulfil the basic assumptions required by the free energy principle.

1. Demystifying Entropy

Let’s start with the basics: Entropy is a quantity that even some physicists feel a little bit puzzled by. In my personal opinion, it should be better called “heat”, since it is pretty much the quantity that is described by this word in everyday language. Unfortunately, “heat” already has another very specific, technical meaning in physics, so we can not just change the name of the quantity to make it more familiar.

We’ll define entropy later in exact terms, but for now just stick with what you’d call “heat” in everyday life. This is because then, the second law of thermodynamics coincides with our everyday experience in many cases.

The second law of thermodynamics states, that in a closed system, i.e. a system which cannot exchange matter or energy with its environment, entropy can never decrease. When entropy stays constant, the associated processes are reversible, when it increases, the associated processes are irreversible.

Imagine we observe a small, red ball rolling down from the edge of a symmetric, smooth valley. Further imagine that the whole system is closed, i.e. cannot exchange matter or energy with its surroundings (think of a very well isolated, air-tight box). The initial situation is pictured here:


Now imagine, there is no friction. A good approximation would be an incredibly smoothly rolling ball on a perfectly smooth slope in a vacuum. In this case, the ball might rise to (almost) the same height on the opposite side of the valley, turn there and roll back to (almost) its initial position. If I were to record a video of the process and play it forwards and backwards, I couldn’t tell which was the right direction. Here’s what that might look like:


Now imagine that there is quite some friction between the ball, the slope (e.g. a real ball rolling down a grassy hill), and the air around it. The ball will roll down the valley and ascend a bit on the opposite side, but it will not even come close to its initial height. From there, it will roll back towards its starting position, but I will climb even less this time. After only a few of these iterations, it will settle at the bottom of the valley.

If I were to record a video of this process, everyone would instantly spot if I played it backwards. It just never happens (without any magic trick or external force involved) that a ball sitting at the bottom of a valley suddenly begins moving, acquiring more and more momentum and rolling higher and higher up the slope. Just watch the following illustration:


So apparently somehow the friction involved in the second process gives it a direction of time and makes the second process irreversible. Why is this?

In the first, reversible process the energy stored in the macroscopic variables, i.e. the position and the velocity of the ball, is almost exactly conserved. This is because there is no friction, which could brake the rolling ball by taking away some of the kinetic energy and transforming it into heat. Thus, the ball can rise to the same height on the opposite side of the valley, since energy only ever gets converted from macroscopic potential energy to macroscopic kinetic energy and back.

In contrast, in the second process, the friction transforms the usable, kinetic energy of the ball into heat, which is distributed in the environment, increasing the temperature of the ball, the slope and the surrounding air. This increase in temperature effectively increases the mean kinetic energy of the individual particles (i.e. atoms and molecules), which make up the ball, slope and air around it. This allows these particles to move and vibrate in more ways than before, as a physicist you’d say it allows them to access a larger volume of microscopic states in their state space (i.e. the space of possible microscopic configurations). This increase in the number of possible ways in which the microscopic particles can be arranged in terms of their position, velocities, vibrational states and so forth, which can macroscopically not be discerned (you just notice that the ball and the slope and the air get warmer, but you can’t exactly say in which way the individual particles are moving at any moment) is exactly the increase in entropy, which makes the process irreversible. Although energy is not lost (remember: we are talking about a closed system, i.e. there is an airtight, well isolated box around the slope, ball and the surrounding air), it is transformed from a macroscopic, usable form, to a microscopic form which cannot be used to push the ball up the slope (what a physicist would call “to do work”). Just try to imagine how unlikely it would be for the about 10^{23} microscopic particles, all moving or jiggling around in different directions, to spontaneously fluctuate in a spatially and temporally correlated way, so that they could push the ball around. This is about as likely as the water in a glas spontaneously cooling down and jumping out of it. It is theoretically possible, but the actual probability is infinitely small, so that even if you’d observe millions of glasses of water during the whole life of the universe, you’d still not see that happening.

Thus, in principle one could say that processes, during which a certain kind of friction occurs, which transports energy from macroscopic (say the position or velocity of the ball) to microscopic (say the mean kinetic energy of the individual atoms and molecules) variables, and which thereby increases the entropy (i.e. the number of indistinguishable microscopic states in which the atoms and molecules can be arranged and in which they can move) of the combined system, are irreversible. It is somehow intuitive, that the opposite direction, i.e. a spontaneous cooling of both ball and slope coinciding with the ball rolling upwards, due to a coincidental correlated motion of about 10^{23} individual atoms or molecules, will never happen.

2. Some more formal definitions

2.1 Entropy

We follow the nice and more in depth discussion of the modern formulation of the second law, given in the awesome paper by Kate Jeffery, Robert Pollack and Carlo Rovelli.

An elegant way to formulate the second law is due to Boltzmann. He defined the entropy of a macroscopic state of a closed system as the number of microscopic arrangements of the constituents of this system, i.e. the individual atoms and molecules, that are consistent with a given set of values of the observed macroscopic variables, which define the macroscopic state. So the entropy S(m) of a macroscopic state m is defined as

S(m) = k \ln W(m)

Here k is the Boltzmann constant and W(m) is the volume (or the count) of all microscopic states which are compatible with the values of the macroscopic state variables characterising m.

Think of a very simple, closed system with only two macroscopic states, A and B. Imagine the microscopic phase space could be sketched in two dimensions like this:


The different shades of grey depict the phase space volumes that correspond to the values of the macroscopic state variables, which define the two states A and B. If the system is initialised in state A, but if there is no constraint on the macroscopic variables forcing the system to stay in this state, the microscopic states will just start to explore the phase space, performing a random walk. Finally, after a certain time (which depends on the actual details of the microscopic dynamics) the system will settle in its thermodynamic equilibrium, in which the probability of finding the system in any accessible microscopic state will be uniform. Thus, as there are many more microscopic states equating to macroscopic state B than to macroscopic state A, one will find the system almost surely in macroscopic state B.

2.2 Information Theoretic Perspective

Please bear in mind that in this blog post, when I say “entropy”, I mean the special case of the thermodynamic entropy of a closed system. Entropy can be defined in a more general way for every probability distribution p(x) on a (measurable) space X. It is defined as the expected value of the negative logarithm of the probability density. I.e. if X was a finite, discrete set, it could be calculated as

H(p) = -\sum_{x\in X} p(x) \log p(x)

This quantity is also called the Shannon entropy, after Claude Shannon, who introduced it in the context of information theory. It looks complicated, but it is just a measure of how spread out the probability density is, e.g. how much about the system we don’t know  due to its randomness. Another way to see it is as the average surprise -\log p(x) when observing samples x from this distribution. Calling -\log p(x) “surprise” makes sense, as you will be more surprised if you observe an element x, which is less likely, i.e. which has a small probability p(x). It can be shown (try it) that the entropy of a distribution on a discrete, finite set is maximised, when the probability mass is spread out evenly over all elements x, i.e. when we know a priori nothing about which element x we will observe, when we draw from the distribution. Put plainly, the entropy of a fair dice is maximal, as we don’t know which outcome we’ll observe, and the entropy declines when somebody tinkers with the dice to bias it towards a certain outcome.

Now we can calculate the maximum entropy of a discrete distribution p(x), which could represent the macroscopic state m of a system on a discrete microscopic state space, which has access only to a finite, discrete set  W of microscopic states. In this case, the probability for every state is equal to p(x) = \frac{1}{N_W}, where N_W is the number of states in W. Thus, the value of the entropy H(p) is

H(p) =  -\sum_{x\in X} \frac{1}{N_W} \log \frac{1}{N_W} = - N_W\frac{1}{N_W} \log \frac{1}{N_W} = -\log \frac{1}{N_W} = \log N_W

So if a system maximises its Shannon entropy on a finite discrete set of states, the value of the Shannon entropy is just the number of states it has access to. In the continuous case, in which the distribution p(x) just represents the macroscopic state m of a system, which has access only to a finite volume W(m) of its microscopic phase space, we can replace the summation above with an integral and we find that the resulting value of the maximum Shannon entropy is just the volume W(m) of the microscopic phase space to which the system has access. Thus, we see that we can recover Boltzmann’s definition by interpreting p(x) as the probability density on the space of possible microstates of a closed thermodynamic system, which corresponds to a macrostate m that has access only to a finite volume W(m) of the state space and by positing that in thermal equilibrium the Shannon entropy of this probability density will be maximised. In this way, the information theoretic (H, Shannon) and classical (S, Boltzmann) definitions of entropy and the second law coincide (modulo the Boltzmann factor k, which just depends on the units in which you calculate the entropy).

On the other hand, the entropy of an arbitrary probability distribution on a discrete, finite set X is minimised, when there is no randomness and we know exactly, which state x^* we will observe. In this case all the probability mass is concentrated on this state. Therefore p(x) = 1 if x = x^* and p(x) = 0 otherwise. The resulting entropy is

H(p) =  -\sum_{x\in X} p(x) \log p(x) = - p(x^*) \log p(x^*) = -1 \log 1 = 0

Thus, if we manage to build a dice that always lands with the same side up, the entropy of the resulting probability distribution will be minimal and have a value of zero.

Please note that in the continuous case, the differential entropy that you get when you replace the sum with an integral over a probability density can also be less than zero. Just so you can’t say I didn’t warn you, when you do your own calculations.

So the take-away from this section should be that an information theoretic quantity called “entropy” can be calculated for any probability distribution and quantifies how spread out this distribution is on its underlying space, e.g. how much we don’t know about the system described by this distribution, due to its randomness. If we calculate the maximum value of this information theoretic entropy for the special case of a probability distribution on a microscopic state space of a closed, thermodynamic system, which represents a macroscopic state at thermal equilibrium, we recover Boltzmann’s classical formula (modulo the Boltzmann constant k) for the thermodynamic entropy of a closed thermodynamic system.

Finally, a quick word of caution for people familiar with Karl Friston’s free energy principle: In this literature (e.g. Action and Behavior: A Free Energy Formulation,  Perceptions as Hypotheses, Saccades as Experiments), the word entropy usually refers to the information theoretic (Shannon) entropy of some clearly defined distributions (e.g. on sensory states, hidden states, some counterfactual density) and usually does not refer to the thermodynamic entropy. Also, in the next section we will talk about thermodynamic free energy, which is a different quantity from the information theoretic, variational free energy which lends its name to the free energy principle. I’m just stressing this here to prevent possible confusion due to the fact that entropy and free energy can mean different things in different contexts.

2.3 Thermodynamic Free Energy

As described in the initial example above, a very good way to increase W(m) is to increase the energy stored in the microscopic variables. E.g. the increase in the mean kinetic energy of the atoms and molecules making up the ball, the air and the slope due to friction allows the atoms and molecules to move, jiggle or vibrate in many more different ways. In this process of transforming energy from macroscopic (i.e. the position of the ball) to microscopic (i.e. the mean kinetic energy of the atoms and molecules) variables, the “usable” energy in the system decreases. This is why the ball can and will not roll up the slope again after it has settled at the bottom of the valley. The energy, which is “free to use” to do work on macroscopic objects, is called free energy. It can be defined as the total energy in the system, which is constant for a closed system, minus the disordered energy in the microscopic variables, which can be calculated as the product of entropy times temperature. But please be aware of the fine print: Energy stored in terms of temperature can very well be used to do work, but only if there are objects at a different temperature. E.g. one could use a hot rock to boil a pot of water and use the resulting steam to move a macroscopic piston. But this only works if the water and the rock have not equilibrated yet, i.e. if there is still some kind of macroscopic disequilibrium in which free energy can be stored. As soon as thermodynamic equilibrium is reached and thus  the rock and the water are at the same temperature, there will be no free energy left to do macroscopic work in the system.

Thus, the free energy of a system decreases as its entropy increases. In fact, one can formulate the second law by saying that in a closed system free energy cannot increase over time, and that spontaneously occurring, irreversible processes are associated with a decrease in free energy. Please look at chapter one of this nice paper by John Baez and Blake Pollard, for a mathematical argument why this is the case.

Now everyone who is familiar with Karl Friston’s “Free energy principle” has to be very careful. We are talking about the thermodynamic free energy now, which is a completely different quantity than the variational free energy, used to do approximate Bayesian inference in machine learning and (putatively) also in the brain. The name just derives from the fact that the latter has a functional form very similar to the former, and that the variational formalism was indeed invented by Richard Feynman to approximately solve problem in theoretical physics.

2.4 Entropic Forces

Starting with the discussion of the inclined plane in school, most people are used to to energetic forces. These are forces that arise due to the gradient of an energy function, often also called a potential function or just potential. Examples are the electric forces drawing electrons through wires due to the potential difference created by a battery in simple circuits, or the force of gravity. Think again of our red ball on the slope, who’s acceleration and de-acceleration is simply due to the gradient in its gravitational potential function, which just happens to be the slope at its current position. However, many seemingly familiar forces actually arise not from the drive to decrease potential energy, but from a gain in entropy. A very familiar example is the force pulling a rubber band back together when you stretch it. In its relaxed state, the long polymers making up the band can curl up and wiggle in many more ways, compared to when they are all stretched in parallel. Thus, the force pulling the band back together is not the potential energy of the molecular bonds, which would have a very different characteristic, but indeed the potential increase in entropy, i.e. the increased volume of the accessible microscopic phase space in the relaxed state. And even seemingly more familiar forces, such as the force created by an expanding gas pushing on a cylinder, are in fact of entropic origin. A very insightful, and mathematically explicit discussion of entropic forces is given in this excellent blog post by John Baez.

3. Entropy and Complexity

Interestingly, our universe started with the Big Bang in a state of very low entropy, i.e. with a tremendous amount of “usable” free energy. So far, no one knows exactly why. However, this initial low-entropy state, together with the second law of thermodynamics, i.e. the universe’s drive to increase entropy, was actually the driving force for the development of many complex structures in the universe. From galaxy clusters, galaxies and individual stars to planets, climate and plate tectonics. All these delicate structures formed because they allowed the universe to decrease its free energy, i.e. to increase its total entropy.

The key here are results from Ilya Prigogine and coworkers. Prigogine won the 1977 nobel prize for his work on the non-equilibrium thermodynamics of dissipative structures. One of his main insights can be summarised by this quote from Kondepudi & Prigogine (2006): “One of the most profound lessons of non-equilibrium thermodynamics is the dual role of irreversible processes: as destroyers of order near equilibrium and as creators of order far from equilibrium”, which I found in the great paper by Michael J. Russell, Wolfgang Nitschke, and Elbert Branscomb.

With order, they mean complex structures, as opposed to a homogeneous distribution of matter. A nice way to look at this is in terms of equilibrium and disequilibrium. Technically, a state of disequilibrium just means that there is another, accessible state of the system which has higher entropy. Intuitively, if you have a pot with hot and a pot with cold water, you can use them to drive a heat engine, until both pots have the same temperature, i.e. an equilibrium is reached. It was the “disequilibrium” in their temperatures that carried the free energy, which could be used to do work. In these words, the universe started in a state of extreme disequilibrium and just strives toward thermal equilibrium. While the final state of the universe might look very uniform and boring, as long as we are far enough away from it, the drive to reach thermal equilibrium, formulated in the second law, can create complex structures.  An intuitive example of such a dissipative system, i.e. a system which forms to allow for or increase the rate of entropy production, i.e. the dissipation of free energy and the associated disequilibrium, are Bénard convection cells. They form far from thermal equilibrium to increase equilibrating heat transport in a fluid between two horizontal plates in a gravity field. Let’s assume the lower plate is hotter than the upper one. When the temperature difference between the plates is very small, heat is transported using diffusion. I.e. the individual molecules of the fluid stay at their place and just transfer heat by bumping into their neighbours. So if the system is already close to equilibrium (i.e. the temperature difference is small), there is just a simple flow of heat from the lower, hotter to the upper, colder plate, further decreasing the temperature difference, thereby destroying the macroscopic “order” or structure due to the difference in temperature. Beyond a certain difference threshold, however, convection starts to set in. I.e. the heat from the lower plate is strong enough to decrease the fluids density sufficiently, so that now not only heat (i.e. kinetic energy of fluid particles) is transported, but also the fluid particles themselves rise to the upper plate. The convective flows quickly self-organise to form geometrically complex cells, which make heat transport orders of magnitude more efficient. Thus, far from equilibrium the flows that dissipate the free energy stored in the temperature difference between the plates actually create macroscopically ordered structures. Although these cells are open system, i.e. they constantly exchange heat with their surroundings, their spontaneously arising macroscopic structure keeps ordered, as long as their driving temperature gradient persists. Their structure is even dynamically stable to perturbations. Thus, their macroscopic dynamic variables (such as the temperature- and density distribution, as well as the local fluid flows within the cells) possess a stable attractor. Furthermore, due to the short range of the participating interactions, one can easily define an interface in terms of a Markov blanket. However, these structures decay quickly as soon as the driving temperature gradient vanishes, and can not “survive” larger changes in their environmental conditions. Still, I think you might see where this is going, but we’ll take another short detour.

4. Meta-Stable States and Channels

Real thermodynamic systems usually have an unbelievably complex, structured phase space, featuring many so called meta-stable states. For an in depth discussion please see again the great paper by Kate Jeffery, Robert Pollack and Carlo Rovelli. Meta-stable states are states which are not of maximum entropy, but which are hard to leave for the system, because there might be some kind of potential barrier, which requires the system to first encounter a very specific configuration before it can cross it. So systems can spend quite some time in a meta-stable state before they find a way to move to another (most of the time also meta-stable) state of higher entropy. Usually such a transition requires the system to build and maintain some ordered structures that support a so called “channel”, through which the system can evolve to a state of higher entropy. Often these structures seem very unlikely, especially from the perspective of the initial, meta-stable state, but because they allow the system to transition into a state with higher entropy, they in fact are not.

Let’s have a look at the following phase-space diagram. The color indicates the ensemble density, i.e. the probability of finding the system in a specific microstate. Red means high, white means zero. Imagine the system is initialised in a state of very low entropy I, as pictured below:

initial_captionedIt will remain in this state, as long as there are constraints in place to keep it there. Think of a container of gas, which is divided by a wall, so that the gas particles can only be in a sub-volume of the container, while the remaining volume is empty. When we remove the constraints (remove the wall), the system will start to diffuse (i.e. the individual microstates will start a random walk) in phase space. In our example, the gas will expand and quickly reach its final state, in which it is homogeneously distributed in the volume of the container. But in reality, the speed and the way in which the system reaches a new stable or meta-stable state depends critically on the actual microscopic dynamics of the systems. For ideal gases they are very simple. In our example here, they are marginally more complicated. Just imagine the density as being a highly concentrated drop of red color given into a thin layer of viscous fluid on a Petri dish. Due to the random, Brownian motion of the fluid particles, the red color will start to disperse and distribute, until finally it will be evenly distributed in the whole accessible volume. This is not only a picture, but an actual example of such a process. The system will quickly reach a new, meta-stable state M of higher entropy, which is connected to the final, stable state F via a small channel C. The notion of “channels” and their relationship to the complex phase space of actual living systems is again discussed in detail in the awesome paper by Kate Jeffery, Robert Pollack and Carlo Rovelli, which inspired most of this section.

Now let’s have a look at what happens, when we remove the constraints on the initial state I:


Let’s pause here. The system has reached the meta-stable state M with higher entropy. But there is still state F with even higher entropy. The only problem is, that it is only accessible through the very narrow channel C of microstates, which forms the “gap” in the barrier separating the two states. Although the microstates right at this gap only form a tiny sub-volume of the intermediate meta-stable state M, and therefore seem to be very unlikely from the perspective of the meta-stable state M, they allow the system to transition into a state with much higher entropy:


In the end (i.e. in thermal equilibrium), the ensemble density, i.e. the probability of finding the system in a given microstate, will be evenly distributed in all of the accessible phase space.


Now, the vast majority of microstates will have transitioned through that narrow, and seemingly unlikely channel C from the meta-stable state M to the final state F. So actually the microstates, and therefore also the macroscopic variables will be very likely to, and in fact will almost surely have traversed that narrow channel. Why? Simply because it allowed the system to enter a state of higher entropy, i.e. less free energy. Thus, the formation of the structures required to dissipate the corresponding disequilibrium might seem very unlikely, although in fact it is almost inevitable, due to (not despite) the second law of thermodynamics.

A nice example are stars. At first, it seems very unlikely that burning stars might form from an almost homogeneous cloud of hydrogen atoms. However, slight inhomogeneities in the density of the gas and gravitation lead to a buildup of larger and heavier balls of gas. Finally, the Jeans instability leads to the gravitational collapse of the gas balls. Thus, the pressure and temperature in the cores of these balls will be high enough to allow for nuclear fusion, which brings the protons in the hydrogen nuclei in a higher entropy state by creating helium nuclei. Thereby, the seemingly unlikely structure of stars opens a channel to release free energy stored in hydrogen nuclei via nuclear fusion. In the end, a lot of nuclear energy is dissipated in the form of heat and photons, tremendously increasing the entropy of the whole universe.

5. More quantitative results

So far, our discussion was based on well known results from equilibrium thermodynamics and the work of Prigogine and colleagues, who where able to derive linearised equations describing non-equilibrium systems. Recent progress has lead to a generalisation of the second law to nonlinear, non-equilibrium, finite-time processes, which culminated in the Crooks fluctuation theorem.

Nikolay Perunov, Robert A. Marsland, and Jeremy England (free preprint, video lecture) recently used this theorem to describe the behaviour of an open thermodynamic system, which is in constant exchange with a complex, driven environment. They could quantify the transition probabilities from an initial macroscopic state I to either of two possible macroscopic outcome states II and III during a given, finite time. The relative probability of the final states II and III was weighted by three factors: (1) A term considering the expected energy of the final states (remember that we are talking now about an open system, which can exchange energy with its environment). This term favours low energy states, similar to the Boltzmann term in the equilibrium thermodynamics of the canonical ensemble. , (2) A kinetic term weights the individual outcome states by their kinetic accessibility, i.e. states that are separated from the initial state by high potential barriers are less likely to be reached in finite time. (3) A dissipation term weights the outcome states by the expected amount of energy, which is absorbed from the driving forces in the environment and dissipated back into the environment as heat. Given outcome states with similar energy and kinetic accessibility, the crucial factor will be the amount of heat, which the system released into the environment during its propagation, i.e. the increase in entropy that it created. This term systematically favours systems which are good at harvesting usable free energy from their surroundings and dissipating it as heat back into the environment. This is especially interesting in the case of challenging environments, i.e. environments in which the dynamics of the driving forces show complex dynamics. Such environments require the system to adapt to its environment and to become predictive of the surrounding fluctuations, to harvest them optimally. If one just looked at the final state of such a system, which had been propagated within a challenging environment, it would most likely appear in a final state in which it had (close to) optimally harvested and dissipated energy from the environment. Thus, the system would appear to have adapted to its surroundings. This is very similar to how Darwinian evolution looks at the traits of existing species and explains them in terms of previous adaptations of their ancestors to challenging environments. Recently, there are more and more simulations showing that this kind of dissipative adaptation can indeed be found in simple, physical systems. A nice overview is given in a wonderful article by Natalie Wolchover for Quanta Magazine.

Further interesting work by Susanne Still, David A. Sivak, Anthony J. Bell, and Gavin E. Crooks (free preprint, video lecture) links the thermodynamic efficiency of an open system (e.g. an agent) in a driven thermodynamic environment to the efficiency of its internal representations of past experience in terms of their predictive power for future states. To be honest, I don’t really now how this fits into our whole narrative just now, but I liked the paper and its way of connecting information theory and thermodynamics very much, so I just had to mention it here.

Another, really interesting and possibly highly related article by John Baez and Blake Pollard connects the dynamics of relative information (also known as relative entropy or the Kullback-Leibler-Divergence)  to biological processes in terms of population dynamics, evolutionary game theory, chemical reaction networks and quite generic Markov processes. They study how one can characterise the approach of these systems to equilibrium in terms of information theory in a very explicit and insightful way.

6. Complexity and Life

So how does the second law of thermodynamics now come into play, when we think about the origin and development of living systems?

Well, after the second law created complex structures on an astronomical scale, in the form of galaxy clusters, galaxies, stars – which were instrumental in creating most of the heavy elements that we are made of – and planets, the early earth found itself in a situation in which it was bombarded with high free energy (i.e. low entropy) photons from the sun. Furthermore, several disequilibria due to the heat stored in earth’s core and exothermic geologic processes provided even more free energy, e.g. at deep ocean vents. Simultaneously, earth featured an abundance of elements such as carbon, hydrogen, oxygen, nitrogen, phosphorus, or different kinds of metals, as well as liquid water, which allowed for a very rich and complex chemistry.

Here’s the short version of the whole story told by Minute Physics and Sean Carroll, much better than I ever could:

Nowadays, our ecosphere increases the universe’s entropy by absorbing high energy photons – mostly in the visible range – from the sun and radiating low energy infrared photons back into space. Since the entropy of a collection of photons is approximately proportional to their number, breaking down a high energy photon into twenty low energy photons increases the entropy of the photons by a factor of 20.

However, the initial disequilibrium on earth might have been a geo-chemical one, found at deep ocean vents. It is discussed in detail in a great paper by Michael J. Russell, Wolfgang Nitschke, and Elbert Branscomb. There is also a great blogpost by Sean Carroll discussing this hypothesis, namely that the initial geo-chemical disequilibrium leading to the first metabolism on earth might have been a very CO2 rich atmosphere, becoming thermodynamically meta-stable after cooling down. Under these conditions, it was thermodynamically favourable for the carbon atoms to be reduced to methane. However, there was no direct chemical reaction that could achieve this, but only a complex chain of reactions, which was furthermore hindered by the fact that the initial reactions actually formed a potential barrier. The bold hypothesis is now, that early metabolic cycles were just a way of performing this reduction to dissipate the stored free energy.

In this view, early structures of life were simply required to sustain the necessary conditions, in terms of temperature, pH, and the concentrations of the individual reactive species, to sustain the complicated chain of reactions constituting the first metabolism. These metabolic cycles allowed the reduction of CO2 to methane, dissipating a tremendous amount of free energy stored in the prehistoric atmosphere. Thus, they formed the first of many thermodynamic channels opened by living system to dissipate reservoirs of free energy, which would not be accessible otherwise.

Crucially, to allow large-scale transitions from one meta-stable state to another meta-stable state of higher entropy, the structures supporting the corresponding channels have to exist for a sufficient period of time, to enable the system to complete the transition. Accordingly, these complex structures must not only emerge, but also persist in a thermally driven, non-stationary, stochastic and dynamic environment. Thus, the structures supporting the metabolic cycles, which allow the ecosphere to dissipate free energy, do not consume free energy to sustain themselves, or to “fight entropy”, as Schrödinger put it. Instead, they are sustained because they support a thermodynamic channel which allows the system to dissipate free energy. Therefore, homeostatic mechanisms are thermodynamically favoured, on a global scale, because they stabilise structures supporting metabolic cycles, which allow the universe to tap into reservoirs of free energy, which would otherwise not be accessible. Please see the excellent paper of Kate Jeffery, Robert Pollack, and Carlo Rovelli for a deeper discussion of life in terms of thermodynamic channels and how the second law might lead to the emergence of stable, long time structures, such as DNA.

To efficiently dissipate large reservoirs of free energy, one of the best ways are cyclic processes. These allow to recycle their work medium – or in biochemical terms the involved catalysts, enzymes and co-factors – thereby limiting the amount of structured matter required to process large amounts of free energy and substrate. Just think of classical heat engines, or the Bénard cells described above. Furthermore, cyclic processes allow for stable flows of free energy, work, and heat over time. Thus, in terms of early life one could argue that biochemical reaction cycles allowed for a temporally stable and efficient dissipation of large amounts of energy by a relatively small amount of living, structured matter. To sustain these cycles, the supporting structures had to provide macroscopically stable reaction conditions in terms of the concentrations and spatial distribution of reactants, temperature, and pH. They had to do so in complex, stochastically driven, dynamic environments. Thus, while by their very nature dissipative systems are open, i.e. in constant exchange of energy and particles with their surrounding environment, to be able to sustain continuous reaction cycles, macroscopically well defined, ordered and temporally and dynamically stable structures had to emerge.

In summary, although dissipative systems are in constant exchange of energy and matter with their surroundings, in terms of their coarse-grained, macroscopic variables they are (they have to be) in a dynamically stable, driven (i.e. non-equilibrium) steady state. This follows from the imperative of their macroscopic state variables, such as their temperature, the spatial distribution and concentration of chemical reactants, or their pH to stay in a small, very well defined range, to allow the underlying metabolic cycles to work smoothly and continuously. Thus, when we look at these systems macroscopically, they will have adapted to their environment, having developed homeostatic regulation mechanisms to counteract changes in their noisy, dynamic environments. Thereby, they stabilise their internal milieu, which supports the metabolic cycles. These, in turn tap into otherwise inaccessible reservoirs of free energy, forming stable channels for the universe’s entropy to grow. 

7. Connection to the Free Energy Principle

In summary, metabolism is not only the means to sustain life’s complex, hierarchical structures. Instead, life’s structures have emerged to sustain a continued metabolism, which allows to harvest and dissipate free energy from sources, which otherwise would not be accessible. In this way, life follows the second law of thermodynamics by providing channels for the combined entropy of the living organisms and their environment to grow.

Here we finally arrive at the starting point for the Free Energy principle: To be able to sustain these thermodynamically favoured metabolic cycles, certain macroscopic variables of the supporting structures have to be tightly regulated. This follows from the imperative of the supporting structures to keep certain state parameters, such as their pH, temperature, concentration of certain ion species or metabolites, and the spatial arrangement and compartmentalisation of specific reaction chains, in a narrow range, which is compatible with their survival, i.e. with the maintenance of their structure and – crucially – their metabolism. As the time-scales of traversing from one meta-stable state to another via a narrow channel opened by means of a specific family of metabolic cycles might take a very long time, the supporting structures have to be able to dynamically regulate these variables, keeping them stable in stochastic, noisy, non-stationary, changing environments. Therefore, (1) the macroscopic dynamics of the resulting systems are approximately ergodic (over the timescale of the supported transitions), possessing  stable attractors due to their emergent homeostatic processes. Furthermore, (2) the emergent boundaries between the internal, well regulated milieu supporting the underlying metabolic cycles, and the noisy, changing environment afford a Markov-blanket, which allows to speak of internal, external and boundary (namely active and sensory states). Thus, the whole setup of the free energy principle emerges not despite, but directly following from the second law of thermodynamics.

Links and References

Edit 10/21/2019: I added some great work by John Baez and colleagues to the main text and the references.

Edit 01/25/2020: Added some fine print to the section on free energy and some related links to a tweet by John Baez and a paper by John Baez and Blake Pollard.

4 thoughts on “Life and the Second Law

  1. Hi Kai, I have made several attempts to understand the mathematics behind the free energy principle. I made zero progress each time. After reading this blog, for the first time, I felt perhaps I can understand a few things. Really appreciate your effort.



  2. Have you read Eric Smith and Harold Morowitz’ _Origin and Nature of Life on Earth_? They combine many of the references you have here with geochemistry, geophysics, information theory, and nonequilibrium statisticl mechanics in a graduate level text. Took me about a year to work through on my own, but neatly ties together your ideas here. Worth checking out! Thanks for writing this up, it was a great refresher, and _really_ tackles entropy well, which for me was honestly the hardest part, even though I have a graduate degree in biophysics.


    1. Thank you very much for the kind feedback and the pointer to the book by Eric Smith and Harold Morowitz. I’ve actually bought it earlier this year, after I had stumbled across a recording of a great talk by Eric Smith (there are many, e.g. , , or I didn’t really have time to dive into the text, which really seems to tie all these levels of description together very well. To be honest, I did not know of the work of Eric Smith and Harold Morowitz, when I wrote the blog post last year, and if I can make some time, I definitely plan to add some of their work to the main text and the references, e.g. .


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s