Positive Semidefinite Metric Learning Using Boosting-like Algorithms

Chunhua Shen, Junae Kim, Lei Wang, Anton van den Hengel

TL;DR

This paper introduces BoostMetric, an efficient and scalable algorithm for learning quadratic Mahalanobis distance metrics without relying on computationally heavy semidefinite programming. By showing that any positive semidefinite (p.s.d.) matrix can be decomposed into a linear combination of rank-one, trace-one matrices, the authors adapt traditional boosting to use these simple matrices as "weak learners." The resulting framework eliminates the need for full eigen-decompositions, offering significant speedups and state-of-the-art accuracy on high-dimensional datasets.

What Problem Does This Paper Address?

Many core machine learning algorithms—such as $k$-nearest neighbors ($k\text{NN}$), $k$-means clustering, and kernel regression—rely heavily on a distance metric to measure similarity between data points. While standard Euclidean distance is a common default, it treats all features equally, ignoring the underlying structure of the data. Learning a custom Mahalanobis distance metric from training data can drastically improve performance.

To ensure that a Mahalanobis distance is mathematically valid, its parameter matrix $X$ must be positive semidefinite (p.s.d.). Enforcing this p.s.d. constraint is typically done using Semidefinite Programming (SDP) or iterative projections that require a full eigen-decomposition at every step. These standard approaches suffer from poor scalability, scaling at $O(D^3)$ to $O(D^{6.5})$ where $D$ is the feature dimensionality. This makes metric learning prohibitive for high-dimensional real-world problems like image classification and face recognition.

Methods

The authors introduce BoostMetric, which reframes metric learning as an ensemble learning problem. The key insight relies on a mathematical theorem: any bounded p.s.d. matrix can be represented as a linear combination of trace-one, rank-one matrices.

BoostMetric capitalizes on this by treating these rank-one matrices as weak learners in a boosting framework, analogous to how AdaBoost uses weak classifiers to build a strong classifier.

Key Algorithmic Features:

  • Leading Eigenvector Updates: Instead of performing a full eigen-decomposition ($O(D^3)$) to project matrices back into the p.s.d. cone, BoostMetric only needs to find the largest eigenvalue and its corresponding eigenvector at each iteration. This reduces the core computational complexity to $O(D^2)$.
  • Smooth Loss Functions: The algorithm optimizes proximity constraints (triplets specifying that point $a_i$ should be closer to $a_j$ than to $a_k$) using smooth convex loss functions, specifically exponential loss (BoostMetric-E) and logistic loss (BoostMetric-L).
  • Optimization Strategies: The paper introduces both a stage-wise version (one-at-a-time coordinate descent) and a totally-corrective version (updating all weak learner weights simultaneously using the L-BFGS-B gradient solver).
  • Multi-pass Learning: An iterative refinement strategy that updates the training triplets dynamically as the metric space deforms across multiple training passes.

Datasets

The authors evaluated BoostMetric across a wide range of standard benchmarks and computer vision tasks:

  • Standard Benchmarks: MNIST, USPS, Letters, yFaces, Balance Scale (bal), Wine, and Iris.
  • Visual Object Categorization: Caltech-101 (specifically Motorbikes vs. Airplanes and Faces vs. Background-Google) and the MSRC dataset.
  • Unconstrained Face Recognition: The Labeled Faces in the Wild (LFW) dataset, evaluating pair-matching accuracy.

No new datasets were introduced in this paper.

Key Insights and Ideas

  • Matrices as Ensembles: The ultimate "aha moment" of the paper is realizing that a complex p.s.d. matrix can be viewed exactly like a boosting ensemble. A matrix is simply a collection of rank-one projections added together with positive weights.
  • Rank-One is Enough: You do not need to update the entire matrix structure at once. Finding just the single most dominant direction of variation (the leading eigenvector) at each step is sufficient to make global progress toward the optimal metric.
  • Parameter-Free Robustness: Much like AdaBoost, the stage-wise version of BoostMetric is practically parameter-free. The regularization parameter $v$ has an incredibly wide margin of tolerance; as long as it is sufficiently small, it does not impact final classification performance.

Key Results

BoostMetric consistently outperformed or matched state-of-the-art metric learning methods like Large Margin Nearest Neighbor (LMNN) and Information Theoretic Metric Learning (ITML).

  • Accuracy: On the yFaces dataset, BoostMetric-E achieved a classification error rate of 6.91%, drastically outperforming LMNN (14.75%) and ITML (19.39%). On the LFW face recognition dataset, BoostMetric achieved 83.81% accuracy using a single SIFT descriptor, outperforming competing single-descriptor methods like LDML (83.2%).
  • Computational Speedups: The computational advantage becomes stark as dimensionality increases. In controlled experiments scaling input dimensions from 50 to 1000, BoostMetric's runtime grew modestly, while LMNN's runtime exploded due to the cost of full eigen-decompositions (see Figure 2 in the paper). On the MSRC dataset, BoostMetric cut training time down to 3.98 hours compared to LMNN's 8.06 hours.

Limitations and Future Work

  • Theoretical Convergence Rates: While the authors prove that the totally-corrective version of BoostMetric strictly minimizes the objective function at each iteration and converges globally, the exact rate of convergence remains theoretically unproven.
  • Future Directions: The authors point out several promising avenues for extending this framework:
  • Integrating online learning so BoostMetric can handle streaming data and scale to massive datasets.
  • Extending the algorithm to semi-supervised and multi-task learning settings.
  • Moving from a single global metric to learning multiple local metrics to better capture complex, non-linear data manifolds.

Summary updated

BibTeX
@article{shen2012positive,
  author = {Chunhua Shen and Junae Kim and Lei Wang and Anton van den Hengel},
  title = {{Positive Semidefinite Metric Learning Using Boosting-like Algorithms}},
  journal = {J. Mach. Learn. Res.},
  year = {2012},
}
Figure