Log-based anomaly detection has become essential to improve software system reliability by identifying problems from log data. However, traditional deep learning methods often struggle to interpret the semantic details of log data, typically in natural language. LLMs, such as GPT-4 and Llama 3, have shown promise in handling these types of tasks due to their advanced language understanding. Current LLM-based methods for anomaly detection include rapid engineering, which uses LLM in zero-shot or few-shot settings, and fine-tuning, which tailors models to specific data sets. Despite their advantages, these methods face challenges in customizing detection accuracy and managing memory efficiency.
The study reviews approaches for log-based anomaly detection, focusing on deep learning methods, especially those using pretrained LLM. Traditional techniques include reconstruction-based methods (such as autoencoders and GANs), which rely on training models to reconstruct normal record sequences and detect anomalies based on reconstruction errors. Binary classification methods, typically supervised, detect anomalies by classifying sequences of records as normal or abnormal. LLMs, including BERT- and GPT-based models, are employed in two main strategies: rapid engineering, which uses LLMs' internal knowledge, and fine-tuning, which customizes models for specific data sets to improve performance. of anomaly detection.
Researchers from SJTU, Shanghai developed LogLLM, a log-based anomaly detection framework using LLM. Unlike traditional methods that require log parsers, LogLLM preprocesses logs with regular expressions. It leverages BERT to extract semantic vectors and uses Llama, a transformative decoder, for record sequence classification. A projector aligns the BERT and Llama vector spaces to maintain semantic consistency. LogLLM's innovative three-stage training process improves your performance and adaptability. Experiments on four public datasets show that LogLLM outperforms existing methods, accurately detecting anomalies even on unstable logs with evolving templates.
The LogLLM anomaly detection framework uses a three-step approach: preprocessing, model architecture, and training. First, records are preprocessed using regular expressions to replace dynamic parameters with a constant token, simplifying model training. The model architecture combines BERT to extract semantic vectors, a projector to align vector spaces, and Llama to classify sequences of records. The training process includes oversampling the minority class to address data imbalance, tuning Llama for response templates, training BERT and the projector for log embeddings, and finally tuning the entire model. QLoRA is used for efficient tuning, minimizing memory usage and preserving performance.
The study evaluates the performance of LogLLM using four real-world datasets: HDFS, BGL, Liberty, and Thunderbird. LogLLM is compared with several semi-supervised, supervised, and non-deep learning methods, including DeepLog, LogAnomaly, PLELog, and RAPID. The evaluation uses metrics such as precision, recall, and F1 score. The results show that LogLLM achieves superior performance on all data sets, with an average F1 score 6.6% higher than the best alternative, NeuralLog. The method efficiently balances precision and recall, outperforms others in anomaly detection, and demonstrates the importance of using labeled anomalies for training.
In conclusion, the study presents LogLLM, a log-based anomaly detection framework that uses LLMs such as BERT and Llama. BERT extracts semantic vectors from log messages, while Llama classifies log sequences. A projector is used to align the vector spaces of BERT and Llama to achieve semantic consistency. Unlike traditional methods, LogLLM preprocesses logs with regular expressions, eliminating the need for log parsers. The framework is trained using a novel three-stage procedure to improve performance and adaptability. Experimental results on four public datasets show that LogLLM outperforms existing methods, effectively detecting anomalies even on unstable log data.
look at the Paper and GitHub page. All credit for this research goes to the researchers of this project. Also, don't forget to follow us on <a target="_blank" href="https://twitter.com/Marktechpost”>twitter and join our Telegram channel and LinkedIn Grabove. If you like our work, you will love our information sheet.. Don't forget to join our SubReddit over 55,000ml.
(<a target="_blank" href="https://landing.deepset.ai/webinar-implementing-idp-with-genai-in-financial-services?utm_campaign=2411%20-%20webinar%20-%20credX%20-%20IDP%20with%20GenAI%20in%20Financial%20Services&utm_source=marktechpost&utm_medium=newsletter” target=”_blank” rel=”noreferrer noopener”>FREE WEBINAR on ai) <a target="_blank" href="https://landing.deepset.ai/webinar-implementing-idp-with-genai-in-financial-services?utm_campaign=2411%20-%20webinar%20-%20credX%20-%20IDP%20with%20GenAI%20in%20Financial%20Services&utm_source=marktechpost&utm_medium=newsletter” target=”_blank” rel=”noreferrer noopener”>Implementation of intelligent document processing with GenAI in financial services and real estate transactions– <a target="_blank" href="https://landing.deepset.ai/webinar-implementing-idp-with-genai-in-financial-services?utm_campaign=2411%20-%20webinar%20-%20credX%20-%20IDP%20with%20GenAI%20in%20Financial%20Services&utm_source=marktechpost&utm_medium=banner-ad-desktop” target=”_blank” rel=”noreferrer noopener”>From framework to production
Sana Hassan, a consulting intern at Marktechpost and a dual degree student at IIT Madras, is passionate about applying technology and artificial intelligence to address real-world challenges. With a strong interest in solving practical problems, he brings a new perspective to the intersection of ai and real-life solutions.
<script async src="//platform.twitter.com/widgets.js” charset=”utf-8″>