Explaining ViTs Using Information Flow

Chase Walker, Md Rubel Ahmed, Sumit Kumar Jha, Rickard Ewetz
Proceedings of The 28th International Conference on Artificial Intelligence and Statistics, PMLR 258:2440-2448, 2025.

Abstract

Computer vision models can be explained by attributing the output decision to the input pixels. While effective methods for explaining convolutional neural networks have been proposed, these methods often produce low-quality attributions when applied to vision transformers (ViTs). State-of-the-art methods for explaining ViTs capture the flow of patch information using transition matrices. However, we observe that transition matrices alone are not sufficiently expressive to accurately explain ViT models. In this paper, we define a theoretical approach to creating explanations for ViTs called InFlow. The framework models the patch-to-patch information flow using a combination of transition matrices and patch embeddings. Moreover, we define an algebra for updating the transition matrices of series connected components, diverging paths, and converging paths in the ViT model. This algebra allows the InFlow framework to produce high quality attributions which explain ViT decision making. In experimental evaluation on ImageNet, with three models, InFlow outperforms six ViT attribution methods in the standard insertion, deletion, SIC and AIC metrics by up to 18%. Qualitative results demonstrate InFlow produces more relevant and sharper explanations. Code is publicly available at \url{https://github.com/chasewalker26/InFlow-ViT-Explanation.}

Cite this Paper


BibTeX
@InProceedings{pmlr-v258-walker25a, title = {Explaining ViTs Using Information Flow}, author = {Walker, Chase and Ahmed, Md Rubel and Jha, Sumit Kumar and Ewetz, Rickard}, booktitle = {Proceedings of The 28th International Conference on Artificial Intelligence and Statistics}, pages = {2440--2448}, year = {2025}, editor = {Li, Yingzhen and Mandt, Stephan and Agrawal, Shipra and Khan, Emtiyaz}, volume = {258}, series = {Proceedings of Machine Learning Research}, month = {03--05 May}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v258/main/assets/walker25a/walker25a.pdf}, url = {https://proceedings.mlr.press/v258/walker25a.html}, abstract = {Computer vision models can be explained by attributing the output decision to the input pixels. While effective methods for explaining convolutional neural networks have been proposed, these methods often produce low-quality attributions when applied to vision transformers (ViTs). State-of-the-art methods for explaining ViTs capture the flow of patch information using transition matrices. However, we observe that transition matrices alone are not sufficiently expressive to accurately explain ViT models. In this paper, we define a theoretical approach to creating explanations for ViTs called InFlow. The framework models the patch-to-patch information flow using a combination of transition matrices and patch embeddings. Moreover, we define an algebra for updating the transition matrices of series connected components, diverging paths, and converging paths in the ViT model. This algebra allows the InFlow framework to produce high quality attributions which explain ViT decision making. In experimental evaluation on ImageNet, with three models, InFlow outperforms six ViT attribution methods in the standard insertion, deletion, SIC and AIC metrics by up to 18%. Qualitative results demonstrate InFlow produces more relevant and sharper explanations. Code is publicly available at \url{https://github.com/chasewalker26/InFlow-ViT-Explanation.}} }
Endnote
%0 Conference Paper %T Explaining ViTs Using Information Flow %A Chase Walker %A Md Rubel Ahmed %A Sumit Kumar Jha %A Rickard Ewetz %B Proceedings of The 28th International Conference on Artificial Intelligence and Statistics %C Proceedings of Machine Learning Research %D 2025 %E Yingzhen Li %E Stephan Mandt %E Shipra Agrawal %E Emtiyaz Khan %F pmlr-v258-walker25a %I PMLR %P 2440--2448 %U https://proceedings.mlr.press/v258/walker25a.html %V 258 %X Computer vision models can be explained by attributing the output decision to the input pixels. While effective methods for explaining convolutional neural networks have been proposed, these methods often produce low-quality attributions when applied to vision transformers (ViTs). State-of-the-art methods for explaining ViTs capture the flow of patch information using transition matrices. However, we observe that transition matrices alone are not sufficiently expressive to accurately explain ViT models. In this paper, we define a theoretical approach to creating explanations for ViTs called InFlow. The framework models the patch-to-patch information flow using a combination of transition matrices and patch embeddings. Moreover, we define an algebra for updating the transition matrices of series connected components, diverging paths, and converging paths in the ViT model. This algebra allows the InFlow framework to produce high quality attributions which explain ViT decision making. In experimental evaluation on ImageNet, with three models, InFlow outperforms six ViT attribution methods in the standard insertion, deletion, SIC and AIC metrics by up to 18%. Qualitative results demonstrate InFlow produces more relevant and sharper explanations. Code is publicly available at \url{https://github.com/chasewalker26/InFlow-ViT-Explanation.}
APA
Walker, C., Ahmed, M.R., Jha, S.K. & Ewetz, R.. (2025). Explaining ViTs Using Information Flow. Proceedings of The 28th International Conference on Artificial Intelligence and Statistics, in Proceedings of Machine Learning Research 258:2440-2448 Available from https://proceedings.mlr.press/v258/walker25a.html.

Related Material