The authors propose a method to interpret Vision Transformers (ViT) by guiding gradient flow in the direction of attention, which they argue provides more comprehensive and detailed feature-region interpretation. They show that by leveraging the difference between how ViT and humans perceive images, they can alter an image's predicted class in ways nearly imperceptible to humans ("class rewriting"), raising potential security concerns. The paper combines gradient-based and attention-based interpretability to better understand ViT mechanisms.
Main takeaways:
- Standard gradient-based interpretation for Transformers can be improved by explicitly guiding gradients along attention directions.
- This attention-guided gradient method offers more detailed interpretation of which image regions contribute to predictions.
- The method reveals that ViT perceives images differently from humans, enabling "class rewriting" — changing the predicted class with imperceptible image modifications.
- Class rewriting poses potential security risks in deployment scenarios.
- The work aims to deepen understanding of Transformer mechanisms through the interaction of attention and gradient.