Exponential Family

The Exponential Family MLE for the Exponential Family

The Exponential Family

Our treatment of Bayesian statistics showed that certain likelihood-prior pairs such as Binomial-Beta and Normal-Normal produce posteriors in the same family as the prior. This is not a coincidence. These distributions all belong to the exponential family, a unified framework that encompasses many of the distributions used in statistics and machine learning, among them the Bernoulli, Poisson, Normal, Gamma, and Dirichlet distributions.

The exponential family is fundamental for three reasons:

Definition: Exponential Family

An exponential family is a family of probability distributions parameterized by natural parameters (or canonical parameters) \(\eta \in \mathbb{R}^K\), with support over \(\mathcal{X} \subseteq \mathbb{R}^D\) such that \[ \begin{align*} p(x \mid \eta ) &= \frac{1}{Z(\eta)} h(x) \exp\{\eta^\top \mathcal{T}(x)\}\\\\ &= h(x) \exp\{\eta^\top \mathcal{T}(x) - A(\eta)\} \end{align*} \] where

  • \(h(x)\) is a base measure (or carrier measure): a function depending only on \(x\), not on \(\eta\), and often equal to \(1\).
  • \(\mathcal{T}(x) \in \mathbb{R}^K\) is the sufficient statistic vector. It is called sufficient because the likelihood depends on \(x\) only through \(\mathcal{T}(x)\). All information in \(x\) relevant to estimating \(\eta\) is captured by \(\mathcal{T}(x)\).
  • \(Z(\eta)\) is the normalization function, defined so that \(p(x \mid \eta)\) integrates to one over the support, and we write \(A(\eta) = \log Z(\eta)\). The natural parameter \(\eta\) ranges over those vectors with \(Z(\eta) \lt \infty\).

Each exponential family is defined by different \(h(x)\) and \(\mathcal{T}(x)\).

The normalization function \(Z(\eta)\) is often referred to as the partition function in statistical physics and machine learning. In particular, the log-partition function: \[ A(\eta) = \log Z(\eta) \] is convex over the convex set \(\Omega = \{\eta \in \mathbb{R}^K : A(\eta) \lt \infty\}\), and is strictly convex when the family is minimal. That \(\Omega\) is convex and that \(A\) is convex on all of \(\Omega\) are consequences of Hölder's inequality, and the strict convexity of \(A\) on all of \(\Omega\) for a minimal family follows from its equality case. We take these facts for granted here. On the interior of \(\Omega\), which is convex because \(\Omega\) is, the convexity of \(A\), and its strict convexity when the family is minimal, also follow from the Hessian formula \(\nabla^2 A(\eta) = \operatorname{Cov}[\mathcal{T}(x)]\), as shown below in Theorem: Convexity of the Log-Partition Function on the Interior.

In the context of optimization and information geometry, \(A(\eta)\) acts as a convex potential function that links natural parameters to moment parameters.

Definition: Minimal Representation

An exponential family is said to be minimal if there is no nonzero \(\eta \in \mathbb{R}^K\) such that \[ \eta^\top \mathcal{T}(x) = \text{const} \] holds for \(h(x)\,dx\)-almost every \(x\), that is, for all \(x\) outside a set on which \(h\) integrates to zero (for a discrete support, with the integral replaced by a sum).

Equivalently, the components of the sufficient statistic vector \(\mathcal{T}(x)\) (along with the constant function \(1\)) are linearly independent as functions of \(x\), where two functions that agree \(h(x)\,dx\)-almost everywhere are identified. This property ensures the identifiability of the model. There is a unique, one-to-one mapping between the natural parameters \(\eta\) and the resulting probability distribution.

Math vs. ML Perspectives: Handling the Constant

In many machine learning contexts, the condition is simplified to \[ \eta^\top \mathcal{T}(x) = 0. \] This assumes that the bias (constant) term has already been absorbed into the sufficient statistic vector \(\mathcal{T}(x)\) by augmenting it with a constant \(1\).

