# Why isn't the reverse KL divergence commonly used in supervised learning?

Forward KL Divergence (also known as cross entropy loss) is a standard loss function in supervised learning problems. I understand why it is so: matching a known a trained distribution to a known distribution fits $$P \log(P/Q)$$ where $$P$$ is the known distribution.

Why isn't the reverse KL divergence commonly used in supervised learning?

• Maybe say a little more about what reverse KL divergence is. Apr 5 '19 at 19:54
• Reverse KL Divergence would be $Q \log (Q/P)$
– cgo
Apr 8 '19 at 0:24

A common problem in supervised learning where you will see KL-divergence used are classification tasks. Very often in those cases the data points in the training set are assumed to belong to a single class $$c_i$$ where $$i$$ is from some index set $$I$$. The class membership is represented by one-hot encoding, which corresponds to a distribution $$P$$ with $$p_i = 1$$ for the class the data point belongs to and $$p_j = 0$$ for all $$i \neq j$$. The loss function mostly used in this problems is the average categorical cross-entropy $$\langle E_P[-log(Q)]\rangle_{\rm data} = \langle H(P) - D(P || Q)\rangle_{\rm data}$$, which in the case of single-class membership reduces to the binary cross-entropy. Because only one probability in $$P$$ is non-zero in this case, the cross-entropy simplifies to $$\langle -\log(q_i)\rangle_{\rm data}$$. The reverse KL-Divergence $$D(Q || P)$$ is strictly speaking not even defined in this case, as $$Q$$ needs to be absolute continuous w.r.t. $$P$$.