一句话:利用 LLM 从历史缺陷报告提取并迁移缺陷模式,为相似 API 合成带 oracle 的测试,实现深度学习库静默缺陷模糊测试。
深度学习库广泛用于关键应用,其中细微的静默缺陷可能造成严重后果。现有深度学习模糊测试主要面向崩溃检测,因缺乏有效测试程序与相应 oracle,难以发现静默缺陷。本文观察到历史缺陷报告蕴含大量尚未充分利用的静默缺陷信息,提出用大语言模型进行通用且可控的缺陷迁移:先从历史 issue 中提取上下文感知的缺陷模式,再用基于功能的嵌入匹配语义相关的 API,并为目标 API 合成带定制 oracle 的测试用例,从而把已知缺陷 API 的高风险上下文与 oracle 设计迁移到功能相似的目标 API。为保证迁移可靠性,作者引入 LLM 驱动的自验证模块,系统评估每个迁移缺陷实例的有效性。该方法实现为工具 TransFuzz,在 PyTorch、TensorFlow 和 MindSpore 上评估,发现 79 个此前未知缺陷,其中 12 个被确认为 CVE,覆盖 10 种缺陷类型,展示了其有效性与泛化能力。
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.
@article{paperbot3848,
title = {LLM-Powered Silent Bug Fuzzing in Deep Learning Libraries via Versatile and Controlled Bug Transfer},
author = {Kunpeng Zhang and Dongwei Xiao and Daoyuan Wu and Shuai Wang and Jiali Zhao and Yuanyi Lin and Tongtong Xu and Shaohua Wang},
journal = {Proceedings of the ACM on Programming Languages},
volume = {10},
number = {OOPSLA1},
year = {2026},
doi = {10.1145/3798258}
}