[Paper Review] Deep Generative Model using Unregularized Score for Anomaly Detection with Heterogeneous Complexity
This paper proposes an unregularized anomaly score for deep generative models (DGMs) that improves anomaly detection in heterogeneous complexity datasets—where complex-shaped normal samples are mistakenly flagged as anomalous due to inherent variability. By removing regularization terms during inference, the method produces a more robust score that better distinguishes true anomalies from complex but normal structures, significantly outperforming standard DGMs and conventional methods on real-world manufacturing datasets.
Accurate and automated detection of anomalous samples in a natural image dataset can be accomplished with a probabilistic model for end-to-end modeling of images. Such images have heterogeneous complexity, however, and a probabilistic model overlooks simply shaped objects with small anomalies. This is because the probabilistic model assigns undesirably lower likelihoods to complexly shaped objects that are nevertheless consistent with set standards. To overcome this difficulty, we propose an unregularized score for deep generative models (DGMs), which are generative models leveraging deep neural networks. We found that the regularization terms of the DGMs considerably influence the anomaly score depending on the complexity of the samples. By removing these terms, we obtain an unregularized score, which we evaluated on a toy dataset and real-world manufacturing datasets. Empirical results demonstrate that the unregularized score is robust to the inherent complexity of samples and can be used to better detect anomalies.
Motivation & Objective
- To address the challenge of false positive anomaly detections in deep generative models when normal samples have high structural complexity, such as screw holes or textured tissues.
- To investigate how regularization terms in DGMs distort anomaly scores based on sample complexity, leading to misclassification of complex normal samples as anomalies.
- To propose and evaluate an unregularized score derived from the variational autoencoder objective, removing regularization to improve robustness to inherent sample complexity.
- To validate the proposed method on both synthetic and real-world manufacturing datasets, demonstrating superior performance over standard DGMs and conventional anomaly detection techniques.
Proposed method
- The method uses a variational autoencoder (VAE) with the standard VAE objective function but omits the KL divergence regularization term during inference, resulting in an unregularized anomaly score.
- The anomaly score is defined as the square normalized distance $ M(x) = \|x - \mu_x\|^2 / \sigma_x^2 $, which is invariant to the complexity of the input image patch.
- The unregularized score is computed using the reconstructed mean $ \mu_x $ and standard deviation $ \sigma_x $ from the VAE encoder, avoiding dependence on the complexity-sensitive KL term.
- The method is evaluated using the VAE's reconstruction loss and normalized distance as the final anomaly score, with normalization to ensure consistency across complex and simple regions.
- The approach is compared against standard VAEs with regularization, Gaussian Mixture Models (GMM), and Isolation Forest on toy and real manufacturing datasets.
- The score is applied at the patch level with a $ 4 \times 4 $ stride to localize anomalies in images, with scores normalized to [0,1] for visualization and evaluation.
Experimental results
Research questions
- RQ1How do regularization terms in deep generative models affect anomaly detection performance on samples with heterogeneous complexity?
- RQ2Can removing regularization terms in the inference phase improve the robustness of anomaly detection for complex-shaped normal samples?
- RQ3Does the unregularized score $ M(x) $ outperform standard DGM-based anomaly scores on real-world manufacturing datasets with complex textures and structures?
- RQ4To what extent does the proposed method reduce false positives on normal but complex regions such as screw grooves or textured surfaces?
Key findings
- The VAE with the unregularized score $ M(x) $ significantly outperformed the standard VAE with regularization on the screw dataset, achieving higher ROC-AUC scores.
- The unregularized score $ M(x) $ produced consistently low anomaly scores in normal, complex regions such as screw grooves and curved surfaces, unlike the standard VAE, which assigned high scores due to variability.
- The Isolation Forest failed to model the screw dataset effectively, producing poor performance due to its inability to capture spatial and structural patterns in complex textures.
- The GMM with the unregularized score showed moderate improvement over its regularized counterpart, but still struggled with spatial shifts and complex boundaries, unlike the VAE-based method.
- The square normalized distance $ M(x) $ was robust to image patch complexity because it normalized by $ \sigma_x $, which inherently accounts for local variability, making it more reliable for anomaly detection.
- Visualizations confirmed that the unregularized score correctly localized anomalies such as blowholes while avoiding false positives in normal but complex regions like screw grooves.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.