However, in our canonical definition where the log-partition function \(A(\eta)\) and base measure \(h(x)\) are explicitly separated, we must use the more rigorous \(\text{const}\) condition. If \(\eta^\top \mathcal{T}(x)\) were a constant, that value would be absorbed by \(A(\eta)\), meaning multiple \(\eta\) values could represent the same distribution. A minimal representation prevents this redundancy, ensuring that the Fisher information matrix is positive definite at every interior point of \(\Omega\) and the optimization surface is well-behaved.

A common example of a non-minimal representation is the \(K\)-class multinomial distribution. Because the probabilities must sum to one (\(\sum p_i = 1\)), the natural parameters are over-specified. While we can work with this redundant form (as often done in Softmax regression), we can always reparameterize it into a minimal representation using \(K-1\) independent components to restore unique identifiability.

Let \(\eta = f(\phi)\), where \(\phi \in \mathbb{R}^M\) is some other possibly smaller set of parameters (\(M \leq K\)), and then \[ p(x \mid \phi ) = h(x) \exp\{ f(\phi)^\top \mathcal{T}(x) - A(f(\phi))\}. \] If \(M \lt K\) and the mapping \(\phi \to \eta\) is nonlinear, it is said to be a curved exponential family.

If \(\eta = f(\phi) = \phi\), the model is in canonical form and in addition, if \(\mathcal{T} =x\), we call it a natural exponential family (NEF): \[ p(x \mid \eta ) = h(x) \exp\{\eta^\top x - A(\eta)\}. \]

Finally, we define the moment parameters as follows: \[ m = \mathbb{E}[\mathcal{T}(x)] \in \mathbb{R}^K. \]

Example 1: Bernoulli Distribution

\[ \begin{align*} \operatorname{Ber}(x \mid \mu) &= \mu^x (1-\mu)^{1-x} \\\\ &= \exp\{x \log (\mu) + (1-x) \log (1-\mu)\}\\\\ &= \exp\{\mathcal{T}(x)^\top \eta\} \end{align*} \] where

  • \(\mathcal{T}(x) = [\mathbb{1}\{x=1\}, \, \mathbb{1}\{x=0\}]\).
  • \(\eta = [\log(\mu), \, \log(1-\mu)]\).
  • \(\mu\) is the mean parameter.

In this representation, the components \(\mathbb{1}\{x=1\}\) and \(\mathbb{1}\{x=0\}\) of \(\mathcal{T}(x)\) satisfy \(\mathbb{1}\{x=1\} + \mathbb{1}\{x=0\} = 1\) for all \(x\) in the support, violating the minimality condition with the nonzero vector \(v = (1, 1)\). Consequently, shifting \(\eta\) by any multiple of \(v\) yields the same distribution, so \(\eta\) is not uniquely determined. To restore uniqueness, we use a minimal representation: \[ \operatorname{Ber}(x \mid \mu) = \exp\left\{x \log \left(\frac{\mu}{1-\mu}\right) + \log (1-\mu)\right\} \] where

  • \(\mathcal{T}(x) = x\).
  • \(\eta = \log \left(\frac{\mu}{1-\mu}\right)\).
  • \(A(\eta) = -\log (1-\mu) = \log(1+ e^{\eta})\).
  • \(h(x) = 1\).

The Bernoulli example reveals a fundamental connection to classification models. The mean parameter \(\mu\) can be recovered from the canonical parameter \(\eta\) via: \[ \mu = \sigma(\eta) = \frac{1}{1+e^{-\eta}}. \] Here \(\sigma(\cdot)\) is the logistic function.

A direct computation gives \[ \begin{align*} \frac{dA}{d \eta} &= \frac{d}{d\eta} \log(1+ e^{\eta}) \\\\ &= \frac{e^{\eta}}{1 + e^{\eta}} \\\\ &= \frac{1}{1+e^{-\eta}} \\\\ &= \mu. \end{align*} \]

In general, the log-partition function \(A(\eta)\) acts as the cumulant generating function for the sufficient statistics \(\mathcal{T}(x)\). In other words, the derivatives of \(A(\eta)\) generate all the cumulants of \(\mathcal{T}(x)\). The first two are particularly important.

Theorem: Cumulants from the Log-Partition Function

