the.ai

Information / Divergence

verified

KL Divergence

How much do you lose by believing the wrong distribution? KL divergence answers in bits: the extra length of every message when you encode reality's symbols using your model's code. It is zero only when the two agree, and it is not symmetric — being wrong about a rare event costs differently depending on which way round you are wrong.

Viz primitive · budget-splitexcess-bits = 6

excess-bits holds 33% of the budget; rest holds the remaining 67%.

Bits wasted by coding with the wrong distribution against the bits the right one would have cost, in bits. Drag the divergence up to watch the waste overtake the message it is carrying.

6

Reviewed by opendroid · 2026-08-18

Origin · not linkable

  • Kullback & Leibler 1951 — On Information and Sufficiency · Annals of Mathematical Statistics 22(1) · doi:10.1214/aoms/1177729694