Maximum Likelihood Estimation (MLE)

Volume I, Chapter 3 — Part V. The likelihood function, log-likelihood, MLE derivations for exponential family distributions, consistency and asymptotic normality, Fisher information, Cramér-Rao bound, and the equivalence to cross-entropy minimization.

Intermediate

Table of Contents

  1. Learning Objectives
  2. Prerequisites
  3. Notation
  4. Core Intuition
  5. The Likelihood Function and Likelihood Principle
  6. Maximum Likelihood Estimation
  7. Log-Likelihood and Computational Advantages
  8. MLE for Exponential Family Distributions
  9. Score Function and Fisher Information
  10. Consistency of the MLE
  11. Asymptotic Normality and the Cramér-Rao Bound
  12. Invariance and Functional MLE
  13. MLE as KL Minimization and Cross-Entropy
  14. MLE for Neural Networks
  15. Limitations and the Path to Bayesian Methods
  16. Common Pitfalls and Misconceptions
  17. Research Perspective
  18. Summary of Takeaways
  19. Exercises

Learning Objectives

After reading this chapter, you should be able to:

  1. Define the likelihood function and distinguish it from a PDF over parameters.
  2. Derive MLEs for Gaussian, Bernoulli, Poisson, and exponential family distributions.
  3. State and interpret the score function and Fisher information matrix.
  4. State consistency and asymptotic normality theorems for the MLE and sketch their proofs.
  5. Explain the Cramér-Rao lower bound and asymptotic efficiency of the MLE.
  6. Prove that MLE minimizes KL divergence to the empirical distribution and equates to cross-entropy minimization.
  7. Identify MLE as the foundation of MSE loss, cross-entropy loss, and neural network training.

Prerequisites


Notation

  • D={xi}i=1N\mathcal{D} = \lbrace x_i \rbrace_{i=1}^N — Observed dataset
  • θ,θ\theta, \boldsymbol{\theta} — Model parameters
  • L(θ),(θ)L(\theta), \ell(\theta) — Likelihood and log-likelihood
  • θ^MLE\hat{\theta}_{\mathrm{MLE}} — Maximum likelihood estimator
  • I(θ)I(\theta) — Fisher information
  • I(θ)\mathcal{I}(\theta) — Observed information

Core Intuition

Given data D={x1,,xn}\mathcal{D} = \{x_1, \ldots, x_n\}, we posit a parametric family {p(xθ):θΘ}\{p(x \mid \boldsymbol\theta) : \boldsymbol\theta \in \Theta\} and ask: which parameter value makes the observed data most probable? This is Maximum Likelihood Estimation (MLE) — the dominant paradigm for parameter learning in statistics and machine learning.

When you train a neural network with cross-entropy loss, you are performing MLE under a categorical model. When you minimize MSE for regression, you are performing MLE under Gaussian noise. The loss functions of deep learning are not arbitrary — they are derived from probabilistic assumptions via the likelihood principle.

MLE has elegant asymptotic theory: under regularity conditions, θ^MLE\hat{\boldsymbol\theta}_{\text{MLE}} is consistent (converges to the true parameter), asymptotically normal (with variance governed by Fisher information), and efficient (achieves the Cramér-Rao lower bound). These guarantees explain why MLE is the default — and why its limitations (overfitting, no uncertainty quantification) motivate Bayesian extensions.

Series context. This is Part V of Chapter 3 in Volume I. It precedes Bias–Variance Tradeoff and connects to Linear Regression and Logistic Regression in Volume II.

Interactive: Maximum Likelihood Estimation

μ̂_MLE
TrueMLE fitSamples

μ̂_MLE

1.728

σ̂_MLE

0.824

Observe: With few samples, MLE can differ significantly from the true parameters. As n→∞, MLE converges (consistency). The MLE for σ² is biased (divides by n, not n-1).

The Likelihood Function and Likelihood Principle

Setup. Observations x1,,xnx_1, \ldots, x_n are i.i.d. from unknown distribution pp^*, modeled by parametric family {p(xθ):θΘRd}\{p(x \mid \boldsymbol\theta) : \boldsymbol\theta \in \Theta \subseteq \mathbb{R}^d\}.

Definition 1 (Likelihood Function). The likelihood function is the probability (or density) of the observed data viewed as a function of parameters:

