Unified Unsupervised Anomaly Detection via Matching Cost Filtering
Zhe Zhang, Mingxiu Cai, Gaochang Wu, Jing Zhang, Lingqiao Liu, Dacheng Tao, Tianyou Chai, Xiatian Zhu
TL;DR
Unified Cost Filtering (UCF) reframes unsupervised anomaly detection across unimodal RGB and multimodal RGB–3D and RGB–Text as a three-stage pipeline: feature extraction, anomaly cost-volume construction, and cost-volume filtering. By constructing a multi-template, cross-/intra-modal similarity volume and refining it with a dual-stream attention-guided 3D U‑Net (RCSA), UCF suppresses pervasive matching noise from reconstruction shortcuts and cross-modal misalignments. Integrated as a plug-in into 10 diverse baselines, UCF achieves state-of-the-art results across 22 benchmarks, including challenging RGB, RGB–3D, and RGB–Text UAD tasks, with modest memory and compute overhead. The approach demonstrates strong increases in both detection (image-level) and localization (pixel/region-level) performance, enhancing practical deployment in industrial and medical domains and enabling broader cross-modal knowledge transfer in anomaly detection.
Abstract
Unsupervised anomaly detection (UAD) aims to identify image- and pixel-level anomalies using only normal training data, with wide applications such as industrial inspection and medical analysis, where anomalies are scarce due to privacy concerns and cold-start constraints. Existing methods, whether reconstruction-based (restoring normal counterparts) or embedding-based (pretrained representations), fundamentally conduct image- or feature-level matching to generate anomaly maps. Nonetheless, matching noise has been largely overlooked, limiting their detection ability. Beyond earlier focus on unimodal RGB-based UAD, recent advances expand to multimodal scenarios, e.g., RGB-3D and RGB-Text, enabled by point cloud sensing and vision-language models. Despite shared challenges, these lines remain largely isolated, hindering a comprehensive understanding and knowledge transfer. In this paper, we advocate unified UAD for both unimodal and multimodal settings in the matching perspective. Under this insight, we present Unified Cost Filtering (UCF), a generic post-hoc refinement framework for refining anomaly cost volume of any UAD model. The cost volume is constructed by matching a test sample against normal samples from the same or different modalities, followed by a learnable filtering module with multi-layer attention guidance from the test sample, mitigating matching noise and highlighting subtle anomalies. Comprehensive experiments on 22 diverse benchmarks demonstrate the efficacy of UCF in enhancing a variety of UAD methods, consistently achieving new state-of-the-art results in both unimodal (RGB) and multimodal (RGB-3D, RGB-Text) UAD scenarios. Code and models will be released at https://github.com/ZHE-SAPI/CostFilter-AD.
