The Exponential Family

Dive into Deep Learning · §36.4

The Exponential Family: Sufficient Statistics, Cumulants, Maximum Entropy, and Conjugacy
canonical form h(\mathbf{x})\exp(\boldsymbol{\eta}^\top T(\mathbf{x}) - A(\boldsymbol{\eta})) · maximum entropy · \nabla A = \mathbb{E}[T] & \nabla^2 A = \mathrm{Cov}(T) · GLMs · softmax origins · conjugate priors

Four Regressions, Four Losses, One Gradient

Motivation

\nabla_{\mathbf{W}} \mathcal{L} = \mathbf{x}\bigl(\text{prediction} - \text{observation}\bigr)^\top

  • One universal training rule: Linear, logistic, softmax, and Poisson regression all share the exact same gradient formula because their target distributions belong to the exponential family.
  • Four payoffs of canonical form: Cumulant derivatives (\nabla A = \mathbb{E}[T], \nabla^2 A = \mathrm{Cov}(T)), convex moment-matching MLE, maximum entropy, and additive conjugate priors.

Rewriting the Bernoulli Into Exponential Form

How Log-Odds and Softplus Emerge

\log P(X = x) = x\underbrace{\log\frac{p}{1 - p}}_{\eta} - \underbrace{\log(1 + e^\eta)}_{A(\eta)}

  • Natural parameter (logit): \eta = \log\frac{p}{1-p} \in \mathbb{R}, inverted by the logistic sigmoid p = \mathrm{sigmoid}(\eta) = (1 + e^{-\eta})^{-1}.
  • Log-partition (softplus): A(\eta) = -\log(1-p) = \log(1 + e^\eta) normalizes P(X = x) = \exp(\eta x - A(\eta)).

The Canonical Exponential Family

General Definition & Sufficient Statistics

p(\mathbf{x} \mid \boldsymbol{\eta}) = h(\mathbf{x})\,\exp\bigl(\boldsymbol{\eta}^\top T(\mathbf{x}) - A(\boldsymbol{\eta})\bigr)

  • Four building blocks: Parameter-free base measure h(\mathbf{x}) \ge 0, sufficient statistic T(\mathbf{x}) \in \mathbb{R}^d, natural parameter \boldsymbol{\eta} \in \mathbb{R}^d, and log-partition normalizer A(\boldsymbol{\eta}) = \log \int h(\mathbf{x})e^{\boldsymbol{\eta}^\top T(\mathbf{x})}\,d\mathbf{x}.
  • Why T(\mathbf{x}) is sufficient: Across n i.i.d. draws, \boldsymbol{\eta} interacts with the dataset solely through the fixed-size sum \sum_{i=1}^n T(\mathbf{x}_i).

Catalog of Exponential Family Members

Unifying Discrete and Continuous Distributions

Every row below writes p(\mathbf{x} \mid \boldsymbol{\eta}) = h(\mathbf{x})\exp(\boldsymbol{\eta}^\top T(\mathbf{x}) - A(\boldsymbol{\eta})):

Distribution Base Measure h(\mathbf{x}) Sufficient Statistic T(\mathbf{x}) Natural Parameter \boldsymbol{\eta} Log-Partition A(\boldsymbol{\eta})
\mathrm{Bernoulli}(p) 1 x \in \{0, 1\} \log\frac{p}{1-p} \log(1 + e^\eta)
\mathrm{Binomial}(n, p) (n fixed) \binom{n}{x} x \in \{0, \dots, n\} \log\frac{p}{1-p} n\log(1 + e^\eta)
\mathrm{Poisson}(\lambda) 1/k! k \in \{0, 1, \dots\} \log \lambda e^\eta
\mathrm{Categorical}(\mathbf{p}) 1 One-hot \mathbf{y} \in \{0, 1\}^K Logits \mathbf{z} \in \mathbb{R}^K \log \sum_{k=1}^K e^{z_k}
\mathrm{Exp}(\lambda) \mathbf{1}_{x \ge 0} x -\lambda < 0 -\log(-\eta)
\mathcal{N}(\mu, \sigma^2) 1/\sqrt{2\pi} (x,\ x^2)^\top \left(\frac{\mu}{\sigma^2},\ -\frac{1}{2\sigma^2}\right)^\top -\frac{\eta_1^2}{4\eta_2} - \frac{1}{2}\log(-2\eta_2)
\mathrm{Laplace}(\mu, b) (\mu fixed) 1 \|x - \mu\| -1/b < 0 \log(-2/\eta)