Let \(\eta\) lie in the interior of \(\Omega = \{\eta \in \mathbb{R}^K : A(\eta) \lt \infty\}\). Then the gradient and Hessian of the log-partition function recover the first two cumulants of the sufficient statistic vector: \[ \nabla A(\eta) = \mathbb{E}[\mathcal{T}(x)], \quad \nabla^2 A(\eta) = \operatorname{Cov}[\mathcal{T}(x)]. \]

Proof:

Write \(Z(\eta) = \int h(x) \exp\{\eta^\top \mathcal{T}(x)\}\,dx\), so that \(A(\eta) = \log Z(\eta)\). For \(\eta\) in the interior of \(\Omega\) the integral converges on a neighborhood of \(\eta\), and we take for granted that differentiation may be carried out under the integral sign there. Differentiating once gives \[ \begin{align*} \nabla A(\eta) &= \frac{\nabla Z(\eta)}{Z(\eta)} \\\\ &= \frac{1}{Z(\eta)} \int \mathcal{T}(x) h(x) \exp\{\eta^\top \mathcal{T}(x)\}\,dx \\\\ &= \int \mathcal{T}(x)\, p(x \mid \eta)\,dx = \mathbb{E}[\mathcal{T}(x)]. \end{align*} \] Differentiating a second time and applying the quotient rule to \(\nabla Z / Z\), \[ \begin{align*} \nabla^2 A(\eta) &= \frac{\nabla^2 Z(\eta)}{Z(\eta)} - \frac{\nabla Z(\eta)\,\nabla Z(\eta)^\top}{Z(\eta)^2} \\\\ &= \mathbb{E}[\mathcal{T}(x)\mathcal{T}(x)^\top] - \mathbb{E}[\mathcal{T}(x)]\,\mathbb{E}[\mathcal{T}(x)]^\top \\\\ &= \operatorname{Cov}[\mathcal{T}(x)]. \end{align*} \] The same computation applies verbatim to a discrete support, with the integral replaced by a sum over the support.

The first identity says the gradient of \(A\) returns the moment parameters \(m := \mathbb{E}[\mathcal{T}(x)]\). The second identity says the Hessian of \(A\) returns the covariance of the sufficient statistics. Minimality is what keeps this covariance matrix from degenerating.

Theorem: Convexity of the Log-Partition Function on the Interior

Let \(\Omega = \{\eta \in \mathbb{R}^K : A(\eta) \lt \infty\}\). For every \(\eta\) in the interior of \(\Omega\) and every \(v \in \mathbb{R}^K\), \[ v^\top \nabla^2 A(\eta)\, v = \operatorname{Var}[v^\top \mathcal{T}(x)] \geq 0, \] the variance being taken under \(p(\cdot \mid \eta)\), and \(A\) is convex on that interior. If the family is minimal, then \(\nabla^2 A(\eta)\) is positive definite at every such \(\eta\), and \(A\) is strictly convex on that interior.

Proof:

The quadratic form.
Pairing the second cumulant identity with \(v\) on both sides, we obtain \[ \begin{align*} v^\top \nabla^2 A(\eta)\, v &= v^\top \operatorname{Cov}[\mathcal{T}(x)]\, v \\\\ &= \operatorname{Var}[v^\top \mathcal{T}(x)] \geq 0. \end{align*} \] Assume the family is minimal, fix an interior \(\eta\) and a nonzero \(v \in \mathbb{R}^K\), and suppose the variance were zero. Write \(m_v = \mathbb{E}[v^\top \mathcal{T}(x)]\). Then \(\int (v^\top \mathcal{T}(x) - m_v)^2 \, p(x \mid \eta)\,dx = 0\) with a nonnegative measurable integrand, so by the vanishing of nonnegative functions with zero integral (applied with the sample space as the measure space and \(dx\) as the measure), \((v^\top \mathcal{T}(x) - m_v)^2 \, p(x \mid \eta) = 0\) for almost every \(x\). For a discrete support, the integral becomes a sum, and the conclusion holds at every point of the support. Since \((v^\top \mathcal{T}(x) - m_v)^2 \gt 0\) on \(N = \{x : v^\top \mathcal{T}(x) \neq m_v\}\) and \(\exp\{\eta^\top \mathcal{T}(x) - A(\eta)\} \gt 0\), this says that \(h = 0\) almost everywhere on \(N\), and by the converse direction of the same theorem, \(\int_N h(x)\,dx = 0\). Thus, although \(v \neq 0\), \(v^\top \mathcal{T}(x) = m_v\) for \(h(x)\,dx\)-almost every \(x\), which minimality rules out. Therefore \(v^\top \nabla^2 A(\eta)\, v \gt 0\).

