Geometry Preserving Multi-task Metric Learning

Peipei Yang, Kaizhu Huang, Cheng-Lin Liu

Abstract

Metric learning is a critical component for distance-based classification, yet its performance is often constrained by the availability of labeled data. While multi-task learning (MTL) offers a path to mitigate data scarcity by sharing knowledge across related tasks, traditional regularization methods like the Frobenius norm often fail to preserve the essential geometric structure of the data. This paper introduces a novel multi-task metric learning framework that utilizes von Neumann divergence as a regularizer. By maintaining the structural properties of the distance matrices, the proposed method ensures that shared knowledge translates into consistent geometric arrangements. We demonstrate that this approach, termed mt-von, consistently outperforms existing methods across diverse datasets, particularly when training samples are sparse.

Introduction

Metric learning aims to find a distance function—typically a Mahalanobis distance—that brings similar data points closer together while pushing dissimilar points apart. This is the foundational mechanism for algorithms like k-Nearest Neighbors (k-NN). However, learning an effective metric requires significant labeled data, which is not always available.

Multi-task learning (MTL) addresses this by training multiple related tasks jointly, allowing them to "borrow" information from one another. Traditionally, MTL for metric learning has relied on the Frobenius norm to enforce similarity between task-specific metrics. However, the Frobenius norm treats matrices as flat vectors, ignoring their inherent geometric structure. This can lead to situations where two metrics are numerically "close" but produce vastly different data arrangements, hindering effective knowledge transfer.

Methodology: Beyond Vector-Based Similarity

The authors propose a framework that moves beyond simple vector-based similarity to preserve the underlying data geometry.

1. The Base: Large Margin Nearest Neighbor (LMNN)

The framework builds upon the Large Margin Nearest Neighbor (LMNN) algorithm. LMNN learns a metric by ensuring a "margin" between a point’s target neighbors and "imposers" (points with different labels that are too close).

The LMNN framework and the effect of regularization on metric learning.

2. The Regularizer: von Neumann Divergence

Instead of the Frobenius norm, the authors employ von Neumann divergence ($D_{vN}$), a type of Bregman matrix divergence. It is defined as: $$D_{vN}(A, B) = \text{tr}(A \log A - A \log B - A + B)$$ where $A$ represents the task-specific metric and $B$ is a common "global" metric. Unlike the Frobenius norm, $D_{vN}$ respects the positive semi-definite nature of distance matrices and aligns their "stretch" and "orientation."

3. Geometry Preserving Probability (PG)

A key theoretical contribution is the concept of Geometry Preserving Probability ($PG$). This metric quantifies the likelihood that two different distance functions will yield the same relative distance judgments for pairs of points, providing a formal link between matrix divergence and geometric consistency.

The "Aha" Moment: Why Geometry Matters

The central insight of the paper is that the Frobenius norm can be deceptive. As shown in the figure below, two metrics can have a small Frobenius distance even if one rotates or squashes the data in a way that destroys the cluster structure of the other.

Comparison of data geometry preservation across different metrics.

Von Neumann divergence is significantly more effective at keeping the geometric properties of the metrics aligned. The authors prove that minimizing $D_{vN}$ effectively bounds the KL-divergence between the directional scales of the metrics, ensuring that the "shape" of the data is preserved across tasks.

Experimental Results

The proposed mt-von algorithm was evaluated against several baselines, including single-task learning (stLMNN) and Frobenius-based multi-task learning (mt-Frob), across five real-world datasets:

  • Handwritten Letter Classification
  • USPS Digit Dataset
  • Isolet Speech Recognition
  • Insurance Company (CoIL) Benchmark
  • Multi-speaker Vowel Classification

Key Findings:

  • Consistent Superiority: The mt-von method consistently outperformed all baselines across every dataset.
  • Robustness to Small Data: The performance advantage was most pronounced when training data was scarce. By borrowing the correct geometry from related tasks, the model maintained high accuracy where single-task models failed.
  • Global Optimality: The optimization problem is jointly convex, ensuring that the algorithm reliably converges to a global optimum without getting stuck in local minima.

Conclusion

By shifting the focus from numerical matrix similarity to geometric preservation, this work provides a more robust foundation for multi-task metric learning. The use of von Neumann divergence allows for more meaningful knowledge propagation, particularly in data-poor regimes. Future work may explore extending these principles to non-linear or kernel-based metrics and optimizing the computational cost associated with matrix logarithms.

Summary updated

BibTeX
@inproceedings{yang2012geometry,
  author = {Peipei Yang and Kaizhu Huang and Cheng-Lin Liu},
  title = {{Geometry Preserving Multi-task Metric Learning}},
  booktitle = {ECML/PKDD},
  year = {2012},
  doi = {10.1007/978-3-642-33460-3\_47},
}
Figure