We provide an implementation to compute the flat metric in any dimension. The flat metric, also called dual bounded Lipschitz distance, generalizes the well-known Wasserstein distance W1 to the case that the distributions are of unequal total mass. This is of particular interest for unbalanced optimal transport tasks and for the analysis of data distributions where the sample size is important or normalization is not possible. The core of the method is based on a neural network to determine on optimal test function realizing the distance between two given measures. Special focus was put on achieving comparability of pairwise computed distances from independently trained networks. We tested the quality of the output in several experiments where ground truth was available as well as with simulated data.
翻译:我们提供了任意维度下计算平坦度量的实现方法。平坦度量,又称对偶有界Lipschitz距离,将著名的Wasserstein距离W1推广到分布总质量不相等的情形。这对于非均衡最优传输任务以及样本规模重要或无法归一化处理的数据分布分析具有特殊意义。该方法的核心基于神经网络,通过确定最优测试函数来实现两个给定测度间的距离。我们特别关注了使独立训练网络计算出的成对距离具有可比性的问题。在多个存在真实基准值的实验及模拟数据测试中,我们对输出质量进行了验证。