Year: 2018

Abstract:
In this work we offer an information-theoretic framework for representation learning that connects with a wide class of existing objectives in machine learning. We develop a formal correspondence between this work and thermodynamics and discuss its implications.

heading: 1 INTRODUCTION
text: Let X,Y be some paired data, for example: a set of images X and their labels Y . We imagine the data comes from some true, unknown data generating process Φ1, from which we have drawn a training set of N pairs:
TN ≡ (xN , yN ) ≡ {x1, y1, x2, y2, . . . , xN , yN} ∼ φ(xN , yN ). (1)
We further imagine the process is exchangeable2 and the data is conditionally independent given the governing process Φ:
p(xN , yN |φ) = ∏ i p(xi|φ)p(yi|xi, φ). (2)
As machine learners, we believe that by studying the training set, we should be able to infer or predict new draws from the same data generating process. Call a set of M future draws from the data generating process T ′M ≡ {XM , YM} the test set. The predictive information (Bialek et al., 2001) is the mutual information between the training set and a infinite test set, equivalently the amount of information the training set provides about the generative process itself:
Ipred(TN ) ≡ lim M→∞ I(TN ; T ′M ) = I(TN ; Φ) = I(XN , Y N ; Φ). (3)
The predictive information measures the underlying complexity of the data generating process (Still, 2014), and is fundamentally limited and must grow sublinearly in the dataset size (Bialek et al., 2001). Hence, the predictive information is a vanishing fraction of the total information in the training set 3:
lim N→∞ Ipred(TN ) H(TN ) = 0 (4)
A vanishing fraction of the information present in our training data is in any way useful for future tasks. A vanishing fraction of the information contained in the training data is signal, the rest is noise. We claim the goal of learning is to learn a representation of data, both locally and globally that captures the predictive information while being maximally compressed: that separates the signal from the noise.
1 Here we aim to invoke the same philosophy as in the introduction to Watanabe (2018). 2 That is, we imagine the data satisfies De Finetti’s theorem, for which infinite exchangeable processes usually can be described by products of conditionally independent distributions, but don’t want to worry too much about the complicated details since there are subtle special cases (Accardi, 2018).
3 Here and throughout H(A) is used to denote entropies H(A) = − ∑
i p(A) log p(A).

heading: 2 A TALE OF TWO WORLDS
text: We are primarily interested in learning a stochastic local representation of X , call it Z, defined by some parametric distribution of our own design: p(zi|xi, θ) with its own parameters θ. A training procedure is a process that assigns a distribution p(θ|xN , yN ) to the parameters conditioned on the observed dataset. In this way, the parameters of our local parametric map are themselves a global representation of the dataset. With our augmentations, the world now looks like the graphical model in Figure 3a, denoted World P : Some data generating process Φ generates a dataset (XN , Y N ) which we perform some learning algorithm on to get some parameters p(θ|xN , yN ) which we can use to form a parametric local representation p(zi|xi, θ). World P is what we have. It is not necessarily what we want. What we have to contend with is an unknown distribution of our data. What we want is a world that corresponds to the traditional modeling assumptions in which Z acts as a latent factor for X and Y , rending them conditionally independent, leaving no correlations unexplained. Similarly, we would prefer if we could easily marginalize out the dependence on our universal (Φ) and model specific (Θ) parameters. World Q in Figure 3b is the world we want 4.
We can measure the degree to which the real world aligns with our desires by computing the minimum possible relative information5 between our distribution p and any distribution consistent with the conditional dependencies encoded in graphical model Q6. It can be shown (Friedman et al., 2001) that this quantity is given by the difference in multi-informations between the two graphical models, as measured in World P :
J ≡ min q∈Q DKL [p; q] = IP − IQ. (5)
The multi-information (Slonim et al., 2005) of a graphical model is the KL divergence between the joint distribution and the product of all of the marginal distributions, which can be computed as a sum of mutual informations, one for each node in the graph, between itself and its parents:
IG ≡ 〈
log p(gN )∏ i p(gi) 〉 = ∑ i I(gi; Pa(gi)) (6)
In our case: J = I(Θ;XN , Y N ) + ∑ i [I(Xi; Φ) + I(Yi;Xi,Φ) + I(Zi;Xi,Θ)− I(Xi;Zi)− I(Yi;Zi)] .
(7) 4 We could consider different alternatives, deciding to relax some of the constraints we imposed in World Q, or generalizing World P by letting the representation depend on X and Y jointly, for instance. What follows demonstrates a general sort of calculus that we can invoke for any specified pair of graphical models. In particular Appendices A to C discuss alternatives.
5 Also known as the KL divergence. 6 Note that this is DKL [p; q∗] where q∗ is the well known reverse-information projection or moment pro-
jection: q∗ = argminq∈QDKL [p; q] (Csiszár & Matúš, 2003).
This minimal relative information has two terms outside our control and we can take them to be constant, but which relate to the predictive information:∑
i [I(Xi; Φ) + I(Yi;Xi,Φ)] ≥ ∑ i I(Yi;Xi) + Ipred(TN ). (8)
These terms measure the intrinsic complexity of our data. The remaining four terms are:
• I(Xi;Zi) - which measures how much information our representation contains about the input (X). This should be maximized to ensure our local representation actually represents the input.
• I(Yi;Zi) - which measures how much information our representation contains about our auxiliary data. This should be maximized as well to ensure that our local representation is predictive for the labels.
• I(Zi;Xi,Θ) - which measures how much information the parameters and input determine about our representation. This should be minimized to ensure consistency between worlds, and ensure we learn compressed local representations. Notice that this is similar to, but distinct from the first term above.
I(Zi;Xi,Θ) = I(Zi;Xi) + I(Zi; Θ|Xi) (9)
by the Chain Rule for mutual information 7.
• I(Θ;XN , Y N ) - which measures how much information we store about our training data in the parameters of our encoder. This should also be minimized to ensure we learn compressed global representation, preveting overfitting.
These mutual informations are all intractable in general, since we cannot compute the necessary marginals in closed form, given that we do not have access to the true data generating distribution.

