Evaluating the programming robustness of large language models (LLMs) is paramount for ensuring their reliability in AI-based software development. However, adversarial attacks exhibit fundamental limitations that compromise fair robustness assessment: they demonstrate contradictory evaluation outcomes where different attack strategies tend to favor different models, and more critically, they operate solely through external perturbations, failing to capture the intrinsic stability essential for autonomous coding agents where subsequent inputs are endogenously generated by the model itself. We introduce EVALOOOP, a novel assessment framework that evaluates robustness from a self-consistency perspective, leveraging the natural duality inherent in software engineering tasks (e.g., code generation and code summarization). EVALOOOP establishes a self-contained feedback loop where an LLM iteratively transforms between code and natural language until functional failure occurs, with robustness quantified by a novel Average Sustainable Loops (ASL) metric-the mean number of iterations maintaining functional correctness across benchmark tasks. This cyclical strategy intrinsically evaluates robustness without relying on external attack configurations, providing a unified metric that reveals how effectively LLMs preserve semantic integrity through sustained self-referential transformations. We evaluate 96 popular LLMs, ranging from 0.5B to 685B parameters, on EVALOOOP equipped with the MBPP Plus benchmark, and found that EVALOOOP typically induces a 2.65%-47.62% absolute drop in pass@1 accuracy within ten loops. Intriguingly, robustness does not always align with initial performance (i.e., one-time query); for instance, Qwen3-235B-A22B-Instruct-2507, despite inferior initial code generation compared to OpenAI's o-series models and DeepSeek-V3, demonstrated the superior robustness (ASL score).


翻译:评估大语言模型(LLMs)的编程鲁棒性对于确保其在基于人工智能的软件开发中的可靠性至关重要。然而,对抗性攻击存在根本性局限,损害了公平的鲁棒性评估:它们表现出相互矛盾的评估结果,即不同的攻击策略往往倾向于支持不同的模型;更重要的是,它们仅通过外部扰动进行操作,未能捕捉到自主编码代理所必需的内在稳定性,而此类代理的后续输入是由模型自身内生生成的。我们提出了EVALOOOP,这是一个新颖的评估框架,它从自一致性的角度评估鲁棒性,利用了软件工程任务(例如,代码生成与代码摘要)中固有的自然对偶性。EVALOOOP建立了一个自包含的反馈循环,其中LLM在代码和自然语言之间迭代转换,直至发生功能失效,其鲁棒性通过一种新颖的平均可持续循环次数(ASL)指标进行量化——即在基准任务中保持功能正确性的平均迭代次数。这种循环策略本质上评估了鲁棒性,无需依赖外部攻击配置,提供了一个统一的度量标准,揭示了LLM在持续的自指涉转换中如何有效地保持语义完整性。我们在配备MBPP Plus基准测试的EVALOOOP上评估了96个流行的LLM(参数量从0.5B到685B不等),发现EVALOOOP通常在十个循环内导致pass@1准确率绝对下降2.65%-47.62%。有趣的是,鲁棒性并不总是与初始性能(即一次性查询)一致;例如,Qwen3-235B-A22B-Instruct-2507尽管在初始代码生成方面逊于OpenAI的o系列模型和DeepSeek-V3,却表现出了卓越的鲁棒性(ASL得分)。

0
下载
关闭预览

相关内容

【斯坦福博士论文】大语言模型的AI辅助评估
专知会员服务
31+阅读 · 2025年3月30日
迈向大语言模型偏好学习的统一视角综述
专知会员服务
24+阅读 · 2024年9月7日
GPT系列大模型在自然语言处理任务中的鲁棒性研究
专知会员服务
30+阅读 · 2024年3月22日
天大最新《大型语言模型评估》全面综述,111页pdf
专知会员服务
88+阅读 · 2023年10月31日
大型语言模型公平性
专知会员服务
41+阅读 · 2023年8月31日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
FCS 论坛 | 孟德宇:误差建模原理
FCS
15+阅读 · 2017年8月17日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员