L(θ)=L(θ;D)=p(Dθ)=i=1np(xiθ).(1)\mathcal{L}(\boldsymbol\theta) = \mathcal{L}(\boldsymbol\theta; \mathcal{D}) = p(\mathcal{D} \mid \boldsymbol\theta) = \prod_{i=1}^n p(x_i \mid \boldsymbol\theta). \tag{1}

The i.i.d. factorization is essential.

Critical distinction.

  • p(xθ)p(x \mid \boldsymbol\theta)xx (fixed θ\boldsymbol\theta) — xx — it is a PMF/PDF
  • L(θ)\mathcal{L}(\boldsymbol\theta)θ\boldsymbol\theta (fixed data) — Not necessarily θ\boldsymbol\theta

Example. For nn Bernoulli trials with kk successes: L(p)=pk(1p)nk\mathcal{L}(p) = p^k(1-p)^{n-k}. As a function of p[0,1]p \in [0,1], this integrates to 1 over pp only for specific n,kn, k — it is not a density on pp without a prior (Bayesian view).

Likelihood Principle (Informal). All evidence about θ\boldsymbol\theta from the experiment is contained in L(θ)\mathcal{L}(\boldsymbol\theta). Two experiments with proportional likelihoods (L1(θ)=cL2(θ)\mathcal{L}_1(\boldsymbol\theta) = c \cdot \mathcal{L}_2(\boldsymbol\theta)) yield identical inference about θ\boldsymbol\theta.


Maximum Likelihood Estimation

Definition 2 (Maximum Likelihood Estimator). The MLE is:

θ^MLE=argmaxθΘ  L(θ)=argmaxθΘ  i=1np(xiθ).(2)\hat{\boldsymbol\theta}_{\text{MLE}} = \underset{\boldsymbol\theta \in \Theta}{\text{argmax}} \; \mathcal{L}(\boldsymbol\theta) = \underset{\boldsymbol\theta \in \Theta}{\text{argmax}} \; \prod_{i=1}^n p(x_i \mid \boldsymbol\theta). \tag{2}

Definition 3 (Log-Likelihood). The log-likelihood is:

(θ)=logL(θ)=i=1nlogp(xiθ).(3)\ell(\boldsymbol\theta) = \log \mathcal{L}(\boldsymbol\theta) = \sum_{i=1}^n \log p(x_i \mid \boldsymbol\theta). \tag{3}

Since log\log is strictly increasing, θ^MLE=argmaxθ(θ)\hat{\boldsymbol\theta}_{\text{MLE}} = \arg\max_{\boldsymbol\theta} \ell(\boldsymbol\theta).

Proposition 1 (First-Order Condition). If θ^MLE\hat{\boldsymbol\theta}_{\text{MLE}} is in the interior of Θ\Theta and \ell is differentiable, then:

θ(θ^MLE)=0.(4)\nabla_{\boldsymbol\theta} \ell(\hat{\boldsymbol\theta}_{\text{MLE}}) = \mathbf{0}. \tag{4}

Proof. Necessary condition for an interior maximum of a differentiable function. \blacksquare

Proposition 2 (Second-Order Condition). If additionally 2(θ^MLE)0-\nabla^2 \ell(\hat{\boldsymbol\theta}_{\text{MLE}}) \succ 0 (negative Hessian positive definite), then θ^MLE\hat{\boldsymbol\theta}_{\text{MLE}} is a local maximum.


Log-Likelihood and Computational Advantages

Why log?

  1. Products become sums: (θ)=ilogp(xiθ)\ell(\boldsymbol\theta) = \sum_i \log p(x_i \mid \boldsymbol\theta) — numerically stable, avoids underflow.
  2. Exponential family: Log-likelihood is often concave, enabling closed-form or convex optimization.
  3. Gradients decompose: (θ)=ilogp(xiθ)\nabla \ell(\boldsymbol\theta) = \sum_i \nabla \log p(x_i \mid \boldsymbol\theta) — supports stochastic gradients (SGD).

