Skip to content
nonconvexcard

Maximum likelihood is KL minimisation

ProofBeginner⏱ 15 minLLMsmlekl divergencecross entropy

Problem

Prove L(θ)=H(p^)+KL(p^∥qθ)\mathcal L(\theta) = H(\hat p) + \mathrm{KL}(\hat p\|q_\theta) and deduce that minimising cross entropy is minimising the forward KL. Explain the mode-covering consequence.

Write a complete argument. Every inequality you use should be one you could state precisely.

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
Perplexity is not comparable across tokenisersLLMsNumericalBeginner15 min
The cross-entropy gradient is the prediction errorLLMsProofBeginner15 min
The irreducible loss is the conditional entropyLLMsProofIntermediate30 min
Temperature monotonically controls entropyLLMsProofAdvanced30 min
The KL divergence of best-of-n abyssAgentsProofGraduate1 hour