Metric Learning

Metric Learning refers to the set of ML techniques aiming to learn a measure of distance (and therefore similarity) between data points. E.g. in face recognition, one wants a model that identifies two distinct photos of the same person as being very close in a certain representation space, while keeping representations of photos of distinct people sufficiently apart. Typically metric learning is more about learning a representation where a known distance function (such as the euclidian distance) works for the intended purposes (e.g. the euclidian distance between representations of photos of the same person is small). These techniques are often referred to as "contrastive learning", since during training the (siamese network) model is fed pairs of datapoints with the same semantic content (positive label), or with different semantic content (negative label), and has to either classify them as labeled, or learn a representation that puts positive-labeled pairs closer together than negative-labeled pairs.
Related concepts:
Triplet Loss