跳到正文
arXiv (AI + Vision + Imaging)· Wenji Bai, Muhammad Waseem, Jaakko Peltonen, Pekka Abrahamsson·· 8 天前AI 评分15

CLEW:基于日志锚定的反向追踪实现根因代码定位

CLEW: Log-Anchored Backward Tracing for Root-Cause Code Localization

AI 导读

CLEW 将基于规则的日志到代码锚定与 LLM 引导的反向代码追踪结合,输出排序候选函数、受影响模组及含机制路径与日志事件的解释。在包含 192 个真实问题与故障注入案例的 LogLoc 基准上,CLEW 于 LogLoc-Issues 取得最高 Acc@1 77.3% 和 MRR 81.3%,在 LogLoc-Airflow 上以 97.6% Acc@1 与领先基线持平。

正文 · 原文

arXiv:2611.19448v1 Announce Type: cross Abstract: Failures in industrial software systems may involve multiple components and be difficult to reproduce outside the production environment. Root-cause code localization therefore often relies on issue descriptions and runtime logs. However, log evidence may be noisy or incomplete, and the code reporting a symptom may differ from the code containing the underlying defect. These conditions make it challenging to identify relevant log evidence and determine which functions could have caused the reported failure. To address this gap, we introduce CLEW, an agentic approach that combines rule-based log-to-code anchoring with LLM-guided backward code tracing. CLEW organizes selected observations into diagnostic states, guides source exploration from anchored symptom functions, and returns ranked candidate functions, an affected module, and an explanation comprising a proposed mechanism path and associated log events. For evaluation, we construct LogLoc, a benchmark comprising 192 real-world issue and fault-injection cases. Against three baselines, CLEW records the highest observed Acc@1 (77.3%) and MRR (81.3%) on LogLoc-Issues and matches the leading baselines at 97.6% Acc@1 on LogLoc-Airflow. Averaged over all 192 cases, CLEW's wall-clock time is approximately 73% lower than LocAgent's at a similar average inference cost. No aggregate degradation is observed under the tested perturbations, with modest changes in Acc@1 and MRR across the evaluated seeds and base models. These results suggest that CLEW can combine function-level localization with evidence links and runtime efficiency under the evaluated conditions.

来源:arXiv (AI + Vision + Imaging) · arxiv.org