Proposition 3. For i.i.d. data, (θ)=n1ni=1nlogp(xiθ)=nEp^n[logp(Xθ)]\ell(\boldsymbol\theta) = n \cdot \frac{1}{n}\sum_{i=1}^n \log p(x_i \mid \boldsymbol\theta) = n \cdot \mathbb{E}_{\hat{p}_n}[\log p(X \mid \boldsymbol\theta)] where p^n\hat{p}_n is the empirical distribution.


MLE for Exponential Family Distributions

Definition 4 (Exponential Family). A distribution with density:

p(xθ)=h(x)exp(η(θ)TT(x)A(θ)),(5)p(x \mid \boldsymbol\theta) = h(x) \exp\left(\boldsymbol\eta(\boldsymbol\theta)^T \mathbf{T}(x) - A(\boldsymbol\theta)\right), \tag{5}

where T(x)\mathbf{T}(x) are sufficient statistics, η\boldsymbol\eta are natural parameters, and AA is the log-partition function.

Theorem 1 (MLE for Exponential Family). For i.i.d. samples from an exponential family, the MLE satisfies:

Epθ[T(X)]=Tˉn=1ni=1nT(xi),(6)\mathbb{E}_{p_{\boldsymbol\theta}}[\mathbf{T}(X)] = \bar{\mathbf{T}}_n = \frac{1}{n}\sum_{i=1}^n \mathbf{T}(x_i), \tag{6}

i.e., match expected sufficient statistics to sample averages.

Gaussian — Known Variance

xiN(μ,σ2)x_i \sim \mathcal{N}(\mu, \sigma^2), σ2\sigma^2 known:

(μ)=n2log(2πσ2)12σ2i=1n(xiμ)2.(7)\ell(\mu) = -\frac{n}{2}\log(2\pi\sigma^2) - \frac{1}{2\sigma^2}\sum_{i=1}^n (x_i - \mu)^2. \tag{7} μ=1σ2i=1n(xiμ)=0    μ^MLE=xˉ=1ni=1nxi.(8)\frac{\partial \ell}{\partial \mu} = \frac{1}{\sigma^2}\sum_{i=1}^n (x_i - \mu) = 0 \implies \hat{\mu}_{\text{MLE}} = \bar{x} = \frac{1}{n}\sum_{i=1}^n x_i. \tag{8}

Gaussian — Unknown Mean and Variance

μ^MLE=xˉ,σ^MLE2=1ni=1n(xixˉ)2.(9)\hat{\mu}_{\text{MLE}} = \bar{x}, \quad \hat{\sigma}^2_{\text{MLE}} = \frac{1}{n}\sum_{i=1}^n (x_i - \bar{x})^2. \tag{9}

Remark. σ^MLE2\hat{\sigma}^2_{\text{MLE}} divides by nn, not n1n-1 — it is biased. The unbiased estimator uses Bessel's correction (n1n-1). This bias–variance tradeoff is developed in Bias–Variance Tradeoff.

Bernoulli

xi{0,1}x_i \in \{0, 1\}, P(xi=1)=pP(x_i = 1) = p:

(p)=i=1n[xilogp+(1xi)log(1p)].(10)\ell(p) = \sum_{i=1}^n [x_i \log p + (1-x_i)\log(1-p)]. \tag{10} p=ixipnixi1p=0    p^MLE=1ni=1nxi.(11)\frac{\partial \ell}{\partial p} = \frac{\sum_i x_i}{p} - \frac{n - \sum_i x_i}{1-p} = 0 \implies \hat{p}_{\text{MLE}} = \frac{1}{n}\sum_{i=1}^n x_i. \tag{11}

Poisson

xiPoisson(λ)x_i \sim \text{Poisson}(\lambda):

(λ)=i[xilogλλlog(xi!)]    λ^MLE=xˉ.(12)\ell(\lambda) = \sum_i [x_i \log \lambda - \lambda - \log(x_i!)] \implies \hat{\lambda}_{\text{MLE}} = \bar{x}. \tag{12}

Score Function and Fisher Information

Definition 5 (Score Function). The score is the gradient of the log-likelihood for a single observation:

s(θ;x)=θlogp(xθ).(13)\mathbf{s}(\boldsymbol\theta; x) = \nabla_{\boldsymbol\theta} \log p(x \mid \boldsymbol\theta). \tag{13}

