AirIAD: Agentic Iterative Reasoning for Industrial Anomaly Detection

Huan Yu, Tiecheng Zhang, Jin Wang, Jingru Yang, Kaixiang Huang, Zhongyang Sun, Guodong Lu, Shengfeng HeNeurIPS 2026

TL;DR

Multimodal large language models (MLLMs) are pretty good at glancing at a factory part and saying "something looks off," but they struggle to tell you what the defect is and where it is located in a single pass. AirIAD turns the model into a detective—giving it a magnifying glass to zoom in on suspicious regions and an encyclopedia to look up defect definitions—allowing it to iteratively double-check its own hypotheses. Built on a compact 4B-parameter model, it outperforms giant proprietary models like GPT-5.4 and Gemini-3.1-Pro on end-to-end industrial diagnosis, and even generalizes zero-shot to reading brain MRIs.

What Problem Does This Paper Address?

Imagine inspecting a complex circuit board for microscopic defects. A human inspector doesn't just glance once and write a report; they spot something weird, lean in for a closer look, check the manual to see if that glossy blob counts as "thermal melting," and adjust their conclusion.

Current MLLMs try to do Industrial Anomaly Detection (IAD) in a single forward pass. While they handle simple binary detection ("normal vs. broken") reasonably well, they fall apart on fine-grained diagnosis—simultaneously determining if an anomaly exists, what category it belongs to, and where its bounding box is, without explicit target prompts. Without a way to revisit visual evidence or actively fetch domain rules during reasoning, single-pass models suffer from cascading errors, hallucinated bounding boxes, and misalignment between what they see and what they name it.

Figure 1: Overview of AirIAD. AirIAD formulates fine-grained anomaly analysis as an iterative spatio-semantic matching process. Guided by the SSCV CoT, the agent alternates between targeted visual inspection (Perceptive Zoomer) and semantic retrieval (Knowledge Retriever), using cross- verification to progressively refine its hypothesis until reaching a consistent diagnosis.

Methods

AirIAD reformulates anomaly detection from a static guess into an iterative spatio-semantic matching process.

Instead of guessing once, the agent forms an initial hypothesis (a candidate defect type and a bounding box) and triggers a unified [INSPECT] action that simultaneously invokes two tools:

  1. Perceptive Zoomer: Crops the image at the hypothesized bounding box for high-resolution visual inspection.
  2. Knowledge Retriever: Queries an expert knowledge base for the exact visual description of the hypothesized defect category.

To make sense of the tool outputs, the authors introduce Spatio-Semantic Cross-Verification (SSCV) Chain-of-Thought. Before every action, the model generates two separate reasoning streams: <spatial> (checking if the zoomed crop actually captures the defect) and <semantic> (checking if the visual evidence matches the retrieved textbook definition). If they don't align, the model refines its box or category and loops again.

Figure 2: Training pipeline of AirIAD. The optimization follows a two-stage curriculum. Stage 1: Warm-up SFT instills the foundational SSCV CoT formatting. Stage 2: Spatio-Semantic GiGPO (SS-GiGPO) further enhances the model’s spatio-semantic reasoning capability through RL.

Training this multi-turn loop requires a two-stage pipeline:

  • Stage 1 (Standard Warm-up SFT): Distills trajectories from a larger teacher model (Qwen3-VL-235B) so the student learns the tool syntax and SSCV tags.
  • Stage 2 (Novel RL — SS-GiGPO): Standard episode-level RL (like GRPO) only rewards the final answer, leaving intermediate tool calls flying blind. Existing step-level RL (GiGPO) groups identical states to compare actions, which fails in continuous visual spaces where two bounding boxes are rarely pixel-identical. The authors invent Spatio-Semantic Anchor State Grouping (SSASG), which clusters intermediate steps into comparable groups if they share the same defect category and overlapping boxes ($\text{IoU} > 0.5$). Combined with a curriculum-based localization reward and a multiplicative bonus for getting both type and location right, SS-GiGPO teaches the agent which intermediate refinements actually move the needle.

Datasets

  • MMAD Benchmark: Used for main training and evaluation (20%/80% train-test split). It combines four industrial datasets covering structural and logical defects: MVTec AD, MVTec LOCO, VisA, and GoodsAD. Unlike standard MMAD multiple-choice evaluations, the authors enforce strict unified prediction of presence, type, and bounding box.
  • Cross-Domain Medical Benchmark: Newly formulated by the authors to test zero-shot transfer without fine-tuning, pairing pathological scans from the Figshare brain tumor dataset with healthy slices from the BTMRI dataset.

