arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.06534cs.CVcs.AIcs.LGcs.NE
收藏

通过反演理解基于Transformer的视觉模型

Understanding Transformer-Based Vision Models via Modular Feature Inversion

Jan Rathjens, Shirin Reyhanian, David Kappel, Laurenz Wiskott

AI总结:

本文提出一种高效的模块化特征反演方法,应用于Detection Transformer和Vision Transformer等大规模模型,通过定性和定量分析揭示了这些模型编码上下文形状、图像细节、层间相关性及对颜色扰动鲁棒性的内部机制。

摘要:

理解深度神经网络背后的机制仍然是机器学习和计算机视觉领域的一项基本挑战。一种有前景但仅得到初步探索的方法是特征反演,该方法试图使用训练好的逆向神经网络从中间表示中重建图像。在本研究中,我们重新审视特征反演,引入了一种新颖的模块化变体,使得该技术的应用显著更高效。我们展示了如何将我们的方法系统地应用于大规模基于Transformer的视觉模型Detection Transformer和Vision Transformer,以及如何以有意义的方式定性解释重建的图像。我们进一步定量评估了我们的方法,从而揭示了这两种Transformer架构中出现的表示图像特征的潜在机制。我们的分析提供了关于这些模型如何编码上下文形状和图像细节、它们的各层如何相关以及它们对颜色扰动的鲁棒性的关键见解。这些发现有助于更深入地理解基于Transformer的视觉模型及其内部表示。用于复现我们实验的代码可在github.com/wiskott-lab/inverse-tvm获取。

英文摘要:

Understanding the internal mechanisms of deep neural networks remains a central challenge in machine learning. In computer vision, one promising yet only preliminarily explored approach is feature inversion via inverse networks, which reconstructs images from intermediate representations using trained inverse networks. In this study, we revisit feature inversion via inverse networks, introducing a novel, modular variant that enables a computationally more efficient application of the technique while, in some cases, producing semantically more coherent image reconstructions. We apply our method to large-scale transformer-based vision models, specifically Detection Transformer, Vision Transformer, Swin Transformer, and Data-Efficient Image Transformer, analyzing the resulting reconstructions across network depth. Our main analysis compares Detection Transformer and Vision Transformer, which exhibit the most informative differences among the evaluated architectures. At the same time, results for Swin Transformer and Data-Efficient Image Transformer support the broader applicability of our framework. Our findings reveal gradual representational changes across transformer layers as a shared characteristic of Detection Transformer and Vision Transformer, as well as systematic differences in how they preserve contextual shape and fine-grained image details, and in their robustness to color perturbations. These findings deepen understanding of transformer-based vision models and demonstrate the utility of modular feature inversion as an interpretability tool.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