What Lies Outside the Exponential Family?

Moving Support & Heavy-Tailed Non-Convexity

  • Moving support (\mathrm{Unif}(0, \theta)): Because the support [0, \theta] depends on \theta, the MLE is the sample extreme \hat{\theta}_{\mathrm{MLE}} = \max_i x_i rather than a moment-matching average.
  • Algebraic heavy tails (Student’s t_\nu(\mu)): The product \prod_{i=1}^n \bigl(1 + (x_i-\mu)^2/\nu\bigr)^{-(\nu+1)/2} has no fixed-size sufficient statistic (Pitman–Koopman–Darmois theorem), making its NLL non-convex with multiple local minima.

Jaynes’s Loaded Die and Maximum Entropy

Where the Exponential Form Comes From

  • Shannon entropy measures average surprise (in nats): H[p] = -\sum_{k=1}^K p_k \log p_k \quad (\text{fair die: } H = \log 6 \approx 1.792)
  • Jaynes’s puzzle: A 6-sided die has average roll \mathbb{E}[k] = 4.5 instead of 3.5. Putting mass 1/2 on \{3, 6\} hits mean 4.5, but assumes faces \{1, 2, 4, 5\} are impossible (H = \log 2 \approx 0.693).
  • Principle of Maximum Entropy: The least-committal distribution matching \mathbb{E}[k] = 4.5 is the exponential tilt: p_k = \frac{e^{\eta k}}{\sum_{j=1}^6 e^{\eta j}}, \quad \eta \approx 0.371 \quad (H \approx 1.614)
image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/

Finding the Maximum-Entropy Tilt by Bisection

Monotonicity of the Mean Statistic

The mean roll \sum_k k\,p_k(\eta) grows strictly with \eta (derivative \mathrm{Var}_\eta(k) > 0), so 50 bisection steps find \eta \approx 0.371:

k = np.arange(1, 7)
def tilt(eta):                                   # p_k proportional to exp(eta k)
    w = np.exp(eta * k)
    return w / w.sum()

lo, hi = -5.0, 5.0
for _ in range(50):                              # bisection: the mean increases with eta
    eta = (lo + hi) / 2
    lo, hi = (eta, hi) if (tilt(eta) * k).sum() < 4.5 else (lo, eta)
p = tilt(eta)
print('eta =', round(eta, 3), ' p =', p.round(3))
print('H =', round(-(p * np.log(p)).sum(), 3), ' log 6 =', round(np.log(6), 3))
eta = 0.371  p = [0.054 0.079 0.114 0.165 0.24  0.347]
H = 1.614  log 6 = 1.792

Minimal entropy sacrifice: The exponential tilt surrenders only \log 6 - 1.614 \approx 0.18\text{ nats} of entropy to shift the mean from 3.5 to 4.5, compared with 1.10\text{ nats} lost by the two-point distribution on \{3, 6\}.

Gibbs’ Inequality: KL Divergence Is Non-Negative

One Tangent Line Proves Global Optimality

D_{\mathrm{KL}}(q \| p) = \sum_{\mathbf{x}:\,q(\mathbf{x}) > 0} q(\mathbf{x})\log\frac{q(\mathbf{x})}{p(\mathbf{x})} \ge 0

  • Tangent-line proof (\log u \le u - 1): Substituting u = p(\mathbf{x})/q(\mathbf{x}) gives -D_{\mathrm{KL}}(q \| p) \le \sum_{q>0} q(\mathbf{x})\bigl(\frac{p(\mathbf{x})}{q(\mathbf{x})} - 1\bigr) = \sum_{q>0} p(\mathbf{x}) - 1 \le 0.
  • Uniqueness: Equality \log u = u - 1 holds only at u = 1, forcing p(\mathbf{x}) = q(\mathbf{x}) everywhere.

The Maximum-Entropy Theorem and Its Corollaries

Why Every Moment-Constrained MaxEnt Distribution Is Exponential Family

Define entropy relative to base measure h(\mathbf{x}) as H_h[q] = -\sum_{\mathbf{x}} q(\mathbf{x})\log\frac{q(\mathbf{x})}{h(\mathbf{x})}.

Proposition (Maximum Entropy): Let p(\mathbf{x}) = h(\mathbf{x})\exp(\boldsymbol{\eta}^\top T(\mathbf{x}) - A(\boldsymbol{\eta})), and let q be any distribution matching its mean statistics, \mathbb{E}_q[T(\mathbf{x})] = \mathbb{E}_p[T(\mathbf{x})]. Then:

