arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.11031cs.SEcs.AIcs.CL
收藏

AdaptiveLog:一种大语言模型与小语言模型协作的自适应日志分析框架

AdaptiveLog: An Adaptive Log Analysis Framework with the Collaboration of Large and Small Language Model

Fudan University(复旦大学);Donghua University(东华大学)

Lipeng Ma, Weidong Yang, Yixuan Li, Ben Fei, Mingjie Zhou, Shuhao Li, Sihang Jiang, Bo Xu, Yanghua Xiao

AI总结:

提出AdaptiveLog框架,协同大语言模型与小语言模型,通过基于SLM不确定性的自适应选择策略和错误案例检索提示,在保证日志分析性能的同时降低推理成本。

摘要:

自动化日志分析对于确保复杂系统的高可用性和可靠性至关重要。自然语言处理中大型语言模型(LLM)的出现,开启了由语言模型驱动的自动化日志分析的新时代,引起了广泛关注。在该领域,基于语言模型进行日志分析的两种主要范式已变得突出。小语言模型(SLM)遵循预训练和微调范式,通过在监督数据集上进行微调,专注于特定的日志分析任务。另一方面,遵循上下文学习范式的LLM,通过在提示上下文中提供少量示例来分析日志,而不更新参数。尽管它们各有优势,我们注意到SLM更具成本效益但能力较弱,而具有大参数的LLM功能强大但昂贵且效率低下。为了在自动化日志分析中权衡两种模型的性能和推理成本,本文引入了一种自适应日志分析框架,称为AdaptiveLog,该框架有效降低了与LLM相关的成本,同时确保优越的结果。该框架协同一个LLM和一个SLM,策略性地将LLM分配给处理复杂日志,而将较简单的日志委托给SLM。具体而言,为了高效查询LLM,我们提出了一种基于SLM不确定性估计的自适应选择策略,仅在SLM不确定时调用LLM。此外,为了增强LLM在日志分析任务中的推理能力,我们提出了一种新颖的提示策略,通过检索类似的易出错案例作为参考,使模型能够利用过去的错误经验并从这些案例中学习解决方案。大量实验表明,AdaptiveLog在不同任务上实现了最先进的结果,在保持成本效率的同时提高了日志分析的整体准确性。

英文摘要:

Automated log analysis is crucial to ensure high availability and reliability of complex systems. The advent of LLMs in NLP has ushered in a new era of language model-driven automated log analysis, garnering significant interest. Within this field, two primary paradigms based on language models for log analysis have become prominent. Small Language Models (SLMs) follow the pre-train and fine-tune paradigm, focusing on the specific log analysis task through fine-tuning on supervised datasets. On the other hand, LLMs following the in-context learning paradigm, analyze logs by providing a few examples in prompt contexts without updating parameters. Despite their respective strengths, we notice that SLMs are more cost-effective but less powerful, whereas LLMs with large parameters are highly powerful but expensive and inefficient. To trade-off between the performance and inference costs of both models in automated log analysis, this paper introduces an adaptive log analysis framework known as AdaptiveLog, which effectively reduces the costs associated with LLM while ensuring superior results. This framework collaborates an LLM and a small language model, strategically allocating the LLM to tackle complex logs while delegating simpler logs to the SLM. Specifically, to efficiently query the LLM, we propose an adaptive selection strategy based on the uncertainty estimation of the SLM, where the LLM is invoked only when the SLM is uncertain. In addition, to enhance the reasoning ability of the LLM in log analysis tasks, we propose a novel prompt strategy by retrieving similar error-prone cases as the reference, enabling the model to leverage past error experiences and learn solutions from these cases. Extensive experiments demonstrate that AdaptiveLog achieves state-of-the-art results across different tasks, elevating the overall accuracy of log analysis while maintaining cost efficiency.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