TL;DR
Decision models like Clef-flash can detect industrial anomalies zero-shot with high accuracy, but their internal "attention maps" are surprisingly useless for localization. This paper reveals a "dissociation" where the model's decision head ignores the rich spatial information present in its own backbone, often performing worse than a random map at finding defects.
What Problem Does This Paper Address?
In automated industrial inspection, it’s not enough to know if a part is defective; an operator needs to know where the defect is. A new class of vision-language models, called decision models (e.g., Clef, Clef-flash), are designed to answer questions like "Does this part have a defect?" with a simple probability for "true" or "false," rather than generating text.
Common practice in the field assumes that the internal "attention weights" of these models can be read as a map of where the model "looked" to make its decision. This paper rigorously tests this assumption: do these decision models actually localize the anomalies they detect?
Methods
The authors conducted a detailed case study on Clef-flash (based on a Qwen3.5-9B backbone). To look under the hood, they defined eight different "readouts" (R0–R7) to probe the model's internal state:
- R1 (Head Attention): The standard map derived from the decision head's routing attention.
- R2 (Backbone Attention): Cross-attention from the question tokens to the image tokens.
- R3 (Probing): A nearest-neighbor search using the backbone's internal states against a bank of normal images.
- R4 (Dependence): A "counterfactual" test that replaces image blocks with normal ones to see how much the final decision changes.
- R7 (Teaching): Retraining the decision head on synthetic defects to see if it can learn to localize.
The study followed a strict pre-registered protocol, comparing these maps against several controls, including a "center prior" (a simple Gaussian at the image center) and random maps.
Datasets
The models were evaluated on four major public benchmarks for industrial anomaly detection:
- MVTec AD: The industry standard for structural anomalies.
- VisA: A diverse dataset of complex objects.
- MVTec AD 2: A newer, more challenging benchmark.
- MVTec LOCO AD: Focused on "logical" anomalies (e.g., missing components).
Key Insights and Ideas
- The Great Dissociation: There is a massive gap between detection performance and localization capability. A model can be a world-class detector while its internal "map" is worse than random.
- Information is Present but Ignored: The backbone does know where the defect is. Readouts from the backbone (R2 and R3) produce quite accurate maps. However, the decision head seems to ignore this spatial data, relying instead on "summary vectors" that compress the image information.
- Attention is Fragile and Context-Dependent: The backbone's ability to "point" at a defect (R2) is highly sensitive to the prompt. If you remove the "industrial inspection" context from the question, the backbone's attention often drifts away from the object entirely.
- Faithfulness vs. Plausibility: The paper highlights a critical distinction: a map might look "plausible" (matching human intuition) without being "faithful" (actually reflecting what the model used to decide). In Clef-flash, the head's attention is neither.
Key Results
- Detection: Clef-flash achieves a strong 0.924 image AUROC on MVTec AD in a zero-shot setting.
- Localization Failure: The head's routing attention (R1) produced a mean pixel AUROC of only 0.391—significantly below the 0.5 chance level.
- Backbone Success: In contrast, the backbone's attention (R2) reached 0.863 pixel AUROC, and direct probing of states (R3) hit 0.897.
- Teaching: While retraining the head (R7) improved its localization to 0.896, it still failed to match dedicated few-shot localizers like PatchCore (0.979).
Limitations and Future Work
As a case study of one specific model family, it remains a hypothesis whether these findings apply to all decision models. The authors also note the risk of "contamination"—the possibility that the benchmarks were seen during the backbone's massive pre-training phase.
Future work should investigate which specific parts of a prompt (e.g., the product name vs. the task description) drive the backbone's attention. There is also a clear opportunity to design new decision heads that are explicitly forced to attend to the regions that matter for the final decision.
Summary updated