KL(p || q) = sum of p(x) log(p(x) / q(x)): the extra information lost when q is used to approximate p.
It is always zero or positive, and zero only when p equals q.
Relationship: H(p, q) = H(p) + KL(p || q). Since the entropy of the true labels H(p) is constant, minimizing cross-entropy is the same as minimizing the KL divergence from the true distribution to the model.
Used in VAEs, knowledge distillation, t-SNE, and the KL penalty that keeps a model close to a reference model in RLHF.
Loading…