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

Roberto Sprengel Minozzo Tomchak, Oge Marques, Lucas Garcia Pedroso, Luiz Eduardo Oliveira, Paulo Lisboa de Almeida
3/27/2026
cs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{tomchak2026maintaining,
  title  = {Maintaining Difficulty: A Margin Scheduler for Triplet Loss in Siamese Networks Training},
  author = {Roberto Sprengel Minozzo Tomchak and Oge Marques and Lucas Garcia Pedroso and Luiz Eduardo Oliveira and Paulo Lisboa de Almeida},
  year   = {2026},
  eprint = {2603.26389},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.26389v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.26389.svg)](https://codeofpaper.com/paper/2603.26389)

Discussion