Large scale representation learning from triplet comparisons

Siavash Haghiri, Leena Chennuru Vankadara, Ulrike von Luxburg

Abstract

The objective of ordinal embedding is to find a Euclidean representation of a set of abstract items, using only answers to triplet comparisons of the form "Is item $i$ closer to the item $j$ or item $k$? ". In recent years, numerous algorithms have been proposed to solve this problem. However, there does not exist a fair and thorough assessment of these embedding methods and therefore several key questions remain unanswered: Which algorithms perform better when the embedding dimension is constrained or few triplet comparisons are available? Which ones scale better with increasing sample size or dimension? In our paper, we address these questions and provide the first comprehensive and systematic empirical evaluation of existing algorithms as well as a new neural network approach. We find that simple, relatively unknown, non-convex methods consistently outperform all other algorithms, including elaborate approaches based on neural networks or landmark approaches. This finding can be explained by our insight that many of the non-convex optimization approaches do not suffer from local optima. Our comprehensive assessment is enabled by our unified library of popular embedding algorithms that leverages GPU resources and allows for fast and accurate embeddings of millions of data points.

Introduction

Ordinal Embedding (OE) is a representation learning task where the goal is to map items into a low-dimensional Euclidean space based solely on relative similarity constraints. These constraints typically take the form of triplets $(i, j, k)$, indicating that item $i$ is more similar to $j$ than to $k$. Despite a decade of research, the field has lacked a standardized benchmark to evaluate performance across different noise levels, dataset sizes, and dimensions. This work provides a systematic evaluation of existing methods and introduces a new neural network-based approach, OENN, supported by a new open-source GPU-accelerated library.

Methodology and the OENN Approach

The study categorizes OE algorithms into three primary families: Gram Matrix-based methods (e.g., GNMDS, CKL), Embedding-based methods (e.g., STE, SOE), and Landmark-based methods (e.g., LOE, LLOE). To facilitate large-scale comparison, the authors developed a GPU-supported library using PyTorch, enabling the processing of datasets with millions of points, such as the Forest Covertype dataset (581k points).

A key contribution is the Ordinal Embedding Neural Network (OENN). Unlike traditional methods that optimize coordinates directly, OENN uses a multi-layer feedforward network to learn the embedding function, taking binary-encoded indices as input to "memorize" the mapping.

The OENN architecture and its constituent Embedding Network.

Key Findings: The Power of Simplicity

The empirical evaluation across 15 diverse datasets yielded several surprising insights that challenge recent trends in the field.

The Superiority of SOE

Soft Ordinal Embedding (SOE), a relatively simple non-convex method using a hinge loss on distances, emerged as the clear winner. It consistently achieved the lowest test triplet error and best preserved local neighborhoods (kNN error) compared to more complex neural networks or landmark-based techniques.

Optimization Landscape and Local Optima

A major concern in non-convex OE is the risk of getting stuck in poor local optima. However, the authors found that simple methods like SOE and STE almost always find globally optimal solutions (near-zero training error) given sufficient time. This suggests that the optimization landscape for ordinal embedding is significantly more benign than previously assumed.

Scalability and Landmark Methods

While landmark-based methods like LLOE were specifically designed for massive scale, the study found they were often slower or less accurate than simply running SOE on a GPU. The results indicate that for many large-scale applications, simple embedding-based methods are preferable when hardware acceleration is available.

Table comparing landmark-based methods LLOE and LOE.

Conclusion

This comprehensive benchmark reveals that simple non-convex methods, particularly SOE, are remarkably effective for ordinal embedding. The development of a unified GPU library demonstrates that these methods can scale to millions of data points, often surpassing the performance of more intricate architectures. These findings provide a new foundation for future research in large-scale representation learning from relative comparisons.

Summary updated

BibTeX
@article{haghiri2023large,
  author = {Siavash Haghiri and Leena Chennuru Vankadara and Ulrike von Luxburg},
  title = {{Large scale representation learning from triplet comparisons}},
  journal = {J. Mach. Learn. Res.},
  year = {2023},
}
Figure