AtomEx: Atomic Explanations of Vision Transformers with Integer Scorecards

Magdalena Trędowicz, Łukasz Struski, Arkadiusz Lewicki, Jacek TaborarXiv 2026

TL;DR

Standard saliency heatmaps show you where a neural network is looking, but they keep the actual decision-making arithmetic locked in a black box. AtomEx translates a frozen Vision Transformer’s decisions into a literal checklist: it discovers recurring visual parts on its own and scores them using simple integer addition. If an image’s recognizable parts cover enough area to cross a point threshold—say, 5 points for a school bus—the model says yes.

What Problem Does This Paper Address?

Imagine asking a radiologist or a mechanic for a diagnosis, and instead of giving you a reason, they just shine a flashlight on a general area and walk away. That is essentially what standard visual attribution methods (like Grad-CAM or attention rollout) do.

When a Vision Transformer (ViT) looks at an ambulance and decides it is not a school bus, heatmap methods still light up parts of the ambulance—like its wheels and windows. What they fail to tell you is how those visual pieces combine, or why that specific combination fell short. Meanwhile, concept- or prototype-based models often rely on external segmentation tools, human part-annotations, or allow rich feature vectors to leak around the visual partition so you can't be sure the visual map alone drove the decision. The authors ask: can we explain a frozen ViT’s class decision using a persistent vocabulary of visual parts and a rule simple enough to do in your head?

Figure 1. The same atoms and rule explain acceptance and rejection. Left to right: input, Chefer and LeGrad maps, AtomEx groups, and the school-bus scorecard (seed 101). Each attribution method is normalized jointly over the two images, preserving its weaker response to the ambulance. Only the six groups retained by the card are colored. A group earns points when it covers at least the “needed” share of the native 56×56 lattice; gray entries with parenthesized points are inactive. Acceptance requires 5 points. The bus earns 14; the ambulance earns 2 for wheels, while dark glass falls below its threshold and the other groups do not count. Names are assigned by inspection (Fig. 4). Group displays use denser maps, while the card uses native-lattice areas (Apps. 4 and 21).

Methods

AtomEx operates in two distinct stages: learn the visual atoms flexibly, then compress the rule ruthlessly.

  1. High-Res Token Lattice: Standard ViTs chop 224×224 images into coarse 16×16 pixel patches. To get sharper boundaries without an external segmenter, AtomEx feeds 16 slightly shifted views of the image into the frozen ViT, interleaving the resulting patch descriptors into a dense 56×56 lattice.
  2. Learning Atoms via a Closed Surrogate: Cosine similarity against 20 trainable prototypes assigns every lattice site to exactly one disjoint spatial "group." Crucially, 10 of these are discard channels—a clever sink for irrelevant background—while the 10 "used" channels are multiplied by signed scalars and fed into a monotone CNN trained to mimic the ViT’s top-1 class decision. Total variation (TV) regularization keeps groups compact and unfragmented. Because the CNN only sees the spatial group maps (no raw pixels or class tokens), all predictive signal is forced into the partition itself.
  3. The Integer Scorecard: Once trained, the prototypes are frozen and the CNN is thrown away. AtomEx measures the image area covered by each positive group, searches for area thresholds via coordinate descent, and fits a logistic regression whose weights are rounded into small integers. To classify an image, you check which groups exceed their required area, add up their integer points, and check if the sum hits the target score. (A two-sided variant also subtracts points for negative evidence.)

Datasets

The authors evaluate AtomEx without introducing new benchmarks, relying on:

  • ImageNet: 33 classes total for the surrogate study (3 main classes—beagle, school bus, valley—plus 20 randomly sampled and 10 manually selected classes) and 23 for the scorecard study.
  • PartImageNet++: Used alongside ImageNet bounding boxes to evaluate whether the unsupervised groups align with human-labeled object parts.
  • Medical Imaging: Chest X-ray datasets and newborn echocardiography video datasets (probing EchoJEPA-B and EchoFM across three heart views) to test domain generalization.

Key Insights and Ideas

  • Why two stages matter: Why not train the discrete scorecard end-to-end? As smooth sigmoid thresholds sharpen into hard step functions during training, gradients vanish; to compensate, the visual groups bloat into messy, catch-all blobs just to cross the area threshold. Separating representation learning (via the CNN) from rule fitting keeps the atoms crisp.
  • Discard channels make TV work: Without background discard channels, every pixel must belong to an explanatory group, making one giant, image-spanning blob the easiest way to minimize boundary penalties. Free boundaries between discard channels let explanatory parts shrink wrap onto actual features—cutting used image area from ~52% down to ~20%.
  • Shared features vs. sufficient evidence: On the school bus card, wheels and dark glass earn only +2 points each (and appear frequently on other road vehicles), whereas yellow panels and roof signs earn +4 each. With 5 points required, an ambulance with bus-like wheels earns 2 points and is cleanly rejected.

Key Results

  • High Fidelity, Tiny Rules: Across 20 random ImageNet classes, positive-only integer scorecards achieve 98.4% balanced fidelity to the frozen ViT teacher (just 0.5 percentage points behind the CNN surrogate's 98.9%), with 58 of 60 cards needing only 4 to 6 visual groups. On the three main tasks, cards hit 99.0% fidelity.
  • Competitive Localization: On beagle and school bus, AtomEx positive groups achieve 95.0% and 94.7% bounding-box precision, competing well with nine attribution baselines (though LeGrad remains sharper at 98.3% and 96.5%).
  • Domain & Human Checks: On echocardiography videos, two-sided cards match teacher decisions on 83–92% of test samples, isolating color-Doppler defect regions verified by a pediatric cardiologist. In a 30-person user study, humans given 6 solved scorecard examples predicted the ViT's binary decision on unseen photos with 60.4% accuracy (79.3% on target-class photos).

Limitations and Future Work

  • Surrogate ≠ Causal Mechanism: While deleting positive groups drops the teacher's class margin, neither the surrogate nor the scorecard reliably tracks the teacher’s exact decision flips under synthetic pixel edits (following only 2–4% of flips). Negative groups, in particular, lack strong causal support.
  • Hard Negatives & Per-Class Fitting: Positive-only cards struggle more on visually similar classes (rejecting 62% of nearest-neighbor class negatives on random classes, and just 16% on beagle—though two-sided cards recover the beagle rate to 31%). Furthermore, every class requires training its own separate vocabulary and card.
  • Architecture Limits: While AtomEx transfers cleanly to DeiT-III-B/16, it fails to form object-aligned groups on hierarchical architectures like Swin-B due to coarse 32-pixel cells. Testing how well humans can visually spot the atoms and apply the rules completely unaided remains an open next step.

Summary updated

BibTeX
@misc{tredowicz2026atomex,
  author = {Magdalena Trędowicz and Łukasz Struski and Arkadiusz Lewicki and Jacek Tabor},
  title = {{AtomEx: Atomic Explanations of Vision Transformers with Integer Scorecards}},
  year = {2026},
  eprint = {2611.37752},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.37752},
}
Figure