arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.23065cs.SE
收藏

基于大语言模型的深度学习库中无声bug模糊测试技术:通过多功能且可控的bug转移

LLM-Powered Silent Bug Fuzzing in Deep Learning Libraries via Versatile and Controlled Bug Transfer

Hong Kong University of Science and Technology(香港科技大学);Lingnan University(岭南大学);Huawei(华为);Central University of Finance and Economics(中央财经大学)

Kunpeng Zhang, Dongwei Xiao, Daoyuan Wu, Shuai Wang, Jiali Zhao, Yuanyi Lin, Tongtong Xu, Shaohua Wang

AI总结:

利用大语言模型实现深度学习库中无声bug的模糊测试,通过多功能且可控的bug转移技术发现79个新bug。

摘要:

深度学习(DL)库在关键应用中被广泛使用,即使细微的无声bug也可能导致严重后果。尽管现有的DL模糊测试技术在检测崩溃方面取得了进展,但它们本质上难以检测无声bug,因为缺乏有效的测试程序和相应的或acles。基于观察到历史bug报告中包含丰富的、未充分利用的关于无声bug的信息,我们利用大语言模型(LLMs)进行多功能且可控的bug转移,以实现无声bug的模糊测试。具体而言,我们的方法使用LLMs从历史问题中提取上下文感知的bug模式,通过功能基的嵌入匹配语义相关的应用程序编程接口(APIs),并合成带有定制或acles的测试用例。这使得通过将高风险上下文和或acles设计从已知buggy API转移到功能相似的目标API,主动检测无声bug。为了确保我们上下文感知bug转移的可靠性,我们引入了一个基于LLM的自我验证模块,系统地评估每个转移的bug实例的有效性。我们将这一方法实现为一个名为TransFuzz的工具,并在三个主流DL库:PyTorch、TensorFlow和MindSpore上进行了评估。TransFuzz成功发现了79个之前未知的bug(12个被确认为常见漏洞和暴露(CVEs)),在10种bug类型中证明了其有效性和在迁移DL库bug发现能力方面的通用性。

英文摘要:

Deep learning (DL) libraries are widely used in critical applications, where even subtle silent bugs can lead to serious consequences. While existing DL fuzzing techniques have made progress in detecting crashes, they inherently struggle to detect silent bugs due to the lack of effective test programs and corresponding oracles. Building on the observation that historical bug reports contain rich, underutilized information about silent bugs, we leverage large language models (LLMs) to perform versatile yet controlled bug transfer for silent bug fuzzing. Specifically, our approach uses LLMs to extract context-aware bug patterns from historical issues, match semantically related Application Programming Interfaces (APIs) using functionality-based embeddings, and synthesize test cases with customized oracles. This enables proactive detection of silent bugs by transferring high-risk contexts and oracle designs from known buggy APIs to functionally similar target APIs. To ensure the reliability of our context-aware bug transfer, we introduce an LLM-powered self-validation module that systematically evaluates the validity of each transferred bug instance. We implement this methodology in a tool named TransFuzz and evaluate it on three mainstream DL libraries: PyTorch, TensorFlow, and MindSpore. TransFuzz successfully discovers 79 previously unknown bugs (12 confirmed as Common Vulnerabilities and Exposures (CVEs)) in 10 bug types, demonstrating its effectiveness and generalizability in migrating DL library bug discovery capabilities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