We introduce a new family of distances, relative-translation invariant Wasserstein distances (), for measuring the similarity of two probability distributions under distribution shift. Generalizing it from the classical optimal transport model, we show that distances are also real distance metrics defined on the quotient set and invariant to distribution translations. When , the distance enjoys more exciting properties, including decomposability of the optimal transport model, translation-invariance of the distance, and a Pythagorean relationship between and the classical quadratic Wasserstein distance (). Based on these properties, we show that a distribution shift, measured by distance, can be explained in the bias-variance perspective. In addition, we propose a variant of the Sinkhorn algorithm, named Sinkhorn algorithm, for efficiently calculating distance, coupling solutions, as well as distance. We also provide the analysis of numerical stability and time complexity for the proposed algorithm. Finally, we validate the distance metric and the algorithm performance with three experiments. We conduct one numerical validation for the Sinkhorn algorithm and show two real-world applications demonstrating the effectiveness of using under distribution shift: digits recognition and similar thunderstorm detection. The experimental results report that our proposed algorithm significantly improves the computational efficiency of Sinkhorn in certain practical applications, and the distance is robust to distribution translations compared with baselines.
View on arXiv