KL Divergence
A measure of how much information is lost when one distribution is used to approximate another.
Written , it is the extra surprise you accept by describing reality with your approximation . It is zero exactly when the two distributions are identical, and positive otherwise.
It is not a distance, and the reason matters. and are different numbers, so the order of the arguments is a modelling decision. Putting the true distribution first penalises your model for assigning low probability where reality has mass, which produces an approximation that spreads out to cover everything. Reversing it produces one that concentrates on a single mode and ignores the rest — the difference between a blurry average and a confident guess.
Cross-entropy decomposes as , and since does not depend on your model, minimising cross-entropy and minimising KL divergence are the same optimisation. It also appears directly as the regularisation term in variational autoencoders and as the constraint keeping a fine-tuned policy near its reference model in RLHF and DPO.