Convexity along segments.
Let \(\eta_0 \neq \eta_1\) lie in the interior, put \(v = \eta_1 - \eta_0\), and set \(g(t) = A(\eta_0 + t v)\). The interior of \(\Omega\) is convex. Indeed, if the balls of radius \(r\) about \(\eta_0\) and \(\eta_1\) lie in \(\Omega\), then the convexity of \(\Omega\), noted above, puts the ball of radius \(r\) about each point of the segment between them in \(\Omega\) as well. Hence \(\eta_0 + t v\) lies in the interior for every \(t \in [0, 1]\). Since the interior is open, the same holds for \(t\) slightly below \(0\) and slightly above \(1\), so there is an open interval \(J \supseteq [0, 1]\) on which \(\eta_0 + t v\) stays in the interior. Now \(g\) is the log-partition function of the one-parameter exponential family with base measure \(h(x) \exp\{\eta_0^\top \mathcal{T}(x)\}\) and sufficient statistic \(v^\top \mathcal{T}(x)\). Its partition function is \(t \mapsto Z(\eta_0 + t v)\), so its natural parameter space is \(\{t : \eta_0 + t v \in \Omega\}\), which contains \(J\) in its interior. Applying the second cumulant identity to that family gives, for \(t \in J\), \(g''(t) = \operatorname{Var}[v^\top \mathcal{T}(x)]\) under \(p(\cdot \mid \eta_0 + t v)\), which is \(v^\top \nabla^2 A(\eta_0 + t v)\, v\). By the quadratic-form step, \(g''(t) \geq 0\), with strict inequality for a minimal family (as \(v \neq 0\)). The route through the one-parameter family needs only the second cumulant identity, not continuity of \(\nabla^2 A\).

Take the minimal case. By the mean value theorem applied to \(g'\), the derivative \(g'\) is strictly increasing on \(J\). For \(t \in (0, 1)\), the same theorem, now applied to \(g\) on \([0, t]\) and on \([t, 1]\), provides \(s_1 \in (0, t)\) and \(s_2 \in (t, 1)\) with \[ \begin{align*} \frac{g(t) - g(0)}{t} &= g'(s_1) \\\\ &\lt g'(s_2) \\\\ &= \frac{g(1) - g(t)}{1 - t}. \end{align*} \] Multiplying by \(t(1 - t) \gt 0\) and rearranging, we find \(g(t) \lt (1 - t)\, g(0) + t\, g(1)\), that is, \[ A\bigl((1 - t)\eta_0 + t \eta_1\bigr) \lt (1 - t) A(\eta_0) + t A(\eta_1). \] Without minimality the same argument, with \(g'' \geq 0\) and non-strict inequalities throughout, gives the corresponding non-strict inequality, so \(A\) is convex on the interior.

For a minimal family, the theorem makes the negative log-likelihood \(N A(\eta) - \eta^\top \mathcal{T}(\mathcal{D})\) (up to an \(\eta\)-independent constant) of the next section strictly convex on the interior of \(\Omega\), so it has at most one minimizer there. The MLE is therefore unique whenever it exists.

We now write two of the most widely used continuous distributions in machine learning in exponential family form.

Example 2: Normal Distribution

