sbert-triplet-loss-euclidean-margin-1

IN premise — summaries/2026/08/24/reimers-2019-sentence-bert-s2-related-work.md

Created 2026-08-25T02:58:27+00:00

SBERT's triplet loss uses Euclidean distance with margin ε = 1: Loss = max(||s_a − s_p|| − ||s_a − s_n|| + 1, 0).

Summary

SBERT trains its sentence embeddings by pushing similar sentence pairs closer together and dissimilar pairs further apart, requiring a minimum gap of one unit (in vector space) between the "similar" and "dissimilar" distances before it stops applying a correction. This fixed margin of 1 is a hard design choice, so any downstream system that relies on SBERT's similarity scores inherits this specific scale and tolerance into how close "close enough" has to be.