heading: 2.1 FUNCTIONALS
text: Despite their intractability, we can compute variational bounds on these mutual informations.

heading: 2.1.1 ENTROPY
text: S ≡ 〈 log p(θ|xN , yN )
q(θ)
〉 P ≥ I(Θ;XN , Y N ) (10)
The relative entropy in our parameters or just entropy for short measures the relative information between the distribution we assign our parameters in World P after learning from the data (XN , Y N ), with respect to some data independent q(θ) prior on the parameters. This is an upper bound on the mutual information between the data and our parameters and as such can measure our risk of overfitting our parameters.
2.1.2 RATE
Ri ≡ 〈
log p(zi|xi, θ) q(zi) 〉 P ≥ I(Zi;Xi,Θ) (11)
The rate measures the complexity of our representation. It is the relative information of a sample specific representation zi ∼ p(z|xi, θ) with respect to our variational marginal q(z). It measures how many bits we actually encode about each sample, and can measure how our risk of overfitting our representation. We use R ≡ ∑ iRi.
7Given this relationship, we could actually reduce the total number of functions we consider from 4 to 3, as discussed in Appendix A.

heading: 2.1.3 CLASSIFICATION ERROR
text: Ci ≡ −〈log q(yi|zi)〉P ≥ H(Yi)− I(Yi;Zi) = H(Yi|Zi) (12)
The classification error measures the conditional entropy of Y left after conditioning on Z. It is a measure of how much information about Y is left unspecified in our representation. This functional measures our supervised learning performance. We use C ≡ ∑ i Ci.

heading: 2.1.4 DISTORTION
text: Di ≡ −〈log q(xi|zi)〉P ≥ H(Xi)− I(Xi;Zi) = H(Xi|Zi) (13)
The distortion measures the conditional entropy of X left after conditioning on Z. It is a measure of how much information about X is left unspecified in our representation. This functional measures our unsupervised learning performance. We use D ≡ ∑ iDi.

heading: 2.2 GEOMETRY
text: The distributions p(z|x, θ), p(θ|xN , yN ), q(z), q(x|z), q(y|z) can be chosen arbitrarily. Once chosen, the functionals R,C,D, S take on well described values. The choice of the five distributional families specifies a single point in a four-dimensional space.
Importantly, the sum of these functionals is a variational upper bound (up to an additive constant) for the minimum possible relative information between worlds (Appendix D):
S +R+ C +D ≥ J + ∑ i H(Xi, Yi|Φ) (14)
Besides just the upper bound, we can consider the full space of feasible points. Notice that S and R are both themselves upper bounds on mutual informations, and so must be positive semidefinite. If our data is discrete, or if we have discretized it 8, D and C which are both upper bounds on conditional entropies, must be positive as well. Along with Equation (14), given that∑ iH(Xi, Yi|Φ) is a positive constant outside our control, the space of possible (R,C,D, S) values is at least restricted to be points in the positive orthant with some minimum possible Manhattan distance to the origin:
S +R+ C +D ≥ ∑ i H(Xi, Yi|Φ) R ≥ 0 S ≥ 0 D ≥ 0 C ≥ 0 (15)
Even in the infinite model family limit, data-processing inequalities on mutual information terms all defined in a set of variables that satisfy some nontrivial conditional dependencies ensure that there are regions in this functional space that are wholly out of reach. The surface of the feasible region maps an optimal frontier, optimal in the degree to which it minimizes mismatch between our two worlds subject to constraints on the relative magnitudes of the individual terms. This convex polytope has edges, faces and corners that are identifiable as the optimal solutions for well known objectives.
This story is a generalization of the story presented in Alemi et al. (2018), which can be considered a two-dimensional projection of this larger space (onto R,D). Within our larger framework we can derive more specific bounds between subsets of the functionals. For instance:
Ri +Di ≥ H(Xi) + I(Zi; Θ|Xi). (16)
This mirrors the bound given in Alemi et al. (2018) where R+D ≥ H(X), which is still true given that all conditional mutual informations are positive semi-definite (H(X) + I(Z; Θ|X) ≥ H(X)), but here we obtain a tighter pointwise bound that has a term measuring how much information about our encoding is revealed by the parameters after conditioning on the input itself. This term
8More generally, if we choose some measure m(x),m(y) on both X and Y , we can define D and C in terms of that measure e.g. D ≡ − 〈
log q(x|z) m(x) 〉 P ≥ Hm(X)− I(X;Z) = Hm(X|Z)
I(Zi; Θ|Xi) captures the degree to which our local representation is overly sensitive to the particular parameter settings 910.

