Bayesian Active Distance Metric Learning

Liu Yang, Rong Jin, Rahul SukthankarUAI 2007

Abstract

Distance metric learning is an important component for many tasks, such as statistical classification and content-based image retrieval. Existing approaches for learning distance metrics from pairwise constraints typically suffer from two major problems. First, most algorithms only offer point estimation of the distance metric and can therefore be unreliable when the number of training examples is small. Second, since these algorithms generally select their training examples at random, they can be inefficient if labeling effort is limited. This paper presents a Bayesian framework for distance metric learning that estimates a posterior distribution for the distance metric from labeled pairwise constraints. We describe an efficient algorithm based on the variational method for the proposed Bayesian approach. Furthermore, we apply the proposed Bayesian framework to active distance metric learning by selecting those unlabeled example pairs with the greatest uncertainty in relative distance. Experiments in classification demonstrate that the proposed framework achieves higher classification accuracy and identifies more informative training examples than the non-Bayesian approach and state-of-the-art distance metric learning algorithms.

Introduction

Distance Metric Learning (DML) is the process of teaching a system to measure similarity effectively. In applications like image retrieval or face recognition, the goal is to ensure that "similar" items are mathematically proximal while "dissimilar" items are distant. Standard DML algorithms, however, face significant hurdles. They often rely on point estimates that are sensitive to noise in small datasets and typically utilize random labeling strategies that are inefficient when human labeling effort is a limited resource.

Methodology

This paper introduces Bayesian Distance Metric Learning (BAYES). Rather than searching for a single optimal distance matrix, the framework treats the metric as a random variable and estimates its posterior distribution. To ensure computational feasibility, the authors employ two primary strategies:

  1. Eigen Approximation: The distance metric is modeled as a linear combination of the top eigenvectors of the data, significantly reducing the dimensionality of the search space.
  2. Variational Inference: A variational approach approximates the complex posterior distribution with a simpler Gaussian distribution, allowing for efficient updates via an Expectation-Maximization (EM) style algorithm.

Active Learning Strategy

The Bayesian framework naturally extends to active learning (BAYES+VAR). By utilizing the full posterior distribution—specifically the variance—the model identifies unlabeled pairs where it is most uncertain about similarity. Using a Laplacian approximation to calculate entropy, the system selects these high-uncertainty pairs for manual labeling, ensuring that each new data point provides maximal information to refine the model.

Experimental Results

The framework was evaluated on the COREL Image Database and the ISOLET spoken letter recognition dataset. The experiments compared the BAYES approach against Maximum Likelihood Estimation (MLE) and state-of-the-art methods like Neighborhood Component Analysis (NCA) and Large Margin Nearest Neighbor (LMNN).

Figure 1: Classification accuracy vs. number of iterations, showing the rapid performance gains of the BAYES+VAR approach compared to MLE-based active learning and random sampling.

Key findings include:

  • Robustness with Small Data: With only 10–30 training examples, BAYES consistently outperformed NCA and LMNN. On the COREL dataset, BAYES achieved approximately 64.6% accuracy compared to MLE's 59.6%.
  • Efficiency of Uncertainty: The active learning version (BAYES+VAR) reached high accuracy levels significantly faster than random sampling or active learning based solely on the mean metric.
Figure 2: Comparison of classification accuracy across iterations, highlighting the consistent superiority of the Bayesian framework in identifying informative training pairs.

Conclusion

The proposed Bayesian framework addresses the core limitations of traditional distance metric learning. By modeling uncertainty and employing an active selection strategy, the BAYES+VAR method achieves higher classification accuracy with fewer labeled examples. While the approach shows diminishing returns as the initial training set grows, its efficiency in low-data regimes makes it a powerful tool for real-world applications where labeling is expensive.

Summary updated

BibTeX
@inproceedings{yang2007bayesian,
  author = {Liu Yang and Rong Jin and Rahul Sukthankar},
  title = {{Bayesian Active Distance Metric Learning}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2007},
  url = {https://openreview.net/forum?id=LZKhlZv8oE},
}
Figure