Contents
Entropy, Cross-Entropy and KL Divergence/Chapter 08 of 10
08Common misconceptions
- “KL divergence is a distance.” It is not symmetric and does not satisfy the triangle inequality: 3.63 bits one way between the cities, 1.15 the other.
- “Cross-entropy and KL are the same loss.” They have the same gradient and the same minimizer, but cross-entropy is larger by the entropy of the data. With one-hot labels that entropy is zero and they coincide.
- “A good model reaches zero loss.” The floor is the entropy of the data. Miami’s weather costs 0.99 bits a day even to a perfect forecaster.
- “Entropy is the surprise of the outcome.” Surprise belongs to one outcome; entropy is the average surprise of a whole distribution, known before the outcome is seen.
- “Bits or nats change the answer.” The base only rescales every quantity by the same constant (1 nat =1.443 bits); minimizers, comparisons and perplexity are unchanged.
- “Forward and reverse KL give the same fit.” Only when the model family contains p. Otherwise forward KL covers all modes and reverse KL picks one (Section 5.5).