Background
Type: Article

A new geometry-aware non-euclidean distance metric

Journal: Machine Learning (15730565)Year: March 2025Volume: 114Issue:
Ghaziasgar M.Mahvash Mohammadi H.a Adibi P.
DOI:10.1007/s10994-024-06702-zLanguage: English

Abstract

Many machine learning algorithms use Euclidean distance as a common metric to calculate similarities between data. However, Euclidean distance is not valid when data lie on a manifold with non-zero curvatures. Therefore, we propose a new non-parametric approach that uses curvatures to calculate distances. Curvature is an appealing feature for this purpose since it is not altered by isometries. In this paper, we propose two formulas for measuring distances on a manifold with constant curvature, and their validities are proven using the theorems of differential geometry. Utilizing these formulas, an algorithm is developed to measure the distance between a point and the center of a class. In the proposed algorithm geodesies are divided into equal linear segments, assuming that the curvature remains constant within each segment. This assumption is shown to be valid in many data spaces experimentally. Observed data near each segment are used to estimate curvatures and calculate distances within each segment. Finally, the total distance is computed by summing up the non-Euclidean lengths of all segments. The proposed method is a supervised version of k-means, named non-Euclidean centers. The correctness of the proposed method is validated using the Riemann tensor and its related theorems in differential geometry. Furthermore, experimental results show that our method performs well in real-world data classification applications. The space of symmetric positive definite matrices, which is often endowed with non-Euclidean metrics that induce some curvature, is used for input data representations. © The Author(s), under exclusive licence to Springer Science+Business Media LLC, part of Springer Nature 2025.