Graph-Based Log Anomaly Detection via Adversarial Training
摘要
Log analysis can diagnose software system issues. Log anomaly detection always faces the challenge of class distribution imbalance and data noise. In addition, existing methods often overlook log event structural relationships, causing instability. In this work, we propose AdvGraLog, a Generative Adversarial Network (GAN) model based on log graph representation, to detect anomalies when the reconstruction error of discriminator is terrible. We construct log graphs and employ Graph Neural Network (GNN) to obtain a comprehensive graph representation. We use a GAN generator to transform original negative logs into adversarial samples. Discriminator adopts an AutoEncoder (AE) to detect anomalies by comparing reconstruction error to a threshold. Adversarial training enhances adversarial sample quality and boosts the discriminator’s anomaly recognition. Experimental results demonstrate the superiority of our proposed method over baseline approaches in real-world datasets. Supplementary experiments further validate the effectiveness of our model in handling imbalanced log data and augmenting model robustness.