{"id":12569,"date":"2015-08-11T17:09:45","date_gmt":"2015-08-12T00:09:45","guid":{"rendered":"http:\/\/www.preposterousuniverse.com\/blog\/?p=12569"},"modified":"2020-11-26T08:01:39","modified_gmt":"2020-11-26T16:01:39","slug":"the-bayesian-second-law-of-thermodynamics","status":"publish","type":"post","link":"https:\/\/preposterousuniverse.com\/blog\/2015\/08\/11\/the-bayesian-second-law-of-thermodynamics\/","title":{"rendered":"The Bayesian Second Law of Thermodynamics"},"content":{"rendered":"<p><a href=\"http:\/\/preposterousuniverse.com\/eternitytohere\/faq.html\">Entropy increases.<\/a> Closed systems become increasingly disordered over time. So says the Second Law of Thermodynamics, one of my favorite notions in all of physics. <\/p>\n<p>At least, entropy <em>usually<\/em> increases. If we define entropy by first defining &#8220;macrostates&#8221; &#8212; collections of individual states of the system that are macroscopically indistinguishable from each other &#8212; and then taking the logarithm of the number of microstates per macrostate, as portrayed in this blog&#8217;s header image, then we don&#8217;t expect entropy to <em>always<\/em> increase. According to Boltzmann, the increase of entropy is just really, really probable, since higher-entropy macrostates are much, much bigger than lower-entropy ones. But if we wait long enough &#8212; really long, much longer than the age of the universe &#8212; a macroscopic system will spontaneously fluctuate into a lower-entropy state. Cream and coffee will unmix, eggs will unbreak, maybe whole <a href=\"https:\/\/www.preposterousuniverse.com\/blog\/2011\/08\/03\/a-universe-out-of-chaos\/\">universes<\/a> will come into being. But because the timescales are so long, this is just a matter of intellectual curiosity, not experimental science.<\/p>\n<p>That&#8217;s what I was taught, anyway. But since I left grad school, physicists (and chemists, and biologists) have become increasingly interested in ultra-tiny systems, with only a few moving parts. Nanomachines, or the molecular components inside <a href=\"https:\/\/www.preposterousuniverse.com\/blog\/2006\/09\/29\/the-cell-is-like-tron\/\">living cells<\/a>. In systems like that, the occasional downward fluctuation in entropy is not only possible, it&#8217;s going to happen relatively frequently &#8212; with crucial consequences for <a href=\"http:\/\/lifesratchet.com\/\">how the real world works<\/a>.<\/p>\n<p>Accordingly, the last fifteen years or so has seen something of a revolution in non-equilibrium statistical mechanics &#8212; the study of statistical systems far from their happy resting states. Two of the most important results are the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Crooks_fluctuation_theorem\">Crooks Fluctuation Theorem<\/a> (by <a href=\"http:\/\/threeplusone.com\/gec\/\">Gavin Crooks<\/a>), which relates the probability of a process forward in time to the probability of its time-reverse, and the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Jarzynski_equality\">Jarzynski Equality<\/a> (by <a href=\"http:\/\/www.chem.umd.edu\/christopher-jarzynski\/\">Christopher Jarzynski<\/a>), which relates the change in free energy between two states to the average amount of work done on a journey between them.\u00a0(Professional statistical mechanics are so used to dealing with <strong>in<\/strong>equalities that when they finally do have an honest equation, they call it an &#8220;equality.&#8221;) There is a sense in which these relations underlie the good old Second Law; the Jarzynski equality can be derived from the Crooks Fluctuation Theorem, and the Second Law can be derived from the Jarzynski Equality. (Though the three relations were discovered in reverse chronological order from how they are used to derive each other.)<\/p>\n<p>Still, there is a mystery lurking in how we think about entropy and the Second Law &#8212; a puzzle that, like many such puzzles, I never really thought about until we came up with a solution. Boltzmann&#8217;s definition of entropy (logarithm of number of microstates in a macrostate) is very conceptually clear, and good enough to be engraved on his <a href=\"https:\/\/en.wikipedia.org\/wiki\/Boltzmann%27s_entropy_formula\">tombstone<\/a>. But it&#8217;s not the only definition of entropy, and it&#8217;s not even the one that people use most often.<\/p>\n<p>Rather than referring to macrostates, we can think of entropy as characterizing something more subjective: our knowledge of the state of the system. That is, we might not know the exact position <strong><em>x<\/em><\/strong> and momentum <em><strong>p<\/strong><\/em> of every atom that makes up a fluid, but we might have some probability distribution \u03c1(<em><strong>x<\/strong><\/em>,<em><strong>p<\/strong><\/em>) that tells us the likelihood the system is in any particular state (to the best of our knowledge). Then the entropy associated with that distribution is given by a different, though equally famous, formula:<\/p>\n<blockquote><p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/preposterousuniverse.com\/blog\/wp-content\/ql-cache\/quicklatex.com-514d706f970c9e35c76026cf675a82b2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;&#32;&#61;&#32;&#45;&#32;&#92;&#105;&#110;&#116;&#32;&#92;&#114;&#104;&#111;&#32;&#92;&#108;&#111;&#103;&#32;&#92;&#114;&#104;&#111;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"118\" style=\"vertical-align: -6px;\"\/><\/p><\/blockquote>\n<p>That is, we take the probability distribution \u03c1, multiply it by its own logarithm, and integrate the result over all the possible states of the system, to get (minus) the entropy. A formula like this was introduced by Boltzmann himself, but these days is often associated with <a href=\"https:\/\/en.wikipedia.org\/wiki\/Entropy_(statistical_thermodynamics)#Gibbs_Entropy_Formula\">Josiah Willard Gibbs<\/a>, unless you are into information theory, where it&#8217;s credited to <a href=\"https:\/\/en.wikipedia.org\/wiki\/Entropy_(information_theory)\">Claude Shannon<\/a>. Don&#8217;t worry if the symbols are totally opaque; the point is that low entropy means we know a lot about the specific state a system is in, and high entropy means we don&#8217;t know much at all.<\/p>\n<p>In appropriate circumstances, the Boltzmann and Gibbs formulations of entropy and the Second Law are closely related to each other. But there&#8217;s a crucial difference: in a perfectly isolated system, the Boltzmann entropy tends to increase, but the Gibbs entropy stays exactly constant. In an open system &#8212; allowed to interact with the environment &#8212; the Gibbs entropy will go up, but it will <em>only<\/em> go up. It will never fluctuate down. (Entropy can decrease through heat loss, if you put your system in a refrigerator or something, but you know what I mean.) The Gibbs entropy is about our knowledge of the system, and as the system is randomly buffeted by its environment we know less and less about its specific state. So what, from the Gibbs point of view, can we possibly mean by &#8220;entropy rarely, but occasionally, will fluctuate downward&#8221;?<\/p>\n<p>I won&#8217;t hold you in suspense. Since the Gibbs\/Shannon entropy is a feature of our knowledge of the system, the way it can fluctuate downward is for us to <em>look<\/em> at the system and notice that it is in a relatively unlikely state &#8212; thereby gaining knowledge.<\/p>\n<p>But this operation of &#8220;looking at the system&#8221; doesn&#8217;t have a ready implementation in how we usually formulate statistical mechanics. Until now! My collaborators Tony Bartolotta, Stefan Leichenauer, Jason Pollack, and I have written <a href=\"http:\/\/arxiv.org\/abs\/1508.02421\">a paper<\/a> formulating statistical mechanics with explicit knowledge updating via measurement outcomes. (Some extra figures, animations, and codes are available at <a href=\"http:\/\/preposterousuniverse.com\/research\/bsl\/\">this web page<\/a>.)<\/p>\n<blockquote><p><strong><a href=\"http:\/\/arxiv.org\/abs\/1508.02421\">The Bayesian Second Law of Thermodynamics<\/a><\/strong><br \/>\nAnthony Bartolotta, Sean M. Carroll, Stefan Leichenauer, and Jason Pollack<\/p>\n<p>We derive a generalization of the Second Law of Thermodynamics that uses Bayesian updates to explicitly incorporate the effects of a measurement of a system at some point in its evolution. By allowing an experimenter&#8217;s knowledge to be updated by the measurement process, this formulation resolves a tension between the fact that the entropy of a statistical system can sometimes fluctuate downward and the information-theoretic idea that knowledge of a stochastically-evolving system degrades over time. The Bayesian Second Law can be written as \u0394H(\u03c1<sub>m<\/sub>,\u03c1)+\u27e8Q\u27e9<sub>F|m<\/sub>\u22650, where \u0394H(\u03c1<sub>m<\/sub>,\u03c1) is the change in the cross entropy between the original phase-space probability distribution \u03c1 and the measurement-updated distribution \u03c1<sub>m<\/sub>, and \u27e8Q\u27e9<sub>F|m<\/sub> is the expectation value of a generalized heat flow out of the system. We also derive refined versions of the Second Law that bound the entropy increase from below by a non-negative number, as well as Bayesian versions of the Jarzynski equality. We demonstrate the formalism using simple analytical and numerical examples.<\/p><\/blockquote>\n<p>The crucial word &#8220;Bayesian&#8221; here refers to <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bayes%27_theorem\">Bayes&#8217;s Theorem<\/a>, a central result in probability theory. <!--more--> Bayes&#8217;s theorem tells us how to update the probability we assign to any given idea, after we&#8217;ve received relevant new information. In the case of statistical mechanics, we start with some probability distribution for the system, then let it evolve (by being influenced by the outside world, or simply by interacting with a heat bath). Then we make some measurement &#8212; but a realistic measurement, which tells us something about the system but not everything. So we can use Bayes&#8217;s Theorem to update our knowledge and get a new probability distribution.<\/p>\n<p>So far, all perfectly standard. We go a bit farther by also updating the <em>initial<\/em> distribution that we started with &#8212; our knowledge of the measurement outcome influences what we think we know about the system at the beginning of the experiment. Then we derive the Bayesian Second Law of Thermodynamics, which relates the original (un-updated) distribution at initial and final times to the updated distribution at initial and final times.<\/p>\n<p>That relationship makes use of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cross_entropy\">cross entropy<\/a> between two distributions, which you actually don&#8217;t see that often in information theory. Think of\u00a0how much you would expect to learn by being told the specific state of a system, when all you originally knew was some probability distribution. If that distribution were sharply peaked around some value, you don&#8217;t expect to learn very much &#8212; you basically already know what state the system is in. But if it&#8217;s spread out, you expect to learn a bit more. Indeed, we can think of the Gibbs\/Shannon entropy <em>S<\/em>(\u03c1) as &#8220;the average amount we expect to learn by being told the exact state of the system, given that it is described by a probability distribution \u03c1.&#8221;<\/p>\n<p>By contrast, the cross-entropy <em>H<\/em>(\u03c1, \u03c9) is a function of two distributions: the &#8220;assumed&#8221; distribution \u03c9, and the &#8220;true&#8221; distribution \u03c1. Now we&#8217;re imagining that there are two sources of uncertainty: one because the actual distribution has a nonzero entropy, and another because we&#8217;re not even using the right distribution! The cross entropy between those two distributions is &#8220;the average amount we expect to learn by being told the exact state of the system, given that we think it is described by a probability distribution \u03c9 but it is actually described by a probability distribution \u03c1.&#8221; And the Bayesian Second Law (BSL) tells us that this lack of knowledge &#8212; the amount we would learn on average by being told the exact state of the system, given that we were using the un-updated distribution &#8212; is always larger at the end of the experiment than at the beginning (up to corrections because the system may be emitting heat). So the BSL gives us a nice information-theoretic way of incorporating the act of &#8220;looking at the system&#8221; into the formalism of statistical mechanics.<\/p>\n<p>I&#8217;m very happy with how this paper turned out, and as usual my hard-working collaborators deserve most of the credit. Of course, none of us actually does statistical mechanics for a living &#8212; we&#8217;re all particle\/field theorists who have wandered off the reservation. What inspired our wandering was actually <a href=\"https:\/\/www.quantamagazine.org\/20140122-a-new-physics-theory-of-life\/\">this article by Natalie Wolchover<\/a> in <em>Quanta<\/em> magazine, about <a href=\"http:\/\/www.englandlab.com\/uploads\/7\/8\/0\/3\/7803054\/2013jcpsrep.pdf\">work<\/a> by <a href=\"http:\/\/web.mit.edu\/physics\/people\/faculty\/england_jeremy.html\">Jeremy England at MIT<\/a>. I had read the <em>Quanta<\/em> article, and Stefan had seen a discussion of it on <a href=\"https:\/\/www.reddit.com\/r\/Physics\/comments\/1vuql4\/a_new_thermodynamics_theory_of_the_origin_of_life\/\">Reddit<\/a>, so we got to talking about it at lunch. We thought there was more we could do along these lines, and here we are.<\/p>\n<p>It will be interesting to see what we can do with the BSL, now that we have it. As mentioned, occasional fluctuations downward in entropy happen all the time in small systems, and are especially important in biophysics, perhaps even for the origin of life. While we have phrased the BSL in terms of a measurement carried out by an observer, it&#8217;s certainly not necessary to have an actual person there doing the observing. All of our equations hold perfectly well if we simply ask &#8220;what happens, given that the system ends up in a certain kind of probability distribution.&#8221; That final conditioning might be &#8220;a bacteria has replicated,&#8221; or &#8220;an RNA molecule has assembled itself.&#8221; It&#8217;s an exciting connection between fundamental principles of physics and the messy reality of our fluctuating world.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Entropy increases. Closed systems become increasingly disordered over time. So says the Second Law of Thermodynamics, one of my favorite notions in all of physics. At least, entropy usually increases. If we define entropy by first defining &#8220;macrostates&#8221; &#8212; collections of individual states of the system that are macroscopically indistinguishable from each other &#8212; and [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,28,35],"tags":[],"class_list":["post-12569","post","type-post","status-publish","format-standard","hentry","category-arxiv","category-science","category-time"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/posts\/12569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/comments?post=12569"}],"version-history":[{"count":5,"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/posts\/12569\/revisions"}],"predecessor-version":[{"id":13682,"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/posts\/12569\/revisions\/13682"}],"wp:attachment":[{"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/media?parent=12569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/categories?post=12569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/preposterousuniverse.com\/blog\/wp-json\/wp\/v2\/tags?post=12569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}