On Sequence-to-Sequence Models for Automated Log Parsing
Summary
This study systematically evaluated four sequence modeling architectures—Transformer, Mamba state-space, monodirectional LSTM, and bidirectional LSTM—for automated log parsing. Researchers trained 396 models across various dataset configurations, using relative Levenshtein edit distance for evaluation. Transformer achieved the lowest mean relative edit distance (0.111), followed by Mamba (0.145), mono-LSTM (0.186), and bi-LSTM (0.265). Mamba provided competitive accuracy with substantially lower computational cost. Character-level tokenization generally improved performance, while sequence length had negligible practical impact on Transformer accuracy. Both Mamba and Transformer demonstrated stronger sample efficiency than recurrent models, with Transformers reducing parsing error by 23.4%.
Key takeaway
For MLOps engineers designing log parsing pipelines, this study clarifies architectural choices. If your environment has structured or moderately variable log datasets, Mamba offers strong performance with significantly lower computational costs, making it ideal for budget-constrained deployments. For highly heterogeneous or distribution-shifted log formats, Transformers provide maximum robustness, reducing parsing error by 23.4%, despite higher compute demands. Evaluate character-level tokenization for improved accuracy.
Key insights
Mamba and Transformer models offer superior log parsing accuracy and sample efficiency, with Mamba providing cost advantages.
Principles
- Character-level tokenization generally improves log parsing performance.
- Mamba models offer competitive accuracy with substantially lower computational cost.
- Transformers demonstrate stronger robustness under log format heterogeneity.
Method
A controlled empirical study compared Transformer, Mamba, mono-LSTM, and bi-LSTM architectures, training 396 models across varied datasets and evaluating with relative Levenshtein edit distance.
In practice
- Prioritize character-level tokenization for log parsing when architectural constraints permit.
- Consider Mamba for log parsing in resource-constrained environments.
- Utilize Transformers for highly diverse or distribution-shifted log formats.
Topics
- Automated Log Parsing
- Sequence-to-Sequence Models
- Transformer Architecture
- Mamba State-Space Models
- Recurrent Neural Networks
- Computational Efficiency
- Log Data Analysis
Code references
Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, MLOps Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.