RELAX: Representation Learning Explainability

Kristoffer K. Wickstrøm1, Daniel J. Trosten1, Sigurd Løkse1, Ahcène Boubekki1, Karl Øyvind Mikalsen1, Michael C. Kampffmeyer1, Robert Jenssen1

1 UiT The Arctic University of Norway

International Journal of Computer Vision (2023)

Abstract

Despite the significant improvements that representation learning via self-supervision has led to when learning from unlabeled data, no methods exist that explain what influences the learned representation. We address this need through our proposed approach, RELAX, which is the first approach for attribution-based explanations of representations. Our approach can also model the uncertainty in its explanations, which is essential to produce trustworthy explanations. RELAX explains representations by measuring similarities in the representation space between an input and masked out versions of itself, providing intuitive explanations and significantly outperforming the gradient-based baseline. We provide theoretical interpretations of RELAX and conduct a novel analysis of feature extractors trained using supervised and unsupervised learning, providing insights into different learning strategies. Finally, we illustrate the usability of RELAX in multi-view clustering and highlight that incorporating uncertainty can be essential for providing low-complexity explanations, taking a crucial step towards explaining representations.

Method

RELAX masks out parts of the input and measures how similar the representation of the masked input is to the representation of the original input. Image regions where masking barely changes the similarity receive low importance, while regions where masking strongly decreases the similarity receive high importance. The importance is estimated online over thousands of random masks as a weighted running mean of the per-mask similarity scores.

The RELAX framework.

Paper

RELAX: Representation Learning Explainability
Kristoffer K. Wickstrøm, Daniel J. Trosten, Sigurd Løkse, Ahcène Boubekki, Karl Øyvind Mikalsen, Michael C. Kampffmeyer, Robert Jenssen.
International Journal of Computer Vision, 2023.

[journal] [arXiv]

Code

The implementation is available as the relax-xai package:

pip install relax-xai

Source code: [GitHub]

BibTeX

@article{wickstrom2023relax,
  author  = {Wickstr\o{}m, Kristoffer K. and Trosten, Daniel J. and L\o{}kse, Sigurd and Boubekki, Ahc\`{e}ne and Mikalsen, Karl \o{}yvind and Kampffmeyer, Michael C. and Jenssen, Robert},
  title   = {RELAX: Representation Learning Explainability},
  journal = {International Journal of Computer Vision},
  year    = {2023},
  volume  = {131},
  number  = {6},
  pages   = {1584--1610},
  doi     = {https://doi.org/10.1007/s11263-023-01773-2}
}