Supervised Metric Learning with Generalization Guarantees

Aurélien BelletarXiv 2013

Abstract

Metric learning is a critical component of modern machine learning, yet bridging the gap between empirical performance and theoretical generalization remains a significant challenge. This work introduces novel frameworks for learning custom distance metrics with rigorous mathematical guarantees. By leveraging the theory of $(\epsilon, \gamma, \tau)$-good similarity functions and algorithmic robustness, we present algorithms for both structured data (strings and trees) and feature vectors. Our contributions include the Good Edit Similarity Learning (GESL) algorithm and Similarity Learning for Linear Classification (SLLC). Experimental results demonstrate that these methods achieve high accuracy and extreme model sparsity while maintaining computational efficiency, providing a unified theoretical foundation for generalization in non-i.i.d. metric learning settings.

Introduction

In machine learning, the performance of algorithms such as $k$-nearest neighbors (k-NN) or Support Vector Machines (SVM) is heavily dependent on the chosen distance metric. Standard metrics like Euclidean or Levenshtein distance often fail to capture task-specific nuances. Metric learning addresses this by optimizing distance functions from labeled data. However, two primary hurdles persist: the disconnect between local metric optimization and global classification, and the difficulty of proving generalization on unseen data. The latter is particularly challenging because metric learning involves pairs or triplets of data, which violates the standard "independent and identically distributed" (i.i.d.) assumptions used in most statistical proofs.

Methodology

This research introduces several frameworks to address these challenges across different data types:

Structured Data Learning

For strings and trees, we propose a novel string kernel based on learned edit probabilities. Unlike traditional edit kernels, this formulation is parameter-free and guaranteed to be Positive Semi-Definite (PSD). Additionally, the Good Edit Similarity Learning (GESL) algorithm optimizes edit costs by relaxing the "goodness" criteria, replacing expensive iterative methods (like Expectation-Maximization) with efficient convex programming.

Similarity Learning for Linear Classification (SLLC)

For feature vectors, SLLC learns a bilinear similarity function. By optimizing a global criterion rather than millions of local pairs (as seen in methods like Large Margin Nearest Neighbor), SLLC is specifically tailored for linear classifiers. This approach significantly reduces the number of constraints, leading to faster training and sparser models.

Theoretical Framework: Algorithmic Robustness

To provide generalization guarantees for models using sparsity-inducing regularizers, we adapt the concept of algorithmic robustness to the metric learning setting. We prove that a weak notion of robustness is both a necessary and sufficient condition for a metric learning algorithm to generalize, offering a universal theoretical "safety check" for new algorithms.

Experimental Evaluation

The proposed methods were evaluated across a diverse range of benchmarks, including handwritten digits (NIST), natural language (Wiktionary), and standard UCI repository datasets.

Efficiency and Sparsity

SLLC proved to be several orders of magnitude faster than popular methods like LMNN due to its handling of fewer constraints. Furthermore, it achieved extreme sparsity; on the Breast Cancer and Ionosphere datasets, SLLC produced models that were 10 to 60 times sparser than those produced by standard SVMs or other metric learning methods, without sacrificing accuracy.

Accuracy on Structured Data

The GESL algorithm and the proposed string kernel consistently outperformed standard baselines. For example, on a Wiktionary dataset used to classify words as English or French, GESL achieved approximately 78% accuracy, compared to the 69% baseline of standard edit distance.

Key Insights and Conclusion

The core insights of this work revolve around the power of "goodness" in similarity functions and the fundamental role of robustness in generalization. We demonstrate that a similarity function does not need to be a formal metric (e.g., symmetric or PSD) to be effective for linear classification, provided it behaves well relative to a set of landmark points.

Future research will focus on extending these generalization guarantees to other tasks, such as regression and ranking, and exploring Information Geometry—specifically Bregman divergences—as a promising area to unify various distance measures under a single geometric framework.

Summary updated

BibTeX
@misc{bellet2013supervised,
  author = {Aurélien Bellet},
  title = {{Supervised Metric Learning with Generalization Guarantees}},
  year = {2013},
  eprint = {1307.4514},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1307.4514},
}
Figure