LibreLog:使用开源大型语言模型实现准确且高效的无监督日志解析
LibreLog: Accurate and Efficient Unsupervised Log Parsing Using Open-Source Large Language Models
AI总结:
本文提出无监督日志解析方法LibreLog,利用开源LLM(Llama3-8B)结合固定深度分组树、检索增强生成、自我反思和模板记忆技术,在保护隐私和降低成本的同时,实现了最先进的解析准确率和效率。
摘要:
日志解析是将非结构化日志数据转换为结构化格式的关键步骤,有助于后续基于日志的分析。传统的基于语法的日志解析器高效且有效,但在处理偏离预定义规则的日志时,其准确性通常会下降。最近,基于大型语言模型(LLM)的日志解析器展现出了卓越的解析准确率。然而,现有的基于LLM的解析器面临三大主要挑战:1)用于微调或上下文学习的人工标注耗时且费力;2)由于日志数据量庞大且LLM的上下文大小有限,导致解析成本增加;3)使用像ChatGPT这样的商业模型处理敏感日志信息会带来隐私风险。为了克服这些局限性,本文提出了LibreLog,这是一种无监督日志解析方法,利用开源LLM(即Llama3-8B)来增强隐私保护并降低运营成本,同时实现最先进的解析准确率。LibreLog首先使用固定深度的分组树,将具有相似静态文本但动态变量不同的日志进行分组。然后,它通过三个组件解析这些组内的日志:i)基于相似度评分的检索增强生成:根据Jaccard相似度在每个组内选择多样化的日志,帮助LLM区分静态文本和动态变量;ii)自我反思:迭代查询LLM以细化日志模板,从而提高解析准确率;iii)日志模板记忆:存储已解析的模板以减少LLM查询,进而提高解析效率。我们在LogHub-2.0上的评估表明,与最先进的基于LLM的解析器相比,LibreLog的解析准确率提高了25%,处理日志的速度提高了2.7倍。简而言之,LibreLog解决了使用商业LLM的隐私和成本问题,同时实现了最先进的解析效率和准确率。
英文摘要:
Log parsing is a critical step that transforms unstructured log data into structured formats, facilitating subsequent log-based analysis. Traditional syntax-based log parsers are efficient and effective, but they often experience decreased accuracy when processing logs that deviate from the predefined rules. Recently, large language models (LLM) based log parsers have shown superior parsing accuracy. However, existing LLM-based parsers face three main challenges: 1)time-consuming and labor-intensive manual labeling for fine-tuning or in-context learning, 2)increased parsing costs due to the vast volume of log data and limited context size of LLMs, and 3)privacy risks from using commercial models like ChatGPT with sensitive log information. To overcome these limitations, this paper introduces LibreLog, an unsupervised log parsing approach that leverages open-source LLMs (i.e., Llama3-8B) to enhance privacy and reduce operational costs while achieving state-of-the-art parsing accuracy. LibreLog first groups logs with similar static text but varying dynamic variables using a fixed-depth grouping tree. It then parses logs within these groups using three components: i)similarity scoring-based retrieval augmented generation: selects diverse logs within each group based on Jaccard similarity, helping the LLM distinguish between static text and dynamic variables; ii)self-reflection: iteratively query LLMs to refine log templates to improve parsing accuracy; and iii) log template memory: stores parsed templates to reduce LLM queries for improved parsing efficiency. Our evaluation on LogHub-2.0 shows that LibreLog achieves 25% higher parsing accuracy and processes logs 2.7 times faster compared to state-of-the-art LLM-based parsers. In short, LibreLog addresses privacy and cost concerns of using commercial LLMs while achieving state-of-the-arts parsing efficiency and accuracy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。