H_h[q] = H_h[p] - D_{\mathrm{KL}}(q \| p) \le H_h[p] \qquad (\text{with equality iff } q = p)

  • Two-line proof: Split \log\frac{q}{h} = \log\frac{q}{p} + \log\frac{p}{h}. The first sum is -D_{\mathrm{KL}}(q \| p) \le 0. Because \log\frac{p}{h} = \boldsymbol{\eta}^\top T(\mathbf{x}) - A(\boldsymbol{\eta}) is linear in T, the second sum depends on q only through its constrained mean: -\boldsymbol{\eta}^\top\mathbb{E}_q[T] + A(\boldsymbol{\eta}) = -\boldsymbol{\eta}^\top\mathbb{E}_p[T] + A(\boldsymbol{\eta}) = H_h[p]. \blacksquare
  • Famous corollaries:
    • No constraint (T \equiv 0, h \equiv 1 on K outcomes): Uniform distribution (H = \log K).
    • Fixed mean \mu and variance \sigma^2 on \mathbb{R} (T(x) = (x, x^2), h \equiv 1): Gaussian \mathcal{N}(\mu, \sigma^2).
    • Fixed mean m on \{0, 1, 2, \dots\} (T(k) = k): \mathrm{Poisson}(m) when h(k) = 1/k!, or \mathrm{Geometric} when h(k) = 1.

The Moment Property: Derivatives of A(η)

Cumulant Generation & Convexity

\nabla_{\boldsymbol{\eta}} A(\boldsymbol{\eta}) = \mathbb{E}\bigl[T(\mathbf{x})\bigr], \qquad \nabla_{\boldsymbol{\eta}}^2 A(\boldsymbol{\eta}) = \mathrm{Cov}\bigl(T(\mathbf{x})\bigr) \succeq \mathbf{0}

  • Moment generation by differentiation: Differentiating A(\boldsymbol{\eta}) = \log \int h(\mathbf{x})e^{\boldsymbol{\eta}^\top T(\mathbf{x})}\,d\mathbf{x} once yields the mean of T(\mathbf{x}); differentiating twice yields its covariance matrix.
  • Universal convexity: Because every covariance matrix is positive semidefinite, A(\boldsymbol{\eta}) and the negative log-likelihood are always convex in \boldsymbol{\eta}.

Computing Moments via Automatic Differentiation

Analytical & Autograd Verification

  • Bernoulli (A(\eta) = \log(1 + e^\eta)): A'(\eta) = \mathrm{sigmoid}(\eta) = p and A''(\eta) = \mathrm{sigmoid}(\eta)(1 - \mathrm{sigmoid}(\eta)) = p(1 - p).
  • Poisson (A(\eta) = e^\eta with \eta = \log\lambda): Since e^\eta is its own derivative, A'(\eta) = A''(\eta) = e^\eta = \lambda, explaining in one line why the Poisson mean equals its variance.

Computing Moments via Automatic Differentiation (cont.)

Analytical & Autograd Verification

def derivatives(A, eta):
    """First and second derivative of the scalar function A at eta."""
    eta = torch.tensor(eta, dtype=torch.float64, requires_grad=True)
    (dA,) = torch.autograd.grad(A(eta), eta, create_graph=True)
    (d2A,) = torch.autograd.grad(dA, eta)
    return dA.item(), d2A.item()

cases = [('Bernoulli', torch.nn.functional.softplus, math.log(9 / 4), 9 / 13, 36 / 169),
         ('Poisson', torch.exp, math.log(4), 4, 4)]
for name, A, eta, mean, var in cases:
    dA, d2A = derivatives(A, eta)
    print(f"{name:9s} A' = {dA:.4f} (mean {mean:.4f})  A'' = {d2A:.4f} (variance {var:.4f})")
Bernoulli A' = 0.6923 (mean 0.6923)  A'' = 0.2130 (variance 0.2130)
Poisson   A' = 4.0000 (mean 4.0000)  A'' = 4.0000 (variance 4.0000)

Maximum Likelihood as Convex Moment Matching

