Memory Wrap: a Data-Efficient and Interpretable Extension to Image Classification Models

Biagio La Rosa, Roberto Capobianco, Daniele Nardi
6/1/2021
cs.LG
transformer-attention

Official code: KRLGroup/memory-wrap (5 stars, Python, MIT, last commit 2025-03-21).

Abstract

Due to their black-box and data-hungry nature, deep learning techniques are not yet widely adopted for real-world applications in critical domains, like healthcare and justice. This paper presents Memory Wrap, a plug-and-play extension to any image classification model.

Show full abstract

Memory Wrap improves both data-efficiency and model interpretability, adopting a content-attention mechanism between the input and some memories of past training samples. We show that Memory Wrap outperforms standard classifiers when it learns from a limited set of data, and it reaches comparable performance when it learns from the full dataset. We discuss how its structure and content-attention mechanisms make predictions interpretable, compared to standard classifiers. To this end, we both show a method to build explanations by examples and counterfactuals, based on the memory content, and how to exploit them to get insights about its decision process. We test our approach on image classification tasks using several architectures on three different datasets, namely CIFAR10, SVHN, and CINIC10.

View on arXivView PDF

Code Implementations(1)

MIT
57PythonAug 20, 20201 years agoMIT

Similar Papers

Cite this paper

@article{rosa2021memory,
  title  = {Memory Wrap: a Data-Efficient and Interpretable Extension to Image Classification Models},
  author = {Biagio La Rosa and Roberto Capobianco and Daniele Nardi},
  year   = {2021},
  eprint = {2106.01440},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.01440}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.01440.svg)](https://codeofpaper.com/paper/2106.01440)

Discussion