Leveraging Large Language Models and BERT for Log Parsing and Anomaly Detection
Computer systems and applications generate large amounts of logs to measure and record information, which is vital to protect the systems from malicious attacks and useful for repairing faults, especially with the rapid development of distributed computing. Among various logs, the anomaly log is beneficial for operations and maintenance (O&M) personnel to locate faults and improve efficiency. In this paper, we utilize a large language model, ChatGPT, for the log parser task. We choose the BERT model, a self-supervised framework for log anomaly detection. BERT, an embedded transformer encoder, with a self-attention mechanism can better handle context-dependent tasks such as anomaly log detection. Meanwhile, it is based on the masked language model task and next sentence prediction task in the pretraining period to capture the normal log sequence pattern. The experimental results on two log datasets show that the BERT model combined with an LLM performed better than other classical models such as Deelog and Loganomaly.
Authors
- Yihan Zhou (ORCID: https://orcid.org/0000-0002-7934-7423)
- Yuxin Li (ORCID: https://orcid.org/0000-0001-7404-6595)
- Yan Chen (ORCID: https://orcid.org/0000-0002-7713-6913)
- Yukang Zhou
- Chao Hu (ORCID: https://orcid.org/0000-0002-7679-1748)
- X. L. Rao
Institutions
- Central South University (CN)
- Hong Kong Polytechnic University (HK)
- Nanyang Technological University (SG)
Publication Details
- Journal
- Mathematics
- Published
- 2024-09-05
- DOI
- https://doi.org/10.3390/math12172758
- Citations
- 8
- Primary Topic
- Software System Performance and Reliability
- Type
- article
- Field-Weighted Citation Impact
- 2.79
Funders
- National Natural Science Foundation of China
- Central South University