Global Optimization of the Log-Likelihood

  • For n i.i.d. observations \mathbf{x}_1, \dots, \mathbf{x}_n, the negative log-likelihood (NLL) is convex in \boldsymbol{\eta}: \mathcal{L}(\boldsymbol{\eta}) = n\,A(\boldsymbol{\eta}) - \boldsymbol{\eta}^\top \sum_{i=1}^n T(\mathbf{x}_i) - \sum_{i=1}^n \log h(\mathbf{x}_i)
  • Moment-matching optimality condition (\nabla_{\boldsymbol{\eta}} \mathcal{L} = \mathbf{0}): \nabla A(\hat{\boldsymbol{\eta}}) = \bar{T} = \frac{1}{n}\sum_{i=1}^n T(\mathbf{x}_i)
  • Coin (9/13 heads): \mathrm{sigmoid}(\hat{\eta}) = \frac{9}{13} \implies \hat{\eta} = \log\frac{9}{4} \approx 0.811. At \hat{\eta}, average NLL equals the fitted coin’s entropy (0.617\text{ nats/flip}).
image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/

Boundary Divergence and Redundant Logits

When Moment Matching Has No Finite or Unique Solution

  • Unattainable boundary means (13/13 heads): Since \mathrm{sigmoid}(\eta) \in (0, 1) is open, \bar{T} = 1 has no finite solution (\hat{\eta} \to +\infty, just like linearly separable logistic regression without weight decay).
  • Non-minimal softmax logits: Because one-hot coordinates sum to \mathbf{1}^\top \mathbf{y} = 1, shifting \mathbf{z} \to \mathbf{z} + c\mathbf{1} leaves probabilities unchanged—exploited by logsumexp (c = \max_k z_k) to prevent overflow.

Origins of the Softmax: Noisy Utility & Gumbel-Max

Discrete Choice Theory & Exact Categorical Sampling

Suppose a decision maker picks the class with the highest noise-perturbed score y = \operatorname{argmax}_{k \in \{1,\dots,K\}}(z_k + \epsilon_k):

  • Why Gaussian noise (\epsilon_k \sim \mathcal{N}(0, s^2)) stalls for K > 2: The probit model P(y=1) = \Phi\!\left(\frac{z_1 - z_2}{\sqrt{2}s}\right) requires a (K-1)-dimensional numerical integral with no closed form as soon as K \ge 3.
  • Proposition (Gumbel Noise Yields Softmax): If \epsilon_1, \dots, \epsilon_K are i.i.d. standard Gumbel variables with CDF G(t) = \exp(-e^{-t}), then z_j + \epsilon_j has CDF \exp(-e^{z_j}e^{-t}). Integrating over the winning score t = z_k + \epsilon_k with S = \sum_{j=1}^K e^{z_j} and v = e^{-t} closes analytically: P\Bigl(\operatorname*{argmax}_j (z_j + \epsilon_j) = k\Bigr) = \int_{-\infty}^{\infty} e^{z_k}e^{-t}\exp(-Se^{-t})\,dt = e^{z_k}\int_0^{\infty} e^{-Sv}\,dv = \frac{e^{z_k}}{\sum_{j=1}^K e^{z_j}}
  • Log-sum-exp as a smooth maximum: The winning score itself satisfies \max_j(z_j + \epsilon_j) \sim \mathrm{Gumbel}(\log \sum_j e^{z_j}), and its gradient with respect to \mathbf{z} is the softmax vector.

The Gumbel-Max Trick and Temperature Scaling

Three Converging Views of Softmax

  • 1. Gumbel-Max sampler: Since \operatorname{argmax}_k(z_k + T\epsilon_k) = \operatorname{argmax}_k(z_k/T + \epsilon_k), adding Gumbel noise of scale T > 0 and taking the argmax draws exact samples from \mathrm{softmax}(\mathbf{z}/T).
  • 2. Statistical physics (Boltzmann law): At temperature T with state energy E_k = -z_k, thermal equilibrium assigns p_k \propto e^{-E_k/T} = e^{z_k/T} (also the MaxEnt distribution at fixed expected logit \sum_k p_k z_k).
  • 3. Probit vs. logit tails: While |\mathrm{sigmoid}(1.7x) - \Phi(x)| < 0.01, on a mislabeled outlier (m \gg 0) logit loss grows linearly (\sim m) while probit loss grows quadratically (\sim m^2/4s^2).

The Gumbel-Max Trick and Temperature Scaling (cont.)

Three Converging Views of Softmax

Verifying the Gumbel-max sampler on \mathbf{z} = (2, 1, 0.1, -1) across 10^5 trials at T = 1 and T = 2:

