亲爱的研友该休息了!由于当前在线用户较少,发布求助请尽量完整地填写文献信息,科研通机器人24小时在线,伴您度过漫漫科研夜!身体可是革命的本钱,早点休息,好梦!

SPRoC: Semantics-Preserving Mutations for Robustness Evaluation of Code Generation Large Language Models

作者
Qiancheng Shi,Qihong Han,Zhanqi Cui,Zheng Zeng
出处
期刊:Conference proceedings [Institute of Electrical and Electronics Engineers]
卷期号:: 2218-2223
标识
DOI:10.1109/smc58881.2025.11343558
摘要

With the widespread use of large language models (LLMs) in code generation, their capabilities continues enhanced. However, LLMs still exhibit instability when faced with minor input prompt variations, which presents challenges for practical deployment. Existing prompt mutation methods, such as random insertions, deletions, or replacements without understanding prompt semantics and structure, still have some limitations. These methods fail to capture the diverse ways of real users express, limiting their ability to assess code generation robustness of LLMs. To address this, we propose SPRoC (Semantics-Preserving Robustness of Code generation), a method for evaluating LLM robustness through prompt mutation. Using a BERT-based model, SPRoC generates mutated prompts that maintain semantic consistency but offer diverse expressions. These prompts create a new dataset to verify the functionality of LLM-generated code. SPRoC compares the functional correctness of code before and after mutation to assess robustness of LLMs to input variations. We conduct experiments on the HumanEval dataset with several mainstream LLMs, including ChatGPT, DeepSeek, Claude, ERNIE, and Qwen, to evaluate performance under SPRoC mutations. Results show that SPRoC reduces the models’ Pass@k scores with minimal semantic changes, outperforming the baseline Radamsa method. In addition, SPRoC achieves better performance in terms of similarity metrics like BLEU and BERTScore, improving by 12.96% and 1.83%, respectively.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
快乐的稚晴完成签到,获得积分10
4秒前
pjjpk01完成签到,获得积分10
10秒前
26秒前
mictime完成签到,获得积分10
32秒前
安详盼烟完成签到 ,获得积分10
37秒前
小月顺利毕业版完成签到,获得积分10
37秒前
45秒前
怡然的千儿完成签到,获得积分10
1分钟前
breeze完成签到,获得积分10
1分钟前
炙热百褶裙完成签到,获得积分10
1分钟前
1分钟前
牛魔发布了新的文献求助10
1分钟前
1分钟前
2分钟前
坚强含烟完成签到,获得积分10
2分钟前
坚定的咖啡完成签到,获得积分10
2分钟前
牛魔发布了新的文献求助10
2分钟前
v0id的应助被科研通管家采纳,获得10
2分钟前
2分钟前
2分钟前
POTATO发布了新的文献求助10
2分钟前
Koala04发布了新的文献求助30
2分钟前
科研通AI6.4的应助被wwwww采纳,获得10
2分钟前
科研通AI6.4的应助被wwwww采纳,获得10
2分钟前
Ava的应助被wwwww采纳,获得10
2分钟前
科研通AI6.2的应助被wwwww采纳,获得10
2分钟前
wanci的应助被wwwww采纳,获得10
2分钟前
可爱的函函的应助被wwwww采纳,获得10
2分钟前
科研通AI6.2的应助被wwwww采纳,获得10
2分钟前
田様的应助被wwwww采纳,获得10
2分钟前
科研通AI6.2的应助被wwwww采纳,获得10
2分钟前
大模型的应助被wwwww采纳,获得10
2分钟前
满意的平凡完成签到,获得积分10
2分钟前
Perry完成签到,获得积分0
2分钟前
2分钟前
标致茈完成签到,获得积分10
2分钟前
hamburger完成签到,获得积分10
3分钟前
我是老大的应助被牛魔采纳,获得10
3分钟前
3分钟前
3分钟前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Das Matthäusevangelium: Kapitel 1:1–17 1000
IRTSD: Open-Source Data and Toolset for Electromagnetic Transient Analysis of Disturbances and IBR Control Malfunctions in Transmission Systems 1000
Entre Praga y Madrid : los contactos checoslovaco-españoles (1948-1977) 600
Les Mots du discours 600
A Consideration on Use of Material Grades for Hull Structural Members Based on Fracture Toughness(Second Report) 500
AI Disclosure in Annual Reports: Evolution, Determinants, and Capital Market Participants’ Perceptions 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 工程类 有机化学 化学工程 生物化学 物理 复合材料 内科学 催化作用 光电子学 人工智能 细胞生物学 无机化学 物理化学 数学
热门帖子
关注 科研通微信公众号,转发送积分 8115264
求助须知:如何正确求助?哪些是违规求助? 9521389
关于积分的说明 21533455
捐赠科研通 7693402
什么是DOI,文献DOI怎么找? 3413534
关于科研通互助平台的介绍 2539818
邀请新用户注册赠送积分活动 2453572