[Paper Review] Log Message Anomaly Detection and Classification Using Auto-B/LSTM and Auto-GRU
This paper proposes Auto-LSTM, Auto-BLSTM, and Auto-GRU models that combine autoencoders with recurrent networks to detect anomalies and classify log messages. By first compressing unstructured log data into meaningful features via autoencoders and then applying LSTM, BLSTM, or GRU for sequence modeling, the models achieve over 99% accuracy, precision, and F-measure on benchmark log datasets, outperforming existing methods with minimal training data.
Log messages are now widely used in software systems. They are important for classification as millions of logs are generated each day. Most logs are unstructured which makes classification a challenge. In this paper, Deep Learning (DL) methods called Auto-LSTM, Auto-BLSTM and Auto-GRU are developed for anomaly detection and log classification. These models are used to convert unstructured log data to extracted features which is suitable for classification algorithms. They are evaluated using four data sets, namely BGL, Openstack, Thunderbird and IMDB. The first three are popular log data sets while the fourth is a movie review data set which is used for sentiment classification. The results obtained show that Auto-LSTM, Auto-BLSTM and Auto-GRU perform better than other well-known algorithms.
Motivation & Objective
- To address the challenge of detecting anomalies in unstructured log messages generated by large-scale software systems.
- To improve log classification performance by extracting meaningful features from raw, unstructured log text.
- To develop deep learning models that require minimal training data while maintaining high accuracy in anomaly detection and classification.
- To evaluate the proposed models on diverse datasets, including system logs and sentiment-labeled text, to demonstrate generalization capability.
- To show that autoencoder-based feature extraction enhances the performance of recurrent networks on sequential log data.
Proposed method
- An autoencoder is used to compress raw log messages into a lower-dimensional latent representation, preserving structural and semantic features.
- The learned latent features from the autoencoder are fed into LSTM, BLSTM, or GRU networks for sequence modeling and classification.
- Word frequency is used to convert text log messages into numerical vectors before autoencoder training, preserving basic word-level relationships.
- The models are trained end-to-end using backpropagation with a reconstruction loss for the autoencoder and cross-entropy loss for the classification head.
- 10-fold cross-validation is applied to evaluate generalization, with training data limited to less than 1% of the total dataset.
- Hyperparameter tuning is suggested as a future step to further improve performance.
Experimental results
Research questions
- RQ1Can autoencoder-based feature extraction improve the performance of recurrent networks in log anomaly detection and classification?
- RQ2How do Auto-LSTM, Auto-BLSTM, and Auto-GRU compare to existing models in terms of accuracy, precision, recall, and F-measure on log datasets?
- RQ3To what extent can these models generalize to non-log text classification tasks, such as sentiment analysis?
- RQ4Does using a small fraction of training data (less than 1%) still yield high performance when combined with autoencoder feature learning?
- RQ5How does the bidirectional context in Auto-BLSTM compare to unidirectional LSTM and GRU in capturing log message semantics?
Key findings
- The Auto-BLSTM model achieved the highest average validation accuracy of 99.6% and testing accuracy of 99.4% across the BGL, OpenStack, and Thunderbird datasets.
- On the BGL dataset, the Auto-BLSTM model achieved a recall of 99.9% for positive (anomalous) logs and an F-measure of 99.3%.
- The Auto-LSTM model achieved a testing accuracy of 99.0%, with precision and recall of 98.4% and 99.8% for negative and positive logs, respectively.
- The Auto-GRU model achieved a testing accuracy of 99.2%, with precision of 98.7% and 99.9% and recall of 99.9% and 98.5% for negative and positive logs, respectively.
- All models outperformed the IKNN algorithm, achieving higher precision (98.7% vs. 96%), recall (99.9% vs. 96%), and F-measure (99.1% vs. 96%) on negative log messages.
- The models generalized well to the IMDB movie review dataset, achieving strong performance in sentiment classification, indicating broad applicability beyond log analysis.
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.