Research map / Label-efficient and robust learning / OOD and anomaly detection
CostFilter-AD: Enhancing Anomaly Detection through Matching Cost Filtering
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes CostFilter-AD, a plug-in that builds a global patch-matching cost volume between an input and normal templates and refines it with a 3D U-Net guided by input features and an initial anomaly map, improving multi-class and single-class UAD on MVTec-AD and VisA.
Problem
Unsupervised anomaly detection relies on image- or feature-level matching between inputs and normal templates, and this matching is noisy (identical shortcut, misalignment), blurring normal/anomaly boundaries and hurting detection of subtle anomalies.
Approach
Treat anomaly scoring as cost volume filtering borrowed from stereo/flow estimation: build a global matching cost volume across multiple templates (including intermediate diffusion reconstructions), then filter it with a 3D U-Net whose residual channel-spatial attention is queried by input features and an initial anomaly map, plus a class-aware adaptor in the loss.
Key results
- Integrated with GLAD on MVTec-AD multi-class, image/pixel AUROC improves by 1.2%/0.9% (GLAD baseline 97.5/97.3 to 98.7/98.2 mean).
- On VisA, AnomalDF+Ours reaches mean 94.3 I-AUROC / 99.2 P-AUROC versus 90.5 / 97.5 for AnomalDF.
- With Dinomaly on MVTec-AD, CostFilter-AD achieves 99.7 I-AUROC and 98.4 P-AUROC versus 99.6 / 98.3 baseline, with only ~43.6M extra parameters and ~0.05 s extra inference per image for Dinomaly.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add CostFilter-AD to HVQ-Trans | HVQ-Trans · MVTec-AD | image AUROC: 98.0 -> 99.0 | Helped |
| Add CostFilter-AD to AnomalDF | AnomalDF · MVTec-AD | pixel AUROC: 98.1 -> 98.8 | Helped |
| Add CostFilter-AD to UniAD | UniAD · VisA | pixel AUROC: 98.0 -> 98.6 | Helped |
| Add CostFilter-AD to Dinomaly | Dinomaly · BTAD | pixel AP: 70.1 -> 74.3 | Helped |
| Map the matching dimension to depth rather than channel (ablation) | GLAD+CostFilter-AD · MVTec-AD | image AUROC: 96.2 -> 87.8 | Hurt |
| Add N-1 intermediate denoising-step templates (ablation) | GLAD+CostFilter-AD · MVTec-AD | image AUROC: 96.2 -> 96.7 | Helped |
| Add spatial guidance (SG) (ablation) | GLAD+CostFilter-AD · MVTec-AD | image AUROC: 96.7 -> 97.8 | Helped |
| Add matching guidance (MG) from the initial anomaly map (ablation) | GLAD+CostFilter-AD · MVTec-AD | image AUROC: 97.8 -> 98.3 | Helped |
| Add class-aware adaptor / cross-entropy loss (ablation) | GLAD+CostFilter-AD · MVTec-AD | image AUROC: 98.3 -> 98.5 | Helped |
| Add SSIM and Soft-IoU structural losses (ablation) | GLAD+CostFilter-AD · MVTec-AD | pixel AUROC: 98.0 -> 98.2 | Helped |
| Train a hybrid model on both reconstruction- and embedding-based volumes (ablation) | CostFilter-AD · MVTec-AD | image AUROC: 98.7 -> 98.8 | Mixed |
| Train a hybrid model on both reconstruction- and embedding-based volumes (ablation) | CostFilter-AD · VisA | pixel AUROC: 99.2 -> 99.3 | Helped |
Surprising findings
- Directly applying stereo-matching-style local (pixel-level) matching drops performance to 87.8/89.0 on MVTec-AD, attributed to feature contamination from global multi-template matching.
- Anomaly volumes from reconstruction-based and embedding-based templates are not compatible across models; cross-type testing causes performance drops, requiring a hybrid model.
Limitations
- Relies on anomaly-relevant signals being present in the cost volume; subtle anomalies from low-resolution or weak features are still missed (failure cases).
- Gains over strong baselines like Dinomaly are small (e.g., 0.1 I-AUROC on VisA), and some per-class metrics regress.
- Cost volume compatibility is limited across template types, needing a hybrid model.
Experimental setup
Datasets: MVTec-AD VisA MPDD BTAD
Benchmarks: MVTec-AD VisA MPDD BTAD
Metrics: I-AUROC I-AP I-F1max P-AUROC P-AP P-F1max AUPRO
Baselines: UniAD GLAD HVQ-Trans AnomalDF Dinomaly PatchCore DiAD VPDM MambaAD JNLD OmniAL
Builds on: GLAD AnomalyDINO HVQ-Trans DINO stereo matching cost volume filtering
Closest papers by meaning
- One-to-Normal: Anomaly Personalization for Few-shot Anomaly Detection (NeurIPS 2024 · similarity 0.87)
- Correcting Deviations from Normality: A Reformulated Diffusion Model for Multi-Class Unsupervised Anomaly Detection (CVPR 2025 · similarity 0.87)
- AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model (AAAI 2024 · similarity 0.86)
- Dinomaly: The Less Is More Philosophy in Multi-Class Unsupervised Anomaly Detection (CVPR 2025 · similarity 0.86)
- UniVAD: A Training-free Unified Model for Few-shot Visual Anomaly Detection (CVPR 2025 · similarity 0.86)
- ADPretrain: Advancing Industrial Anomaly Detection via Anomaly Representation Pretraining (NeurIPS 2025 · similarity 0.85)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
