What is the purpose of the margin parameter in contrastive and triplet losses?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
Overview: Explain what the margin parameter does in contrastive and triplet losses for metric learning. Tests understanding of trivial and collapsed solutions, which pairs and triplets produce gradients, hard and semi-hard negatives, embedding normalization, and the effects of a margin that is too small or too large.