I struggle to find any comprehensive explanations about Similarity Learning. From what I have gathered it is the same as Metric learning, except it attempts to learn a similarity function rather than a metric.
Can anyone please clarify the difference between them? Any links or sources would be greatly appreciated.
Thanks in advance.
For most (all?) purposes, metric learning is a subset of similarity learning. Note that, in common use, "similar" is roughly an inverse of "distance": things with a low distance between them have high similarity. In practice, this is usually a matter of semantic choice -- a continuous transformation can generally make the two isomorphic.
A metric needs to follow certain rules; a similarity function has looser standards. For instance, compare a full-length (say, 2 hours) movie M
with a 20-minute animated reduction A
. A metric function f
requires that f(M, A) = f(A, M)
. However, if you decide that the richness of the movie means that it shouldn't regard the cartoon as such close kin, you might input the pair of training triples
(A, M, 0.90)
(M, A, 0.15)
Another example would be with set similarity, measured by size and membership, but in a non-Euclidean fashion.
a = {1, 2, 3, 4}
b = {3, 4, 5, 6}
c = {5, 6, 7, 8}
A similarity training would allow
(a, b, 2)
(b, c, 2)
(a, c, 10)
In this "world", a
and c
suffer a large penalty because they have nothing in common but set size. b
is close to each of them due to having half the elements in common. This would give a metric function a headache, since it severely violates subaddition
, the triangle inequality.
Does that help clear up the differences?