Abstract
Metric learning is fundamental to many machine learning tasks, yet triplet-based constraints often lead to prohibitive computational costs. This paper introduces MetricBoost, a novel boosting algorithm that learns a Mahalanobis distance metric by additively combining rank-one positive semi-definite (PSD) matrices. By employing a "bipartite strategy," MetricBoost decomposes complex triplet-based proximity constraints into efficient pairwise ones, allowing it to scale to large datasets. We demonstrate that MetricBoost achieves superior accuracy on standard benchmarks and significant speedups in large-scale medical imaging applications.
Introduction
In machine learning, the distance metric between data points significantly influences performance. While Euclidean distance is standard, it often fails to capture the underlying structure of complex data. Metric learning aims to learn a Mahalanobis distance, parameterized by a matrix $M$, that satisfies specific proximity constraints—typically expressed as triplets: "Object $i$ should be closer to $j$ than to $k$."
However, the $O(N^3)$ complexity of triplets makes traditional solvers for PSD matrices computationally expensive and difficult to scale. MetricBoost addresses these challenges by adapting the AdaBoost framework to iteratively build a high-rank metric from simple, rank-one components.
Methods
MetricBoost constructs the metric matrix $M$ through an additive process:
- Additive Construction: In each iteration, the algorithm finds a "weak" hypothesis—a rank-one PSD matrix $U_t = u_t u_t^T$—and adds it to the ensemble with a weight $\alpha_t$.
- Eigenvalue Optimization: Finding the optimal vector $u_t$ is reduced to an eigenvalue problem, specifically identifying the eigenvector corresponding to the largest absolute eigenvalue of a matrix derived from the current triplet distribution.
- Bipartite Strategy: To overcome the cubic complexity of triplets, MetricBoost refactors them into pairwise constraints when labels are available. By maintaining weights on pairs ($O(N^2)$) rather than triplets ($O(N^3)$), the algorithm achieves a massive reduction in memory and computation time.
- Weak Learner Variants: The framework supports both binary and continuous weak learners, providing flexibility for different classification and retrieval tasks.
Experimental Results
UCI Benchmarks
MetricBoost was evaluated against state-of-the-art methods, including ITML, BoostMetric, and COP, across six UCI datasets. As shown in the table below, MetricBoost variants consistently achieved top-tier accuracy.
A key finding was that binary weak models often outperformed normalized continuous models for k-NN classification, suggesting that relative proximity is more critical than exact distance values in these contexts.
k-NN Performance
The algorithm's effectiveness in k-NN classification is further illustrated by its performance across varying values of $k$. MetricBoost (the "Proposed" method) maintains a clear lead over baseline metrics.
Large-Scale Medical Applications
MetricBoost was also tested on a large-scale Diffuse Lung Disease dataset (22,923 samples). It achieved a nearly 10x speedup over the previous state-of-the-art, training in 22.1 seconds compared to 201.8 seconds for BoostMetric. In a colorectal polyp matching task, MetricBoost proved robust to significant anatomical deformations, outperforming traditional geodesic distance-based methods.
Conclusion
MetricBoost provides a scalable and accurate framework for triplet-based metric learning. By leveraging rank-one PSD matrices and a bipartite constraint decomposition, it bridges the gap between high-performance metric learning and large-scale real-world applications. Future work will explore optimal triplet selection and formal generalization bounds for this boosting structure.
Summary updated