
What happened
Aoki's explainer computes KL divergence between a 90/10 red-blue box (reality P) and a 50/50 belief (Q), getting about 0.368 in one direction and 0.511 in the reverse.
Why it matters
The gap shows KL divergence measures extra surprise from using the wrong distribution, not plain distance, so swapping which world is real changes the number.
Summaries like this, every morning.
This is the sixth installment of Aoki's series on the mathematics behind AI and neuroscience, and it picks up from the previous episode's treatment of entropy. Entropy described the uncertainty of the world itself; KL divergence adds a second perspective, the extra information cost of believing a distribution that differs from reality. The worked example makes the abstract formula tangible: with natural logarithms the units are nats, and the two directions differ because the average is taken over whichever distribution is treated as real.
The piece then links the formula to a boxed identity, cross entropy equals entropy plus KL divergence, and to three properties: the value is never negative, it is zero only when the distributions match, and it is generally asymmetric. That last property is why KL divergence is not a distance in the usual mathematical sense. A further note points out that if the believed distribution assigns zero probability to something that can happen, the divergence becomes infinite, a warning about overconfident models.
Aoki extends the idea to continuous distributions, where the sum becomes an integral, and then to three application areas. In statistics, minimizing KL divergence is equivalent to minimizing cross entropy, which connects to maximum likelihood estimation from an earlier episode. In generative AI, the VAE objective includes a KL term that keeps the learned latent distribution close to a prior. In neuroscience, Karl Friston's free energy principle uses KL divergence to describe how the brain compares predicted and actual sensory information, though it is not established that the brain literally computes KL divergence.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.