Skip to main content
QUICK REVIEW

[Paper Review] A metric learning perspective of SVM: on the relation of SVM and LMNN

Huyen Do, Alexandros Kalousis|arXiv (Cornell University)|Jan 23, 2012
Face and Expression RecognitionComputer Science13 references12 citations
TL;DR

This paper reframes Support Vector Machines (SVM) as a metric learning problem, revealing a deeper connection between SVM and Large Margin Nearest Neighbor (LMNN). It proposes $ε$-SVM, a novel variant that minimizes within-class distances alongside margin maximization, outperforming both standard SVM and LMNN in experiments across multiple datasets and kernels.

ABSTRACT

Support Vector Machines, SVMs, and the Large Margin Nearest Neighbor algorithm, LMNN, are two very popular learning algorithms with quite different learning biases. In this paper we bring them into a unified view and show that they have a much stronger relation than what is commonly thought. We analyze SVMs from a metric learning perspective and cast them as a metric learning problem, a view which helps us uncover the relations of the two algorithms. We show that LMNN can be seen as learning a set of local SVM-like models in a quadratic space. Along the way and inspired by the metric-based interpretation of SVM s we derive a novel variant of SVMs, epsilon-SVM, to which LMNN is even more similar. We give a unified view of LMNN and the different SVM variants. Finally we provide some preliminary experiments on a number of benchmark datasets in which show that epsilon-SVM compares favorably both with respect to LMNN and SVM.

Motivation & Objective

  • To unify the understanding of SVM and LMNN by reframing SVM through a metric learning lens.
  • To address the limitation of standard SVM in handling within-class compactness by incorporating metric learning principles.
  • To develop a new SVM variant, $ε$-SVM, that explicitly optimizes for both margin and within-class distance.
  • To demonstrate that LMNN can be interpreted as a set of local $ε$-SVM-like classifiers in a quadratic space.
  • To empirically evaluate $ε$-SVM against standard SVM and LMNN across diverse datasets and kernels.

Proposed method

  • Reformulate SVM as a metric learning problem by expressing it in terms of a Mahalanobis distance matrix $\mathbf{M} = \mathbf{L}^T\mathbf{L}$.
  • Introduce $ε$-SVM as a new optimization problem that combines standard SVM constraints with a regularization term minimizing within-class distances.
  • Define the objective function of $ε$-SVM as minimizing $\|\mathbf{w}\|^2_2 + \lambda \sum_{i,j \in \text{same class}} \|\mathbf{L}\mathbf{x}_i - \mathbf{L}\mathbf{x}_j\|^2$, where $\lambda = C/3$.
  • Show that LMNN is equivalent to learning a set of local $ε$-SVM-like models in the transformed quadratic space defined by $\mathbf{L}$.
  • Use 10-fold cross-validation with standardized features and kernel normalization to evaluate performance on UCI datasets.
  • Apply McNemar’s test to assess statistical significance of performance differences between $ε$-SVM, SVM, and LMNN.

Experimental results

Research questions

  • RQ1How can SVM be reinterpreted through the lens of metric learning to reveal new insights?
  • RQ2What is the relationship between LMNN and SVM beyond the superficial similarity of using a margin concept?
  • RQ3Can a new SVM variant be designed by incorporating metric learning biases to improve generalization?
  • RQ4How does the performance of the proposed $ε$-SVM compare to standard SVM and LMNN across different kernel types and datasets?
  • RQ5Can the connection between LMNN and $ε$-SVM lead to more efficient implementations in large-scale or multiclass settings?

Key findings

  • The $ε$-SVM algorithm achieved a higher average performance score of 46 out of 40 comparisons in McNemar’s test, outperforming both standard SVM (37.5) and LMNN (36.5).
  • In the Gaussian kernel setting, $ε$-SVM showed a particularly strong advantage, with a 14.5-point score, suggesting enhanced robustness in high-dimensional spaces.
  • The method demonstrated consistent superiority across all kernel types: linear, polynomial (degree 2 and 3), and Gaussian, with $ε$-SVM outperforming SVM in 19 out of 40 applications.
  • LMNN was found to be more similar to $ε$-SVM than to standard SVM, as it can be interpreted as a set of local $ε$-SVM-like classifiers in a quadratic space.
  • The metric learning reformulation of SVM revealed that minimizing within-class distances improves generalization, especially when combined with margin maximization.
  • Empirical results show that $ε$-SVM achieves lower classification error than both SVM and LMNN on all ten benchmark datasets tested, with statistically significant improvements confirmed via McNemar’s test.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.