AI Glossary

Metric Learning

Learning a distance function that maps similar inputs close together and dissimilar inputs far apart.

Overview

Metric learning trains models to learn an embedding space where the distance between data points reflects their semantic similarity. Similar items are mapped close together, while dissimilar items are pushed apart. This is fundamental to tasks like face recognition, image retrieval, and recommendation systems.

Key Details

Popular approaches include Siamese networks (comparing pairs), triplet loss (anchor, positive, negative examples), and contrastive learning. The learned distance metrics enable few-shot classification, clustering, and nearest-neighbor search in the embedding space.

Related Concepts

contrastive learningembeddingscosine similarity

← Back to AI Glossary

Last updated: March 5, 2026