[Paper Review] FlexParser -- the adaptive log file parser for continuous results in a changing world
FlexParser is a novel, adaptive deep learning-based log file parser that maintains high parsing accuracy despite gradual changes in log message structures—commonly caused by software updates. Using text preprocessing followed by a stateful LSTM that learns structural patterns across multiple log events, FlexParser achieves an average F1-score of 0.98 across seven public datasets under various mutation conditions, outperforming both state-of-the-art unsupervised parsers and other deep learning methods in dynamic environments.
Any modern system writes events into files, called log files. Those contain crucial information which are subject to various analyses. Examples range from cybersecurity, intrusion detection over usage analyses to trouble shooting. Before data analysis is possible, desired information needs to be extracted first out of the semi-structured log messages. State-of-the-art event parsing often assumes static log events. However, any modern system is updated consistently and with updates also log file structures can change. We call those changes "mutation" and study parsing performance for different mutation cases. Latest research discovers mutations using anomaly detection post mortem, however, does not cover actual continuous parsing. Thus, we propose a novel and flexible parser, called FlexParser, which can extract desired values despite gradual changes in the log messages. It implies basic text preprocessing followed by a supervised Deep Learning method. We train a stateful LSTM on parsing one event per data set. Statefulness enforces the model to learn log message structures across several examples. Our model was tested on seven different, publicly available log file data sets and various kinds of mutations. Exhibiting an average F1-Score of 0.98, it outperforms other Deep Learning methods as well as state-of-the-art unsupervised parsers.
Motivation & Objective
- To address the challenge of maintaining accurate log parsing in systems undergoing continuous software updates that alter log message formats.
- To develop a parser that adapts to gradual structural changes (mutations) in log files without requiring retraining from scratch.
- To outperform existing state-of-the-art (SOTA) unsupervised and supervised log parsers in dynamic, evolving log environments.
- To demonstrate robustness across diverse log sources, including distributed systems, supercomputers, operating systems, and mobile applications.
- To provide a reliable foundation for downstream log analytics by ensuring continuous, accurate value extraction despite semantic and syntactic shifts in log messages.
Proposed method
- Applying text preprocessing to normalize and standardize raw log messages before parsing.
- Employing a supervised, stateful Long Short-Term Memory (LSTM) network to learn long-range dependencies and structural patterns across sequences of log events.
- Training the model on one target event per dataset to ensure comparability and isolate parsing performance for individual key-value pairs.
- Leveraging statefulness to enforce the model’s learning of event structure across multiple log entries rather than treating each log line in isolation.
- Using a fixed architecture and hyperparameters across all datasets and mutation cases to ensure fair comparison.
- Evaluating model performance using F1-score as the primary metric to balance precision and recall, especially in imbalanced data scenarios.
Experimental results
Research questions
- RQ1How does FlexParser perform in parsing log messages when the underlying log format undergoes gradual structural changes (mutations)?
- RQ2Can a deep learning-based parser maintain high accuracy across diverse log sources and mutation types, outperforming existing SOTA parsers?
- RQ3Does the use of a stateful LSTM improve parsing robustness compared to non-stateful or standard classification models in evolving log environments?
- RQ4How does the location of mutation insertion (early, middle, or late in the log file) affect parsing performance?
- RQ5Can FlexParser generalize across different system types, including mobile, OS, distributed, and HPC systems, under real-world mutation scenarios?
Key findings
- FlexParser achieves an average F1-score of 0.98 across seven public log datasets under various mutation conditions, significantly outperforming other deep learning and state-of-the-art unsupervised parsers.
- The stateful LSTM architecture enables the model to learn structural patterns across multiple log events, improving robustness to gradual format changes.
- FlexParser maintains high parsing accuracy even when mutations occur at different positions in the log file (early, middle, or late), demonstrating consistent adaptability.
- The model outperforms SOTA unsupervised parsers such as Drain, Spell, and LogMine, particularly in scenarios involving rare or subtle log format changes.
- FlexParser is the first method to successfully parse values from gradually changing log messages without relying on semantic continuity, making it uniquely suited for evolving systems.
- The study confirms that F1-score is a more reliable and meaningful metric than AUC or accuracy for evaluating log parsing models, especially in imbalanced data settings.
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.