Deep Asymmetric Metric Learning via Rich Relationship Mining

Xinyi Xu, Yanhua Yang, Cheng Deng, Feng Zheng

Introduction

Metric learning aims to train neural networks to map images into an embedding space where semantically similar items are clustered together and dissimilar items are pushed apart. Traditionally, the field has been dominated by "hard data mining" strategies—algorithms that search for the most confusing pairs or triplets to optimize the model. However, this approach suffers from three critical flaws: overfitting to difficult cases, high computational complexity due to frequent preprocessing, and a rigid enforcement of global constraints that ignores the natural diversity within a single category.

To address these challenges, the authors propose DAMLRRM (Deep Asymmetric Metric Learning via Rich Relationship Mining). This framework moves away from the greedy search for hard negatives, instead focusing on mining richer data relationships through an asymmetric architecture and graph-based relationship relaxation.

The DAMLRRM Framework

1. Asymmetric Data Streams

DAMLRRM utilizes a two-stream architecture to diversify the relationships the model encounters during training.

  • The Neat Stream: This stream provides structured batches organized by category (e.g., multiple samples of the same bird species). It focuses on learning intra-class similarities and inter-class boundaries.
  • The Shuffled Stream: This stream provides randomly ordered images.
The DAMLRRM architecture featuring two shared streams: one organized by class and one randomly shuffled.

Because these streams have different structures and lengths, they "interlace" over multiple training iterations. This allows the model to compare the same image against a vast variety of different images over time, effectively mining "richer" relationships without requiring the massive batch sizes typical of state-of-the-art competitors.

2. MST-based Relationship Relaxation

Standard metric learning losses often try to force all positive pairs (images of the same class) to be equally close. This is often impossible for complex categories where members look very different (e.g., a front view vs. a side view of a car). DAMLRRM solves this by building a Minimum-Cost Spanning Tree (MST) for each class.

The transition from a fully connected undirected weighted graph to a Minimum-Cost Spanning Tree (MST) to relax positive constraints.

By using an MST, the model only enforces proximity between the most similar neighbors within a class. If Image A is similar to B, and B is similar to C, then A and C are considered "connected" even if they are visually distinct. This ensures a connected region in the embedding space for each category while respecting the natural manifold of the data, significantly boosting generalization.

Experimental Results

The model was evaluated on three standard fine-grained image retrieval benchmarks: CUB-200-2011 (birds), Cars196, and Stanford Online Products (SOP). DAMLRRM consistently outperformed eight major baselines, including Triplet Loss and Angular Loss.

  • CUB-200-2011: Achieved a Recall@1 of 55.1%, surpassing the previous best of 53.6%.
  • Cars196: Reached 73.5% Recall@1, a significant jump over the 71.3% baseline.
  • Efficiency: Most notably, DAMLRRM achieved these results using less than 10% of the sampling size required by competitors. On the CUB dataset, it reached higher accuracy with only 36,000 samples compared to the 700,000 required by the "Lifted Struct" method.

Conclusion and Future Work

DAMLRRM demonstrates that structuring the way data is presented is more effective than simply searching for "hard" samples. By acknowledging that data lives on complex manifolds and using graph-based relaxation, the framework achieves state-of-the-art performance with remarkable sampling efficiency. While the current implementation sees an increase in training time due to MST calculations, future work may explore more efficient graph structures or adversarial training to further enhance relationship mining.

Summary updated

BibTeX
@inproceedings{xu2019deep,
  author = {Xinyi Xu and Yanhua Yang and Cheng Deng and Feng Zheng},
  title = {{Deep Asymmetric Metric Learning via Rich Relationship Mining}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00420},
}
Figure