LogSD: log anomaly detection via topic words awareness semantic augmentation and category-guided Mixup data augmentation
摘要
Log anomaly detection is necessary for the reliability of enterprise systems. The existing research typically employs word vector weighted aggregation or concatenation to represent log semantics, which is easy to lose the word order relationship or ignore the influence of each word. Besides, system anomalies are contingent, which means that the number of normal logs is much greater. This imbalanced data relationship limits the performance of the deep learning model and increases the likelihood of false alarms. Therefore, we propose a log anomaly detection approach via semantic and data augmentation, named LogSD. It first designs a topic word awareness semantic representation method, which synthesizes the relative distance and semantic similarity between topic words and other words, maintains the uniqueness of word order while enriching the log semantic features, and achieves semantic augmentation. Next, LogSD proposes a category-guided Mixup data augmentation strategy to generate pseudo-samples toward abnormal logs in the feature space. Meanwhile, a novel contrastive learning approach is designed to constrain the features of pseudo-samples, reduce noise interference, and achieve data augmentation. Through extensive experiments on two datasets, it is confirmed that LogSD outperforms the state-of-art methods, achieving an average F1-score higher than 0.97.