Kullback–Leibler divergence
In the definitions below, \(G\) is a set.
DefinitionKullback–Leibler divergence#
If \(X,Y\) are two \(G\)-valued random variables, the Kullback–Leibler divergence is defined as
LemmaKullback–Leibler divergence of copy#
If \(X'\) is a copy of \(X\), and \(Y'\) is a copy of \(Y\), then \(D_{KL}(X'\Vert Y') = D_{KL}(X\Vert Y)\).
Proof
Clear from definition.
Lean
Formalized as ProbabilityTheory.IdentDistrib.KLDiv_eq.
Sources
Uses 1
LemmaGibbs inequality#
\(D_{KL}(X\Vert Y) \geq 0\).
Proof
Apply log sum inequality on the definition.
Lean
Formalized as KLDiv_nonneg.
Sources
Uses 2 · Used by 1
LemmaConverse Gibbs inequality#
If \(D_{KL}(X\Vert Y) = 0\), then \(Y\) is a copy of \(X\).
Proof
Apply converse log sum.
Lean
Formalized as KLDiv_eq_zero_iff_identDistrib.
Sources
Uses 1
LemmaConvexity of Kullback–Leibler#
If \(S\) is a finite set, \(\sum_{s \in S} w_s = 1\) for some non-negative \(w_s\), and \({\bf P}(X=x) = \sum_{s\in S} w_s {\bf P}(X_s=x)\), \({\bf P}(Y=x) = \sum_{s\in S} w_s {\bf P}(Y_s=x)\) for all \(x\), then
Proof
For each \(x\), replace \(\log \frac{\mathbf{P}(X_s=x)}{\mathbf{P}(Y_s=x)}\) in the definition with \(\log \frac{w_s\mathbf{P}(X_s=x)}{w_s\mathbf{P}(Y_s=x)}\) for each \(s\), and apply log sum inequality.
Lean
Formalized as KLDiv_of_convex.
Sources
Uses 2 · Used by 1
LemmaKullback–Leibler and injections#
If \(f:G \to H\) is an injection, then \(D_{KL}(f(X)\Vert f(Y)) = D_{KL}(X\Vert Y)\).
Uses 1 · Used by 2
Now let \(G\) be an additive group.
LemmaKullback–Leibler and sums#
If \(X, Y, Z\) are independent \(G\)-valued random variables, then
Proof
For each \(z\), \(D_{KL}(X+z\Vert Y+z)=D_{KL}(X\Vert Y)\) by Kullback–Leibler and injections. Then apply Convexity of Kullback–Leibler with \(w_z=\mathbf{P}(Z=z)\).
Lean
Formalized as KLDiv_add_le_KLDiv_of_indep.
Sources
Uses 2 · Used by 1
LemmaKullback–Leibler and conditioning#
If \(X, Y\) are independent \(G\)-valued random variables, and \(Z\) is another random variable defined on the same sample space as \(X\), then
Proof
Compare the terms correspond to each \(x\in G\) on both sides.
Lean
Formalized as condKLDiv_eq.
Sources
Used by 1
LemmaConditional Gibbs inequality#
\(D_{KL}((X|W)\Vert Y) \geq 0\).
Proof
Clear from Definition Conditional Kullback–Leibler divergence and Lemma Gibbs inequality.
Lean
Formalized as condKLDiv_nonneg.
Sources
Uses 1
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.