For nn i.i.d. observations: (θ)=i=1ns(θ;xi)\nabla \ell(\boldsymbol\theta) = \sum_{i=1}^n \mathbf{s}(\boldsymbol\theta; x_i).

Proposition 4 (Score Has Zero Expectation). Under regularity conditions:

Exp(θ)[s(θ;x)]=0.(14)\mathbb{E}_{x \sim p(\cdot \mid \boldsymbol\theta)}[\mathbf{s}(\boldsymbol\theta; x)] = \mathbf{0}. \tag{14}

Proof.

E[s]=θp(xθ)dx=θp(xθ)dx=θ1=0.(15)\mathbb{E}[\mathbf{s}] = \int \nabla_{\boldsymbol\theta} p(x \mid \boldsymbol\theta)\, dx = \nabla_{\boldsymbol\theta} \int p(x \mid \boldsymbol\theta)\, dx = \nabla_{\boldsymbol\theta} 1 = \mathbf{0}. \tag{15}

(Exchange of derivative and integral justified by regularity.) \blacksquare

Definition 6 (Fisher Information). The Fisher information matrix is:

I(θ)=E[s(θ;X)s(θ;X)T]=E[θ2logp(Xθ)].(16)\mathbf{I}(\boldsymbol\theta) = \mathbb{E}\left[\mathbf{s}(\boldsymbol\theta; X) \mathbf{s}(\boldsymbol\theta; X)^T\right] = -\mathbb{E}\left[\nabla^2_{\boldsymbol\theta} \log p(X \mid \boldsymbol\theta)\right]. \tag{16}

The second equality follows from differentiating E[s]=0\mathbb{E}[\mathbf{s}] = \mathbf{0} w.r.t. θ\boldsymbol\theta.

Interpretation. I(θ)\mathbf{I}(\boldsymbol\theta) measures the curvature of the log-likelihood — how sharply peaked it is around the true parameter. Large Fisher information     \implies data are highly informative about θ\boldsymbol\theta     \implies lower variance of estimators.

Example (Bernoulli). I(p)=1/(p(1p))\mathbf{I}(p) = 1/(p(1-p)). Information is lowest at p=1/2p = 1/2 (hardest to distinguish from noise) and diverges at p{0,1}p \in \{0, 1\}.

Example (Gaussian, known σ2\sigma^2). I(μ)=n/σ2\mathbf{I}(\mu) = n/\sigma^2.


Consistency of the MLE

Definition 7 (Consistency). Estimator θ^n\hat{\boldsymbol\theta}_n is consistent for θ\boldsymbol\theta^* if θ^npθ\hat{\boldsymbol\theta}_n \xrightarrow{p} \boldsymbol\theta^* as nn \to \infty.

Theorem 2 (Consistency of MLE). Under regularity conditions (identifiability, compact Θ\Theta, continuity, dominance for exchange of limit and integral):

θ^MLEpθ,(17)\hat{\boldsymbol\theta}_{\text{MLE}} \xrightarrow{p} \boldsymbol\theta^*, \tag{17}

where θ=argmaxθEp[logp(Xθ)]\boldsymbol\theta^* = \arg\max_{\boldsymbol\theta} \mathbb{E}_{p^*}[\log p(X \mid \boldsymbol\theta)] — the KL-closest parameter if pp^* is not in the model.

Proof sketch.

Step 1. By the Law of Large Numbers:

1n(θ)=1ni=1nlogp(xiθ)a.s.Ep[logp(Xθ)]=H(p,pθ)+const.(18)\frac{1}{n}\ell(\boldsymbol\theta) = \frac{1}{n}\sum_{i=1}^n \log p(x_i \mid \boldsymbol\theta) \xrightarrow{a.s.} \mathbb{E}_{p^*}[\log p(X \mid \boldsymbol\theta)] = -H(p^*, p_{\boldsymbol\theta}) + \text{const}. \tag{18}

Step 2. By identifiability, Ep[logp(Xθ)]\mathbb{E}_{p^*}[\log p(X \mid \boldsymbol\theta)] is uniquely maximized at θ\boldsymbol\theta^* (true parameter if model is correct).

