System log anomaly detection based on contrastive learning and retrieval augmented

System logs are run-time significant events of computer systems recorded by software. By analyzing the system logs, a lot of important information and issues can be detected promptly. Log anomaly detection is a popular research topic in recent years. However, log anomaly detection faces lots of challenges such as the variability of logs, imbalance of normal and abnormal records in log, the continuous emergence of new log formats. To address these challenges, we propose a log anomaly detection framework named LogSentry based on contrastive learning and retrieval-augmented. Our framework consists of a training phase and an inference phase. In the training phase, a BERT based log anomaly detection model using contrastive learning is pre-trained and fine-tuned. In the inference phase, a retrieval-augmented method based on KNN is introduced. During inference, the prediction result of the log anomaly detection model and the average output of the retrieval-augmented method based on KNN will do a weighted summation to obtain the final result, which is whether the log data is abnormal or normal. Our experiments on widely used log datasets indicate the solution proposed in this paper achieves high performance over baseline methods.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2025-11-03
DOI
https://doi.org/10.1038/s41598-025-22208-7
Citations
1
Primary Topic
Software System Performance and Reliability
Type
article
Field-Weighted Citation Impact
1.49

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

System log anomaly detection based on contrastive learning and retrieval augmented

Weian Li, Weihua Ou, Lunzhi Deng, Fang Zhou et al.
1 citations
Scientific Reports
Software System Performance and Reliability
1.49
article

System log anomaly detection based on contrastive learning and retrieval augmented

Weian Li, Weihua Ou, Lunzhi Deng, Fang Zhou, Yang Wu, Hongbin Wang, Wei Huang
article en
1 citations

Abstract

System logs are run-time significant events of computer systems recorded by software. By analyzing the system logs, a lot of important information and issues can be detected promptly. Log anomaly detection is a popular research topic in recent years. However, log anomaly detection faces lots of challenges such as the variability of logs, imbalance of normal and abnormal records in log, the continuous emergence of new log formats. To address these challenges, we propose a log anomaly detection framework named LogSentry based on contrastive learning and retrieval-augmented. Our framework consists of a training phase and an inference phase. In the training phase, a BERT based log anomaly detection model using contrastive learning is pre-trained and fine-tuned. In the inference phase, a retrieval-augmented method based on KNN is introduced. During inference, the prediction result of the log anomaly detection model and the average output of the retrieval-augmented method based on KNN will do a weighted summation to obtain the final result, which is whether the log data is abnormal or normal. Our experiments on widely used log datasets indicate the solution proposed in this paper achieves high performance over baseline methods.

Scientific ReportsVol. 15(1)
Guizhou Normal University (CN), Guizhou Education University (CN), Bureau of Geology and Mineral Exploration and Development of Guizhou Province (CN), Guizhou Institute of Technology (CN)
National Natural Science Foundation of China, Guizhou Normal University, Department of Education of Guizhou Province
Openalex Percentile: Top 12%
Software System Performance and Reliability
1.49
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.