paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Towards Better Linux Kernel Fault Localization: Leveraging Contrastive Reasoning and Hierarchical Context Analysis

面向更好的 Linux 内核故障定位:利用对比推理与层次化上下文分析
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 5/10 · 论文将 LLM 用于 Linux 内核故障定位,属于 LLM 辅助程序分析与调试,与“AI→PL 用 LLM 改进程序分析”相邻;但它不是静态分析/形式化验证,也不涉及浮点或贝叶斯程序分析,因此匹配度中等。引用 0 inbox
Haichi Wang, Ruiguo Yu, Yesong Pang, Yingquan Zhao, Junjie Chen, Jiajun Jiang, Zan Wang
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 CoHiKer,用对比推理与层次化上下文分析显著提升 Linux 内核故障定位的文件级与方法级精度并降低 token 开销。

Linux 内核代码库庞大、架构复杂且涉及底层细节,现有故障定位技术(含基于 LLM 的方法)多面向通用软件,并把缺陷报告与源码当作纯文本,缺乏内核领域知识,难以定位根因与细粒度位置。本文提出 CoHiKer:(1) 对比推理,通过分析变异后的通过/失败测试用例之间的行为差异识别根因;(2) 层次化上下文分析,融合崩溃报告、系统调用语义、文件间依赖与内核特有特征,把定位范围从文件逐步缩小到方法,并以结构化提示让 LLM 在语义化上下文中推理。在扩展的 Linux 内核缺陷数据集上对比五个 SOTA 基线,文件级与方法级 Top-1 准确率分别最高提升 26.07% 与 56.85%,token 消耗最多降低 8.84× 与 28.9×;在非内核数据集上也展现泛化收益。

问题
Linux 内核的故障定位因代码规模大、架构复杂且底层细节多而困难,现有传统与 LLM 方法面向通用软件、将报告与代码视为纯文本,缺乏内核知识,难以识别根因并做到细粒度定位。
方法
提出 LLM 驱动的 CoHiKer:以变异得到的通过/失败测试用例的行为差异进行对比推理来识别根因,并通过融合崩溃报告、系统调用语义、文件间依赖与内核特征的层次化上下文分析,把定位任务从文件逐级分解到方法,配合结构化提示进行语义推理。
评估
在扩展的 Linux 内核缺陷数据集上与五个最先进基线比较,CoHiKer 文件级与方法级 Top-1 准确率最高分别提升 26.07% 与 56.85%,token 消耗最多降低 8.84× 与 28.9×;并验证了在非内核数据集上的泛化能力。
原文摘要(Abstract)

Debugging the Linux kernel remains a formidable challenge due to its vast codebase, complex architecture, and low-level programming intricacies. Effective fault localization (FL) is thus essential for efficient kernel debugging and maintenance. While existing FL techniques (both traditional and LLM-based) have shown promise in general-purpose software, they are ill-suited for the kernel context. In particular, recent LLM-based techniques often treat bug reports and source code as plain text, lacking deep integration of kernel-specific knowledge, which limits their ability to identify root causes and achieve fine-grained localization. We present CoHiKer, a novel LLM-based FL technique tailored to the Linux kernel. CoHiKer introduces two key innovations: (1) contrastive reasoning, which identifies root causes by analyzing the behavioral divergence between carefully mutated passing and failing test cases, and (2) hierarchical context analysis, which systematically narrows the localization scope from files to methods by integrating crash reports, syscall semantics, inter-file dependencies, and kernel-specific features. Unlike prior techniques that rely on static understanding and full-code input, CoHiKer decomposes the localization task and enables structured LLM prompting to reason semantically over meaningful contexts. We evaluate CoHiKer on an extended Linux kernel bug dataset against five state-of-the-art baselines. CoHiKer consistently outperforms all competitors, improving Top-1 localization accuracy by up to 26.07% at the file level and 56.85% at the method level over state-of-the-art LLM-based baselines, while achieving up to 8.84× and 28.9× reductions in token consumption, respectively. Furthermore, CoHiKer demonstrates strong generalizability on the non-kernel dataset, with comparable gains (15.5% and 5.3% in Top-1 at file and method levels). These results demonstrate the promise of CoHiKer as a practical and accurate solution for kernel FL.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2607-00562,
  title = {Towards Better Linux Kernel Fault Localization: Leveraging Contrastive Reasoning and Hierarchical Context Analysis},
  author = {Haichi Wang and Ruiguo Yu and Yesong Pang and Yingquan Zhao and Junjie Chen and Jiajun Jiang and Zan Wang},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3787792}
}