# Maintaining Difficulty: A Margin Scheduler for Triplet Loss in Siamese Networks Training

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

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 12 of its 18 references that are in the map.
- First posted on arXiv 27 Mar 2026.

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

- [ImageNet Large Scale Visual Recognition Challenge](https://mlsanity.com/paper/1409.0575/) (2014)
- [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://mlsanity.com/paper/1905.11946/) (2019)
- [FaceNet: A Unified Embedding for Face Recognition and Clustering](https://mlsanity.com/paper/1503.03832/) (2015)
- [AdaFace: Quality Adaptive Margin for Face Recognition](https://mlsanity.com/paper/2204.00964/) (2022)
- [Learning Fine-grained Image Similarity with Deep Ranking](https://mlsanity.com/paper/1404.4661/) (2014)
- [Smart Mining for Deep Metric Learning](https://mlsanity.com/paper/1704.01285/) (2017)
- [Self-restrained Triplet Loss for Accurate Masked Face Recognition](https://mlsanity.com/paper/2103.01716/) (2021)
- [A Theoretically Sound Upper Bound on the Triplet Loss for Improving the Efficiency of Deep Distance Metric Learning](https://mlsanity.com/paper/1904.08720/) (2019)
- [Learning Incremental Triplet Margin for Person Re-identification](https://mlsanity.com/paper/1812.06576/) (2018)
- [Deep Ranking with Adaptive Margin Triplet Loss](https://mlsanity.com/paper/2107.06187/) (2021)
- [Cross-Modal Subspace Learning with Scheduled Adaptive Margin Constraints](https://mlsanity.com/paper/1909.13733/) (2019)
- [Using Deep Neural Networks to Quantify Parking Dwell Time](https://mlsanity.com/paper/2411.00158/) (2024)

## Abstract (arXiv)

The Triplet Margin Ranking Loss is one of the most widely used loss functions in Siamese Networks for solving Distance Metric Learning (DML) problems. This loss function depends on a margin parameter μ, which defines the minimum distance that should separate positive and negative pairs during training. In this work, we show that, during training, the effective margin of many triplets often exceeds the predefined value of μ, provided that a sufficient number of triplets violating this margin is observed. This behavior indicates that fixing the margin throughout training may limit the learning process. Based on this observation, we propose a margin scheduler that adjusts the value of μ according to the proportion of easy triplets observed at each epoch, with the goal of maintaining training difficulty over time. We show that the proposed strategy leads to improved performance when compared to both a constant margin and a monotonically increasing margin scheme. Experimental results on four different datasets show consistent gains in verification performance.
