UltraTWD: Optimizing Ultrametric Trees for Tree-Wasserstein Distance

Abstract

The Wasserstein distance is a widely used metric for measuring differences between distributions, but its super-cubic time complexity introduces substantial computational burdens. To mitigate this, the tree-Wasserstein distance (TWD) offers a linear-time approximation by leveraging a tree structure; however, existing TWD methods often compromise accuracy due to suboptimal tree structures and edge weights. To address it, we introduce UltraTWD, a novel unsupervised framework that simultaneously optimizes both ultrametric tree structures and edge weights to more faithfully approximate the cost matrix. Specifically, we develop algorithms based on minimum spanning trees, iterative projection, and gradient descent to efficiently learn high-quality ultrametric trees. Empirical results across document retrieval, ranking, and classification tasks demonstrate that UltraTWD achieves superior approximation accuracy and competitive downstream performance. Code is available at: https://github.com/NeXAIS/UltraTWD.

Cite

Text

Yu et al. "UltraTWD: Optimizing Ultrametric Trees for Tree-Wasserstein Distance." Proceedings of the 42nd International Conference on Machine Learning, 2025.

Markdown

[Yu et al. "UltraTWD: Optimizing Ultrametric Trees for Tree-Wasserstein Distance." Proceedings of the 42nd International Conference on Machine Learning, 2025.](https://mlanthology.org/icml/2025/yu2025icml-ultratwd/)

BibTeX

@inproceedings{yu2025icml-ultratwd,
  title     = {{UltraTWD: Optimizing Ultrametric Trees for Tree-Wasserstein Distance}},
  author    = {Yu, Fangchen and Chen, Yanzhen and Wei, Jiaxing and Mao, Jianfeng and Li, Wenye and Sun, Qiang},
  booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
  year      = {2025},
  pages     = {72837-72852},
  volume    = {267},
  url       = {https://mlanthology.org/icml/2025/yu2025icml-ultratwd/}
}