## 2 Preliminary and Related Works
### Normalizing Flow-Based Anomaly Detection  
Unsupervised visual anomaly detection has experienced significant advancements recently, driven by the increasing demand for reliable and efficient anomaly detection solutions in industrial settings. This review explores recent developments in unsupervised anomaly detection, particularly in industrial applications, highlighting the advantages of the normalizing flow method.  
[PERSON] [31] explores the use of normalizing flows to distil distribution knowledge. Normalizing flows have emerged as a powerful tool in anomaly detection, and this study contributes to improving their effectiveness, enhancing the ability to characterize data distributions in industrial anomaly detection.  
The inspection of dry carbon fiber textiles in aerospace manufacturing presents a unique challenge due to the rarity and diversity of defects. [PERSON] et al. present an unsupervised defect detection method that satisfies four key criteria for industrial applicability [32]. By combining a visual transformer encoder and a normalizing flow, this approach extracts global context from input images and produces image likelihood as an anomaly score. Trained on only 150 normal samples, the method achieves exceptional results, correctly detecting 100% of anomalies with a 0% false positive rate, even on subtle defects covering only 1% of the image area. Additionally, the method's real-time performance and interpretability make it suitable for diverse industrial domains.  
[PERSON] et al. introduce DifferNet, a semi-supervised defect detection model leveraging the descriptiveness of features extracted by convolutional neural networks and normalizing flows [33]. DifferNet's innovative approach employs multi-scale feature extraction to enable normalizing flows to assign meaningful likelihoods to images, thus providing efficient defect detection and pixel-wise localization.  
In the pursuit of real-time anomaly detection with localization, [PERSON] et al. introduce CFLOW-AD, a novel model built on conditional normalizing flows [34]. CFLOW-AD presents a discriminatively pretrained encoder followed by multi-scale generative decoders, explicitly estimating the likelihood of encoded features. The result is a computationally and memory-efficient model that surpasses prior state-of-the-art models with a 10\(\times\) reduction in computational requirements. Notably, CFLOW-AD excels in detection tasks with a 0.36% AUROC improvement, as well as localization tasks, with a 1.12% AUROC and 2.5% AUPRO increase. The availability of open-source code facilitates reproducible experiments, enhancing the collaborative nature of research in this domain. Similarly, [PERSON] et al. introduce FastFlow, a novel approach to unsupervised anomaly detection and localization6. FastFlow leverages 2D normalizing flows as a probability distribution estimator, presenting a significant advancement in this field.  
Unsupervised anomaly detection in industrial settings has seen remarkable advancements, with normalizing flow-based methods like CFLOW-AD, FastFlow, and DifferNet demonstrating significant advantages. These methods not only enhance detection accuracy and efficiency but also address practical challenges such as limited training data and real-time processing requirements [14; 38; 39; 40; 41].  
Nevertheless, these models grapple with the pronounced issue of elevated false alarms in intricate industrial scenarios. In our pursuit of refining detection performance, we delve into the manifestation of false alarms within the specific context of industrial applications.