Key Insights and Ideas

  • Dumping all knowledge upfront hurts: Giving the model all expert defect descriptions in the initial prompt actually lowers performance compared to using no tools at all (42.92% vs. 43.09% E2E), because uncurated text acts as distracting semantic noise. Fetching knowledge on-demand is key.
  • Giant MLLMs are "hypochondriacs": Massive reasoning models suffer from a pessimistic diagnostic bias—they over-analyze benign surface variations and flag normal parts as defective (e.g., Gemini-3.1-Pro catches 90.84% of anomalies, but its accuracy on normal images drops to 60.93%). AirIAD's tool-verification loop acts as a sanity check, filtering out up to 77.3% of false alarms on normal parts.
  • SFT teaches syntax, RL teaches grounding: After Stage 1 SFT, classification improves, but spatial localization crashes (from 20.35% down to 13.05%) because pure imitation causes spatial hallucination. Stage 2 RL (SS-GiGPO) rescues localization, rocketing it up to 36.32%.
  • Fast when easy, thorough when hard: Roughly 90% of queries are resolved in $\le 1$ tool call, averaging just 0.26s per query.

Key Results

Built on Qwen3-VL-Instruct (4B and 8B), AirIAD achieves state-of-the-art overall End-to-End (E2E) accuracy—which requires getting detection, defect category, and bounding box ($\text{IoU} \ge 0.5$) simultaneously right across normal and anomalous images:

  • Beats base & giant models: AirIAD-4B hits 49.86% zero-shot and 50.40% one-shot E2E accuracy, jumping +16.33% over its 4B base model (zero-shot) and surpassing Gemini-3.1-Pro (46.77% zero-shot / 42.25% one-shot) and GPT-5.4 (28.36% / 26.08%).
  • Crushes specialized baselines: Outperforms agentic industrial baseline AgentIAD by +17.34% E2E in zero-shot.
  • Domain-invariant reasoning: Trained only on GoodsAD, it generalizes zero-shot to unseen industrial datasets (+21.50% classification gain over base). On unseen brain tumor MRIs (prompt-only adaptation), AirIAD-4B hits 40.55% E2E, nearly doubling Qwen3-VL-4B-Instruct (21.68%).

Limitations and Future Work

In the main text, the authors note that for the hardest edge cases requiring $\ge 4$ tool invocations, accuracy dips slightly below the base model due to compounded visual/semantic noise and limited reasoning depth seen during training. (Broader method limitations are deferred by the authors to Appendix D, which is outside the provided main text). Extending cross-domain diagnostic reasoning to fields like medical imaging and remote sensing is highlighted as a promising frontier.

Summary updated

Abstract

Multimodal large language models offer a promising foundation for industrial anomaly detection (IAD), yet they remain unreliable for fine-grained diagnosis, where subtle defects require tight alignment between localized visual evidence and domain-specific semantics. Existing single-pass frameworks produce predictions without revisiting or validating intermediate evidence, which leads to spatio-semantic misalignment and error accumulation. More importantly, they lack mechanisms to actively control how additional evidence is acquired and integrated during reasoning, limiting their ability to resolve ambiguous cases. To address these limitations, we propose AirIAD, an agentic iterative reasoning framework that unifies progressive refinement with active information acquisition. AirIAD equips the model with two tools, Perceptive Zoomer and Knowledge Retriever, which enable it to iteratively gather complementary visual and semantic evidence. Through this process, the model performs explicit cross-verification between what is observed and what is known, refining intermediate hypotheses until convergence on a reliable diagnosis. This capability is enabled by a two-stage training pipeline. A supervised fine-tuning stage introduces a Spatio-Semantic Cross-Verification Chain-of-Thought, which structures coordinated perception and knowledge grounding. This is followed by a Spatio-Semantic Group-in-Group Policy Optimization stage, which provides dense step-wise supervision to encourage consistent self-refinement and robust spatio-semantic alignment. Extensive experiments on the MMAD benchmark show that AirIAD, built on Qwen3-VL-Instruct-4B, achieves state-of-the-art performance in anomaly detection and fine-grained diagnosis. More details at: https://github.com/FisherYuuri/AirIAD.
BibTeX
@inproceedings{yu2026airiad,
  author = {Huan Yu and TIECHENG ZHANG and Jin Wang and Jingru Yang and Kaixiang Huang and Zhongyang Sun and Guodong Lu and Shengfeng He},
  title = {{AirIAD: Agentic Iterative Reasoning for Industrial Anomaly Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=KGsOIl5BNC},
}
Figure