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.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
斯文败类应助阿柠采纳,获得10
刚刚
李佰丹完成签到 ,获得积分10
刚刚
1秒前
shark完成签到,获得积分10
1秒前
flash发布了新的文献求助30
1秒前
Ddurian应助quietlife采纳,获得20
1秒前
1秒前
大肉猪完成签到,获得积分10
1秒前
2秒前
2秒前
zhzha辉发布了新的文献求助200
3秒前
lyh完成签到,获得积分10
3秒前
3秒前
李爱国应助梁帅琦采纳,获得10
3秒前
嘘嘘完成签到,获得积分10
4秒前
香港交通大学完成签到,获得积分10
4秒前
缓慢的甜瓜完成签到,获得积分10
4秒前
乐乐完成签到,获得积分10
4秒前
swjs08完成签到,获得积分10
5秒前
5秒前
wfy完成签到,获得积分10
5秒前
6秒前
隐形曼青应助Chen采纳,获得10
6秒前
girl完成签到,获得积分10
7秒前
插线板完成签到 ,获得积分10
7秒前
fbzk完成签到,获得积分10
7秒前
风口上的飞猪完成签到,获得积分10
8秒前
lym54发布了新的文献求助10
9秒前
9秒前
9秒前
徐徐完成签到 ,获得积分10
10秒前
美海与鱼完成签到,获得积分10
10秒前
风疏沐雨完成签到,获得积分10
11秒前
飘逸咖啡发布了新的文献求助10
11秒前
11完成签到,获得积分10
11秒前
橙橙卡莉完成签到,获得积分10
11秒前
今天看文献了没完成签到 ,获得积分10
11秒前
眯眯眼的盼芙完成签到 ,获得积分10
11秒前
sober完成签到,获得积分10
11秒前
Riggle G完成签到,获得积分0
11秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Kinesiophobia : a new view of chronic pain behavior 3000
Les Mantodea de guyane 2500
Signals, Systems, and Signal Processing 510
Discrete-Time Signals and Systems 510
Brittle Fracture in Welded Ships 500
Lloyd's Register of Shipping's Approach to the Control of Incidents of Brittle Fracture in Ship Structures 500
热门求助领域 (近24小时)
化学 材料科学 生物 医学 工程类 计算机科学 有机化学 物理 生物化学 纳米技术 复合材料 内科学 化学工程 人工智能 催化作用 遗传学 数学 基因 量子力学 物理化学
热门帖子
关注 科研通微信公众号,转发送积分 5943492
求助须知:如何正确求助?哪些是违规求助? 7087901
关于积分的说明 15890907
捐赠科研通 5074632
什么是DOI,文献DOI怎么找? 2729531
邀请新用户注册赠送积分活动 1689045
关于科研通互助平台的介绍 1614002