Deep Learning (DL) library bugs affect downstream DL applications, emphasizing the need for reliable systems. Generating valid input programs for fuzzing DL libraries is challenging due to the need for satisfying both language syntax/semantics and constraints for constructing valid computational graphs. Recently, the TitanFuzz work demonstrates that modern Large Language Models (LLMs) can be directly leveraged to implicitly learn all the constraints to generate valid DL programs for fuzzing. However, LLMs tend to generate ordinary programs following similar patterns seen in their massive training corpora, while fuzzing favors unusual inputs that cover edge cases or are unlikely to be manually produced. To fill this gap, this paper proposes FuzzGPT, the first technique to prime LLMs to synthesize unusual programs for fuzzing. FuzzGPT is built on the well-known hypothesis that historical bug-triggering programs may include rare/valuable code ingredients important for bug finding. Traditional techniques leveraging such historical information require intensive human efforts to design dedicated generators and ensure the validity of generated programs. FuzzGPT demonstrates that this process can be fully automated via the intrinsic capabilities of LLMs (including fine-tuning and in-context learning), while being generalizable and applicable to challenging domains. While FuzzGPT can be applied with different LLMs, this paper focuses on the powerful GPT-style models: Codex and CodeGen. Moreover, FuzzGPT also shows the potential of directly leveraging the instruct-following capability of the recent ChatGPT for effective fuzzing. Evaluation on two popular DL libraries (PyTorch and TensorFlow) shows that FuzzGPT can substantially outperform TitanFuzz, detecting 76 bugs, with 49 already confirmed as previously unknown bugs, including 11 high-priority bugs or security vulnerabilities.


翻译:深度学习(DL)库的缺陷会波及下游DL应用,凸显了系统可靠性的重要性。在为DL库生成有效的模糊测试输入程序时,既需要满足语言语法/语义,又需满足构建有效计算图的约束条件,这极具挑战性。近年来,TitanFuzz研究表明,可直接利用现代大型语言模型(LLMs)隐式学习所有约束条件,从而生成有效的DL模糊测试程序。然而,LLMs倾向于生成与其大规模训练语料中相似模式的常规程序,而模糊测试则更青睐能覆盖边缘案例或难以手动生成的非常规输入。为填补这一空白,本文提出FuzzGPT——首个引导LLMs合成非常规模糊测试程序的技术。FuzzGPT基于一个广为人知的假设:历史触发缺陷的程序可能包含对缺陷发现至关重要的罕见/有价值代码片段。传统利用此类历史信息的技术需要大量人工投入设计专用生成器,并确保生成程序的有效性。FuzzGPT表明,借助LLMs的内在能力(包括微调和上下文学习),该过程可完全自动化,同时具备泛化性和对挑战性领域的适用性。尽管FuzzGPT可适配不同LLMs,本文聚焦于强大的GPT风格模型:Codex和CodeGen。此外,FuzzGPT还展示了直接利用近期ChatGPT的指令跟随能力进行高效模糊测试的潜力。在两大流行DL库(PyTorch和TensorFlow)上的评估表明,FuzzGPT可显著优于TitanFuzz,检测到76个缺陷,其中49个已被确认为此前未知的缺陷,包括11个高优先级缺陷或安全漏洞。

0
下载
关闭预览

相关内容

知识增强预训练语言模型:全面综述
专知会员服务
97+阅读 · 2021年10月19日
专知会员服务
44+阅读 · 2021年4月12日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
逆强化学习-学习人先验的动机
CreateAMind
16+阅读 · 2019年1月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【泡泡一分钟】基于图神经网络的情景识别
泡泡机器人SLAM
11+阅读 · 2018年11月21日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
自然语言处理 (NLP)资源大全
机械鸡
35+阅读 · 2017年9月17日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
2+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
A Survey of Large Language Models
Arxiv
501+阅读 · 2023年3月31日
Arxiv
34+阅读 · 2022年12月20日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
8+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关VIP内容
知识增强预训练语言模型:全面综述
专知会员服务
97+阅读 · 2021年10月19日
专知会员服务
44+阅读 · 2021年4月12日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
相关资讯
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
逆强化学习-学习人先验的动机
CreateAMind
16+阅读 · 2019年1月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【泡泡一分钟】基于图神经网络的情景识别
泡泡机器人SLAM
11+阅读 · 2018年11月21日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
自然语言处理 (NLP)资源大全
机械鸡
35+阅读 · 2017年9月17日
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
2+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员