[Paper Review] Log-based Anomaly Detection Without Log Parsing
NeuralLog proposes a log-based anomaly detection method that bypasses log parsing by directly encoding raw log messages into semantic vectors using BERT, then applying a Transformer-based classifier to detect anomalies. It achieves F1-scores above 0.95 on four public datasets, outperforming existing parsing-dependent methods by eliminating errors from OOV words and semantic misunderstandings.
Software systems often record important runtime information in system logs for troubleshooting purposes. There have been many studies that use log data to construct machine learning models for detecting system anomalies. Through our empirical study, we find that existing log-based anomaly detection approaches are significantly affected by log parsing errors that are introduced by 1) OOV (out-of-vocabulary) words, and 2) semantic misunderstandings. The log parsing errors could cause the loss of important information for anomaly detection. To address the limitations of existing methods, we propose NeuralLog, a novel log-based anomaly detection approach that does not require log parsing. NeuralLog extracts the semantic meaning of raw log messages and represents them as semantic vectors. These representation vectors are then used to detect anomalies through a Transformer-based classification model, which can capture the contextual information from log sequences. Our experimental results show that the proposed approach can effectively understand the semantic meaning of log messages and achieve accurate anomaly detection results. Overall, NeuralLog achieves F1-scores greater than 0.95 on four public datasets, outperforming the existing approaches.
Motivation & Objective
- To investigate the negative impact of log parsing errors—especially from OOV words and semantic misunderstandings—on anomaly detection performance.
- To develop a log-based anomaly detection approach that eliminates dependency on log parsing to preserve semantic integrity and avoid parsing-induced information loss.
- To leverage pre-trained language models like BERT to extract contextual and semantic representations directly from raw log messages.
- To design a sequence-aware classification model using Transformers to detect anomalies based on semantic log sequences without prior event templating.
- To validate the proposed method on real-world datasets and demonstrate superior performance compared to parsing-based state-of-the-art approaches.
Proposed method
- Utilizes BERT with WordPiece tokenization to encode raw log messages into dense semantic vectors, effectively handling OOV words without requiring log parsing.
- Treats each raw log message as a sequence of tokens and applies a pre-trained BERT model to extract contextualized embeddings that preserve semantic meaning.
- Constructs log sequences by grouping messages temporally (e.g., via fixed or sliding windows) to form input sequences for the anomaly detection model.
- Employs a Transformer-based classifier with multi-head self-attention to model long-range dependencies and contextual relationships across log sequences.
- Trains the end-to-end model in a supervised manner using labeled log sequences, where anomalies are identified based on learned patterns in semantic representations.
- Avoids any form of log template extraction or event indexing, thus eliminating parsing errors and preserving full semantic context.

Experimental results
Research questions
- RQ1To what extent do OOV words and semantic misunderstandings in log parsing degrade the performance of existing log-based anomaly detection methods?
- RQ2Can a deep learning model directly process raw log messages without log parsing achieve better anomaly detection performance than parsing-dependent approaches?
- RQ3How well can BERT-based semantic encoding preserve the contextual and semantic meaning of log messages for anomaly detection?
- RQ4Does a Transformer-based classifier trained on raw log embeddings outperform models relying on parsed log events in detecting system anomalies?
- RQ5Can the proposed method generalize across diverse real-world log datasets without requiring auxiliary data or manual template engineering?
Key findings
- Empirical analysis reveals that log parsing errors—particularly from OOV words and semantic misinterpretations—significantly degrade the performance of existing anomaly detection models.
- NeuralLog achieves F1-scores greater than 0.95 on all four public benchmark datasets, demonstrating high detection accuracy without log parsing.
- The model outperforms state-of-the-art parsing-based methods such as LogRobust, LogAnomaly, and DeepLog, which are sensitive to parsing inaccuracies.
- By using BERT to encode raw logs, NeuralLog effectively captures semantic meaning and contextual relationships, even for rare or unseen OOV terms.
- The end-to-end training of the Transformer classifier on semantic vectors leads to robust anomaly detection, with no need for log template extraction or external data.
- The approach is efficient and scalable, as it avoids computationally expensive parsing steps and directly leverages pre-trained language representations.

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.