z = np.array([2.0, 1.0, 0.1, -1.0])                      # four logits
softmax = lambda v: np.exp(v) / np.exp(v).sum()
rng = np.random.default_rng()
n = 100_000
for T in (1.0, 2.0):                                      # noise scale = temperature
    winners = np.argmax(z + T * rng.gumbel(size=(n, 4)), axis=1)
    freq = np.bincount(winners, minlength=4) / n
    print(f'T = {T:.0f}: argmax frequencies {freq.round(3)}')
    print(f'      softmax(z / T)        {softmax(z / T).round(3)}'
          f'  max diff {np.abs(freq - softmax(z / T)).max():.3f}')
T = 1: argmax frequencies [0.638 0.234 0.095 0.033]
      softmax(z / T)        [0.638 0.235 0.095 0.032]  max diff 0.001
T = 2: argmax frequencies [0.451 0.274 0.173 0.102]
      softmax(z / T)        [0.451 0.274 0.174 0.101]  max diff 0.002

Bayesian Updating and the Beta Conjugate Prior

From Point Estimates to Posterior Distributions

\mathrm{Beta}(\theta \mid a, b) \cdot \theta^x(1-\theta)^{n-x} \propto \mathrm{Beta}(\theta \mid a + x,\ b + n - x)

  • Additive pseudo-counts: Prior parameters (a, b) act as virtual heads and tails added directly to observed counts (x, n-x).
  • Mean vs. mode: Posterior mean \frac{a+x}{a+b+n} uses pseudo-counts (a, b) (giving Laplace’s rule \frac{x+1}{n+2} = \frac{2}{3} under \mathrm{Beta}(1,1)), whereas mode \frac{a+x-1}{a+b+n-2} uses (a-1, b-1).

Posterior Contraction and Non-Conjugate Grid Priors

Analytical Beta Updating vs. 1D Numerical Integration

  • Contraction at rate 1/\sqrt{n}: From \mathrm{Beta}(1, 1), 9/13 heads yields \mathrm{Beta}(10, 5) (\mathrm{sd} \approx 0.118); 90/130 heads yields \mathrm{Beta}(91, 41) (\mathrm{sd} \approx 0.040, smaller by \sqrt{133/16} \approx 2.9\times).
  • Non-conjugate prior (\eta \sim \mathcal{N}(0, 1) on log-odds): By change of variables, p(\theta) = \frac{\phi(\eta)}{\theta(1-\theta)} is not a Beta density, but in 1D a fine grid normalizes p(\theta)P(x\mid\theta) directly:
Beta(1, 1)   : mean 0.667, sd 0.118, mode 0.692
eta ~ N(0, 1): mean 0.644, sd 0.111, mode 0.665
image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/

Universal Conjugacy and Dirichlet Smoothing

General Exponential-Family Priors

Proposition (Universal Conjugate Prior): Every exponential-family likelihood p(\mathbf{x} \mid \boldsymbol{\eta}) = h(\mathbf{x})\exp(\boldsymbol{\eta}^\top T(\mathbf{x}) - A(\boldsymbol{\eta})) admits a conjugate prior parameterized by pseudo-statistic sum \boldsymbol{\nu} \in \mathbb{R}^d and pseudo-sample size \kappa > 0:

p(\boldsymbol{\eta} \mid \boldsymbol{\nu}, \kappa) \propto \exp\bigl(\boldsymbol{\nu}^\top \boldsymbol{\eta} - \kappa\,A(\boldsymbol{\eta})\bigr) \;\;\xrightarrow{n \text{ observations}}\;\; p(\boldsymbol{\eta} \mid \mathbf{x}_{1:n}) \propto \exp\!\left(\Bigl(\boldsymbol{\nu} + \sum_{i=1}^n T(\mathbf{x}_i)\Bigr)^\top \boldsymbol{\eta} - (\kappa + n)A(\boldsymbol{\eta})\right)

Conjugate Pair Prior Density Observed Data (n draws) Posterior Update Practical ML Application
Beta–Binomial \mathrm{Beta}(\theta \mid a, b) x heads, n - x tails \mathrm{Beta}(a + x,\ b + n - x) Binary accuracy & A/B click rates
Gamma–Poisson \mathrm{Gamma}(\lambda \mid a, b) Total count \sum_{i=1}^n x_i \mathrm{Gamma}(a + \sum_i x_i,\ b + n) Arrival rate estimation (a events in b windows)
Dirichlet–Multinomial \mathrm{Dir}(\mathbf{p} \mid \mathbf{a}) \propto \prod_{k=1}^K p_k^{a_k - 1} Class count vector \mathbf{x} \mathrm{Dir}(\mathbf{a} + \mathbf{x}) Add-one smoothing: counts (3,0,1) with \mathrm{Dir}(\mathbf{1}) \to mean (4/7, 1/7, 2/7) \ne 0

