Source-linked AI summary
Industrial Anomaly Detection via Defect-Grounded Reasoning in Visual Latent Space
Jaron Yeh, Yen-Wei Chang, Jiang Liu, Shao-Yuan Lo
TL;DR
Fine-grained industrial inspection methods can require repeated region checks or tools, and may not preserve local defect evidence throughout reasoning. Anomaly-LR refines defect-relevant representations in visual latent space, while IAD-LR-22K provides training instances with reasoning traces and region annotations. It reports state-of-the-art results across model scales and cross-dataset evaluation without external references or tools.
Problem
Fine-grained inspection methods can rely on repeated local-region revisiting or external tools, while local defect evidence may not be preserved throughout subsequent reasoning.
Source: §1 · p. 1Method
Anomaly-LR uses global textual understanding to progressively align intermediate hidden states with defect-relevant visual features, alongside IAD-LR-22K training data with reasoning traces and region annotations.
Source: §1 · p. 1Results
Anomaly-LR consistently outperforms state-of-the-art approaches at 3B and 7B scales and maintains gains under cross-dataset evaluation.
Source: §1 · p. 1Takeaways & Limitations
Attention map analysis shows more attention within defect regions, supporting the effectiveness of defect-grounded reasoning without external references or tools.
Source: §1 · p. 1
Abstract
from arXiv · showhide
Industrial anomaly detection (IAD) is evolving beyond conventional detection and localization toward multimodal inspection systems that can describe, explain, and reason about fine-grained defects. Although recent multimodal large language model (MLLM)-based methods improve anomaly understanding through textual reasoning and visual guidance, they face two limitations in fine-grained inspection. First, their visual refinement often requires iteratively revisiting local image regions or augmenting with additional tools. Second, the resulting local defect evidence may not be reliably preserved throughout subsequent reasoning. To address these, we propose Anomaly-LR, a defect-grounded latent reasoning framework that first forms a global understanding of the input and then progressively refines anomaly-relevant representations directly in the visual latent space. We further construct IAD-LR-22K, the first IAD instruction dataset designed for latent reasoning, containing 22,228 image-question instances from 4,523 industrial images, with global textual reasoning traces and region-level visual annotations. Extensive experiments show that Anomaly-LR achieves state-of-the-art performance among comparable-scale methods across multiple IAD benchmarks, without requiring external references or tools. The code and data will be released at https://github.com/Yen666/Anomaly-LR.
1. INTRODUCTION
Anomaly-LR addresses the difficulty of preserving fine-grained defect evidence during inspection by refining visual representations in latent space. The paper also introduces IAD-LR-22K and reports state-of-the-art performance across model scales and cross-dataset evaluation without external references or tools.
1. INTRODUCTION
- IAD has expanded from detecting anomalous samples and localizing defective regions toward multimodal systems that also discriminate, describe, and analyze anomalies.Convolutional methods mainly provide anomaly scores or localization maps, with limited semantic interpretation.Source: §1 · p. 1
- Earlier approaches strengthen reasoning through chain-of-thought training, iterative region revisiting, or latent optimization, but each leaves challenges for fine-grained inspection.Text-only reasoning captures visual detail indirectly; repeated visual intervention adds inspection steps, and additional inputs do not guarantee relevant evidence is used throughout reasoning.Source: §1 · p. 1
- Anomaly-LR progressively refines intermediate hidden states by aligning them with defect-relevant visual features, guided by textual global understanding.This global-to-local process internalizes localized visual refinement without repeated region revisiting or reliance on external tools.Source: §1 · p. 1
- IAD-LR-22K is the first IAD instruction dataset designed for latent reasoning, with 22,228 image-question instances from 4,523 industrial images.It includes global textual reasoning traces and region-level visual annotations.Source: §1 · p. 1
- Anomaly-LR consistently outperforms state-of-the-art approaches at both 3B and 7B scales, maintaining gains under cross-dataset evaluation without auxiliary references, information, or tools.Attention map analysis shows substantially more attention within defect regions, supporting its effectiveness in defect-grounded reasoning.Source: §1 · p. 1
2. METHOD
Anomaly-LR moves from global textual understanding to defect-grounded latent visual refinement before generating an answer. Its training combines textual supervision with latent reconstruction, and IAD-LR-22K provides reasoning traces and region annotations for that supervision.
2.1. Overall architecture
- Global reasoning precedes local latent refinement and answer generation, with the number of latent positions determined by the defect-region size.The latent positions are supervised to reconstruct visual embeddings from annotated defect regions.Source: §2.1 · pp. 1–2, Figure 1 · p. 2
2.2. Training and inference
- Training combines token-level cross-entropy on textual positions with cosine-similarity reconstruction of each region token from the preceding latent-position hidden state.The authors use cosine similarity rather than L2 because hidden states and target embeddings differ substantially in magnitude; the global trace sustains a language-modeling signal during training.Source: §2.2 · p. 2
- At inference, the model generates the latent segment autoregressively by feeding its own hidden states back for K steps before resuming textual decoding.The fixed-budget strategy was reported to outperform learned stopping and an auxiliary mode-switching objective.Source: §2.2 · p. 2, Figure 1 · p. 2
2.3. IAD-LR-22K dataset
- IAD-LR-22K contains 22,228 image-question instances from 4,523 industrial images, each paired with a global reasoning trace and a region-level visual annotation.Its MMAD and Real-IAD subsets support anomaly detection, localization, defect description, and anomaly analysis.Source: §2.3 · pp. 2–3
3. EXPERIMENTS
Experiments evaluate Anomaly-LR on in-domain MMAD and six out-of-domain benchmarks, alongside architecture, loss, and latent-rollout ablations. The reported results show strong performance and increased attention to defect regions.
3.1. Experimental setup
- The evaluation trains on IAD-LR-22K-MMAD for disjoint MMAD test data and on IAD-LR-22K-RealIAD for tests across six OOD benchmarks.The in-domain test set contains 32,059 multiple-choice questions from 6,766 images; the OOD benchmarks are MVTec, MPDD, VisA, DAGM, DTD, and SDD.Source: §3.1 · p. 3
3.2. Main results
- On MMAD, the 7B model achieves the best accuracy across all seven subtasks, while the 3B model surpasses all 7B and 8B competitors and substantially larger general-purpose MLLMs.Both model scales achieve the highest average accuracy among the compared methods.Source: §3.2 · p. 3
- 77.4% to 79.0% average accuracy at 3B and 80.4% to 82.2% at 7B; Anomaly-LR reports state-of-the-art performance in OOD evaluation.The evaluation covers six benchmarks and reports balanced accuracy.Source: §3.2 · p. 4, Table 2 · p. 4
3.3. Ablation study
- The full three-phase architecture performs best; removing either global textual reasoning or local latent visual reasoning reduces the complementary contribution of the two stages.The Phase 2 + Phase 3 variant tends to collapse to a single answer because its short answer span causes cross-entropy loss to saturate early.Source: §3.3 · p. 4, Table 3 · p. 4
- Cosine similarity outperforms L2 loss at 3B and performs comparably at 7B, which the authors attribute to scale mismatch between hidden states and target visual embeddings.The authors note that L2 is sensitive to magnitude differences, whereas cosine similarity focuses on directional alignment.Source: §3.3 · p. 4
- Removing latent rollout (K = 0) drops accuracy; defect-region attention rises from 4.4× to 19.5× uniform attention when comparing Qwen2.5-VL-3B with Anomaly-LR-3B.The attention comparison is shown for a VisA test image, with the green circle marking the ground-truth defect region.Source: §3.3 · p. 4, Figure 2 · p. 4
4. CONCLUSION
The conclusion presents Anomaly-LR as latent-space defect refinement guided by global textual reasoning, alongside IAD-LR-22K, a dataset for latent reasoning. It reports strong performance across model scales and benchmarks.
4. CONCLUSION
- Anomaly-LR progressively refines intermediate hidden states by aligning them with defect-relevant visual features, guided by global textual reasoning.The framework internalizes localized visual refinement within the model’s latent space and reduces reliance on repeated visual intervention.Source: §4 · p. 4
- IAD-LR-22K is presented as the first IAD dataset designed for latent reasoning.The dataset includes global textual reasoning traces and region-level visual annotations.Source: §4 · p. 4
- Anomaly-LR achieves strong performance across model scales and benchmarks, supporting defect-grounded latent reasoning for fine-grained industrial anomaly understanding.Source: §4 · p. 4
5. COMPLIANCE WITH ETHICAL STANDARDS
The study uses existing public benchmarks and collects no new human-subject data; it states that ethical approval was not required.