Step 3. By uniform convergence (regularity) and the argmax continuous mapping theorem, argmax1n(θ)pargmaxE[logp(Xθ)]=θ\arg\max \frac{1}{n}\ell(\boldsymbol\theta) \xrightarrow{p} \arg\max \mathbb{E}[\log p(X \mid \boldsymbol\theta)] = \boldsymbol\theta^*. \blacksquare

Interpretation. With enough data, MLE finds the best parameter in the model family — in the KL sense from KL Divergence, Theorem 3.


Asymptotic Normality and the Cramér-Rao Bound

Theorem 3 (Asymptotic Normality of MLE). Under regularity conditions, as nn \to \infty:

n(θ^MLEθ)dN(0,I(θ)1).(19)\sqrt{n}(\hat{\boldsymbol\theta}_{\text{MLE}} - \boldsymbol\theta^*) \xrightarrow{d} \mathcal{N}(\mathbf{0}, \mathbf{I}(\boldsymbol\theta^*)^{-1}). \tag{19}

Proof sketch. Taylor expand the score at θ^MLE\hat{\boldsymbol\theta}_{\text{MLE}} around θ\boldsymbol\theta^*:

0=(θ^MLE)(θ)+2(θ)(θ^MLEθ).(20)\mathbf{0} = \nabla \ell(\hat{\boldsymbol\theta}_{\text{MLE}}) \approx \nabla \ell(\boldsymbol\theta^*) + \nabla^2 \ell(\boldsymbol\theta^*)(\hat{\boldsymbol\theta}_{\text{MLE}} - \boldsymbol\theta^*). \tag{20}

Rearranging:

n(θ^MLEθ)[2(θ)/n]1(θ)/n.(21)\sqrt{n}(\hat{\boldsymbol\theta}_{\text{MLE}} - \boldsymbol\theta^*) \approx -[\nabla^2 \ell(\boldsymbol\theta^*)/n]^{-1} \cdot \nabla \ell(\boldsymbol\theta^*)/\sqrt{n}. \tag{21}

By LLN: 2(θ)/npI(θ)-\nabla^2 \ell(\boldsymbol\theta^*)/n \xrightarrow{p} \mathbf{I}(\boldsymbol\theta^*). By CLT: (θ)/ndN(0,I(θ))\nabla \ell(\boldsymbol\theta^*)/\sqrt{n} \xrightarrow{d} \mathcal{N}(\mathbf{0}, \mathbf{I}(\boldsymbol\theta^*)). Slutsky's theorem gives (19). \blacksquare

Theorem 4 (Cramér-Rao Lower Bound). For any unbiased estimator θ~\tilde{\boldsymbol\theta} of θ\boldsymbol\theta^*:

Cov(θ~)I(θ)1.(22)\text{Cov}(\tilde{\boldsymbol\theta}) \succeq \mathbf{I}(\boldsymbol\theta^*)^{-1}. \tag{22}

Proof sketch. Cauchy–Schwarz inequality on Cov(θ~,s)\text{Cov}(\tilde{\boldsymbol\theta}, \mathbf{s}) with E[s]=0\mathbb{E}[\mathbf{s}] = \mathbf{0}. \blacksquare

Corollary 2 (Asymptotic Efficiency). The MLE achieves the Cramér-Rao bound asymptotically — it is the most efficient regular estimator in the large-sample limit.


Invariance and Functional MLE

Theorem 5 (Invariance of MLE). If θ^MLE\hat{\boldsymbol\theta}_{\text{MLE}} is the MLE of θ\boldsymbol\theta, then for any function gg, the MLE of η=g(θ)\eta = g(\boldsymbol\theta) is:

η^MLE=g(θ^MLE).(23)\hat{\eta}_{\text{MLE}} = g(\hat{\boldsymbol\theta}_{\text{MLE}}). \tag{23}

Proof. The likelihood depends on θ\boldsymbol\theta only through g(θ)g(\boldsymbol\theta) when reparameterizing; maximizing over η\eta is equivalent to maximizing over θ\boldsymbol\theta and applying gg. \blacksquare

Example. For Gaussian variance, σ^MLE2=1n(xixˉ)2\hat{\sigma}^2_{\text{MLE}} = \frac{1}{n}\sum (x_i - \bar{x})^2. The MLE of σ\sigma is σ^MLE2\sqrt{\hat{\sigma}^2_{\text{MLE}}}, not σ^MLE2\hat{\sigma}^2_{\text{MLE}} divided differently — invariance gives σ^MLE=σ^MLE2\hat{\sigma}_{\text{MLE}} = \sqrt{\hat{\sigma}^2_{\text{MLE}}}.


