Escaping the curse of dimensionality in similarity learning: Efficient Frank-Wolfe algorithm and generalization bounds

Kuan Liu, Aurélien Bellet

Abstract

Similarity learning is fundamental to many machine learning tasks, yet high-dimensional data often renders traditional bilinear forms computationally intractable and prone to overfitting. We introduce High-Dimensional Similarity Learning (HDSL), a framework that leverages sparse rank-one parameterization and a Frank-Wolfe optimization strategy with away steps. HDSL provides theoretical generalization bounds independent of the input dimension $d$, allowing for efficient learning even in the presence of millions of features. Our results demonstrate state-of-the-art performance on diverse datasets, achieving extreme sparsity without sacrificing interpretability or accuracy.

Introduction

In machine learning, measuring the similarity between data points is a prerequisite for tasks like clustering, recommendation, and classification. Standard metric learning typically employs a bilinear form $x^T M x'$, where $M$ is a $d \times d$ matrix. However, for high-dimensional data where $d$ can reach $10^5$ or more, $M$ contains billions of parameters. This "curse of dimensionality" presents two primary challenges:

  1. Computational Constraints: Storing and optimizing such a large matrix exceeds the memory and processing capabilities of standard hardware.
  2. Generalization Issues: With a parameter count far exceeding the number of samples, models easily overfit to noise.

While techniques like PCA or random projections are often used to reduce dimensionality, they can obscure feature interpretability and destroy subtle signals. HDSL addresses these issues by learning a sparse representation directly in the high-dimensional space.

Methods

HDSL is built upon three core pillars designed to maintain efficiency and theoretical robustness.

Sparse Rank-One Parameterization

Instead of learning a full $d \times d$ matrix, HDSL represents $M$ as a convex combination of 4-sparse, rank-one basis matrices. These matrices capture interactions between specific pairs of features. This approach ensures that the model remains interpretable and computationally manageable.

Frank-Wolfe with Away Steps

The optimization is performed using a projection-free Frank-Wolfe algorithm. In each iteration, the algorithm greedily identifies the most informative feature pair to add to the model. To prevent the accumulation of redundant features and maintain sparsity, "away steps" are incorporated, allowing the algorithm to reduce the weight of or entirely remove previously selected features.

Algorithm 1: Away-step Frank-Wolfe (AFW) for HDSL optimization.

Computational Efficiency

To scale to millions of constraints, HDSL utilizes a mini-batch approach and a fast heuristic for finding optimal feature pairs. The training complexity is $O(Ms)$, where $s$ is the data sparsity, making the runtime independent of the total dimension $d$.

Results

The authors evaluated HDSL against synthetic and real-world datasets, including Dexter (20k features), Dorothea (100k features), and Reuters CV1.

Accuracy and Sparsity

HDSL consistently outperformed diagonal similarity and dimensionality reduction methods. On the Dexter dataset, HDSL achieved a 6.5% error rate, compared to 8.4% for the best competitor. Remarkably, the models remained extremely sparse; for a 20,000-dimensional dataset, HDSL required only ~700 non-zero entries to reach peak performance.

Scalability and Recovery

HDSL demonstrated superior scalability, completing training on the Dorothea dataset in under an hour, whereas competing greedy methods like COMET failed or took significantly longer. Furthermore, synthetic tests showed that HDSL could accurately recover the "ground truth" similarity matrix even under noisy supervision.

Discussion

A key insight of HDSL is that convergence and generalization depend on the sparsity of the solution rather than the input dimension. This makes early stopping a principled regularization technique. While HDSL currently focuses on global similarity measures and smoothed hinge loss, future work may extend the framework to local metrics and direct classification error optimization. The conditions for guaranteed recovery of sparse ground-truth similarities remain an intriguing open question for theoretical research.

Summary updated

BibTeX
@article{liu2019escaping,
  author = {Kuan Liu and Aurélien Bellet},
  title = {{Escaping the curse of dimensionality in similarity learning: Efficient Frank-Wolfe algorithm and generalization bounds}},
  journal = {Neurocomputing},
  year = {2019},
  doi = {10.1016/j.neucom.2018.12.060},
}
Figure