atlas

Research map / Architectures and efficiency / Attention and transformers

Transformer Doctor: Diagnosing and Treating Vision Transformers

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Efficient and robust vision transformers · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Transformer Doctor, which diagnoses conjunction errors in Vision Transformers' inter-token (MHSA) and intra-token (FFN) information integration and treats them with heuristic dynamic and rule-based static integration constraint losses applied to already-trained models.

Problem

Vision Transformers are hard to interpret, and their internal error mechanisms are poorly understood; existing interpretability work focuses on token importance, modules, and features rather than how errors arise internally.

Approach

Inspired by biological conjunction errors, it hypothesizes that Transformers dynamically integrate information among tokens in MHSA in deep layers and statically integrate class information within tokens in FFN, and that integrating wrong information causes mispredictions; it then adds gradient-weighted loss terms (IDI, ISI) that suppress background integration and wrong-class integration during f

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add Transformer Doctor's dynamic and static integration constraintsViT-Tiny · ImageNet-1Kaccuracy: 64.77 -> 68.86Helped
Add Transformer Doctor's dynamic and static integration constraintsEva-Tiny · CIFAR-10accuracy: 87.56 -> 88.28Helped
Add Transformer Doctor's static integration constraintEva-Tiny · CIFAR-100accuracy: 64.15 -> 64.99Helped
Add Transformer Doctor's dynamic and static integration constraintsPVT-Tiny · ImageNet-10accuracy: 82.00 -> 84.20Helped
Add Transformer Doctor's dynamic and static integration constraintsPVT-Tiny · ImageNet-50accuracy: 71.81 -> 74.53Helped
Add Transformer Doctor's dynamic and static integration constraintsEva-Tiny · ImageNet-1Kaccuracy: 72.51 -> 75.45Helped
Set static integration threshold τ to 0.2 (ablation)ViT-Tiny + ISI · ImageNet-10accuracy: 78.8 -> 80.4Helped
Set static integration threshold τ to 0.8 (ablation)ViT-Tiny + ISI · ImageNet-10accuracy: 80.4 -> 78.4Hurt

Surprising findings

Limitations

Experimental setup

Datasets: CIFAR-10 CIFAR-100 ImageNet-10 ImageNet-50 ImageNet-1k ImageNet-S (foreground masks)

Benchmarks: CIFAR-10 CIFAR-100 ImageNet-10 ImageNet-50 ImageNet-1K

Metrics: top-1 accuracy

Baselines: Blank control (continued training without constraints) Original pre-trained Transformers Mean/min/max head aggregation of attention weights Non-gradient integration weights

Builds on: Vision Transformer DeiT CaiT TNT PVT BEiT

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy