Evaluating the Impact of Explainable AI on Trust in AI-Assisted Code Review
作者: Zhenhan Gao, Marvin Muñoz Barón, Umm-e Habiba, Daniel Graziotin, Stefan Wagner
分类: cs.SE, cs.AI, cs.HC
发布日期: 2026-07-27
备注: 23 pages, 4 figures, 5 tables. To appear in Proceedings of the ACM on Software Engineering (PACMSE), Vol. 3, No. ISSTA, Article ISSTA093 (ISSTA 2026). Published under CC BY 4.0. Replication package: https://doi.org/10.5281/zenodo.21457282
💡 一句话要点
研究可解释人工智能对开发者信任的影响
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 可解释人工智能 代码审查 信任 用户研究 大型语言模型 人机协作 软件开发
📋 核心要点
- 现有的LLM代码审查系统缺乏可解释性,导致开发者难以信任AI生成的审查结果。
- 通过对34名参与者的用户研究,比较不同XAI支持水平的代码审查系统,探讨其对开发者信任的影响。
- 研究结果表明,完整的解释提高了信任感,但可能导致开发者对AI推荐的质疑,适度解释则提高了一致性。
📝 摘要(中文)
背景:大型语言模型(LLMs)在自动化代码审查中越来越普遍,但其决策背后的推理难以理解,开发者难以评估LLM生成审查的有效性,从而影响对其信任的判断。可解释人工智能(XAI)在代码审查中的作用及其对信任的影响尚未深入探讨。目标:研究XAI对开发者在AI辅助代码审查中的信任影响。方法:我们进行了一个包含34名参与者的用户研究,比较了三种不同XAI支持水平的LLM代码审查系统。结果:解释水平显著影响信任和与AI推荐的一致性,完全解释(A)产生最高的信任感,但一致性较低,而适度解释(B)则达到了最高的一致性(89.22%)。结论:将XAI纳入代码审查显著改变了信任感和与AI推荐的一致性,这些结果为设计和评估可信的AI代码审查系统提供了重要参考。
🔬 方法详解
问题定义:本研究旨在解决开发者在使用AI辅助代码审查时对LLM生成结果的信任问题。现有方法缺乏可解释性,使得开发者难以评估AI的决策有效性。
核心思路:通过设计不同层次的可解释性,研究其对开发者信任和一致性的影响。具体包括提供详细解释、仅提供反馈和不提供解释三种条件。
技术框架:研究采用了在同一组参与者中进行的对比实验,参与者在真实代码变更请求中评估AI生成的审查,测量信任感、与AI推荐的一致性、决策理由和所需时间。
关键创新:本研究的创新在于系统性地探讨了可解释性对开发者信任的影响,揭示了不同解释水平对信任感和一致性的不同作用。
关键设计:研究中设置了三种条件,分别为详细解释、仅反馈和无解释,参与者在评估时记录了对代码可读性和正确性的关注,且时间测量未显著受解释水平影响。
🖼️ 关键图片
📊 实验亮点
实验结果显示,完整解释条件下的信任感最高(M = 3.99/5),但一致性未达到最高,适度解释条件下的一致性达到了89.22%。无解释条件下的信任和一致性最低,说明可解释性在AI辅助代码审查中至关重要。
🎯 应用场景
该研究的结果对AI辅助软件开发中的代码审查具有重要的应用价值。通过提高可解释性,开发者可以更好地理解和信任AI的决策,从而提升软件开发的效率和质量。未来,研究成果可为设计更可信的AI系统提供指导,促进人机协作的优化。
📄 摘要(原文)
Background: Large language models (LLMs) are increasingly used to automate code review, but the reasoning behind their decisions remains hard to understand. Developers struggle to assess the validity of LLM-generated reviews, making it difficult to gauge how much trust to place in them. The role of Explainable AI (XAI) in code review and its impact on trust remain underexplored. Objective: We study the influence of XAI on developer trust in AI-assisted code reviews. Method: We conducted a within-subjects user study with 34 participants, comparing three LLM-based code review systems with varying levels of XAI support: Condition A (detailed explanation and review feedback), Condition B (review feedback only), and Condition C (no explanations). Participants reviewed real-world code change requests alongside the AI-generated reviews. We measured trust perceptions, agreement with the AI recommendation, the reasoning given for each decision, and the time taken. Results: The level of explanation significantly influences both trust and agreement with AI recommendations, but in different ways. Full explanations (A) yield the highest perceived trust (M = 3.99/5) but not the highest agreement, whereas moderate explanations (B) achieve the highest agreement (89.22%). This could suggest that more explanation prompts developers to question AI recommendations more frequently. No explanations (C) results in the lowest trust and agreement. Explanation level did not significantly affect review time. The most commonly cited reasons for decisions were code readability and correctness. Conclusion: Incorporating XAI into code review significantly changes trust perceptions and agreement with AI recommendations. These results inform the design and evaluation of trustworthy AI-based code review systems, as well as studies on the human factors of AI-assisted software development.