清晨好,您是今天最早来到科研通的研友!由于当前在线用户较少,发布求助请尽量完整地填写文献信息,科研通机器人24小时在线,伴您科研之路漫漫前行!

Can LLMs Fool Themselves? A Preliminary Study on the Robustness of Code Generation with LLMs

作者
Roman Machacek,Timo Kehrer
标识
DOI:10.18420/se2026-ws_14
摘要

Large Language Models (LLMs), such as GPT (OpenAI), Claude (Anthropic), and Llama (Meta), achieve strong performance on standard code generation benchmarks. However, it remains challenging to determine whether these models truly reason about code or simply memorize patterns from training data. In this work, we conduct an initial study of LLM robustness by introducing minor variations in code—such as changes in style, variable names, or structure—to investigate whether models generalize to semantically equivalent programs or rely on memorized solutions. Our goal is to systematically investigate LLM robustness through code paraphrasing, applying semantic-preserving transformations to widely used benchmarks (HumanEval, MBPP, QuixBugs, LiveCodeBench, and CodeLingua). In this paper, we outline the steps towards reaching this goal: We first establish baseline model performance on the original datasets (RQ1), then evaluate the capabilities of LLMs for code paraphrasing (RQ2), and finally, we examine how different paraphrasing strategies affect model performance on the benchmark code generation tasks (RQ3). Our preliminary results show that larger models generally maintain higher correctness across paraphrased variants, with Qwen2.5-Coder models demonstrating the strongest robustness. Llama models are more sensitive to paraphrasing, showing larger drops in accuracy. These findings highlight the importance of evaluating robustness beyond standard benchmarks and provide initial steps for designing more reliable evaluation methods for code generation models.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
复杂亦瑶完成签到,获得积分10
7秒前
完美凝天发布了新的文献求助10
11秒前
16秒前
GLUUUUUE完成签到 ,获得积分10
20秒前
24秒前
难过花瓣发布了新的文献求助10
27秒前
29秒前
昔我往矣完成签到 ,获得积分10
29秒前
晞暝完成签到 ,获得积分10
32秒前
调皮烤鸡完成签到,获得积分10
43秒前
49秒前
null的应助被科研通管家采纳,获得10
50秒前
冷艳凡灵完成签到,获得积分10
50秒前
null的应助被科研通管家采纳,获得10
50秒前
Dali发布了新的文献求助30
50秒前
null的应助被科研通管家采纳,获得10
50秒前
简单柏柳完成签到,获得积分10
50秒前
秀丽安波完成签到,获得积分10
1分钟前
1分钟前
清脆晓瑶完成签到,获得积分10
1分钟前
完美凝天完成签到,获得积分10
1分钟前
mumugoing完成签到 ,获得积分10
1分钟前
1分钟前
1分钟前
丰富的从雪完成签到,获得积分10
1分钟前
1分钟前
小亮完成签到 ,获得积分10
1分钟前
仁爱的觅海完成签到,获得积分10
1分钟前
小悦完成签到 ,获得积分10
1分钟前
靓丽的初丹完成签到,获得积分10
2分钟前
迷路万天完成签到,获得积分10
2分钟前
小巧的孤丹完成签到,获得积分10
2分钟前
美丽妙彤完成签到,获得积分10
2分钟前
null的应助被科研通管家采纳,获得10
2分钟前
2分钟前
MchemG的应助被科研通管家采纳,获得20
2分钟前
null的应助被科研通管家采纳,获得10
2分钟前
null的应助被科研通管家采纳,获得10
2分钟前
2分钟前
null的应助被科研通管家采纳,获得10
2分钟前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
IRTSD: Open-Source Data and Toolset for Electromagnetic Transient Analysis of Disturbances and IBR Control Malfunctions in Transmission Systems 1000
Spec 401: Standards for Jet Fuel Facility and Equipment Commissioning and Flushing at Airports, 2026.1 (Original Issue) 1000
Spec 103: Standard for Jet Fuel Quality Control at Airports, Revision 2026.1 1000
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小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 工程类 有机化学 化学工程 生物化学 物理 复合材料 内科学 催化作用 光电子学 人工智能 细胞生物学 无机化学 物理化学 数学
热门帖子
关注 科研通微信公众号,转发送积分 8108753
求助须知:如何正确求助?哪些是违规求助? 9516566
关于积分的说明 21503382
捐赠科研通 7685342
什么是DOI,文献DOI怎么找? 3410983
关于科研通互助平台的介绍 2538278
邀请新用户注册赠送积分活动 2450911