Skip to main content
QUICK REVIEW

[Paper Review] Evaluation of Similarity-based Explanations

Kazuaki Hanawa, Sho Yokoi|arXiv (Cornell University)|Jun 8, 2020
Explainable Artificial Intelligence (XAI)Computer Science46 references17 citations
TL;DR

This paper evaluates relevance metrics for similarity-based explanations in machine learning, proposing three tests to assess their suitability. It finds that cosine similarity of gradients performs best, outperforming other metrics like L2 distance and dot product, and identifies specific metrics that fail due to sensitivity to feature scale or distribution.

ABSTRACT

Explaining the predictions made by complex machine learning models helps users to understand and accept the predicted outputs with confidence. One promising way is to use similarity-based explanation that provides similar instances as evidence to support model predictions. Several relevance metrics are used for this purpose. In this study, we investigated relevance metrics that can provide reasonable explanations to users. Specifically, we adopted three tests to evaluate whether the relevance metrics satisfy the minimal requirements for similarity-based explanation. Our experiments revealed that the cosine similarity of the gradients of the loss performs best, which would be a recommended choice in practice. In addition, we showed that some metrics perform poorly in our tests and analyzed the reasons of their failure. We expect our insights to help practitioners in selecting appropriate relevance metrics and also aid further researches for designing better relevance metrics for explanations.

Motivation & Objective

  • To identify which relevance metrics are appropriate for similarity-based explanations in machine learning.
  • To evaluate metrics based on minimal criteria that ensure meaningful and reliable explanations.
  • To guide practitioners in selecting robust metrics and inform future research on better explanation methods.
  • To analyze why certain metrics fail in specific evaluation scenarios, particularly under distributional shifts or class constraints.

Proposed method

  • Proposes three evaluation tests: model randomization, identical class, and identical subclass tests to assess relevance metrics.
  • Applies these tests across multiple datasets (CIFAR-10, AGNews) and models (CNN, LSTM) using various relevance metrics.
  • Uses gradient-based representations (e.g., last-layer activations, full-layer features) to compute similarity metrics.
  • Employs cosine similarity, L2 distance, and dot product over input features or hidden representations as core metrics.
  • Evaluates metrics by measuring their consistency in selecting relevant training instances under perturbed or randomized models.
  • Analyzes failure cases by examining metric sensitivity to feature norm and distributional shifts.

Experimental results

Research questions

  • RQ1Which relevance metric best satisfies minimal criteria for similarity-based explanation?
  • RQ2How do different metrics perform under model randomization, identical class, and identical subclass conditions?
  • RQ3Why do certain metrics fail in identifying relevant training instances despite correct model predictions?
  • RQ4What are the underlying causes of metric failure, particularly in relation to feature scale and distribution?
  • RQ5Can we identify a robust, general-purpose metric for similarity-based explanation across diverse models and datasets?

Key findings

  • Cosine similarity of gradients (denoted as $\cos^{\mathrm{grad}}$) performs best across all three evaluation tests, indicating it is the most reliable metric for similarity-based explanation.
  • The $\ell_2$ distance on input features ($\ell_2^x$) and dot product on last-layer features ($\mathrm{dot}^{\mathrm{last}}$) failed the model randomization test, indicating poor robustness.
  • Metrics like $\ell_2^{\mathrm{all}}$ and $\cos^{\mathrm{all}}$ showed moderate performance but failed the identical subclass test, suggesting sensitivity to feature distribution.
  • The influence function ($\mathrm{IF}$) and feature kernel ($\mathrm{FK}$) metrics selected non-typical instances due to high norm sensitivity, especially in gradient-based representations.
  • Metrics based on dot product of gradients ($\mathrm{dot}^{\mathrm{grad}}$) selected instances with large norms, leading to counterintuitive or irrelevant examples.
  • The study identifies that scale sensitivity and lack of invariance under model perturbations are key failure modes for several commonly used metrics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.