While AI-coding assistants accelerate software development, current testing frameworks struggle to keep pace with the resulting volume of AI-generated code. Traditional fuzzing techniques often allocate resources uniformly and lack semantic awareness of algorithmic vulnerability patterns, leading to inefficient resource usage and missed vulnerabilities. To address these limitations, we present a hybrid testing framework that leverages LLM-guided adaptive fuzzing to detect algorithmic vulnerabilities efficiently. Our system SAFuzz integrates prompt-based behavioral diversification, harness generation with problem-specific oracles, and an LLM-based predictor to enable adaptive resource allocation and dynamic early stopping. Evaluating SAFuzz on CSES algorithmic problems, we improve vulnerability discrimination precision from 77.9% to 85.7% and achieve a 1.71x reduction in time cost compared to SOTA GreenFuzz while maintaining comparable recall. We further observe that combining our approach with existing unit test generation methods yields complementary gains, increasing the bug detection recall from 67.3% to 79.5%.


翻译:尽管AI编程助手加速了软件开发,但现有测试框架难以跟上由此产生的AI生成代码规模。传统模糊测试技术通常均匀分配资源,且缺乏对算法漏洞模式的语义感知,导致资源使用效率低下并遗漏漏洞。为应对这些局限,我们提出一种混合测试框架,利用大语言模型引导的自适应模糊测试来高效检测算法漏洞。我们的系统SAFuzz集成了基于提示的行为多样化、配备问题特定预言机的测试套件生成,以及基于大语言模型的预测器,以实现自适应资源分配和动态早停机制。通过在CSES算法问题上评估SAFuzz,我们将漏洞判别精确率从77.9%提升至85.7%,并在保持相近召回率的同时,相比最先进的GreenFuzz实现了1.71倍的时间成本降低。进一步研究发现,将本方法与现有单元测试生成技术结合可产生互补增益,将缺陷检测召回率从67.3%提升至79.5%。

0
下载
关闭预览

相关内容

《大语言模型驱动的智能红队测试》
专知会员服务
16+阅读 · 2025年11月26日
【新书】使用生成式人工智能进行软件测试
专知会员服务
44+阅读 · 2025年1月6日
通过强化学习增强代码生成中的代码大语言模型:综述
专知会员服务
29+阅读 · 2025年1月1日
设计和构建强大的大语言模型智能体
专知会员服务
55+阅读 · 2024年10月6日
《大型语言模型代码生成》综述
专知会员服务
68+阅读 · 2024年6月4日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
手把手教TensorFlow(附代码)
深度学习世界
15+阅读 · 2017年10月17日
NLP中自动生产文摘(auto text summarization)
机器学习研究会
14+阅读 · 2017年10月10日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员