Abstract
Traditional distance metric learning often relies on a single global Mahalanobis distance, which can be suboptimal for heterogeneous datasets where feature relevance varies locally. We propose Instance Specific Metric Subspace Learning (ISMETS), a Bayesian generative framework that learns a unique metric for every data point. By representing each instance's metric as a sparse combination of learned global metric bases, ISMETS facilitates both transductive and inductive inference. Experimental results across synthetic, UCI, and bioinformatic datasets demonstrate that ISMETS consistently outperforms state-of-the-art competitors, particularly in scenarios with limited labeled data.
Introduction
Many fundamental machine learning algorithms, such as k-Nearest Neighbors (k-NN), depend heavily on the choice of distance metric. While global Mahalanobis distance metrics are common, they assume a uniform feature importance across the entire input space. This "one-size-fits-all" approach fails when data is heterogeneous—where the distinguishing features for one subset of data may be irrelevant for another.
Existing instance-specific methods often struggle with two primary challenges: transduction and manual design. Many cannot generalize to unseen test points (transduction) or rely on fixed, hand-crafted basis metrics. ISMETS addresses these by learning a metric subspace directly from the data distribution within a probabilistic framework.
Methodology
ISMETS treats the metric for an instance $x$ as a weighted combination of $K$ latent global metric bases. This structure is formalized through a Probabilistic Graphical Model (PGM) that integrates metrics, bases, and classifiers as random variables.
The framework employs several key components:
- Generative Subspace: A global space spanned by $K$ learned bases. Each instance $x$ is assigned a latent allocation variable that determines its specific metric composition.
- Bayesian Inference: The model incorporates prior knowledge and manages uncertainty through a probabilistic approach.
- Variational Bayes (VB): To handle intractable posterior distributions, the authors utilize Variational Bayes for efficient parameter approximation.
- Inductive Capability: Unlike purely transductive models, ISMETS can infer the metric subspace for new, unseen instances by analyzing their relationship to the training distribution.
Key Insights and Visualization
A defining characteristic of ISMETS is its ability to adapt metrics to local data geometry, particularly near decision boundaries. This is visualized through synthetic datasets to show how the metric ellipsoids adapt to the data's manifold.
- Boundary Awareness: On synthetic "two-moon" data, metrics near the decision boundary become "sharper" (represented by elongated ellipsoids in the inverse metric space). This effectively increases the margin between classes where they are most likely to be confused.
- Metric Sparsity: Utilizing a Dirichlet prior for allocation variables encourages sparse combinations, ensuring that each instance relies on only a few relevant metric bases rather than a noisy mix.
- Simultaneous Optimization: The model learns metric bases, instance-specific weights, and classifier parameters concurrently, ensuring the learned distances are directly optimized for classification performance.
Experimental Results
The authors evaluated ISMETS against eight competitors, including LMNN and SCML, across synthetic data, eight UCI datasets, and four high-dimensional bioinformatic datasets.
- Performance: ISMETS significantly outperformed or matched state-of-the-art methods in 95% confidence t-tests. It showed particular strength in semi-supervised settings, maintaining high accuracy even when only 20% of labels were available.
- Robustness: The model's performance remained stable regardless of the number of metric bases ($K$) chosen, indicating low sensitivity to this hyperparameter.
- Efficiency: ISMETS demonstrated superior computational efficiency compared to other local metric learners, running significantly faster than ISD-L1 and mmLMNN on the mfeat-mor dataset.
Conclusion and Future Work
ISMETS provides a robust, inductive solution for instance-specific metric learning. While efficient, the $O(NKd^2)$ complexity of inductive inference suggests avenues for future optimization. Potential improvements include parallelizing the independent training of metric bases and exploring alternative forms of supervision beyond linear classifiers to further enhance the model's flexibility.
Summary updated