Tencent's AD-Copilot Beats GPT-4o at Spotting Factory Defects With Just 7B Parameters
Tencent and SUSTech researchers built an MLLM that compares industrial images side-by-side, hitting 82.3% on MMAD and beating human experts on defect description.
ProTakeaways
- AD-Copilot is a 7B MLLM specialized for industrial anomaly detection via visual in-context comparison. Paper
- Hits 82.3% on MMAD, beating GPT-4o, Gemini 1.5 Pro and Qwen2.5-VL-72B, plus ordinary humans.
- New Comparison Encoder uses cross-attention between paired images to produce 100 comparison tokens.
- Chat-AD dataset provides 620K samples and 2M QA pairs across 327 industrial categories.
- MMAD-BBox benchmark and BBox-Mask IoU metric enable fair bounding-box localization evaluation.
- Code, models and datasets released at github.com/jam-cc/AD-Copilot.
Multimodal large language models are great at describing cats in photos, but ask them to spot a hairline crack on a circuit board next to a reference part and they mostly shrug. A team from Southern University of Science and Technology, Tencent YouTu Lab, and A*STAR has released AD-Copilot, a 7B vision-language assistant that finally makes visual in-context comparison work for industrial anomaly detection (IAD), together with a 620K-sample dataset called Chat-AD and a new bounding-box benchmark, MMAD-BBox.
The paper reports that AD-Copilot hits 82.3% average accuracy on the MMAD benchmark, beats every open-source and proprietary model tested, and surpasses human experts on several sub-tasks despite using only 7B parameters.

Why general MLLMs fail on factory floors
Quality inspection has two peculiarities that break current MLLMs. First, industrial images differ fundamentally from natural images, exhibiting repetitive patterns, strict geometry, and subtle flaws that MLLMs easily overlook. Models trained on web data have almost never seen a solder splash or a molded-part burr with pixel-level labels.
Second, and more subtle, is what the authors call the semantic comparison bottleneck. In real inspection workflows, a human puts the suspect part next to a known-good template and looks for deviations. Existing MLLMs encode each image independently, so any comparison happens only at the language-reasoning stage, letting the model spot high-level differences like "a hole in a product" but systematically miss subtle pixel-level deviations. Prior studies confirm that giving templates to existing MLLMs yields negligible improvement, which explains why few-shot settings on MMAD have been so disappointing.
Three pieces that reinforce each other
Instead of another VQA-tuned checkpoint, the authors built a framework where the data, the architecture, and the training curriculum all push toward the same idea: comparison as a first-class operation.
- Chat-AD dataset: over 620,000 high-quality samples and 2 million QA pairs across 327 industrial classes, built from public sources (VIADUCT, Real-IAD, MANTA, 3CAD, MPDD) plus two private datasets. Every query image is paired with a normal template, and captions describe the visual differences between them rather than the image in isolation.
- Comparison Encoder: a plug-in module that performs cross-attention between paired image features and compresses the result into 100 learnable comparison tokens. It is inspired by DETR and, crucially, adds tokens rather than modifying the base image features, so the underlying Qwen2.5-VL keeps its general capabilities intact.
- Four-stage curriculum: perception first, reasoning last, with reinforcement learning at the end for verifiable tasks.

How the Comparison Encoder actually works
The design is deliberately minimalist. Fine-grained image features from the vision encoder are cross-attended to those from the paired image, and a set of learnable comparison queries then compresses the cross-attention results into a fixed-length representation. The number of comparison tokens is set to 100, the diagonal length of the default image grid, which provides sufficient spatial coverage for encoding fine-grained visual differences.
For streaming or multi-image inputs, each image is paired only with its immediately preceding counterpart (self-pairing for the first). Attention visualizations show the LLM leans on comparison tokens for anomaly discrimination and defect description tasks, but focuses on base tokens when just describing a single image, so the module doesn't interfere with plain perception.
The training recipe, stage by stage
- Stage 0 - Learning to Compare: full fine-tune of the Comparison Encoder only, on 30K general change-detection samples (CLEVR-Change, MagicBrush, Spot-the-diff). The LLM is frozen.
- Stage 1 - Industrial Comparison: LoRA fine-tune of the encoder and LLM on 218K contrastive captions where the text explicitly names differences between defective and normal states.
- Stage 2 - Multi-task Comparison: instruction tuning on 298K multi-turn dialogues covering anomaly judgment, defect classification, cause reasoning, localization, and counting, mixed with general-domain data to preserve broad skills.
- Stage 3 - Comparison-aware Reasoning: GRPO reinforcement learning with verifiable rewards on 206K multiple-choice and localization questions. The reward function combines format compliance, exact-match for choices, and IoU for bounding boxes.
The total training cost across all four stages is approximately 2,400 GPU hours on a single node, which is remarkably modest for a model of this quality.
A fairer localization benchmark
The team also proposes MMAD-BBox, which asks models to output actual bounding boxes rather than pick descriptive phrases from multiple choice. To handle the messy shapes of real defects, they introduce BBox-Mask IoU: both predicted boxes and ground-truth boxes are converted into binary masks and IoU is computed in the mask space, which is more forgiving of disconnected fragments and irregular contours.
The numbers
On MMAD with the standard 1-shot setting, AD-Copilot-Thinking (7B) reaches 82.29% average accuracy, edging past ordinary humans (78.69%) and approaching expert level (86.65%). It surpasses Qwen2.5-VL-72B (76.96%), GPT-4o (74.92%), and Gemini-1.5-pro (73.09%). On defect description, object classification, and object analysis it even exceeds human experts, though it still trails experts on anomaly discrimination and defect localization.
On MMAD-BBox the gap is dramatic. Qwen2.5-VL-7B manages just 5.15% accuracy at IoU@0.5, while AD-Copilot-Thinking reaches 21%, the 3.35x headline number. Even Seed1.5-VL only hits 12.5% at that threshold.
The generalization results matter too. On UniPCB (PCB inspection, unseen during training) AD-Copilot beats every released MLLM including the IAD-specialist EMIT. On OmniDiff-Real, a general change captioning benchmark completely outside industrial data, it still outperforms GPT-4o and its Qwen2.5-VL baseline, suggesting the comparison capability is genuinely general.
What it is and is not useful for
This is a strong candidate as an interactive inspection copilot: a floor engineer can hand it a query image plus a template and get back a defect classification, a bounding box, and a natural-language explanation. The plug-and-play nature of the Comparison Encoder is interesting too. The authors show that transferring the trained encoder to Qwen2.5-VL-3B without any fine-tuning still improves anomaly-discrimination F1 by 2.4 points, hinting at reuse across model sizes.
Limits worth flagging: the model still trails human experts on the two most critical tasks (deciding whether an anomaly exists, and where exactly it is). PCB localization also lags because Chat-AD does not include PCB categories. And the RL stage overfits fast without the choice-based reward, so the reward mix matters.
Code and models are released at github.com/jam-cc/AD-Copilot, with the datasets promised alongside.