Concept Check: Cumulants, GLMs & Conjugacy

Check Your Understanding

Test your mastery of the exponential family on three problems:

  1. Moments from the log-partition: The exponential distribution \mathrm{Exp}(\lambda) has T(x) = x, natural parameter \eta = -\lambda < 0, and A(\eta) = -\log(-\eta). Compute A'(\eta) and A''(\eta) to recover \mathbb{E}[X] and \mathrm{Var}(X).
  2. Poisson GLM gradient step: A canonical-link Poisson regression model (\hat{\lambda} = e^\eta with \eta = \mathbf{w}^\top\mathbf{x}) predicts \hat{\lambda} = 3 for input \mathbf{x}, and observes count y = 5. What is the gradient of the NLL with respect to \eta and \mathbf{w}?
  3. Dirichlet add-one smoothing: A 4-word vocabulary has observed counts \mathbf{x} = (5, 0, 1, 0) (n = 6). What is the MLE probability vector vs. the posterior mean under a uniform \mathrm{Dir}(1, 1, 1, 1) prior?

Answers:

  1. A'(\eta) = -\frac{1}{\eta} = \mathbf{\frac{1}{\lambda} = \mathbb{E}[X]}, and A''(\eta) = \frac{1}{\eta^2} = \mathbf{\frac{1}{\lambda^2} = \mathrm{Var}(X)}.
  2. By \nabla_\eta \mathcal{L} = \mu - T(y), the gradient with respect to \eta is 3 - 5 = -2, and with respect to \mathbf{w} is -2\mathbf{x} (so gradient descent increases \eta and pushes \hat{\lambda} toward 5).
  3. \hat{\mathbf{p}}_{\mathrm{MLE}} = (5/6, 0, 1/6, 0) assigns zero probability to unseen words. The \mathrm{Dir}(1,1,1,1) posterior is \mathrm{Dir}(6, 1, 2, 1) with posterior mean (0.6, 0.1, 0.2, 0.1).

Summary: The Exponential Family

Key Takeaways

Core Property Mathematical Statement Coin / Benchmark Result Deep Learning Significance
Canonical Form p(\mathbf{x}\mid\boldsymbol{\eta}) = h(\mathbf{x})\exp(\boldsymbol{\eta}^\top T(\mathbf{x}) - A(\boldsymbol{\eta})) Bernoulli: \eta = \log\frac{p}{1-p}, A(\eta) = \log(1+e^\eta) Unifies Bernoulli, Categorical, Gaussian, Poisson
Sufficient Statistics \prod_{i=1}^n p(\mathbf{x}_i\mid\boldsymbol{\eta}) \propto \exp(\boldsymbol{\eta}^\top \sum_i T(\mathbf{x}_i) - nA(\boldsymbol{\eta})) Total heads \sum_i x_i = 9 holds all information Compresses arbitrary datasets into fixed-size sums
Maximum Entropy H_h[q] = H_h[p] - D_{\mathrm{KL}}(q \| p) \le H_h[p] when \mathbb{E}_q[T]=\mathbb{E}_p[T] Loaded die (\mathbb{E}=4.5): tilt p_k \propto e^{0.371k} Explains why Gaussian, Poisson & Boltzmann arise
Cumulant Derivatives \nabla A(\boldsymbol{\eta}) = \mathbb{E}[T(\mathbf{x})]; \nabla^2 A(\boldsymbol{\eta}) = \mathrm{Cov}(T(\mathbf{x})) \succeq \mathbf{0} Poisson A(\eta) = e^\eta \implies \text{mean} = \text{var} = \lambda Proves A(\boldsymbol{\eta}) and the NLL are globally convex
Moment Matching & GLMs \nabla A(\hat{\boldsymbol{\eta}}) = \bar{T}; \nabla_{\mathbf{W}}\mathcal{L} = \mathbf{x}(\boldsymbol{\mu}(\mathbf{x}) - T(y))^\top \mathrm{sigmoid}(\hat{\eta}) = 9/13; diverges if \bar{T} \in \{0, 1\} Universal output-layer gradient across losses
Softmax & Conjugacy \operatorname{argmax}_k(z_k + T\epsilon_k) \sim \mathrm{softmax}(\mathbf{z}/T); \boldsymbol{\nu} \to \boldsymbol{\nu}+\sum_i T_i \mathrm{Beta}(1,1) \to \mathrm{Beta}(10,5), mean 2/3 Gumbel-max sampling, temperature & Laplace smoothing