*Similarity learning* is the area of machine learning focusing on learning how similar or different two objects are.

Similarity learning is often used in areas of machine learning where there are not a fixed number of classes that objects fit into. Face verification is one example of such an area.

Learning-to-rank is another area of machine learning where the model needs to learn a similarity function between the pieces of data in the dataset.

Distance metric learning is related to similarity learning, but where the similarity function is also required to obey the four axioms of a distance metric. Outside of distance metric learning, similarity learning often learns a pseudometric, where not all four axioms of a distance metric are true.