Geodesic Tensor Diffusion for Estimation of the Local Riemannian Metric in Machine Learning

Levada, Alexandre L. M.

–arXiv.org Artificial Intelligence 

Distances are the raw material of nearest-neighbour search, clustering, kernel methods and graph-based learning, yet the Euclidean distance between two data points can be badly misleading when the data lie on a curved, folded or non-uniformly sampled manifold. The object that tells us how to measure lengths and angles \emph{locally}, at each sample, is the Riemannian metric tensor. We present Geodesic Tensor Diffusion (GTD), a simple and scalable algorithm that estimates this tensor at every point of a dataset. GTD imagines a random walker that takes one short step from each sample and records the second moment of the step. Three design choices make this idea work on real data: steps are measured along shortest paths of a $k$-nearest-neighbour graph, so that they follow the data instead of cutting across folds; step probabilities are corrected by an $α=1$ density normalization, so that densely sampled regions do not bias the estimate; and the reference point is excluded from its own neighbourhood. The algorithm needs one truncated Dijkstra search and one small singular value decomposition per sample, is embarrassingly parallel, and its cost grows only linearly with the ambient dimension. We explain, with simple arguments, why it works: the estimate does not depend on the sampling density, its systematic error is an explicit curvature term of order $h^2$, and it converges at explicit rates in which the ambient dimension enters only logarithmically. Experiments on synthetic manifolds, image manifolds in $\mathbb{R}^{1024}$ and handwritten digits confirm the theory down to its constants, show the advantages of GTD on folded manifolds and under non-uniform sampling, and identify its failure modes. A reference implementation is publicly available.