I was wondering if machine learning algorithms (CNNs?) can be used/trained to differentiate between small differences in details between images (such as slight differences in shades of red or other colours, or the presence of small objects between otherwise very similar images?)? And then classify images based on these differences? If this is a difficult endeavour with our current machine learning algorithms, how can it be solved? Would using more data (more images) help?

I would also appreciate it if people could please provide references to research that has focused on this, if possible.

I've only just begun learning machine learning, and this is something that I've been wondering from my research.


2 Answers 2


Attentive Recurrent Comparators (2017) by Pranav Shyam et al. is an interesting paper that helps to answer the question you're wondering, along with a blog post that helps to describe it in easier terms.

The way it's implemented is actually rather intuitive. If you have ever played a "what is different" game with two images usually what you'd do is look back and forth between the images to see what the difference is. The network that the researchers created does just that! It looks at one image and then remembers important features about that images and looks at the other image and goes back and forth.


It exists networks built to learn how to differentiate between classes even if there are looking quite the same. Usually, a triplet loss is used in those networks to learn the difference between the target, a positive sample, and a negative one.

For example, those networks are used to perform identity check with face images, the algorithm learns the differences between different people instead of recognizing people.

Here are some keywords that are possibly relevant: discriminative function, triplet loss, siamese network, one-shot learning.

Theses papers are interesting:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .