arXiv:2608.02967cs.SEcs.AI2026-08

让故障定位查询自动适配问题特征,提升代码缺陷定位精度。

HyperFL: Query-Adaptive Representation Learning for Software Fault Localization

论文配图:HyperFL: Query-Adaptive Representation Learning for Software Fault Localization
图 1 · 摘自论文原文
  • 用轻量超网络动态生成查询编码器参数,实现查询自适应。
  • 在真实数据集上比顶尖方法提升13.3%函数级MRR@10和16.7%命中率。
  • 适合需要高精度缺陷定位的自动化调试与修复场景。

软件故障定位旨在识别导致报告问题的代码位置,是自动化调试与程序修复的基础步骤。现有基于检索的方法将故障定位建模为密集检索任务,通过学习问题报告与源代码间的共享嵌入空间实现定位。然而,这些方法使用固定查询表示编码所有问题报告,忽略了真实世界问题报告在长度、结构和调试信息上的显著差异。为此,本文提出HyperFL,一种面向软件故障定位的查询自适应表示学习框架。HyperFL采用轻量级超网络生成查询编码器的特定LoRA参数,实现动态查询适配,同时保持代码编码器固定可复用。在真实世界问题定位基准测试中,HyperFL在多个嵌入骨干模型上均持续提升检索性能,函数级MRR@10相对最优方法SweRank提升最高达13.3%,Hit@1提升最高达16.7%。进一步分析表明,HyperFL能为不同问题特征学习到各异的适配模式,验证了查询自适应表示在软件问题定位中的有效性。

原文摘要 · Abstract (English)

Software fault localization identifies the code locations responsible for reported issues and is a fundamental step toward automated debugging and program repair. Recent retrieval-based approaches formulate fault localization as a dense retrieval task by learning a shared embedding space between issue reports and source code. However, these methods encode all issue reports using a fixed query representation, despite the substantial diversity of real-world issue reports in length, structure, and debugging information. To address this limitation, we propose HyperFL, a query-adaptive representation learning framework for software fault localization. HyperFL employs a lightweight hypernetwork to generate query-specific LoRA parameters for the query encoder, enabling dynamic query adaptation while keeping the code encoder fixed and reusable. Experiments on a real-world issue localization benchmark demonstrate that HyperFL consistently improves retrieval performance across multiple embedding backbones, achieving up to 13.3% relative improvement in function-level MRR@10 and 16.7% relative improvement in Hit@1 over the state-of-the-art method SweRank. Further analysis shows that HyperFL learns distinct adaptation patterns for different issue characteristics, highlighting the effectiveness of query-adaptive representations for software issue localization.

故障定位查询自适应检索学习代码分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。