Autoencoder with Adaptive Loss Function for Supervised Anomaly Detection
Yasuhiro KANISHIMA, T. Sudo, Hiroyuki Yanagihashi · Procedia Computer Science · 2022
When anomaly detection is applied to a product inspection process, it is often the case that the system initially has no anomaly data, but acquires anomaly data during operation. In such cases, an unsupervised learning-based anomaly detection model (e.g. autoencoders) using only normal data may be applied in the initial phase of operation, and a supervised learning-based anomaly detection model with additional anomaly data may be applied once anomaly data have been acquired during operation. Although supervised learning-based anomaly detection models are an extension of autoencoders to supervised learning, when they are used to update an unsupervised learning-based anomaly detection model to a supervised learning-based anomaly detection model, the problem of inconsistency in the anomaly scores before and after the model update arises. In this paper, we propose a new method called autoencoder with adaptive loss function (AEAL) to improve the detection accuracy of known anomalies while ensuring consistent anomaly scores before and after model updates. AEAL is an autoencoder-based method for learning anomaly detection models by dynamically adjusting the balance between minimizing reconstruction errors for anomaly data and maximizing reconstruction errors for anomaly data. Experimental results on multiple public image datasets show that AEAL has the effect of improving the detection accuracy of known anomalies while ensuring that anomaly scores are consistent with the anomaly detection model prior to the update.