Riemannian Metric Learning for Symmetric Positive Definite Matrices

Raviteja Vemulapalli, David W. JacobsarXiv 2015

Abstract

Over the past few years, symmetric positive definite (SPD) matrices have been receiving considerable attention from the computer vision community. Though various distance measures have been proposed in the past for comparing SPD matrices, the two most widely-used measures are affine-invariant distance and log-Euclidean distance. This is because these two measures are true geodesic distances induced by Riemannian geometry. In this work, we focus on the log-Euclidean Riemannian geometry and propose a data-driven approach for learning Riemannian metrics/geodesic distances for SPD matrices. We show that the geodesic distance learned using the proposed approach performs better than various existing distance measures when evaluated on face matching and clustering tasks.

Introduction

In computer vision, data is frequently represented using Symmetric Positive Definite (SPD) matrices, such as covariance descriptors for textures or diffusion tensors in medical imaging. However, these matrices do not reside in a standard Euclidean space; instead, they form a curved Riemannian manifold.

Applying standard Euclidean distances, such as the Frobenius norm, to these matrices ignores the underlying geometry of the data. While fixed geodesic distances—like the Affine-Invariant or log-Euclidean distances—account for this curvature, they are "one-size-fits-all" metrics that do not adapt to the specific noise or patterns within a given dataset. This paper addresses the challenge of learning a custom Riemannian metric directly from data.

Methods

The proposed solution leverages the log-Euclidean framework to bridge the gap between Riemannian geometry and data-driven metric learning.

The Log-Euclidean Framework

The core insight is that the space of SPD matrices can be mapped to a flat vector space of symmetric matrices using the matrix logarithm. In this log-domain, the complex Riemannian geometry is simplified into Euclidean geometry. This allows for the use of established linear metric learning tools.

Mathematical definitions and properties of common SPD distance measures.

Metric Learning via ITML

The process involves three main steps:

  1. Log-Transformation: Compute the matrix logarithm of an $n \times n$ SPD matrix.
  2. Vectorization: Extract the unique upper-triangular elements into a vector of size $d = n(n+1)/2$.
  3. Information-Theoretic Metric Learning (ITML): Apply ITML to find a Mahalanobis distance matrix ($M$) that minimizes distances between similar pairs and maximizes distances between dissimilar pairs.

Because any Mahalanobis distance in this log-vector space corresponds to a valid Riemannian metric on the original manifold, the learned matrix $M$ defines a data-driven geodesic distance.

Experimental Results

The approach was evaluated on two primary tasks: face matching using the Labeled Faces in the Wild (LFW) dataset and object clustering using the ETH80 dataset.

Face Matching (LFW)

Using 9x9 covariance matrices to represent face regions, the proposed log-Euclidean metric learning achieved a significant performance boost. As shown in the results, the learned metric reached 69.37% accuracy, outperforming the fixed log-Euclidean distance (60.43%) and the Affine-Invariant distance (61.15%).

Comparison of face matching accuracy and ITML gain across different matrix representations.

Clustering (ETH80)

In semi-supervised clustering tasks on the ETH80 dataset, the learned metric achieved 73.79% accuracy, a substantial improvement over the 55.70% achieved by the standard log-Euclidean distance.

Discussion and Conclusion

The results demonstrate that the choice of domain is critical for metric learning. The "ITML gain"—the improvement observed after learning the metric—was consistently highest in the log-Euclidean domain compared to raw covariance or Cholesky-decomposed spaces. This suggests that the log transform effectively "unfolds" the manifold, making linear separators more powerful. While the method is highly effective for the tested matrix sizes, future work could explore the computational scaling for larger matrices and the application of this "map-to-flat" philosophy to other manifolds, such as Grassmannians.

Summary updated

BibTeX
@misc{vemulapalli2015riemannian,
  author = {Raviteja Vemulapalli and David W. Jacobs},
  title = {{Riemannian Metric Learning for Symmetric Positive Definite Matrices}},
  year = {2015},
  eprint = {1501.02393},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1501.02393},
}
Figure