\[ \begin{align*} \mathcal{N}(x \mid \mu, \, \sigma^2) &= \frac{1}{\sigma\sqrt{2\pi}}\exp \left\{-\frac{1}{2\sigma^2}(x - \mu)^2 \right\} \\\\ &= \frac{1}{\sqrt{2\pi}} \exp \left\{ \frac{\mu}{\sigma^2}x - \frac{1}{2\sigma^2}x^2 -\frac{1}{2\sigma^2}\mu^2 -\log \sigma \right\} \end{align*} \] where

  • \(\mathcal{T}(x) = \begin{bmatrix}x \\ x^2 \end{bmatrix}\)
  • \(\eta = \begin{bmatrix} \frac{\mu}{\sigma^2} \\ -\frac{1}{2\sigma^2} \end{bmatrix} \)
  • \(A(\eta) = \frac{\mu^2}{2\sigma^2}+\log \sigma = -\frac{\eta_1^2}{4\eta_2}-\frac{1}{2}\log(-2\eta_2)\)
  • \(h(x) = \frac{1}{\sqrt{2\pi}}\).

Also, the moment parameters are given by: \[ m = \begin{bmatrix} \mu \\ \mu^2 + \sigma^2 \end{bmatrix}. \] Note. If \(\sigma = 1\), the distribution becomes a natural exponential family such that

  • \(\mathcal{T}(x) = x\)
  • \(\eta = \mu\)
  • \(A(\eta) = \frac{\mu^2}{2} = \frac{\eta^2}{2}\)
  • \(h(x) = \frac{1}{\sqrt{2\pi}}\exp\{-\frac{x^2}{2}\} = \mathcal{N}(x \mid 0, 1)\), which is not constant.

The univariate case extends naturally to higher dimensions. The multivariate normal distribution can be rewritten in the information form, parameterized by the precision matrix \(\Lambda = \Sigma^{-1}\) and \(\xi = \Lambda\mu\), which converts directly into canonical exponential-family form (Example 3 below). This form plays a central role in graphical models and message passing algorithms.

Example 3: Multivariate Normal Distribution (MVN)

\[ \begin{align*} \mathcal{N}(x \mid \mu, \Sigma) &= \frac{1}{(2\pi)^{\frac{D}{2}}\sqrt{\det(\Sigma)}} \exp \left\{ -\frac{1}{2}x^\top \Sigma^{-1}x + x^\top \Sigma^{-1}\mu -\frac{1}{2}\mu^\top \Sigma^{-1}\mu \right\}\\\\ &= c \exp\left \{x^\top \Sigma^{-1}\mu -\frac{1}{2}x^\top \Sigma^{-1}x \right\} \end{align*} \] where \[ c = \frac{\exp \left\{-\frac{1}{2}\mu^\top \Sigma^{-1} \mu\right\}}{(2\pi)^{\frac{D}{2}}\sqrt{\det(\Sigma)}} \] and \(\Sigma\) is a covariance matrix.

