paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The Stylistic Blind Spot: Uncovering the Hidden Implicit Bias of Coding Style on LLM Code Evaluation

风格盲区:揭示代码风格对大语言模型代码评估的隐藏隐式偏差
FSE Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering2026匹配度 2/10 · 论文关注代码风格对 LLM 代码评估的隐性偏差,属于 LLM 评测基准鲁棒性研究,与用户主攻的静态分析、Agentic 程序分析、浮点/贝叶斯程序分析及其与 LLM 的交叉均无直接关联;其研究目标本身是 LLM 评估,而非 PL 侧工具或验证方法。引用 0 inbox
Zhiyuan Liu, Yingying Jiang, Huiyan Wang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 BenchPrism,自动生成多样化代码风格的基准变体,揭示代码风格给 LLM 代码评估带来的隐性偏差。

大语言模型在软件工程任务上快速迭代并取得性能提升,但现有主流基准大多只衡量功能正确性,忽视了代码风格等非功能属性,这类属性在真实开发中至关重要,也可能给评估引入偏差。为研究这种隐性偏差,作者提出 BenchPrism:它自动地对代码施加多样化的风格变换,并生成“风格化”的基准变体用于 LLM 评估,从而系统考察偏差在不同基准、不同 LLM 与不同代码任务上的表现及其受何种因素影响。实验证实该偏差确实存在,导致 LLM 评估性能出现不稳定波动——从下降 14.92% 到上升 7.51%——甚至会扭曲模型之间的排名。论文据此给出经验性启示,呼吁研究者在评估 LLM 时关注此类隐藏偏差带来的鲁棒性问题。

问题
主流 LLM 代码评估基准只关注功能正确性,忽视代码风格等非功能因素,可能使评估结果带有未被察觉的隐性偏差。
方法
提出 BenchPrism,自动对代码施加多样化的风格变换,生成风格化的基准变体,并在不同基准、LLM 与代码任务上系统分析偏差的表现与成因。
评估
在多个代码基准、多个 LLM 和多种代码任务上开展实验,证实风格偏差存在并使性能产生从 -14.92% 到 +7.51% 的波动,甚至改变模型排名。
原文摘要(Abstract)

Rapid iteration of large language models (LLMs) improved their performance on software engineering tasks. While prevailing benchmarks effectively measure LLMs' functional correctness, they often overlook non-functional aspects, such as coding styles, which are crucial in real-world development and can introduce evaluation bias. To investigate such implicit bias, we propose BenchPrism that automatically disperses diverse coding styles and generates style-fulfilled benchmark variants for LLM evaluation, and thus explore how the bias behaves and is influenced across different benchmarks, LLMs, and code tasks. Experiments confirm the existence of bias, which indeed leads to unstable performance deviations in LLM evaluation (from a 14.92% drop to a 7.51% increase), even distorting model rankings. We also raise valuable takeaways and hope to inspire future researchers to be mindful of the robustness of LLM evaluation when considering the possibility of such hidden bias.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{LiuJW26,
  title = {The Stylistic Blind Spot: Uncovering the Hidden Implicit Bias of Coding Style on LLM Code Evaluation},
  author = {Zhiyuan Liu and Yingying Jiang and Huiyan Wang},
  booktitle = {FSE},
  year = {2026},
  doi = {10.1145/3803437.3805590}
}