Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models

计算机科学 模糊测试 程序设计语言 Python(编程语言) 人工智能 语法 语义学(计算机科学) 编码(集合论) 自然语言处理 软件 集合(抽象数据类型)
作者
Yinlin Deng,Chunqiu Steven Xia,Haoran Peng,Chenyuan Yang,Lingming Zhang
标识
DOI:10.1145/3597926.3598067
摘要

Deep Learning (DL) systems have received exponential growth in popularity and have become ubiquitous in our everyday life. Such systems are built on top of popular DL libraries, e.g., TensorFlow and PyTorch which provide APIs as building blocks for DL systems. Detecting bugs in these DL libraries is critical for almost all downstream DL systems in ensuring effectiveness/safety for end users. Meanwhile, traditional fuzzing techniques can be hardly effective for such a challenging domain since the input DL programs need to satisfy both the input language (e.g., Python) syntax/semantics and the DL API input/shape constraints for tensor computations. To address these limitations, we propose TitanFuzz – the first approach to directly leveraging Large Language Models (LLMs) to generate input programs for fuzzing DL libraries. LLMs are titanic models trained on billions of code snippets and can autoregressively generate human-like code snippets. Our key insight is that modern LLMs can also include numerous code snippets invoking DL library APIs in their training corpora, and thus can implicitly learn both language syntax/semantics and intricate DL API constraints for valid DL program generation. More specifically, we use both generative and infilling LLMs (e.g., Codex/InCoder) to generate and mutate valid/diverse input DL programs for fuzzing. Our experimental results demonstrate that TitanFuzz can achieve 30.38%/50.84% higher code coverage than state-of-the-art fuzzers on TensorFlow/PyTorch. Furthermore, TitanFuzz is able to detect 65 bugs, with 44 already confirmed as previously unknown bugs. This paper demonstrates that modern titanic LLMs can be leveraged to directly perform both generation-based and mutation-based fuzzing studied for decades, while being fully automated, generalizable, and applicable to domains challenging for traditional approaches (such as DL systems). We hope TitanFuzz can stimulate more work in this promising direction of LLMs for fuzzing.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
辉辉发布了新的文献求助10
刚刚
1秒前
4秒前
海皇星空完成签到 ,获得积分10
4秒前
恒浚完成签到,获得积分10
5秒前
搞怪含巧完成签到,获得积分10
5秒前
王俞关注了科研通微信公众号
5秒前
热心不凡完成签到,获得积分10
6秒前
lqh完成签到,获得积分20
6秒前
8秒前
8秒前
8秒前
哈哈哈发布了新的文献求助10
8秒前
faye发布了新的文献求助10
9秒前
hhsong完成签到,获得积分10
9秒前
勤奋酒窝完成签到,获得积分10
11秒前
roser发布了新的文献求助10
11秒前
几星霜完成签到,获得积分10
12秒前
lin应助李子采纳,获得10
12秒前
Y垚发布了新的文献求助10
13秒前
zhige发布了新的文献求助30
14秒前
还不错的橙子完成签到,获得积分10
15秒前
鲨鱼牙齿关注了科研通微信公众号
16秒前
情怀应助苏叶采纳,获得10
16秒前
17秒前
跳跃太清完成签到 ,获得积分10
17秒前
科目三应助guojin采纳,获得10
18秒前
20秒前
21秒前
pluto应助淡然的铭采纳,获得10
22秒前
22秒前
我是老大应助roser采纳,获得10
23秒前
SciGPT应助有魅力向珊采纳,获得10
23秒前
呱呱乐发布了新的文献求助30
24秒前
量子星尘发布了新的文献求助10
24秒前
26秒前
27秒前
自然的梦松关注了科研通微信公众号
28秒前
徐开心完成签到,获得积分10
30秒前
风吹似夏完成签到,获得积分10
30秒前
高分求助中
A new approach to the extrapolation of accelerated life test data 1000
Cognitive Neuroscience: The Biology of the Mind 1000
Technical Brochure TB 814: LPIT applications in HV gas insulated switchgear 1000
ACSM’s Guidelines for Exercise Testing and Prescription, 12th edition 500
Picture Books with Same-sex Parented Families: Unintentional Censorship 500
Nucleophilic substitution in azasydnone-modified dinitroanisoles 500
不知道标题是什么 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 冶金 细胞生物学 免疫学
热门帖子
关注 科研通微信公众号,转发送积分 3969557
求助须知:如何正确求助?哪些是违规求助? 3514377
关于积分的说明 11173836
捐赠科研通 3249692
什么是DOI,文献DOI怎么找? 1794979
邀请新用户注册赠送积分活动 875537
科研通“疑难数据库(出版商)”最低求助积分说明 804836