Now, we represent this model using canonical parameters. \[ \mathcal{N}_c (x \mid \xi, \Lambda) = c' \exp \left\{x^\top \xi - \frac{1}{2}x^\top \Lambda x \right\} \] where

  • \(\Lambda = \Sigma^{-1}\) is a precision matrix
  • \(\xi = \Sigma^{-1}\mu\) is a precision-weighted mean vector
  • \(c' = \frac{\exp \left\{-\frac{1}{2}\xi^\top \Lambda^{-1} \xi \right\}}{(2\pi)^{\frac{D}{2}}\sqrt{\det(\Lambda^{-1})}}\).

This representation is called information form and can be converted to exponential family notation as follows: \[ \begin{align*} \mathcal{N}_c (x \mid \xi, \Lambda) &= (2\pi)^{-\frac{D}{2}} \exp \left\{\frac{1}{2}\log | \Lambda | -\frac{1}{2}\xi^\top \Lambda^{-1}\xi \right\} \exp \left\{-\frac{1}{2}x^\top \Lambda x + x^\top \xi \right\} \\\\ &= h(x)g(\eta)\exp \left\{-\frac{1}{2}x^\top \Lambda x + x^\top \xi \right\} \\\\ &= h(x)g(\eta)\exp \left \{-\frac{1}{2}(\sum_{i, j}x_i x_j \Lambda_{ij}) + x^\top \xi \right\} \\\\ &= h(x)g(\eta)\exp \left\{-\frac{1}{2}\operatorname{vec}(\Lambda)^\top \operatorname{vec}(xx^\top) + x^\top \xi \right\} \\\\ &= h(x)\exp\{\eta^\top \mathcal{T}(x) - A(\eta)\} \end{align*} \] where

  • \(\mathcal{T}(x) = [x ; \operatorname{vec}(xx^\top)]\)
  • \(\eta = [\xi ; -\frac{1}{2}\operatorname{vec}(\Lambda)] = [\Sigma^{-1}\mu ; -\frac{1}{2}\operatorname{vec}(\Sigma^{-1})]\)
  • \(A(\eta) = -\log g(\eta) = -\frac{1}{2} \log | \Lambda | + \frac{1}{2}\xi^\top \Lambda^{-1} \xi \)
  • \(h(x) = (2\pi)^{-\frac{D}{2}}\).

The moment parameters are given by: \[ m = [\mu ; \operatorname{vec}(\mu\mu^\top + \Sigma)]. \]

Note. For \(D \geq 2\) this form is non-minimal, because \(x_i x_j = x_j x_i\) makes the entries of \(\operatorname{vec}(xx^\top)\) repeat, so the natural parameter \(\eta\) is over-specified by \(D(D-1)/2\) redundant components. A minimal representation would keep each product \(x_i x_j\) with \(i \leq j\) once, and its natural parameter would have entries \(-\frac{1}{2}\Lambda_{ii}\) for the squares and \(-\Lambda_{ij}\) for \(i \lt j\). The off-diagonal entries carry the factor \(2\) because each collects the equal terms \(x_i x_j \Lambda_{ij}\) and \(x_j x_i \Lambda_{ji}\). However, in practice, the non-minimal representation is easier to plug into algorithms and stable for certain operations, while the minimal form is preferred for mathematical derivations.

MLE for the Exponential Family

One of the most useful consequences of the exponential family structure is that maximum likelihood estimation reduces to a simple condition: matching empirical moments to theoretical moments. This is because the gradient of the log-likelihood involves only the sufficient statistics and the log-partition function.

Assume \(\mathcal{D} = \{x_1, \ldots, x_N\}\) is an i.i.d. sample from an exponential family distribution with natural parameter \(\eta\). The likelihood is then given by: \[ \begin{align*} p(\mathcal{D} \mid \eta) &= \left\{\prod_{n=1}^N h(x_n)\right\} \exp \left\{\eta^\top \left[\sum_{n=1}^N \mathcal{T}(x_n)\right] - N A(\eta)\right\} \\\\ &\propto \exp\{\eta^\top \mathcal{T}(\mathcal{D}) - N A(\eta)\} \end{align*} \] where, dropping the \(\eta\)-independent factor \(\prod_n h(x_n)\), we define the aggregated sufficient statistic: \[ \mathcal{T}(\mathcal{D}) := \sum_{n=1}^N \mathcal{T}(x_n) \in \mathbb{R}^K. \]

The derivative of the log-partition function yields the expected value of the sufficient statistic vector: \[ \begin{align*} \nabla_{\eta} \log p(\mathcal{D} \mid \eta) &= \nabla_{\eta} \eta^\top \mathcal{T}(\mathcal{D}) - N \nabla_{\eta} A(\eta) \\\\ &= \mathcal{T}(\mathcal{D}) - N \mathbb{E}[\mathcal{T}(x)], \end{align*} \] where in the second line we used the first cumulant identity \(\nabla A(\eta) = \mathbb{E}[\mathcal{T}(x)]\) established in the previous section.

Setting this gradient to zero, we obtain the MLE \(\hat{\eta}\), characterized by \[ \mathbb{E}_{\hat{\eta}}[\mathcal{T}(x)] = \frac{1}{N}\sum_{n=1}^N \mathcal{T}(x_n). \] The left-hand side is the theoretical expectation of \(\mathcal{T}(x)\) under the model with natural parameter \(\hat{\eta}\). The right-hand side is the empirical average of the sufficient statistics. This principle is called moment matching.

Uniqueness does not give existence. For a Bernoulli sample in which every observation is \(0\), for instance, the moment matching condition forces \(\hat{\mu} = 0\), and no finite \(\hat{\eta}\) satisfies it.

For example, consider the univariate Gaussian \(\mathcal{N}(\mu, \sigma^2)\) with \(\mathcal{T}(x) = [x, x^2]^\top\) (Example 2 above). The moment matching condition becomes \[ \begin{align*} \mathbb{E}_{\hat{\eta}}[x] &= \bar{x} := \frac{1}{N}\sum_{n=1}^N x_n, \\\\ \mathbb{E}_{\hat{\eta}}[x^2] &= \overline{x^2} := \frac{1}{N}\sum_{n=1}^N x_n^2. \end{align*} \]

Using \(\mathbb{E}[x] = \mu\) and \(\mathbb{E}[x^2] = \mu^2 + \sigma^2\), and provided the sample contains at least two distinct values (so that \(\overline{x^2} \gt \bar{x}^2\)), we obtain the closed-form MLE \[ \hat{\mu}_{\text{MLE}} = \bar{x}, \quad \widehat{\sigma^2}_{\text{MLE}} = \overline{x^2} - \bar{x}^2 = \frac{1}{N}\sum_{n=1}^N (x_n - \bar{x})^2. \]

In Variational Inference (VI), approximating an intractable posterior with an exponential family distribution is standard practice. Minimizing \(D_{\mathbb{KL}}(p \| q)\) over an exponential family \(q\) reproduces the moment matching condition of this section, with the expected sufficient statistics of \(p\) in place of the empirical average. Standard variational inference minimizes the reverse divergence \(D_{\mathbb{KL}}(q \| p)\), whose stationary condition differs from the moment matching condition.

The log-partition function reappears in convex duality. On a finite sample space \(\{1, \ldots, K\}\), we take the indicator vector of \(x\) as the sufficient statistic, so that \(\mathcal{T}(x) \in \mathbb{R}^K\). We also take the base measure to be a probability vector \(h = (h_1, \ldots, h_K)\), with \(h_k = h(k)\). Then \(A(\eta) = \log \sum_{k=1}^K h_k e^{\eta_k}\). The theorem on the conjugate of relative entropy on the simplex, read with \(h\) as the reference and \(\eta\) as the variable, shows that \(A\) is the Fenchel conjugate of the relative entropy with respect to \(h\). This relative entropy is the function \(r \mapsto D_{\mathbb{KL}}(r \| h)\) of a distribution \(r\) on \(\{1, \ldots, K\}\), set to \(+\infty\) at vectors that are not distributions. For uniform \(h\) this function equals the negative entropy plus \(\log K\) on distributions.

The supremum defining \(A(\eta)\) as a conjugate is attained only at the distribution with coordinates \(h_k e^{\eta_k - A(\eta)}\), which are the probabilities \(p(k \mid \eta)\). Since \(\mathcal{T}(x)\) is the indicator vector, this distribution is the vector of moment parameters \(m = \mathbb{E}[\mathcal{T}(x)]\), so the only maximizer is \(r = m\). The duality between \(A\) and relative entropy links the exponential family to information geometry. This page does not treat the duality beyond this finite case with the indicator statistic, for instance in the case of densities.

For a general exponential family, the support \(\mathcal{X}\) does not vary with \(\eta\). For \(\eta\) in the interior of \(\Omega\) we also take for granted, as in the proof of the cumulant identities above, that differentiation may be carried out under the integral sign. The fixed support and this interchange make the expected negative Hessian form of the Fisher information matrix available.

Differentiating \(\log p(x \mid \eta) = \log h(x) + \eta^\top \mathcal{T}(x) - A(\eta)\) twice in \(\eta\) leaves \(\nabla_\eta^2 \log p(x \mid \eta) = -\nabla^2 A(\eta)\), a quantity carrying no dependence on \(x\), so taking the expectation changes nothing and \(F(\eta) = \nabla^2 A(\eta)\). The second cumulant identity \(\nabla^2 A(\eta) = \operatorname{Cov}[\mathcal{T}(x)]\) established above is therefore a statement about the Fisher information itself, which measures how sensitive the distribution is to changes in the natural parameter and governs the geometry of the statistical model. For a minimal family, the identity \(F(\eta) = \nabla^2 A(\eta)\) and Theorem: Convexity of the Log-Partition Function on the Interior make \(F(\eta)\) positive definite at every interior \(\eta\). That geometry is the subject of the Fisher information page.