KL divergence measures the difference in two probability distributions
The third form is exactly the difference between ๐ง Cross Entropy and ๐ฅ Entropy. We can interpret this value as the expected extra number of bits to transmit using our predicted
InfoNote that this value is not a true distance: it's non-symmetric and does not satisfy triangle inequality. However, it is non-negative.
Reverse KL Divergence
Reverse KL divergence, as its name suggests, measures
The key difference is the following:
- In forward KL,
is penalized for being too small when is largeโfailing to cover . Here, KL is mass-covering. - In reverse KL,
is penalized for being too large when is smallโfailing to match dominant modes of . Here, KL is mode-seeking.
Applications
We commonly see KL divergence or cross entropy used as loss functions in categorization problems (for example, in ๐ฆ Logistic Regression). The truth label
for a single datapoint where
We can also apply KL divergence to ๐ฐ Information Gain. Rather than computing it as the difference in entropies before and after knowing