cs.LGMar 27, 2026

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

Authors: Roberto Sprengel Minozzo Tomchak, Oge Marques, Lucas Garcia Pedroso, Luiz Eduardo Oliveira, Paulo Lisboa de Almeida

Organizations: Departamento de Informática, Universidade Federal do Paraná, Curitiba, Brazil · College of Engineering and Computer Science, Florida Atlantic University, Boca Raton, FL, U.S.A · Departamento de Matemática, Universidade Federal do Paraná, Curitiba, Brazil

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.

Figures & tables

Explore similar work

CardsList
  1. Task-Guided Multi-Annotation Triplet Learning for Remote Sensing Representations

    Apr 4, 2026Meilun Zhou, Alina ZareRepresentation LearningMulti-Task Learning

  2. Minor First, Major Last: A Depth-Induced Implicit Bias of Sharpness-Aware Minimization

    Mar 9, 2026Chaewon Moon, Dongkuk Si, Chulhee YunSharpness-Aware MinimizationImplicit Bias

  3. SMAT: Simple and Efficient Merge-Aware Training

    Sep 27, 2026Yanggan Gu, Yuanyi Wang, Zhen Li +5Language Model MergingModel Merging