arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2412.01377cs.CLcs.SE
收藏

将大型语言模型适配于日志分析:融入可解释的领域知识

Adapting Large Language Models to Log Analysis with Interpretable Domain Knowledge

Nankai University(南开大学);Huawei(华为);Huawei Canada(华为加拿大)

Yuhe Ji, Yilun Liu, Feiyu Yao, Minggui He, Shimin Tao, Xiaofeng Zhao, Su Chang, Xinhua Yang, Weibin Meng, Yuming Xie, Boxing Chen, Shenglin Zhang, Yongqian Sun

AI总结:

针对通用大型语言模型(LLMs)在日志分析中因领域鸿沟和令牌分布问题导致性能受限的问题,本文提出融入可解释领域知识的持续预训练适配方法,构建NLPLog数据集并训练SuperLog模型,在四项任务中平均准确率较次优模型提升12.01%。

摘要:

日志分析是AI应用中的关键子领域,可实现大规模软件系统故障与错误管理的自动化方法,节省传统人工方法的人力成本。现有基于大型语言模型(LLMs)的解决方案虽具潜力,但受限于自然语言与日志语言间的显著领域鸿沟——后者包含丰富的领域特定令牌(如状态码、IP地址、资源路径),这限制了其在实际应用中的有效性。然而,直接使用原始日志将通用LLMs适配于日志分析,可能因令牌分布不一致而降低性能。本文提出一种领域适配方法,通过持续预训练(CPT)将可解释领域知识融入开源LLMs,以弥合这一鸿沟:该方法让LLMs在包含日志知识的可解释自然文本(而非原始日志)上进行适配,从而减少分布差异。为此,我们构建了NLPLog数据集,包含超25万条日志相关知识的问答对。最终模型SuperLog在四项日志分析任务中均取得最佳性能,平均准确率较次优模型提升12.01%。消融实验也表明,使用可解释日志知识进行领域适配优于使用原始日志。

英文摘要:

Log analysis represents a critical sub-domain within AI applications that facilitates automatic approaches to fault and error management of large-scaled software systems, saving labors of traditional manual methods. While existing solutions using large language models (LLMs) show promise, they are limited by a significant domain gap between natural and log languages (the latter contains rich domain-specific tokens such as status codes, IP addresses, resource pathes), which restricts their effectiveness in real-world applications. However, directly adapting general-purpose LLMs to log analysis using raw logs may degrade their performance due to inconsistent token distribution. In this paper, we present a domain adaptation approach that addresses these limitations by integrating interpretable domain knowledge into open-source LLMs through continual pre-training (CPT), which bridges this domain gap by adapting LLMs on interpretable natural texts with log knowledge (instead of raw logs) to reduce distribution discrepancy. To achieve this, we developed NLPLog, a comprehensive dataset containing over 250,000 question-answer pairs on log-related knowledge. Our resulting model, SuperLog, achieves the best performance across four log analysis tasks, with an average accuracy improvement of 12.01% over the second-best model. Ablation study also suggests advantages of domain adaption using interpretable log knowledge over using raw logs.

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

↑