# Do we need to know or verify properties of loss functions / metrics' implementations?

I will start with an example, in order to get to the general question.

I was reading the following paper (https://www.cns.nyu.edu/pub/lcv/wang03-preprint.pdf) about Structural Similarity Index (SSIM), which is a function used in computer vision. Basically, given two images, it returns (according to some criteria) "how similar" these images are.

But what strikes me is that, in the paper, the following is stated: "we also would like the similarity measure to satisfy the following conditions".

I'll explain these properties now, but my question is the following: why we would like a function to satisfy some properties? In other words, what I understand is that it is interesting to prove that these properties hold, am I right?

Some years ago, I used SSIM not only as a metric to measure the performance of some algorithms, but also as a loss function itself. However, I definitively did not know about these properties, so it could be the case that I was optimizing (or measuring my results) with an implementation of the function that does not hold these properties, is that so?

As for the properties, these are straightforward:

• Unique maximum: S(x, y) = 1 if and only if x = y
• Boundedness: S(x, y) ≤ 1
• Symmetry: S(x, y) = S(y, x)

So the problem of "proving" SSIM's properties is useful for me for to raise the next (more general) research question: do AI-developers usually now properties of their loss functions/metrics? Are these properties relevant (e.g., are there functions for critical tasks)? Are they already being verified?

• If the function doesn’t measure anything of interest, what’s the point? Why not just output $7$ every time?
– Dave
Commented Sep 19, 2022 at 16:32
• I mean, the function has its own shape (with several calculi on covariances etc), but they also mention those three properties over the specified function. This is what I wonder: why specify some properties over an already-described function? How relevant are them? Are the cases out there where these kind of properties not holding yield wrong optimizations/measurements? Commented Sep 19, 2022 at 16:36