# Deep Ranking with Adaptive Margin Triplet Loss

arXiv: https://arxiv.org/abs/2107.06187 · HTML: https://mlsanity.com/paper/2107.06187/

## Key facts

- Cited by 8 papers in the map (data through 14 Oct 2026).
- Builds on 12 of its 24 references that are in the map.
- First posted on arXiv 13 Jul 2021.

## Builds on (most cited first, 12 of 12)

- [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://mlsanity.com/paper/1409.1556/) (2014)
- [Rethinking the Inception Architecture for Computer Vision](https://mlsanity.com/paper/1512.00567/) (2015)
- [FaceNet: A Unified Embedding for Face Recognition and Clustering](https://mlsanity.com/paper/1503.03832/) (2015)
- [In Defense of the Triplet Loss for Person Re-Identification](https://mlsanity.com/paper/1703.07737/) (2017)
- [Deep metric learning using Triplet network](https://mlsanity.com/paper/1412.6622/) (2014)
- [Sampling Matters in Deep Embedding Learning](https://mlsanity.com/paper/1706.07567/) (2017)
- [Learning Fine-grained Image Similarity with Deep Ranking](https://mlsanity.com/paper/1404.4661/) (2014)
- [Photo Aesthetics Ranking Network with Attributes and Content Adaptation](https://mlsanity.com/paper/1606.01621/) (2016)
- [Deep Feature Learning with Relative Distance Comparison for Person Re-identification](https://mlsanity.com/paper/1512.03622/) (2015)
- [KonIQ-10k: Towards an ecologically valid and large-scale IQA database](https://mlsanity.com/paper/1803.08489/) (2018)
- [Will People Like Your Image? Learning the Aesthetic Space](https://mlsanity.com/paper/1611.05203/) (2016)
- [Fast Training of Triplet-based Deep Binary Embedding Networks](https://mlsanity.com/paper/1603.02844/) (2016)

## Built on by (most cited first, 8 of 8)

- [CoNT: Contrastive Neural Text Generation](https://mlsanity.com/paper/2205.14690/) (2022)
- [Structure-Aware 3D VR Sketch to 3D Shape Retrieval](https://mlsanity.com/paper/2209.09043/) (2022)
- [Content-Based Medical Image Retrieval with Opponent Class Adaptive Margin Loss](https://mlsanity.com/paper/2211.15371/) (2022)
- [Local Structure-aware Graph Contrastive Representation Learning](https://mlsanity.com/paper/2308.03271/) (2023)
- [Rewrite-to-Rank: Optimizing Ad Visibility via Retrieval-Aware Text Rewriting](https://mlsanity.com/paper/2507.21099/) (2025)
- [Adaptive Margin RLHF via Preference over Preferences](https://mlsanity.com/paper/2509.22851/) (2025)
- [Maintaining Difficulty: A Margin Scheduler for Triplet Loss in Siamese Networks Training](https://mlsanity.com/paper/2603.26389/) (2026)
- [From "What-If" to "What-Is": Counterfactual Thinking-Inspired Semantic Alignment for Visual Brain Decoding](https://mlsanity.com/paper/2608.15163/) (2026)

## Abstract (arXiv)

We propose a simple modification from a fixed margin triplet loss to an adaptive margin triplet loss. While the original triplet loss is used widely in classification problems such as face recognition, face re-identification and fine-grained similarity, our proposed loss is well suited for rating datasets in which the ratings are continuous values. In contrast to original triplet loss where we have to sample data carefully, in out method, we can generate triplets using the whole dataset, and the optimization can still converge without frequently running into a model collapsing issue. The adaptive margins only need to be computed once before the training, which is much less expensive than generating triplets after every epoch as in the fixed margin case. Besides substantially improved training stability (the proposed model never collapsed in our experiments compared to a couple of times that the training collapsed on existing triplet loss), we achieved slightly better performance than the original triplet loss on various rating datasets and network architectures.
