相对熵

KL散度(,簡稱KLD),在訊息系统中称为相对熵(relative entropy),在连续时间序列中称为随机性(randomness),在统计模型推断中称为訊息增益(information gain)。也称訊息散度(information divergence)。

KL散度是两个機率分布P和Q差别的非对称性的度量。 KL散度是用来度量使用基于Q的分布来编码服从P的分布的样本所需的额外的平均比特数。典型情况下,P表示数据的真实分布,Q表示数据的理论分布、估计的模型分布、或P的近似分布。

: D_{\mathrm{KL}}(P\|Q) = \int_{-\infty}^\infty p(x) \ln \frac{p(x)}{q(x)} \, {\rm d}x, \!

其中pq分別表示分佈PQ的密度。

更一般的,若PQ為集合X的機率測度,且P關於Q絕對連續,則從PQ的KL散度定義為

: D_{\mathrm{KL}}(P\|Q) = \int_X \ln \frac{{\rm d}P}{{\rm d}Q} \,{\rm d}P, \!

其中,假定右側的表達形式存在,則\frac{{\rm d}Q}{{\rm d}P} 為Q關於P的R–N導數。

相應的,若P關於Q絕對連續,則

: D_{\mathrm{KL}}(P\|Q) = \int_X \ln \frac{{\rm d}P}{{\rm d}Q} \,{\rm d}P
= \int_X \frac{{\rm d}P}{{\rm d}Q} \ln\frac{{\rm d}P}{{\rm d}Q}\,{\rm d}Q,

即為P關於Q的相對熵。

特性
相對熵的值為非負數:
:D_{\mathrm{KL}}(P\|Q) \geq 0, \,
由吉布斯不等式可知,當且僅當P=Q時D_{KL}(P\|Q)為零。

尽管从直觉上KL散度是个度量或距离函数, 但是它实际上并不是一个真正的度量或距離。因為KL散度不具有对称性:从分布PQ的距离通常并不等于从QP的距离。
:D_{\mathrm{KL}}(P\|Q) \neq D_{\mathrm{KL}}(Q\|P)

KL散度和其它量的关系
自信息和KL散度
:I(m) = D_{\mathrm{KL}}(\delta_{im} \| \{ p_i \}),

互信息和KL散度
:\begin{align}I(X;Y) & = D_{\mathrm{KL}}(P(X,Y) \| P(X)P(Y) ) \\
& = \mathbb{E}_X \{D_{\mathrm{KL}}(P(Y|X) \| P(Y) ) \} \\
& = \mathbb{E}_Y \{D_{\mathrm{KL}}(P(X|Y) \| P(X) ) \}\end{align}

信息熵和KL散度
:\begin{align}H(X) & = \mathrm{(i)} \, \mathbb{E}_x \{I(x)\} \\
& = \mathrm{(ii)} \log N - D_{\mathrm{KL}}(P(X) \| P_U(X) )\end{align}

条件熵和KL散度
:\begin{align}H(X|Y) & = \log N - D_{\mathrm{KL}}(P(X,Y) \| P_U(X) P(Y) ) \\
& = \mathrm{(i)} \,\, \log N - D_{\mathrm{KL}}(P(X,Y) \| P(X) P(Y) ) - D_{\mathrm{KL}}(P(X) \| P_U(X)) \\
& = H(X) - I(X;Y) \\
& = \mathrm{(ii)} \, \log N - \mathbb{E}_Y \{ D_{\mathrm{KL}}(P(X|Y) \| P_U(X)) \}\end{align}

交叉熵和KL散度
:\mathrm{H}(p, q) = \mathrm{E}_p[-\log q] = \mathrm{H}(p) + D_{\mathrm{KL}}(p \| q).\!

参见

  • 熵 (信息论)
  • 交叉熵

*

參考文獻

评论 (0)

  • 还没有评论,来抢沙发吧。