Maximum Likelihood
Maximum likelihood chooses model parameters that make the observed data likely under the model.
For independent examples:
It is usually optimized as log-likelihood:
or negative log-likelihood:
As an empirical expectation:
where is the empirical data distribution.
For supervised learning, the conditional version is:
This can be written as an empirical risk:
where is the empirical distribution induced by the dataset and sampling rule.
For sequence modeling with the chain rule:
If sequences have different lengths, the denominator is part of the claim:
where is the set of valid non-padding positions. Token-average and sequence-average likelihood optimize different populations.
Why It Matters
- Cross-entropy classification is conditional maximum likelihood.
- Autoregressive language modeling minimizes next-token negative log-likelihood.
- Density estimation and many generative models are likelihood-based.
- Likelihood is not always aligned with sample quality or downstream utility.
- Maximizing likelihood is equivalent to minimizing cross-entropy from the data distribution to the model distribution.
Likelihood Claim Map
| Claim | Likelihood Form | Watch |
|---|---|---|
| classifier probability | calibration, class prevalence, label noise | |
| autoregressive model | tokenization, length normalization, teacher forcing | |
| density model | exact vs approximate normalization | |
| latent-variable model | or ELBO | bound tightness and posterior approximation |
| conditional generation | condition leakage and sampling metric | |
| regression as likelihood | with Gaussian/Laplace/etc. | noise model, target scale, censoring |
Likelihood vs Utility
Likelihood is a proper training objective for probability models, but it may not be the final utility:
| Setting | Likelihood Can Miss |
|---|---|
| generation | sample validity, novelty, diversity, and constraint satisfaction |
| ranking | top-k retrieval or enrichment under a candidate corpus |
| molecular modeling | chemical validity, assay utility, pose geometry, or downstream screening value |
| long sequences | sequence-level success when token-level loss is dominated by easy positions |
| imbalanced classification | decision utility under deployment prevalence |
Checks
- What probability is being maximized: , , or ?
- Is the likelihood exact, approximated, bounded, or implicit?
- Does high likelihood correspond to the task metric?
- Are examples assumed independent when they are grouped or duplicated?
- Is the objective token-level, example-level, trajectory-level, or structure-level?
- What is the averaging denominator: example, token, atom, residue, edge, pair, trajectory, or batch?
- Is model selection based on likelihood, downstream metric, or a separate validation utility?
- Does the reported likelihood use the same preprocessing, tokenization, masking, and support as training?