Quality of Explanations in Contrastive Learning

November 26, 2024   
Keywords: deep learning, machine learning, trustworthy AI, explainable AI, contrastive learning
Prerequisites: deep learning, trustworthy and explainable AI (for MSc), unsupervised deep learning (for MSc)
Difficulty: Medium (B.Sc.)
Group work (only for B.Sc.): possible

Abstract

Contrastive Learning (CL) is a learning paradigm whereas a model is trained to project similar inputs close to each other and dissimilar inputs far from each other in a latent space. Normally, CL is an unsupervised learning technique used as representation learning; however, it can be modified or combined with other losses to perform supervised tasks. The nice advantage of using CL for supervised learning is that the pre-output layer clusters together items from the same class, making them more distant w.r.t. items from other classes, which is something that does not normally happen with the cross-entropy loss.

Triplet loss vs. cross-entropy loss. Cross Entropy is projecting clusters close to each other, while triplet loss ensures that points from different clusters will be further apart from each other than points from same clusters. Behavior of the triplet loss (inspired by CL) vs. regular cross-entropy loss. Image from this article.

The goal of this project is to study whether this advantage translates into higher quality explanations, especially for what concerns the contrastivity or discriminativeness axis. Explorations in other areas of trustworthy AI are also welcome.

An image containing cat and dog showcasing the saliency map of for the two classes. The “dog” saliency map is clustered around the dog’s face, while the “cat” saliency map highlights mainly the body of the cat. Example of a saliency map generated by GradCAM for the class “cat” and “dog”.

Required work

  • identify the task (data + model + loss) to work on, train a model
  • identify techniques for XAI (suggested, saliency maps)
  • run analysis on quality of explanations
  • analyze data

Relevant literature