Exponential families
April 19, 2016 — July 1, 2024
Assumed audience:
Data scientists who must pretend they can remember statistics
Exponential families! The secret magic at the heart of traditional statistics.
Exponential families are probability distributions that just work, in the sense that the things we would hope we can do with them, we can. Informally, this is because a lot of the stuff we do in statistics is about multiplying probabilities, and exponential families are distributions that capture “easy-to-multiply” probabilities. Thus these are the distributions we are taught to handle in statistics classes, and which lead us to undue optimism about statistics more generally, all of which falls apart later. Often, though, we can approximate intractable families by exponential ones or cunning combinations thereof, e.g. in variational inference, so this is not a complete waste of time.
1 Background
Michael I. Jordan, why not?
2 Natural exponential families
a.k.a. NEFs. The simplest case. Suppose that \(\mathbf{x} \in \mathcal {X} \subseteq \mathbb{R} ^{p}.\) Then, a natural exponential family of order p has a density or mass function of the form: \[ f_{X}(\mathbf {x} ; {\boldsymbol{\theta }})=h(\mathbf {x} ) e^{{\boldsymbol{\theta }}^{\rm {T}}\mathbf {x} -A({\boldsymbol{\theta }}) } \] where in this case the parameter \(\boldsymbol{\theta }\in \mathbb {R}^{p}.\) That is, it is a specialisation of the Exponential family where the natural statistics are (the sum of) the observations.
Important members of this sub-family: Gamma with known shape, Gaussian with known variance, negative binomial with known \(r\), Poisson, and binomial with known number of trials.
I mention this family first because it is a good intuition pump. The only problem that it has usefully solved for me so far is Gaussian Belief Propagation. That is, however, a very important case.
3 (Full-blown) exponential families
More commonly we consider the general exponential family, which allows the natural statistics and the parameters to not be in natural form to interact via some \(\mathbb{R}^{p}\to\mathbb{R}^{q}\) function \(T\) and some parameter \(\boldsymbol{\eta}\in \mathbb{R}^{q}\). \[ f_{X}\left(\mathbf {x} ; {\boldsymbol{\theta }} \right) =h(\mathbf {x} ) e^{ {\boldsymbol{\eta }}( {\boldsymbol{\theta }})\cdot \mathbf {T} (\mathbf {x} ) -A({\boldsymbol{\theta }}) }. \] In fact, since we only ever observe the statistics by some function \(\boldsymbol{\eta}(\theta)\) hereafter we will simply define the statistics of interest to be the vector \(\eta\), simplifying to \[ f_{X}\left(\mathbf {x} ; {\boldsymbol{\eta }} \right) =h(\mathbf {x} ) e^{ {\boldsymbol{\eta }}\cdot \mathbf {T} (\mathbf {x} ) -A({\boldsymbol{\eta}})}. \] We call \(\eta\) the natural or canonical parameter, and \(\mathbf {T}\) the sufficient statistic, and \(A\) the log-partition function.
4 Cumulant generating function
TBC.
For the natural exponential families, \(T\) is an identity map, the mean vector and covariance matrix are \[ \operatorname {E} [X]=\nabla A({\boldsymbol{\eta}}){\text{ and }}\operatorname {Cov} [X]=\nabla \nabla ^{\rm {T}}A({\boldsymbol{\eta}})\] where \(\nabla\) is the gradient and \(\nabla \nabla ^{\top}\) is the Hessian matrix.
5 Natural parameters and sufficient statistics
One of the neat things about the exponential families is that the partition function, natural statistics and natural parameters are informative about each other.
The cumulant-generating function is simply \(K(u|\eta)=A(\eta+u)-A(\eta)\).
6 Natural exponential families with quadratic variance functions
A special case with nice properties (Morris 1982, 1983; Morris and Lock 2009).
Morris (1982):
The normal, Poisson, gamma, binomial, and negative binomial distributions are univariate natural exponential families with quadratic variance functions (the variance is at most a quadratic function of the mean). Only one other such family exists. Much theory is unified for these six natural exponential families by appeal to their quadratic variance property, including infinite divisibility, cumulants, orthogonal polynomials, large deviations, and limits in distribution.
7 Conjugate priors
A useful feature of exponential families is that they have conjugate priors, which means that the posterior distribution is in the same family as the prior, and moreover, there is a simple formula for updating the parameters. This is deliciously easy, and also misleads one into thinking that Bayes inference is much easier than it actually is in the general case. See conjugate priors.
8 PCA
PCA is famous for Gaussian data. I gather there is some sense in which it can be generalised to all exponential families as the Exponential Family PCA (Collins, Dasgupta, and Schapire 2001; Jun Li and Dacheng Tao 2013; Liu, Dobriban, and Singer 2017; Mohamed, Ghahramani, and Heller 2008).
9 For random graphs
Exponential random graph models. TBD
10 In graphical models
11 Curved exponential families
A generalisation I occasionally see is that of curved exponential families. I do not know how these work or if they have enough features to benefit me.
12 Squared Neural Families
Another generalisation. See squared neural families.
13 Tempered
Call the \(f^\alpha\) the \(\alpha\)-tempering of a density \(f\) for \(\alpha\in(0,\infty)\). We in fact add in a normalising constant \(Z\) to ensure it is still a valid density. This ends up being handy for many purposes, including understanding conjugate priors.
\[ \begin{aligned} f^\alpha\left(\mathbf {x} ; {\boldsymbol{\eta }} \right) &=\frac{1}{Z(\boldsymbol{\eta }, \alpha)}\left(h(\mathbf {x} ) e^{ {\boldsymbol{\eta }}\cdot \mathbf {T} (\mathbf {x} ) -A({\boldsymbol{\eta}}) }\right)^{\alpha}\\ &=\frac{h^{\alpha}(\mathbf {x} ) e^{ \alpha{\boldsymbol{\eta }}\cdot \mathbf {T} (\mathbf {x} ) -\alpha A({\boldsymbol{\eta}}) }}{Z(\boldsymbol{\eta }, \alpha)} \end{aligned} \] Can this be normalized in general? If we require that \[ \begin{aligned} \int f^\alpha\left(\mathbf {x} ; {\boldsymbol{\eta }} \right) d\mathbf{x}&=1 \end{aligned} \] then we must have \[ \begin{aligned} 1 &= \int\frac{e^{\alpha {\boldsymbol{\eta }}\cdot \mathbf {T} (\mathbf {x} ) + \alpha \log h(\mathbf {x} ) }}{Z(\boldsymbol{\eta }, \alpha)e^{ \alpha A({\boldsymbol{\eta}})}} d\mathbf{x}\\ Z(\boldsymbol{\eta }, \alpha) &= e^{ -\alpha A({\boldsymbol{\eta}})}\int e^{\alpha {\boldsymbol{\eta }}\cdot \mathbf {T} (\mathbf {x} ) + \alpha \log h(\mathbf {x} ) }d\mathbf{x} \end{aligned} \]
AFAICT we cannot say more about the normalising constant without knowing more about the form of \(h\), the base measure; sometimes it simplifies, but that depends upon the specific exponential family we are in.