www.cnblogs.com/zuti666/p/15562161.html
1 Users
1 Comments
12 Highlights
0 Notes
Tags
Top Highlights
Wasserstein距离度量两个概率分布之间的距离
KL散度和JS散度是突变的,要么最大要么最小,Wasserstein距离却是平滑的,如果我们要用梯度下降法优化这个参数,前两者根本提供不了梯度,Wasserstein距离却可以。类似地,在高维空间中如果两个分布不重叠或者重叠部分可忽略,则KL和JS既反映不了远近,也提供不了梯度,但是Wasserstein却可以提供有意义的梯度
能够衡量不相交的时候的距离,并且距离越近效果越好 Wasserstein距离相比KL散度、JS散度的优越性在于,即便两个分布没有重叠,Wasserstein距离仍然能够反映它们的远近;而JS散度在此情况下是常量,KL散度可能无意义
Earth Mover’s Distance 的优点
但在二维上面,事实上有很多种方法,推土机距离就是定义为穷举所有的方案,距离最小的那个
Wasserstein distance ( Kantorovich metric)
KL散度和JS散度度量的问题
KL散度和JS散度度量的问题: 如果两个分布P,Q离得很远,完全没有重叠的时候,那么KL散度值是没有意义的,而JS散度值是一个常数。这在学习算法中是比较致命的,这就意味这这一点的梯度为0。梯度消失了。
如果两个分布P,Q离得很远,完全没有重叠的时候,那么KL散度值是没有意义的,而JS散度值是一个常数。这在学习算法中是比较致命的,这就意味这这一点的梯度为0。梯度消失了。
在所有可能的联合分布中能够对这个期望值取到的下界infγ∼Π(P1,P2)E(x,y)∼γ||x−y|| � � � γ ∼ Π ( � 1 , � 2 ) � ( � , � ) ∼ γ | | � − � | | 就是Wasserstein距离
对于每一个可能的联合分布γ,可以从中采样(x,y)∼γ ( � , � ) ∼ γ 得到一个样本x和y,并计算出这对样本的距离 ||x−y|| | | � − � | | ,所以可以计算该联合分布γ下,样本对距离的期望值E(x,y)∼γ||x−y|| � ( � , � ) ∼ γ | | � − � | | 。
这里描述的是两个概率分布之间的距离。这个距离不是直观的几何上的距离,距离在数学上的定义是一个宽泛的概念,只要满足非负、自反、三角不等式就可以称之为距离。 我们想将一个分布移动到另一个分布,可以把分布想象称为土堆,我们每次取样,进行移动。这个过程像是推土机或者说挖掘机移动土堆,我们每次移动一点,最终把整个土堆移动完成,或者说是把土堆填到沟里。如果是离散的分布,那就是每次移动一个有质量的点。(实际上Wasserstein距离就是在最优路径下搬运过程的最小消耗,又被称作Earth-Mover Distance)
Toughts & Comments
shiwei shi
The article discusses various measures of distance between probability distributions, including entropy, KL divergence, JS divergence, Wasserstein distance (also known as Earth Mover's Distance), and Kantorovich metric. While KL and JS divergences have limitations in cases where distributions do not overlap, Wasserstein distance can provide meaningful gradients even in such cases. The article also explains how Wasserstein distance can be calculated by sampling from joint distributions and computing the expected distance between samples. Overall, Wasserstein distance is a more versatile and robust measure of distance between probability distributions.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.