Geometry-aware metric learning

Zhengdong Lu, Prateek Jain, Inderjit S. Dhillon

Introduction

In machine learning, defining "distance" is critical. Whether classifying images or clustering documents, an algorithm needs a robust way to measure how similar two points are. Historically, researchers have taken two divergent paths:

  1. Task-dependent learning: Utilizing labels (e.g., "these two points are similar") to warp the space and satisfy constraints. However, this often ignores the underlying structure of the unlabeled data.
  2. Data-dependent learning: Analyzing the "manifold" (the low-dimensional surface the data sits on) to define similarity. This excels in unsupervised learning but struggles to incorporate specific task labels.

Most real-world data is high-volume but low-supervision. There is a pressing need to use sparse labels while respecting the geometric structure of massive amounts of unlabeled data. Furthermore, existing "joint" methods often rely on Semi-Definite Programming (SDP), which is notoriously slow and scales poorly. To address this, researchers introduced Geometry-aware Metric Learning (G-ML), a framework that simultaneously learns a task-specific distance metric and respects the intrinsic "shape" of the data.

The G-ML Framework

The core of G-ML is a joint optimization problem designed to bridge the gap between labels and geometry. The goal is to learn two distinct kernels:

  • $K$: A task-dependent kernel that satisfies pairwise similarity and dissimilarity constraints.
  • $M$: A data-dependent kernel that captures the intrinsic geometry, often using the eigenvectors of a graph Laplacian.
Conceptual diagram of task-dependent and data-dependent kernels

The authors use the LogDet divergence ($D_{\ell d}$) as a distance measure to keep $K$ and $M$ "close" to each other. The objective function minimizes this divergence subject to task constraints on $K$ and geometric constraints on $M$.

While the problem isn't jointly convex, it is convex in $K$ and $M^{-1}$ individually. This allows for an efficient alternating minimization algorithm:

  1. Fix $M$ and update $K$ using a fast cyclic projection method (similar to Information-Theoretic Metric Learning, or ITML).
  2. Fix $K$ and update the parameters of $M$ (like the eigenvalues of the spectral kernel) to better match $K$.

This alternating approach avoids the heavy computational lifting of SDP, making it significantly faster and more scalable.

Experimental Results

G-ML was evaluated across several domains, including standard UCI datasets for supervised classification, text and digit datasets for semi-supervised classification, and image datasets for manifold alignment.

Test error over iterations for Iris, Wine, Ionosphere, and Scale datasets

Key findings include: * Accuracy & Efficiency: On semi-supervised digit and text classification, G-ML consistently performed as well as or better than state-of-the-art methods like non-parametric spectral kernels. The algorithm typically converges in just a few iterations, making it viable for datasets where older metric learning methods stall. * Automatic Model Selection: In supervised settings (like the UCI datasets shown above), G-ML can automatically tune hyperparameters (e.g., the width of an RBF kernel) more efficiently than traditional cross-validation. * Manifold Alignment: G-ML successfully aligned manifolds of different people's faces based on illumination (Yale Face B dataset). It achieved a recall of 0.47 in retrieving images with similar lighting angles, significantly beating ITML (0.24) and Diffusion Kernels (0.23). * Geometry as a Regularizer: By forcing the task-specific kernel $K$ to remain near a manifold-aware kernel $M$, the model is naturally regularized and less likely to overfit to a small number of labels.

Limitations and Future Directions

While G-ML reduces the need for extensive tuning, users still need to select certain hyperparameters, such as the number of eigenvectors ($r$) and the initial graph parameters. Additionally, like all manifold methods, performance is heavily tied to the quality of the initial k-NN graph; if the graph fails to capture the true manifold, the "geometry-aware" aspect of the model will struggle. Finally, while the paper provides a theoretical framework for extending the kernel to unseen samples (out-of-sample extension), the experimental focus remains primarily on the transductive setting.

Summary updated

BibTeX
@inproceedings{lu2009geometry,
  author = {Zhengdong Lu and Prateek Jain and Inderjit S. Dhillon},
  title = {{Geometry-aware metric learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2009},
  doi = {10.1145/1553374.1553461},
}
Figure