Fault-Guided Cross-Layer Prediction for Unsupervised Anomaly Detection
Abstract
Feature reconstruction is widely used for unsupervised industrial anomaly detection in the single-class setting, where only normal images from one product category are available for training. We propose a single-class detector that asks what information one block can pass to another. We treat the depth of a frozen vision transformer as a sequence of discrete transitions. A directed predictor learns a block-to-block hidden-state transition pointwise over tokens. Adjacent-layer cosine similarity exposes four sharp fault lines in DINOv2 ViT-L, separating stable depth segments. The deepest blocks retain semantic context but lose local detail; a prediction from deep or shallow sources to sensitive targets therefore exposes the information that cannot be transported. The fault structure fixes the source and target roles, and the same rule transfers to ViT-B and RADIO-B. We use a bounded foreground prior calibrated solely on training images: it attenuates background evidence without also erasing defects outside the estimated foreground. Using one predictor architecture and a common training-only calibration protocol, image AUROC is 99.75 on MVTec-AD, 99.42 on VisA and 94.27 on Real-IAD. On Real-IAD the object-level AUROC is 96.26. At 256x256 pixel resolution, P-AUROC/P-AUPRO are 98.46/95.97 on MVTec-AD, 99.21/96.12 on VisA and 99.26/96.59 on Real-IAD.
Figures & tables
| branch | source block | target blocks |
|---|---|---|
| forward | ||
| backward |
| backbone | detected faults | near target | mid target | deep source band |
|---|---|---|---|---|
| ViT-L | , , , | |||
| ViT-B | , | |||
| RADIO-B | , |
| quantity | symbol | value |
|---|---|---|
| high-pass strength | ||
| high-pass scale | ||
| smoothing | – | Gaussian, |
| pooling ratio | – | top ( ) |
| B-branch field | ||
| global reliability | ; for no mask or multi-object |
| method | S-AUROC | I-AUROC | P-AUPRO |
|---|---|---|---|
| PaDiM [ 10 ] | 91.2 | 80.3 | 81.8 |
| CFlow [ 14 ] | 89.8 | 82.5 | 90.5 |
| PatchCore [ 34 ] | 93.7 | 89.4 | 91.5 |
| SoftPatch [ 22 ] | 92.8 | 89.4 | 90.8 |
| SimpleNet [ 25 ] | 94.9 | 88.5 | 84.6 |
| DeSTSeg [ 41 ] | 94.0 | 86.9 | 81.5 |
| dataset | method | I | O | P | PRO | I | O | P | PRO |
|---|---|---|---|---|---|---|---|---|---|
| MVTec-AD | ours | 99.70 | – | 97.30 | 95.94 | 99.75 | – | 98.46 | 95.97 |
| Dinomaly2 | 99.84 | – | 98.54 | 95.83 | 99.85 | – | 98.75 | 96.42 | |
| VisA | ours | 99.29 | – | 98.95 | 94.83 | 99.42 | – | 99.21 | 96.12 |
| Dinomaly2 | 99.05 | – | 99.21 | 95.90 | 98.90 | – | 99.39 | 96.64 | |
| Real-IAD | ours | 94.01 | 96.13 | 98.70 | 97.33 | 94.27 | 96.26 | 99.26 | 96.59 |
| configuration | mean AUROC | (pp) |
| reference (8 predictors, B3) | 0.9902 | – |
| branch group | ||
| forward channels only | 0.9663 | |
| all backward channels (BWD6) | 0.9874 | |
| targets | ||
| drop target (ONLY14) | 0.9866 |
| backbone | MVTec-AD I | VisA I | Real-IAD I/O |
|---|---|---|---|
| ViT-L/14 | 99.75 | 99.42 | 94.27 / 96.26 |
| ViT-B/14 | 99.46 | 99.04 | 94.01 / 96.02 |
| RADIO-B | 99.33 | 98.35 | 93.27 / 95.78 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| category | ||
|---|---|---|
| bottle | 0.000 | 0.7960 |
| cable | 0.000 | 0.7123 |
| capsule | 0.000 | 0.6818 |
| carpet | 0.000 | 0.5752 |
| grid | 0.000 | 0.6649 |
| hazelnut | 0.000 | 0.7785 |
| category | ||
|---|---|---|
| candle | 0.000 | 0.6455 |
| capsules | 0.631 | 0.8673 |
| cashew | 0.000 | 0.7130 |
| chewinggum | 0.000 | 0.7926 |
| fryum | 0.604 | 0.8644 |
| macaroni1 | 0.596 | 0.8635 |
| category | ||
|---|---|---|
| audiojack | 0.651 | 0.8695 |
| bottle_cap | 0.000 | 0.7186 |
| button_battery | 0.745 | 0.8795 |
| end_cap | 0.530 | 0.8566 |
| eraser | 0.000 | 0.6983 |
| fire_hood | 0.295 | 0.8315 |
| dataset | I-AUROC | O-AUROC | P-AUROC | P-AUPRO |
|---|---|---|---|---|
| MVTec-AD | – | |||
| VisA | – | |||
| Real-IAD |
| configuration | forward channels | backward channels |
|---|---|---|
| Ours (8) | ||
| forward-only | – | |
| BWD4 | – | |
| BWD6 | – | |
| B1 | ||
| B2 |
| group | configuration | mean I-ROC | (pp) |
|---|---|---|---|
| reference | NOINP | 0.9902 | – |
| control | F8NOINP | 0.9901 | |
| direction | forward-only | 0.9663 | |
| BWD4 | 0.9868 | ||
| BWD6 | 0.9874 | ||
| source | A0 | 0.9901 |
| configuration | cable | screw | pcb1 | macaroni2 | mean |
|---|---|---|---|---|---|
| BWD6 | 0.9888 | 0.9904 | 0.9969 | 0.9733 | 0.9874 |
| B1 (1 deep source) | 0.9981 | 0.9873 | 0.9927 | 0.9711 | 0.9873 |
| B2 (2 deep sources) | 0.9972 | 0.9902 | 0.9970 | 0.9722 | 0.9892 |
| B4 (4 deep sources) | 0.9951 | 0.9918 | 0.9980 | 0.9758 | 0.9902 |
| category | best deep 14 | best deep 7 | mean | ||
|---|---|---|---|---|---|
| cable | 0.9981 | 0.9875 | 0.9893 (23 14) | 0.9920 (21 7) | 0.9985 |
| screw | 0.9283 | 0.9524 | 0.9889 (22 14) | 0.9902 (21 7) | 0.9920 |
| pcb1 | 0.9818 | 0.9889 | 0.9927 (23 14) | 0.9862 (23 7) | 0.9918 |
| macaroni2 | 0.9286 | 0.9811 | 0.9907 (23 14) | 0.9893 (23 7) | 0.9915 |
| audiojack | 0.7852 | 0.8358 | 0.8485 (23 14) | 0.8393 (21 7) | 0.8486 |
| category | gate | prior off | prior on | (pp) |
|---|---|---|---|---|
| cable | ON | 0.9971 | 0.9985 | |
| screw | OFF | 0.9920 | 0.9920 | |
| pcb1 | ON | 0.9813 | 0.9918 | |
| macaroni2 | ON | 0.9544 | 0.9915 |
| category | cross | recon | grouped recon |
|---|---|---|---|
| cable | 0.9648 | 0.9565 | 0.9515 |
| screw | 0.9553 | 0.9076 | 0.9129 |
| pcb1 | 0.9658 | 0.9602 | 0.9630 |
| macaroni2 | 0.9637 | 0.9806 | 0.9813 |
| category | patch-8 | native-14 | (pp) |
|---|---|---|---|
| bottle_cap | 97.84 | 93.54 | |
| button_battery | 93.83 | 88.46 | |
| end_cap | 91.89 | 88.17 | |
| eraser | 96.31 | 92.93 | |
| fire_hood | 93.48 | 91.71 | |
| mounts | 87.63 | 86.13 |
| dataset | category | I-AUROC | P-AUROC | P-AUPRO |
|---|---|---|---|---|
| MPDD | bracket_black | 92.75 | 99.16 | 98.42 |
| bracket_brown | 97.13 | 94.26 | 93.13 | |
| bracket_white | 99.78 | 99.59 | 94.86 | |
| connector | 100.00 | 97.82 | 93.17 | |
| metal_plate | 100.00 | 99.53 | 97.98 | |
| tubes | 99.95 | 99.10 | 96.82 |
| dataset | categories | mask ON | gate OFF | no mask | |
|---|---|---|---|---|---|
| MVTec-AD | 15 | 7 | 3 | 5 | 2 |
| VisA | 12 | 11 | 1 | 0 | 9 |
| Real-IAD | 30 | 30 | 0 | 0 | 2 |
| dataset | category | I (O) | P | PRO |
|---|---|---|---|---|
| MVTec-AD | bottle | 100.00 | 99.20 | 97.70 |
| cable | 99.55 | 98.69 | 95.79 | |
| capsule | 99.16 | 98.79 | 97.69 | |
| carpet | 100.00 | 99.43 | 98.35 | |
| grid | 100.00 | 99.44 | 96.78 | |
| hazelnut | 100.00 | 99.55 | 98.11 |
Unsupervised Anomaly Detection
Unsupervised anomaly detection finds unusual patterns without labeled examples of faults, attacks, defects, or other rare events.
See all 233 papers