heading: 2.3 GENERALIZATION
text: We can evaluate how much information our representations capture about the true data generating process. For instance, I(Zi; Φ) which measures how much information about the true data generating procedure our local representations capture. Notice that given the conditional dependencies in world P , we have the following Markov chain:
Φ→ (Xi, Yi,Θ)→ Zi (17)
and so by the Data Processing Inequality (Cover & Thomas, 2012):
I(Zi; Φ) ≤ I(Zi; Θ, Xi, Yi) = I(Zi;Xi,Θ) +((((( (( I(Zi;Yi|Xi,Θ) ≤ Ri. (18)
The per-instance rate Ri forms an upper bound on the mutual information between our encoding Zi and the true governing parameters of our data Φ. Similarly, we can establish that:
Φ→ (XN , Y N )→ Θ =⇒ I(Θ; Φ) ≤ I(Θ;XN , Y N ) ≤ S. (19)
S upper bounds the amount of information our encoder’s parameters Θ, the global representation of the dataset can contain about the true process Φ. At the same time:
I(Θ; Φ) ≤ I(XN , Y N ; Φ) ≤ ∑ i I(Xi, Yi; Φ), (20)
which sets a natural upper limit for the maximum S that might be useful.

heading: 3 OPTIMAL FRONTIER
text: As in Alemi et al. (2018), under mild assumptions about the variational distributional families, it can be argued that the surface is monotonic in all of its arguments. The optimal surface in the infinite family limit can be characterized as a convex polytope (Equation (15)). In practice we will be in the realistic setting corresponding to finite parametric families such as neural network approximators. We then expect that there is an irrevocable gap that opens up in the variational bounds. Any failure of the distributional families to model the correct corresponding marginal in P means that the space of all realizable R,C,D, S values will be some convex relaxation of the optimal feasible surface. This surface will be described some function f(R,C,D, S) = 0, which means we can identify points on the surface as a function of one functional with respect to the others (e.g. R = R(C,D, S)). Finding points on this surface equates to solving a constrained optimization problem, e.g.
min q(z)q(x|z)q(y|z)p(z|x,θ)p(θ|{x,y}) R such that D = D0, S = S0, C = C0. (21)
Equivalently, we could solve the unconstrained Lagrange multipliers problem:
min q(z)q(x|z)q(y|z)p(z|x,θ)p(θ|{x,y}) R+ δD + γC + σS. (22)
Here δ, γ, σ are Lagrange multipliers that impose the constraints. They each correspond to the partial derivative of the rate at the solution with respect to their corresponding functional, keeping the others fixed.
Notice that this single objective encompasses a wide range of existing techniques.
• If we retain C alone, we are doing traditional supervised learning and our network will learn to be deterministic in its activations and parameters.
9In Appendix A we consider taking this bound seriously to limit the space only only three functionals, S, C and V ≥ I(Zi; Θ|Xi)
10 This could help explain the observation that often times putting additional modeling power on the prior rather than the encoder can give improvements in ELBO (Chen et al., 2016).
• If δ = 0 we no longer require a variational reconstruction network q(x|z), and are doing some form of supervised learning generally.
• If δ = 0, σ = 0 we exactly recover the Variational Information Bottleneck (VIB) objective of Alemi et al. (2016) (where β = 1/γ), a form of stochastically regularized supervised learning that imposes a bottleneck on how much information our representation can retain about the input, while simultaneously maximizing the amount of information the representation contains about the target.
• If δ = 0 and σ, γ → ∞ but in such a way as to keep the ratio fixed β ≡ σ/γ (that is if we drop the R term and only keep C + βS as our objective) we recover the Information Bottleneck Lagrangian loss of Achille & Soatto (2017), presented as an alternative way to do Information Bottleneck (Tishby et al., 1999) but being stochastic on the parameters rather than the activations as in VIB.
• As a special case, if our objective is set to C + S (δ = 0, σ, γ →∞, σ/γ → 1), we obtain the objective for a Bayesian neural network, ala Blundell et al. (2015).
• If we retain only D, we are training a stochastic autoencoder. • If σ = 0, γ = 0, δ = 1 the objective is equivalent to the ELBO used to train a VAE (Kingma
& Welling, 2014).
• If σ = 0, γ = 0 more generally, the objective is equivalent to a β-VAE (Higgins et al., 2017) where β = 1/δ.
• If γ = 0 all terms involving the auxiliary data Y drop out and we are doing some form of unsupervised learning without any variational classifier q(y|z). The presence of the S term makes this more general than a usual β-VAE and should offer better generalization properties and control of overfitting by bottle-necking how much information we allow the parameters of our encoder to extract from the training data.
• σ = 0, γ = α, δ = 1 recovers the semi-supervised objective of Kingma et al. (2014). • In its most general form, in common parlance the full objective might be described as
a temperature-regulated Bayesian semi-supervised β-VAE, or a Variational Information Bottleneck Lagrangian Autoencoder (VIBLA).
Examples of all of these objectives behavior on a simple toy model is shown in Appendix H.
Notice that all of these previous approaches describe low dimensional sub-surfaces of the optimal three dimensional frontier. These approaches were all interested in different domains, some were focused on supervised prediction accuracy, others on learning a generative model. Depending on your specific problem, and downstream tasks, different points on the optimal frontier will be desirable. However, instead of choosing a single point on the frontier, we can now explore a region on the surface to see what class of solutions are possible within the modeling choices. By simply adjusting the three control parameters δ, γ, σ, we can smoothly move across the entire frontier and smoothly interpolate between all of these objectives and beyond.

heading: 3.1 OPTIMIZATION
text: So far we’ve considered explicit forms of the objective in terms of the four functionals. For S this would require some kind of tractable approximation to the posterior over the parameters of our encoding distribution11. Alternatively, we can formally describe the exact solution to our minimization problem:
minS s.t. R = R0, C = C0, D = D0. (23)
Recall that S measures the relative entropy of our parameter distribution with respect to the q(θ) prior. As such, the solution that minimizes the relative entropy subject to some constraints is a generalized Boltzmann distribution (Jaynes, 1957):
p∗(θ|{x, y}) = q(θ) Z e−(R+δD+γC)/σ. (24)
11 As in Blundell et al. (2015); Achille & Soatto (2017)
Here Z is the partition function, the normalization constant for the distribution Z = ∫ dθ q(θ) e−(R+δD+γC)/σ (25)
This suggests an alternative method for finding points on the optimal frontier. We could turn the unconstrained Lagrange optimization problem that required some explicit choice of tractable posterior distribution over parameters into a sampling problem for a richer implicit distribution.
A naive way to draw samples from this posterior would be to use Stochastic Gradient Langevin Dynamics or its cousins (Welling & Teh, 2011; Chen et al., 2014; Ma et al., 2015) which, in practice, would look like ordinary stochastic gradient descent (or its cousins like momentum) for the objective R + δD + γC, with injected noise. By choosing the magnitude of the noise relative to the learning rate, the effective temperature σ can be controlled.
There is increasing evidence that the stochastic part of stochastic gradient descent itself is enough to turn SGD less into an optimization procedure and more into an approximate posterior sampler (Mandt et al., 2017; Smith & Le, 2017; Achille & Soatto, 2017; Zhang et al., 2018; Chaudhari & Soatto, 2017), where hyperparameters such as the learning rate and batch size set the effective temperature. If ordinary stochastic gradient descent is doing something more akin to sampling from a posterior and less like optimizing to some minimum, it would help explain improved performance through ensemble averages of different points along trajectories (Huang et al., 2017).
When viewed in this light, Equation 24 describes the optimal posterior for the parameters so as to ensure the minimal divergence between worlds P and Q. q(θ) plays the role of the prior over parameters, but our overall objective is minimized when
q(θ) = p(θ) = 〈p(θ|xN , yN )〉p(xN ,yN ). (26)
That is, when our prior is the marginal of the posteriors over all possible datasets drawn from the true distribution. A fair draw from this marginal is to take a sample from the posterior obtained on a different but related dataset. Insomuch as ordinary SGD training is an approximate method for drawing a posterior sample, the common practice of fine-tuning a pretrained network on a related dataset is using a sample from the optimal prior as our initial parameters. The fact that fine-tuning approximates use of an optimal prior presumably helps explain its broad success.
If we identify our true goal not as optimizing some objective but instead directly sampling from Equation 24, we can consider alternative approaches to define our learning dynamics, such as parallel tempering or population annealing (Machta & Ellis, 2011). Alternatively, we could, instead of adopting variational bounds on the mutual informations, consider other mutual information bounds such as those in Ishmael Belghazi et al. (2018); van den Oord et al. (2018). Perhaps our priors can be fit, providing we form estimates of the expectation over datasets (e.g. bootstrapping or jackknifing our dataset (DasGupta, 2008)).

heading: 4 THERMODYNAMICS
text: So far we have described a framework for learning that involves finding points that lie on the surface of a convex three-dimensional surface in terms of four functional coordinates R,C,D, S. Interestingly, this is all that is required to establish a formal connection to thermodynamics, which similarly is little more than the study of exact differentials (Sethna, 2006; Finn, 1993).
Whereas previous approaches connecting thermodynamics and learning (Parrondo et al., 2015; Still, 2017; Still et al., 2012) have focused on describing the thermodynamics and statistical mechanics of physical realizations of learning systems (i.e. the heat bath in these papers is a physical heat bath at finite temperature), in this work we make a formal analogy to the structure of the theory of thermodynamics, without any physical content.

heading: 4.1 FIRST LAW OF LEARNING
text: The optimal frontier creates an equivalence class of states, being the set of all states that minimize as much as possible the distortion introduced in projecting world P onto a set of distributions that
respect the conditions in Q. The surface satisfies some equation f(R,C,D, S) = 0 which we can use to describe any one of these functionals in terms of the rest, e.g. R = R(C,D, S). This function is entire, and so we can equate partial derivatives of the function with differentials of the functionals12:
dR =
( ∂R
∂C ) D,S dC + ( ∂R ∂D ) C,S dD + ( ∂R ∂S ) C,D dS. (27)
Since the function is smooth and convex, instead of identifying the surface of optimal rates in terms of the functionals C,D, S, we could just as well describe the surface in terms of the partial derivatives by applying a Legendre transformation. We will name the partial derivatives:
γ ≡ − ( ∂R
∂C ) D,S
δ ≡ − ( ∂R
∂D ) C,S
σ ≡ − ( ∂R
∂S ) C,D . (28)
These measure the exchange rate for turning rate into reduced distortion, reduced classification error, or increased entropy, respectively.
The functionals R,C,D, S are analogous to extensive thermodynamic variables such as volume, entropy, particle number, magnetic field, charge, surface area, length and energy which grow as the system grows, while the named partial derivatives γ, δ, σ are analogous to the intensive, generalized forces in thermodynamics corresponding to their paired state variable, such as pressure, temperature, chemical potential, magnetization, electromotive force, surface tension, elastic force, etc. Just as in thermodynamics, the extensive functionals are defined for any state, while the intensive partial derivatives are only well defined for equilibrium states, which in our language are the states lying on the optimal surface 13.
Recasting our total differential:
dR = −γdC − δdD − σdS, (29)
we create a law analogous to the First Law of Thermodynamics. In thermodynamics the First Law is often taken to be a statement about the conservation of energy, and by analogy here we could think about this law as a statement about the conservation of information. Granted, the actual content of the law is fairly vacuous, equivalent only to the statement that there exists a scalar function R = R(C,D, S) defining our surface and its partial derivatives.

heading: 4.2 MAXWELL RELATIONS AND THERMODYNAMIC POTENTIALS
text: Requiring that Equation 29 be an exact differential has mathematically trivial but intuitively nonobvious implications that relate various partial derivatives of the system to one another, akin to the Maxwell Relations in thermodynamics. For example, requiring that mixed second partial derivatives are symmetric establishes that:(
∂2R
∂D∂C
) = ( ∂2R
∂C∂D
) =⇒ ( ∂δ
∂C ) D = ( ∂γ ∂D ) C . (30)
This equates the result of two very different experiments. In the experiment encoded in the partial derivative on the left, one would measure the change in the derivative of the R − D curve (δ) as a function of the classification error (C) at fixed distortion (D). On the right one would measure the change in the derivative of the R − C curve (γ) as a function of the distortion (D) at fixed classification error (C). As different as these scenarios appear, they are mathematically equivalent. A full set of Maxwell relations can be found in Appendix F.
We can additionally take and name higher order partial derivatives, analogous to the susceptibilities of thermodynamics like bulk modulus, the thermal expansion coefficient, or heat capacities. For instance, we can define the analog of heat capacity for our system, a sort of rate capacity at constant distortion:
KD ≡ ( ∂R
∂σ ) D . (31)
12( ∂X ∂Y ) Z
denotes the partial derivative of X with respect to Y holding Z constant. 13For more discussion of equilibrium states, and how they connect with more intuitive notions of equilibrium,
see Appendix G
Just as in thermodynamics, these susceptibilities may offer useful ways to characterize and quantify the systematic differences between model families. Perhaps general scaling laws can be found between susceptibilities and network widths, or depths, or number of parameters or dataset size. Divergences or discontinuities in the susceptibilities are the hallmark of phase transitions in physical systems, and it is reasonable to expect to see similar phenomenon for certain models.
A great deal of first, second and third order partial derivatives in thermodynamics are given unique names. This is because the quantities are particularly useful for comparing different physical systems. We expect a subset of the first, second and higher order partial derivatives of the base functionals will prove similarly useful for comparing, quantifying, and understanding differences between modeling choices.

heading: 4.3 SECOND LAW OF LEARNING?
text: Even when doing deterministic training, training is non-invertible (Maclaurin et al., 2015), and we need to contend with and track the entropy (S) term. We set the parameters of our networks initially with a fair draw from some prior distribution q(θ). The training procedure acts as a Markov process on the distribution of parameters, transforming it from the prior distribution into some modified distribution, the posterior p(θ|xN , yN ). Optimization is a many-to-one function, that in the ideal limiting case, maps all possible initializations to a single global optimum. In this limiting case S would be divergent, and there is nothing to prevent us from memorizing the training set.
The Second Law of Thermodynamics states that the entropy of an isolated system tends to increase. All systems tend to disorder, and this places limits on the maximum possible efficiency of heat engines.
Formally, there are many statements akin to the Second Law of Thermodynamics that can be made about Markov chains generally (Cover & Thomas, 2012). The central one is that for any for any two distributions pn, qn both evolving according to the same Markov process (n marks the time step), the relative entropy DKL [pn; qn] is monotonically decreasing with time. This establishes that for a stationary Markov chain, the relative entropy to the stationary state DKL [pn; p∞] monotonically decreases 14.
In our language, we can make strong statements about dynamics that target points on the optimal frontier, or dynamics that implement a relaxation towards equilibrium. There is a fundamental distinction between states that live on the frontier and those off of it, analogous to the distinction between equilibrium and non-equilibrium states in thermodynamics.
Any equilibrium distribution can be expressed in the form Equation (24) and identified by its partial derivatives γ, δ, σ. If name the objective in Equation (22):
J(γ, δ, σ) ≡ R+ δD + γC + σS, (32) The value this objective takes for any equilibrium distribution can be shown to be given by the log partition function (Equation (25)):
min J(γ, δ, σ) = −σ logZ(γ, δ, σ) (33) and the KL divergence between any distribution over parameters p(θ) and an equilibrium distribution is:
DKL [p(θ); p ∗(θ; γ, δ, σ)] = ∆J/σ (34) ∆J ≡ Jnoneq(p; γ, δ, σ)− J(γ, δ, σ) (35) Where Jnoneq is the non-equilibrium objective:
Jnoneq(p; γ, δ, σ) = 〈R+ δD + γC + σS〉p(θ) . (36)
For a stationary Markov process whose stationary distribution is an equilibrium distribution the KL divergence to the stationary distribution must monotonically decrease each step. This means the ∆J/σ must decrease monotonically, that is our objective J must decrease monotonically:
Jt=0 ≥ Jt ≥ Jt+1 ≥ Jt=∞. (37) 14For discrete state Markov chains, this implies that if the stationary distribution is uniform, the entropy of
the distribution H(pn) is strictly increasing.
Furthermore, if we use q(θ) as our prior over parameters, we know:
Jt=0 = 〈R+ δD + γC〉q(θ) (38) Jt=∞ = −σ logZ. (39)

heading: 5 CONCLUSION
text: We have formalized representation learning as the process of minimizing the distortion introduced when we project the real world (World P ) onto the world we desire (WorldQ). The projection is naturally described by a set of four functionals which variationally bound relevant mutual informations in the real world. Relations between the functionals describe an optimal three-dimensional surface in a four dimensional space of optimal states. A single learning objective targeting points on this optimal surface can express a wide array of existing learning objectives spanning from unsupervised learning to supervised learning and everywhere in between. The geometry of the optimal frontier suggests a wide array of identities involving the functionals and their partial derivatives. This offers a direct analogy to thermodynamics independent of any physical content. By analogy to thermodynamics, we can begin to develop new quantitative measures and relationships amongst properties of our models that we believe will offer a new class of theoretical understanding of learning behavior.

heading: A RECONSTRUCTION FREE FORMULATION
text: We can utilize the Chain Rule of Mutual Information (Equation (9)):
I(Zi;Xi,Θ) = I(Zi;Xi) + I(Zi; Θ|Xi), (40)
to simplify our expression for the minimum possible KL between worlds (Equation (7)), and consider a reduced set of functionals (compare to Section 2.1):
• Ci ≡ −〈log q(yi|zi)〉P ≥ H(Yi)− I(Yi;Zi) = H(Yi|Zi) The classification error, as before.
• S ≡ 〈
log p(θ|{x,y})q(θ) 〉 P ≥ I(Θ; {X,Y })
The entropy as before. • Vi ≡ 〈
log p(zi|xi,θ)q(zi|xi) 〉 P ≥ I(Zi; Θ|Xi)
The volume of the representation (for lack of a better term), which measures the mutual information between our representation Z and the parameters Θ, conditioned on the input X . That is, this functional bounds how much of the information in our representation can come from the learning algorithm, independent of the actual input.
In principle, these three functionals still fully characterize the distortion introduced in our information projection. Notice that this new functional requires the variational approximation q(zi|xi), a variational approximation to the marginal over our parameter distribution. Notice also that we no longer require a variational approximation to p(xi|zi). That is, in this formulation we no longer require any form of decoder, or synthesis in our original data space X . While equivalent in its information projection, this more naturally corresponds to the model of our desired world Q:
q(x, y, φ, z, θ) = q(φ)q(θ) ∏ i q(zi|xi)q(yi|zi), (41)
depicted below in Figure 2. Here we desire, not the joint generative model X ← Z → Y , but the predictive model X → Z → Y .
In this case we have:
C + S + V ≥ J + ∑ i [H(YiXi|Φ)−H(Xi)] . (42)
We can imagine tracing out this, now three dimensional, frontier that still explores a space consistent with our original graphical model, but wherein we no longer have to do any form of direct variational synthesis.

heading: B BAYESIAN INFERENCE
text: Just as in A we can consider alternative graphical models for World P. In particular, we can consider a simplified scenario depicted in Figure 3 corresponding to the usual situation in Bayesian inference.
Here we have just data, generated by some process and we form a single global representation of the dataset. The world we desire, World Q, corresponds to the usual Bayesian modeling assumption, whereby our own global representation generates the data conditionally independently.
For these sets of graphical models, we have the following information projection:
Jbayes = min q∈Q DKL [p; q] = IP − IQ = ∑ i I(Xi; Φ) + I(Θ;X n)− ∑ i I(Xi; Θ) (43)
And we can derive the simple variational bounds:
S ≡ 〈
log p(θ|Xn) q(θ)
〉 ≥ I(Θ;Xn) (44)
This entropy gives an upper bound on the mutual information between our parameters and the dataset, it requires a variational approximation to the true marginal of the posterior p(θ|XN ) over datasets: q(θ), a prior.
Ui ≡ −〈log q(xi|θ)〉 ≥ H(Xi|Θ) (45) The energy gives an upper bound on the conditional entropy of our data given our parameters, it is powered by a variational approximation to the factored inverse of our global representation, the likelihood in ordinary parlance.
Our optimal frontier is set by those conditions above as well as: 15: U + S ≥ Jbayes + ∑ i H(Xi|Φ) (46)
Just as in our earlier paper (Alemi et al., 2018) we could trace out the frontier by doing the constrained optimization problem:
minS + βU (47)
The formal solution to this optimization problem takes the form: log p(θ|xN ) = log q(θ) + β ∑ i log q(xi|θ)− logZ. (48)
Where Z is the partition function: Z = ∫ dθ q(θ)eβ ∑ i log q(xi|θ) (49)
This is the ordinary temperature regulated (Watanabe, 2009) Bayesian posterior: p(θ|xN ) ∝ q(θ) ∏ i q(xi|θ)β . (50)
Using a temperature to regulate the relative contribution of the prior and posterior has been used broadly, but ordinarily doesn’t have a well founded justification. Here we can unapologetically vary
15U ≡ ∑
i Ui
the relative contributions of the prior and likelihood since in the representational framework, those are both variational approximations that might have differing ability to better model the true distributions they approximate. By varying the β parameter here, just as in the β-VAE case (Alemi et al., 2018) we can smoothly explore the frontier within our modeling family, smoothly controlling the amount of information our model extracts from the dataset. This can help us control for overfitting in a principled way.
Additionally, we could try to relax our variational approximations, and fit our prior, assuming we could estimate an expectation over datasets. One way to do that is with a bootstrap or jackknife procedure (DasGupta, 2008).

heading: C DISCRIMINATIVE MODELS
text: Similarly we could consider the situation depicting usual discriminative learning, depicted in Figure 4.
For these sets of graphical models, we have the following information projection: Jd = IP − IQ = I(Θ;XN , Y N ) + ∑ i [I(Xi; Φ) + I(Yi;Xi,Φ)− I(Yi;Xi,Θ)] . (51)
S ≡ 〈
log p(θ|Xn) q(θ) 〉 P ≥ I(Θ;Xn) (52)
This entropy gives an upper bound on the mutual information between our parameters and the dataset, it requires a variational approximation to the true marginal of the posterior p(θ|XN ) over datasets: q(θ), a prior.
Ui ≡ −〈log q(yi|xi, θ)〉P ≥ H(Yi|Xi,Θ) (53) The energy gives an upper bound on the conditional entropy of our targets given our parameters and input, it is powered by a variational approximation to the factored inverse of our global representation, the conditional likelihood in ordinary parlance.
Our optimal frontier is set by those conditions above as well as: U + S ≥ Jd + ∑ i H(Yi|Xi,Φ)− I(Xi; Φ) (54)
Just as previously in Appendix B solutions on the frontier can be specified by: log p(θ|xN , yN ) = log q(θ) + β ∑ i log q(yi|xi, θ)− logZ. (55)
Here again we can smoothly explore the frontier set by the variationals approximations given by the prior and likelihood by simply adjusting β. We might additionally consider going beyond the fixed variational approximations and push the frontier by fitting the prior, or likelihood.

heading: D FUNCTIONAL INEQUALITIES
text: Here we show the details for deriving Equation (14).
We start by expressing our functional inequalities, but being explicit about presence of the relative informations of our variational approximations.
I(Θ;XN , Y N ) = S −DKL [p(θ); q(θ)] (56) I(Xi;Zi) = H(Xi)−Di +DKL [p(xi|zi); q(xi|zi)] (57) I(Yi;Zi) = H(Yi)− Ci +DKL [p(yi|zi); q(yi|zi)] (58)
I(Zi;Xi,Θ) = Ri −DKL [p(zi); q(zi)] (59)
Combining Equations (7) and (56) to (59): J = S +D+C +R−DKL [p; q]− ∑ i [H(Xi) +H(Yi)− I(Xi; Φ)− I(Yi;Xi,Φ)] ≥ 0. (60) Here we have collected all of the KL divergences for our variational approximations:
DKL [p; q] ≡DKL [p(θ); q(θ)] + ∑ i DKL [p(xi|zi); q(xi|zi)]
+ ∑ i [DKL [p(yi|zi); q(yi|zi)] +DKL [p(zi); q(zi)]] . (61)
We can simplify: H(Xi)− I(Xi; Φ) = H(Xi|Φ) (62)
H(Yi)− I(Yi;XiΦ) = H(Yi|Xi,Φ) (63) H(Yi|Xi,Φ) +H(Xi|Φ) = H(Yi, Xi|Φ) (64)
To obtain: J = S +D + C +R−DKL [p; q]− ∑ i H(Yi, Xi|Φ) (65)
Which yields:
S +D + C +R = J +DKL [p; q] + ∑ i H(Yi, Xi|Φ) (66)
S +D + C +R ≥ J + ∑ i H(Yi, Xi|Φ) (67)
S +D + C +R ≥ ∑ i H(Yi, Xi|Φ) (68)
(69)
E IDENTITIES
We will utilize some basic information identities, first by definition I(A;B) = H(A)−H(A|B) (70)
= H(B)−H(B|A) (71) = H(A) +H(B)−H(A,B) (72) = H(A,B)−H(A|B)−H(B|A) (73)
By the chain rule of mutual information: I(A,B;C) = I(A;C) + I(B;C|A) ≥ 0 (74)
Mutual informations, and conditional mutual informations are always positive: I(A;B) ≥ 0 (75)
I(A;B|C) ≥ 0 (76) We will also use the following rule for conditional entropies
H(B|A) = H(A,B)−H(A) (77)

heading: F MAXWELL RELATIONS
text: We can also define other potentials analogous to the alternative thermodynamic potentials such as enthalpy, free energy, and Gibb’s free energy by performing partial Legendre transformations. For instance, we can define a free rate:
F (C,D, σ) ≡ R+ σS (78) dF = −γdC − δdD + Sdσ. (79)
The free rate measures the rate of our system, not as a function of S (something difficult to keep fixed), but in terms of σ, a parameter in our loss or optimal posterior.
The free rate gives rise to other Maxwell relations such as( ∂S
∂C ) σ = − ( ∂γ ∂σ ) C , (80)
which equates how much each additional bit of entropy (S) buys you in terms of classification error (C) at fixed effective temperature (σ), to a seemingly very different experiment where you measure the change in the effective supervised tension (γ, the slope on the R − C curve) versus effective temperature (σ) at a fixed classification error (C).
F.1 COMPLETE ENUMERATION
Here we enumerate a complete set of Maxwell Relations. First if we write R = R(D,C, S):
dR = −γdC − δdD − σdS
( ∂γ
∂D ) C = ( ∂δ ∂C ) D
(81)
( ∂δ
∂S ) D = ( ∂σ ∂D ) S
(82)
( ∂γ
∂S ) C = ( ∂σ ∂C ) S
(83)
Next transforming to F = R+ σS = F (D,C, σ)
dF = −γdC − δdD + Sdσ
( ∂γ
∂σ ) C = − ( ∂S ∂C ) σ
(84)
( ∂δ
∂S ) D = − ( ∂S ∂D ) σ
(85)
Next transforming to H = R+ γC = H(D, γ, S)
dH = Cdγ − δD − σdS (86)
( ∂C
∂D ) γ = − ( ∂δ ∂γ ) D
(87)
( ∂C
∂S ) γ = − ( ∂σ ∂γ ) S
(88)
Next transforming to G = R+ σS + γC = G(D, γ, σ) dG = Cdγ − δdD + Sdσ (89)
( ∂C
∂σ ) γ = ( ∂S ∂γ ) σ
(90)
Next transforming to A = R+ δD = A(δ, C, S) dA = −γdC +Ddδ − σdS (91)
( ∂γ
∂δ ) C = − ( ∂D ∂C ) δ
(92)
( ∂D
∂σ ) δ = − ( ∂σ ∂δ ) S
(93)
Finally transforming to B = R+ δD + σS = B(δ, C, σ) dB = −γdC +Ddδ + Sdσ (94)
( ∂γ
∂σ ) C = − ( ∂S ∂C ) σ
(95)
( ∂S
∂δ ) σ = ( ∂D ∂σ ) δ
(96)

heading: G ZEROTH LAW OF LEARNING
text: A central concept in thermodynamics is a notion of equilibrium. The so called Zeroth Law of thermodynamics defines thermal equilibrium as a sort of reflexive property of systems (Finn, 1993). If systemA is in thermal equilibrium with systemC, and systemB is separately in thermal equilibrium with system C, then system A and B are in thermal equilibrium with each other.
When any sub-part of a system is in thermal equilibrium with any other sub-part, the system is said to be an equilibrium state.
In our framework, the points on the optimal surface are analogous to the equilibrium states, for which we have well defined partial derivatives. We can demonstrate that this notion of equilibrium agrees with a more intuitive notion of equilibrium between coupled systems. Imagine we have two different models, characterized by their own set of distributions, Model A is defined by pA(z|x, θ), pA(θ, {x, y}), qA(z), and model B by pB(z|x, θ), pB(θ, {x, y}), qB(z). Both models will have their own value for each of the functionals: RA, SA, DA, CA and RB , SB , DB , CB . Each model defines its own representation ZA, ZB . Now imagine coupling the models, by forming the joint representation ZC = (ZA, ZB) formed by concatenating the two representations together. Now the governing distributions over Z are simply the product of the two model’s distributions, e.g. qC(zC) = qA(zA)qB(zB). Thus the rate RC and entropy SC for the combined model is the sum of the individual models: RC = RA +RB , SC = SA + SB .
Now imagine we sample new states for the combined system which are maximally entropic with the constraint that the combined rate stay constant:
minS s.t. R = RC =⇒ p(θ|{x, y}) = q(θ)
Z e−R/σ. (97)
For the expectation of the two rates to be unchanged after they have been coupled and evolved holding their total rate fixed, we must have,
− 1 σ RA − 1 σB RB = − 1 σC RC = − 1 σC (RA +RB) =⇒ σA = σB = σC . (98)
Therefore, we can see that σ, the effective temperature, allows us to identify whether two systems are in thermal equilibrium with one another. Just as in thermodynamics, if two systems at different temperatures are coupled, some transfer takes place.

heading: H EXPERIMENTS
text: We show examples of models trained on a toy dataset for all of the different objectives we define above. The dataset has both an infinite data variant, where overfitting is not a problem, and a finite data variant, where overfitting can be clearly observed for both reconstruction and classification.
Data generation. We follow the toy model from Alemi et al. (2018), but add an additional classification label in order to explore supervised and semi-supervised objectives. The true data generating distribution is as follows. We first sample a latent binary variable, z ∼ Ber(0.7), then sample a latent 1D continuous value from that variable, h|z ∼ N (h|µz, σz), and finally we observe a discretized value, x = discretize(h;B), where B is a set of 30 equally spaced bins, and a discrete label, y = z (so the true label is the latent variable that generated x). We set µz and σz such that R∗ ≡ I(x; z) = 0.5 nats, in the true generative process, representing the ideal rate target for a latent variable model. For the finite dataset, we select 50 examples randomly from the joint p(x, y, z). For the infinite dataset, we directly supply the true full marginal p(x, y) at each iteration during training. When training on the finite dataset, we evaluate model performance against the infinite dataset so that there is no error in the evaluation metrics due to a finite test set.
Model details. We choose to use a discrete latent representation with K = 30 values, with an encoder of the form q(zi|xj) ∝ − exp[(wei xj − bei )2], where z is the one-hot encoding of the latent categorical variable, and x is the one-hot encoding of the observed categorical variable. We use a decoder of the same form, but with different parameters: q(xj |zi) ∝ − exp[(wdi xj − bdi )2]. We use a classifier of the same form as well: q(yj |zi) ∝ − exp[(wci yj − bci )2]. Finally, we use a variational marginal, q(zi) = πi. Given this, the true joint distribution has the form p(x, y, z) = p(x)p(z|x)p(y|x), with marginal p(z) = ∑ x p(x, z), and conditionals p(x|z) = p(x, z)/p(z) and p(y|z) = p(y, z)/p(z). The encoder is additionally parameterized following Achille & Soatto (2017) by α, a set of learned parameters for a Log Normal distribution of the form logN (−αi/2, αi). In total, the model has 184 parameters: 60 weights and biases in the encoder and decoder, 4 weights and biases in the classifier, 30 weights in the marginal, and an additional 30 weights for the αi parameterizing the stochastic encoder. We initialize the weights so that when σ = 0, there is no noticeable effect on the encoder during training or testing.
Experiments. In Figure 5, we show the optimal, hand-crafted model for the toy dataset, as well as a selection of parameterizations of the TherML objective that correspond to commonly-used objective functions and a few new objective functions not previously described. In the captions, the parameters are specified with γ, δ, σ as in the main text, as well as ρ, which is a corresponding Lagrange multiplier for R, in order to simplify the parameterization. It just parameterizes the optimal surface slightly differently. We train all objectives for 10,000 gradient steps. For all of the objectives described, the model has converged, or come close to convergence, by that point.
Because the model is sufficiently powerful to memorize the dataset, most of the objectives are very susceptible to overfitting. Only the objective variants that are “regularized” by the S term (parameterized by σ) are able to avoid overfitting in the decoder and classifier.

Review summaries:
This paper attempts to establish a notion of thermodynamics for machine learning. Let me give an attempt at summary. First, an objective function is established based on demanding that the multi-information of two graphical models be small. The first graphical model is supposed to represent the actual dependence of variables and parameters used to learn a latent description of the training data, and the model demands that the latents entirely explain the correlation of the data, with the parameters marginalized out. Then, a variational approximation is made to four subsets of terms in this objective function, defining four "thermodynamic"  functionals. Minimizing the sum of these functionals puts a variational upper bound on the objective. Next, the sum is related to an unconstrained Lagrange multiplier problem making use of the facts (1) that such an objective will likely have many different realizations of the thermodynamic functionals for specific value of the bound and (2) that on the optimal surface the value of one of the functional can be parametrized in terms of the three others. If we pick the entropy functional to be parameterized in terms of the others, we find ourself precisely in the where the solution to the optimization is a Boltzmann distribution; the coefficients of the Lagrange multipliers will then take on thermodynamic interpretations in of temperature, generalized chemical potentials, etc. At this point, the machinery of thermodynamics can be brought to bear, including a first law, Maxwell relations (equality of mixed partial derivatives), etc.

This paper builds on the (Alemi et al 2018) ICML paper and presents a formal framework for representation learning. The authors use a graphical model for their representation learning task and use basic information theoretic inequalities to upper-bound their measure of performance which is a KL divergence. The authors then define the optimal frontier which corresponds to the lowest possible upper-bound and write it as an optimization problem. Written with Lagrange multipliers, they obtain several known cost functions for different particular choices of these parameters.