MLE as KL Minimization and Cross-Entropy

Theorem 6 (MLE \Leftrightarrow KL Minimization). The MLE minimizes KL divergence from the empirical distribution:

θ^MLE=argminθ  DKL(p^npθ).(24)\hat{\boldsymbol\theta}_{\text{MLE}} = \underset{\boldsymbol\theta}{\text{argmin}} \; D_{\text{KL}}(\hat{p}_n \| p_{\boldsymbol\theta}). \tag{24}

Proof. From KL Divergence, Theorem 3. \blacksquare

Theorem 7 (Cross-Entropy for Classification). For one-hot labels yi{1,,C}y_i \in \{1, \ldots, C\} and model pθ(yx)=softmax(fθ(x))p_{\boldsymbol\theta}(y \mid \mathbf{x}) = \text{softmax}(f_{\boldsymbol\theta}(\mathbf{x})):

LCE=i=1nlogpθ(yixi)(25)\mathcal{L}_{\text{CE}} = -\sum_{i=1}^n \log p_{\boldsymbol\theta}(y_i \mid \mathbf{x}_i) \tag{25}

is the negative log-likelihood. Minimizing LCE\mathcal{L}_{\text{CE}} \equiv MLE \equiv minimizing DKL(p^empiricalpθ)D_{\text{KL}}(\hat{p}_{\text{empirical}} \| p_{\boldsymbol\theta}).

Theorem 8 (MSE for Regression). For yixiN(fθ(xi),σ2)y_i \mid \mathbf{x}_i \sim \mathcal{N}(f_{\boldsymbol\theta}(\mathbf{x}_i), \sigma^2):

(θ)=n2log(2πσ2)12σ2i=1n(yifθ(xi))2.(26)\ell(\boldsymbol\theta) = -\frac{n}{2}\log(2\pi\sigma^2) - \frac{1}{2\sigma^2}\sum_{i=1}^n (y_i - f_{\boldsymbol\theta}(\mathbf{x}_i))^2. \tag{26}

Maximizing \ell \equiv minimizing i(yifθ(xi))2\sum_i (y_i - f_{\boldsymbol\theta}(\mathbf{x}_i))^2 (MSE).


MLE for Neural Networks

A neural network defines a conditional distribution pθ(yx)p_{\boldsymbol\theta}(y \mid \mathbf{x}).

Regression: Gaussian noise     \implies MSE loss (Theorem 8).

Classification: Categorical/softmax     \implies cross-entropy loss (Theorem 7).

Language modeling: Autoregressive factorization p(x1,,xT)=tp(xtx<t)p(x_1, \ldots, x_T) = \prod_t p(x_t \mid x_{<t})     \implies sum of log-probabilities (negative log-likelihood per token).

Optimization. MLE is solved via Gradient Descent on (θ)-\ell(\boldsymbol\theta) — SGD on mini-batches approximates the full gradient.

Key insight. Loss function design is not separate from probabilistic modeling. Choosing a loss is choosing a likelihood.


Limitations and the Path to Bayesian Methods

  1. Overfitting. With limited data, MLE can overfit (e.g., p^=1\hat{p} = 1 after 3/3 coin flips). Regularization and MAP estimation add prior terms.

  2. No uncertainty quantification. MLE gives a point estimate; it does not provide credible intervals without asymptotic approximations.

  3. Singular likelihoods. Mixture models can have unbounded likelihood (component collapses on a single point). Constraints or priors needed.

  4. Model misspecification. If p{pθ}p^* \notin \{p_{\boldsymbol\theta}\}, MLE finds the KL-closest model, which may be misleading.

  5. Finite-sample bias. MLE can be biased (variance estimation with divisor nn). Unbiased alternatives exist but may have higher variance.

Progression: MLE \to MAP (add prior) \to Full Bayesian (posterior over θ\boldsymbol\theta) — see Bayes' Theorem and Bayesian Linear Regression.


Common Pitfalls and Misconceptions

