Disentangling Visual Transformers: Patch-level Interpretability for Image Classification
Guillaume Jeanneret, Loïc Simon, Frédéric Jurie
TL;DR
The paper addresses the interpretability gap in Vision Transformers by introducing HiT, a Hindered Transformer that enforces patch-local information and disentangles patch contributions to enable CLS to be expressed as a linear sum of patch-level terms. By updating only the CLS token through multi-head attention while keeping image tokens processed by MLP, HiT yields intrinsic patch-level saliency without external tools, enabling CAM-like saliency maps and layer-wise attributions. Across six diverse datasets, HiT demonstrates superior interpretability (via insertion-deletion metrics) with a modest sacrifice in top-1 accuracy compared to non-interpretable ViTs, and provides thorough qualitative analyses, sanity checks, and ablations. The work highlights a practical, interpretable-by-design alternative for applications where transparency is critical, while acknowledging slower convergence and potential limitations in modeling complex spatial dependencies, pointing to future improvements in training efficiency and inter-token interactions.
Abstract
Visual transformers have achieved remarkable performance in image classification tasks, but this performance gain has come at the cost of interpretability. One of the main obstacles to the interpretation of transformers is the self-attention mechanism, which mixes visual information across the whole image in a complex way. In this paper, we propose Hindered Transformer (HiT), a novel interpretable by design architecture inspired by visual transformers. Our proposed architecture rethinks the design of transformers to better disentangle patch influences at the classification stage. Ultimately, HiT can be interpreted as a linear combination of patch-level information. We show that the advantages of our approach in terms of explicability come with a reasonable trade-off in performance, making it an attractive alternative for applications where interpretability is paramount.
