Equivalence of Maximizing Auto-regressive Log-Likelihood and Minimizing Cross-Entropy Loss
The objective of maximizing the auto-regressive log-likelihood for a sequence, which is calculated by summing the conditional log-probabilities of each token, is mathematically equivalent to the objective of minimizing the cross-entropy loss.
0
1
Tags
Ch.4 Alignment - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Mathematical Formulation of LLM Inference
Equivalence of Maximizing Auto-regressive Log-Likelihood and Minimizing Cross-Entropy Loss
Conditional vs. Joint Probability Objectives in Language Modeling
Notational Convention for Autoregressive Conditional Probability
Modeling and Efficient Computation of Conditional Token Probabilities
A language model is generating a response sequence 'y' given an input context 'x'. The model generates the two-token sequence y = ('deep', 'learning'). The model's calculated log-probabilities for each step of the generation are as follows:
- Log-probability of the first token:
log Pr(y₁='deep' | x) = -0.7 - Log-probability of the second token, given the first:
log Pr(y₂='learning' | x, y₁='deep') = -0.4
Based on the standard method for calculating the probability of a full sequence, what is the total conditional log-likelihood of the entire sequence 'y', i.e.,
log Pr(y|x)?- Log-probability of the first token:
Comparing Model Confidence via Log-Likelihood
Analyzing a Flawed Log-Likelihood Calculation
Learn After
A machine learning engineer is training a language model on a text corpus. During training, they plot two values at each step:
- The average negative log-likelihood of the target sequences.
- The cross-entropy loss between the model's predicted probability distributions and the one-hot encoded target tokens.
The engineer observes that the two plots are identical. Which of the following statements provides the most accurate mathematical justification for this observation?
Equivalence of Training Objectives
True or False: The mathematical equivalence between minimizing cross-entropy loss and maximizing the auto-regressive log-likelihood for a target sequence holds true regardless of how the ground-truth labels are represented (e.g., one-hot vectors vs. smoothed probability distributions).
Comparing Language Model Training Objectives