Source-linked AI summary
Training-Free Logical and Structural Anomaly Detection via Calibrated Fusion
Changyi Li, Miao Yu, Kai Dong, Yu Xiao
TL;DR
Industrial anomaly detection needs to handle local structural defects and global logical violations, but existing methods trade off training-free deployment against explicit counting. This paper calibrates heterogeneous frozen cues using normal images and fuses them in one detector, achieving the best training-free average on MVTec-LOCO while remaining competitive more broadly.
Problem
Existing detectors often favor structural or logical anomalies, while training-free methods lack explicit counting and counting-based methods rely on category-specific component models.
Method
Normal-set calibration aligns heterogeneous frozen appearance and counting cues, which are fused with a p-norm soft-OR in a unified training-free framework.
Results
92.5 average image-level AUROC is the best among training-free detectors on MVTec-LOCO, with competitive performance against trained or part-supervised methods.
Takeaways & Limitations
Calibrated fusion enables one self-explaining training-free detector to address both logical and structural anomaly families.
Takeaways & Limitations
Logical AUROC remains below category-specific and part-supervised methods, with screw bag particularly difficult because numerous near-identical parts hinder reliable counting.
Abstract
from arXiv · showhide
Industrial anomaly detection must handle two distinct defect families: structural anomalies, which manifest as local texture corruptions, and logical anomalies, which violate global rules on object count, composition, or arrangement. Existing detectors typically favor one family at the expense of the other. In particular, training-free methods effectively exploit frozen representations but lack an explicit notion of object count, while methods that reason about counts usually rely on category-specific component modeling. We show that counting ability can be introduced into training-free anomaly detection without additional training or part-level supervision. Our key idea is a normal-set calibration that aligns heterogeneous anomaly cues using statistics from normal images, enabling their direct fusion within a unified training-free framework. Built upon this calibration, our detector combines complementary frozen cues to address both logical and structural anomalies. On MVTec-LOCO, our method achieves image-level AUROCs of 89.0 and 95.9 on logical and structural anomalies, respectively, yielding a 92.5 average---the best among training-free detectors in our comparison. It remains competitive with methods requiring network training or part annotations, while its structural variant matches PatchCore on MVTec-AD (99.1 image-AUROC), suggesting that the proposed calibration generalizes beyond logical anomaly detection.
1 Introduction
Industrial inspection must detect both local structural defects and globally inconsistent logical defects, but existing approaches often favor one. The paper proposes calibrated fusion to add counting to training-free detection and combine complementary cues.
- Structural anomalies corrupt local appearance, whereas logical anomalies preserve local appearance but violate global count, composition, or arrangement rules.
- Training-free methods reuse frozen representations but lack explicit object counting, while category-specific methods obtain counting through component models.
- The proposed normal-set calibration places heterogeneous frozen cues on a common scale for unified fusion without per-category training.
- A p-norm soft-OR preserves strong evidence from individual branches instead of averaging it away.
- 92.5 average image-level AUROC is the best result among training-free detectors on MVTec-LOCO, while the method remains competitive with trained or part-supervised methods.
2 Related Work
Prior work separates local structural detection from global logical reasoning, leaving a gap between training-free deployment and explicit counting. This method bridges that gap with frozen-model counting and calibrated cue fusion.
- Structural detectors are effective for local texture defects but ineffective when every local region appears normal despite incorrect global composition.
- Existing logical detectors either remain training-free without explicit counting or use category-specific component models to obtain counting.
- The proposed method uses a frozen promptable model for training-free counting and normal-set calibration to unify logical and structural cues.
3 Method
The detector extracts complementary appearance and counting cues from frozen branches, calibrates their scores using normal images, and fuses them into an anomaly score with interpretable attribution.
- Five frozen branches provide complementary appearance and counting cues, with four appearance branches and one open-vocabulary counting branch.
- Normal-set calibration rescales incompatible raw branch scores onto a common scale using only normal images.
- A p-norm soft-OR aggregates calibrated scores while preserving strong evidence from individual branches rather than averaging it away.
- The calibrated scores also support evidence attribution for logical or structural decisions.
- Set features capture composition while remaining insensitive to exact spatial arrangement.
- Dual patch memories complement composition cues by modeling fine-grained structural defects with semantic and textural features.
3.3 Training-free open-vocabulary counting
The counting branch turns a frozen open-vocabulary segmentation model into a training-free counting cue by aggregating instance counts across confidence thresholds.
- A frozen promptable concept-segmentation model supplies an explicit counting cue absent from appearance representations.
- Open-vocabulary instance proposals are counted across multiple confidence thresholds and concatenated into a count vector.
- The counting anomaly score is a reliability-weighted standardized deviation from normal count statistics.
3.4 Normal-set calibration for heterogeneous cues
Normal-set calibration places heterogeneous branch scores on a shared scale using normal validation data, enabling fusion that preserves strong complementary evidence without simple-sum dilution or max sensitivity.
- Calibration maps every branch’s normal 99th percentile to ˆs_b = 1, making above-normal deviations comparable across cues.Normal images typically satisfy ˆs_b ≲ 1, while stronger deviations extend beyond the shared threshold.
- A plain sum can dilute sparse branch evidence, whereas a maximum can overreact to single-branch false positives.The fusion design therefore targets a middle ground between retaining strong evidence and limiting outlier dominance.
- The p-norm interpolates between summation at p=1 and maximization as p →∞; the method uses p=6 to implement a soft logical OR.This choice emphasizes strong evidence without allowing one outlier to dominate.
3.6 Interpretable evidence attribution
The detector reuses calibrated branch scores to explain detections, attributing them to logical or structural evidence and, for logical cases, identifying count-based support without training an explanation-specific model.
- Trigger construction: Above-normal triggers activate only when a calibrated branch score exceeds the shared normal threshold.For branch b, the trigger is t_b = max(ˆs_b − 1, 0).
- Logical versus structural attribution: Logical and structural attribution aggregates triggers over separate branch groups and selects the dominant axis.The logical axis uses deep, pix, and sam; the structural axis uses pc and pc-cnn.
- Count rationale: For logical detections, the largest reliability-weighted count contribution identifies the offending concept and reports observed versus normal counts.Associated instance masks localize the evidence, for example, a label with observed count 0 versus normal count 2.
- Training-free implementation: All models remain frozen, and inference requires only frozen forward passes on a single GPU.The protocol uses no anomaly labels, part annotations, gradient optimization, LLMs, or category-specific networks.
3.8 Comparison with prior work
On MVTec-LOCO, the method achieves the strongest average and structural performance among the compared training-free detectors, while logical performance remains below methods using category-specific part models. Ablations indicate that branch complementarity and calibrated fusion are central to this result.
- 92.5 average image-AUROC is the highest among training-free methods, surpassing SINBAD (88.3) and ComAD+PatchCore (90.1).
- 95.9 structural AUROC is strongest in the comparison, exceeding EfficientAD (94.7) and PUAD (94.1).
- 89.0 logical AUROC remains below methods using category-specific part models and trails SINBAD among training-free approaches.The authors attribute this gap to the cleaner per-category part representations available to segmentation-based methods.
- 99.4 is the method’s strongest training-free result on breakfast box, whereas screw bag is the most challenging category at 77.2.Numerous small, near-identical parts make reliable counting difficult in screw bag.
- Removing the counting branch reduces logical AUROC by 3.4 points, while removing textural memory reduces structural AUROC by 1.6 points.Semantic memory is the strongest individual contributor on the structural axis, with a 4.2-point reduction when removed.
- 92.5 average image-AUROC from calibrated p-norm fusion exceeds calibrated sum (90.6), rank-max (89.0), and top-2 rank pooling (89.7).The analysis reports that summation dilutes single-branch evidence, whereas the maximum overreacts to isolated outliers.
3.10 Evaluating the Explanations
The detector’s explanations are largely faithful to its decisions and remain human-readable by reusing the evidence that drives detection.
- 73.8% of anomalies receive the correct logical/structural attribution on average.The attribution agrees with the ground-truth anomaly type, indicating that explanations reflect the detector’s decision evidence.
- Logical explanations identify offending concepts through observed-versus-normal counts and instance masks.
- Structural explanations localise evidence through patch-memory distance maps.
- The explanations are intrinsic because they reuse the detector’s calibrated scores.
3.11 Structural Generalisation
The structural configuration transfers effectively to MVTec-AD when logical branches are disabled, while the full LOCO configuration is poorly suited to purely structural anomalies.
- The evaluation retains two calibrated patch memories and the same p-norm fusion while disabling logical branches.
- 99.1 average image-AUROC is achieved on MVTec-AD, matching PatchCore.
- 78.4 average image-AUROC results from applying the full five-branch LOCO configuration on MVTec-AD.
- The results indicate that logical branches are specialised to compositional anomalies rather than universally beneficial.
4 Discussion
The discussion identifies cue integration as the main bottleneck, while highlighting unstable counting and limited fusion as remaining constraints.
- A per-image oracle reaches nearly 100 AUROC on both anomaly axes, indicating that relevant evidence is already available across branches.
- Normal-set calibration provides a common language for fusing heterogeneous cues.
- Different counts for identical normal screw-bag images broaden the normal count distribution and limit logical discrimination.
- The method requires a small number of category concept names, while a fully name-free variant recovers only about half of the counting gain.
- The wide oracle gap leaves training-free single-score fusion as the clearest opportunity for future improvement.
5 Conclusion
The paper presents normal-set calibration as a way to fuse frozen appearance and counting cues for training-free detection across logical and structural anomalies.
- Normal-set calibration brings heterogeneous frozen-model cues onto a common scale without training.
- The framework combines appearance-based evidence and open-vocabulary counting in a single self-explaining detector.
- The method achieves the strongest average performance among training-free methods on MVTec-LOCO and remains competitive on MVTec-AD.
- The remaining challenge is integrating complementary cues more effectively, as indicated by the wide oracle gap.