arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.17183cs.SEcs.AI
收藏

大语言模型在长上下文代码问答中的鲁棒性与推理可信度

Robustness and Reasoning Fidelity of Large Language Models in Long-Context Code Question Answering

IBM Research(IBM研究院)

Kishan Maharaj, Nandakishore Menon, Ashita Saxena, Srikanth Tamilselvam

AI总结:

本研究评估了大语言模型在长上下文代码问答中的鲁棒性和推理可信度,通过不同设置测试发现模型在面对干扰信息时表现脆弱,揭示了现有评估的局限性。

摘要:

大语言模型(LLMs)越来越多地协助需要对长代码上下文进行推理的软件工程任务,但其在不同输入条件下鲁棒性的清晰程度仍然不清楚。我们通过受控消融测试系统地研究了长上下文代码问答,测试了答案格式、干扰项和上下文规模的敏感性。通过扩展LongCodeBench Python数据集,加入新的COBOL和Java问题-答案集,我们在三种设置下评估了最先进的模型:(i)打乱的多项选择选项,(ii)开放性问题,以及(iii)包含相关和对抗性无关信息的针叶草上下文。结果表明,在打乱的多项选择选项和开放性问题中,性能显著下降,并且在存在无关提示的情况下表现出脆弱性。我们的发现突显了当前长上下文评估的局限性,并为评估传统和现代系统中的代码推理提供了更广泛的基准。

英文摘要:

Large language models (LLMs) increasingly assist software engineering tasks that require reasoning over long code contexts, yet their robustness under varying input conditions remains unclear. We conduct a systematic study of long-context code question answering using controlled ablations that test sensitivity to answer format, distractors, and context scale. Extending LongCodeBench Python dataset with new COBOL and Java question-answer sets, we evaluate state-of-the-art models under three settings: (i) shuffled multiple-choice options, (ii) open-ended questions and (iii) needle-in-a-haystack contexts containing relevant and adversarially irrelevant information. Results show substantial performance drops in both shuffled multiple-choice options and open-ended questions, and brittle behavior in the presence of irrelevant cues. Our findings highlight limitations of current long-context evaluations and provide a broader benchmark for assessing code reasoning in both legacy and modern systems.

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

↑