GCAFlow: Multi-Scale Flow-Based Model with Global Context-Aware Channel Attention for Industrial Anomaly Detection
Lin Liao, Congde Lu, Yujie Gao, Hao Yu, Biao Cai · Sensors · 2025
In anomaly detection tasks, labeled defect data are often scarce. Unsupervised learning leverages only normal samples during training, making it particularly suitable for anomaly detection tasks. Among unsupervised methods, normalizing flow models have shown distinct advantages. They allow precise modeling of data distributions and enable direct computation of sample log-likelihoods. Recent work has largely focused on feature fusion strategies. However, most of the flow-based methods emphasize spatial information while neglecting the critical role of channel-wise features. To address this limitation, we propose GCAFlow, a novel flow-based model enhanced with a global context-aware channel attention mechanism. In addition, we design a hierarchical convolutional subnetwork to improve the probabilistic modeling capacity of the flow-based framework. This subnetwork supports more accurate estimation of data likelihoods and enhances anomaly detection performance. We evaluate GCAFlow on three benchmark anomaly detection datasets, and the results demonstrate that it consistently outperforms existing flow-based models in both accuracy and robustness. In particular, on the VisA dataset, GCAFlow achieves an image-level AUROC of 98.2% and a pixel-level AUROC of 99.0%.