Pitfall 1: Treating likelihood as a probability over parameters. L(θ)\mathcal{L}(\boldsymbol\theta) is not a posterior; it requires a prior and Bayes' theorem for that interpretation.

Pitfall 2: Assuming MLE is always unbiased. Gaussian variance MLE is biased; only asymptotic properties are guaranteed generally.

Pitfall 3: Confusing MLE with least squares in all settings. MSE is MLE only under Gaussian noise. Laplace noise     \implies L1 loss (median regression); robust losses correspond to different likelihoods.

Pitfall 4: Ignoring regularity conditions. Without identifiability, consistency fails. Mixture models without constraints have singular Fisher information.

Pitfall 5: Equating training log-likelihood with generalization. Minimizing -\ell on training data does not guarantee low KL to pp^* on test data — see Bias–Variance Tradeoff.


Research Perspective

Maximum likelihood dates to Fisher (1912–1922), who formalized it and developed asymptotic theory. The connection to KL divergence and information geometry (Amari, 1985) unified statistics and information theory.

In deep learning, MLE remains the default training objective, but research explores: noise-contrastive estimation, score matching (avoiding normalization constants), adversarial losses (non-likelihood), and Bayesian deep learning (posterior over weights). The debate over whether SGD on overparameterized networks performs implicit Bayesian inference continues.


Summary of Takeaways

  • LikelihoodL(θ)=ip(xiθ)\mathcal{L}(\boldsymbol\theta) = \prod_i p(x_i \mid \boldsymbol\theta) — Data probability as function of θ\boldsymbol\theta
  • Log-likelihood(θ)=ilogp(xiθ)\ell(\boldsymbol\theta) = \sum_i \log p(x_i \mid \boldsymbol\theta) — Sum form, gradients
  • MLEθ^=argmax(θ)\hat{\boldsymbol\theta} = \arg\max \ell(\boldsymbol\theta) — Most probable parameters
  • Scores=logp(xθ)\mathbf{s} = \nabla \log p(x \mid \boldsymbol\theta), E[s]=0\mathbb{E}[\mathbf{s}] = \mathbf{0} — First-order condition
  • Fisher informationI(θ)=E[ssT]\mathbf{I}(\boldsymbol\theta) = \mathbb{E}[\mathbf{s}\mathbf{s}^T] — Asymptotic variance
  • Consistencyθ^pθ\hat{\boldsymbol\theta} \xrightarrow{p} \boldsymbol\theta^* — Large-nn correctness
  • Asymptotic normalityn(θ^θ)N(0,I1)\sqrt{n}(\hat{\boldsymbol\theta} - \boldsymbol\theta^*) \to \mathcal{N}(\mathbf{0}, \mathbf{I}^{-1}) — Confidence intervals
  • MLE \Leftrightarrow min KLargminDKL(p^n —pθ)\arg\min D_{\text{KL}}(\hat{p}_n \ — p_{\boldsymbol\theta}) — Closest model to data

Next article: The Bias–Variance Tradeoff → — decomposing prediction error beyond point estimation.


Exercises

Exercise 1 (Bernoulli). Derive (11) completely, verifying the second derivative is negative at the optimum.

Exercise 2 (Gaussian). Derive (9) for both μ\mu and σ2\sigma^2 simultaneously.

Exercise 3 (Fisher information). Compute I(p)\mathbf{I}(p) for Bernoulli and verify the Cramér-Rao bound for p^MLE\hat{p}_{\text{MLE}}.

Exercise 4 (Consistency). Explain why p^MLE=3/3=1\hat{p}_{\text{MLE}} = 3/3 = 1 after three heads is consistent for the true p=1/2p = 1/2.

Exercise 5 (Invariance). If λ^MLE=xˉ\hat{\lambda}_{\text{MLE}} = \bar{x} for Poisson, what is the MLE of η=eλ\eta = e^\lambda?

Exercise 6 (KL). Prove Theorem 6 directly from the definition of DKL(p^npθ)D_{\text{KL}}(\hat{p}_n \| p_{\boldsymbol\theta}).

Exercise 7 (Conceptual). Why does MSE correspond to Gaussian noise but not Laplace noise?

Exercise 8 (Asymptotic). State the regularity conditions needed for Theorem 3 and give an example where they fail.