Skip to main content
QUICK REVIEW

[Paper Review] Concise Logarithmic Loss Function for Robust Training of Anomaly Detection Model

YeongHyeon Park|arXiv (Cornell University)|Jan 15, 2022
Anomaly Detection Techniques and ApplicationsComputer Science7 citations
TL;DR

This paper proposes a novel logarithmic mean squared error (LMSE) loss function to improve training stability and anomaly detection performance in autoencoder-based models. By applying logarithmic scaling to prediction errors, LMSE enhances gradient flow and loss convergence, demonstrating superior robustness and up to 0.017 AUROC improvement over MSE on MNIST and consistent stability on Fashion-MNIST.

ABSTRACT

Recently, deep learning-based algorithms are widely adopted due to the advantage of being able to establish anomaly detection models without or with minimal domain knowledge of the task. Instead, to train the artificial neural network more stable, it should be better to define the appropriate neural network structure or the loss function. For the training anomaly detection model, the mean squared error (MSE) function is adopted widely. On the other hand, the novel loss function, logarithmic mean squared error (LMSE), is proposed in this paper to train the neural network more stable. This study covers a variety of comparisons from mathematical comparisons, visualization in the differential domain for backpropagation, loss convergence in the training process, and anomaly detection performance. In an overall view, LMSE is superior to the existing MSE function in terms of strongness of loss convergence, anomaly detection performance. The LMSE function is expected to be applicable for training not only the anomaly detection model but also the general generative neural network.

Motivation & Objective

  • To address instability in training deep autoencoders for anomaly detection using standard mean squared error (MSE) loss.
  • To improve training robustness by reducing sensitivity to large prediction errors during backpropagation.
  • To enhance anomaly detection performance through a more stable and consistent loss convergence process.
  • To evaluate the proposed LMSE loss against MSE and MSLE across multiple benchmark datasets (MNIST, Fashion-MNIST).

Proposed method

  • Proposes a logarithmic transformation of the prediction error in the MSE loss function, resulting in the Logarithmic Mean Squared Error (LMSE) loss.
  • The LMSE loss is defined as $ L_{\text{LMSE}}(y,\hat{y}) = \frac{1}{N} \sum_{n=1}^{N} (\log(y+1) - \log(\hat{y}+1))^2 $, applying log scaling to both target and prediction.
  • Employs grid search for hyperparameter tuning (latent dimension and learning rate) to ensure fair comparison between loss functions.
  • Uses AUROC as the primary metric for evaluating anomaly detection performance across 10-class setups per dataset.
  • Visualizes loss convergence and gradient dynamics to compare training stability between MSE and LMSE.
  • Conducts ablation studies on MNIST and Fashion-MNIST, analyzing both mean performance and standard deviation across runs.

Experimental results

Research questions

  • RQ1Does the logarithmic transformation of the MSE loss improve training stability in autoencoder-based anomaly detection models?
  • RQ2How does LMSE compare to MSE and MSLE in terms of loss convergence speed and consistency during training?
  • RQ3What is the impact of LMSE on anomaly detection performance, measured by AUROC, across different normal class definitions?
  • RQ4Is the performance gain of LMSE statistically significant and consistent across diverse datasets like MNIST and Fashion-MNIST?
  • RQ5Can LMSE reduce variance in training outcomes across different hyperparameter settings compared to MSE?

Key findings

  • LMSE demonstrated superior loss convergence stability on both MNIST and Fashion-MNIST, with lower average loss and reduced standard deviation across training runs.
  • On the MNIST dataset, LMSE achieved a mean AUROC of 0.893 ± 0.067, outperforming MSE’s 0.887 ± 0.074, with a 0.006 improvement in average AUROC.
  • The maximum performance gain of LMSE over MSE reached 0.017 AUROC for the 'class 2' anomaly detection task on MNIST.
  • On Fashion-MNIST, LMSE showed slightly lower mean AUROC (0.901 ± 0.060) than MSE (0.903 ± 0.060), but with equivalent performance stability.
  • The standard deviation of AUROC across 10 classes was lower for LMSE (0.067) than for MSE (0.074) on MNIST, indicating more consistent performance.
  • Visual analysis confirmed that LMSE produces steeper gradients in high-error regions, enabling faster correction of large errors and improved training robustness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.