paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Detecting and understanding real-world differential performance bugs in machine learning libraries

检测与理解机器学习库中真实世界的差分性能缺陷
ISSTA Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis2020匹配度 5/10 · 论文将差分性能分析与模糊测试用于机器学习库的性能缺陷检测,属于程序分析在 ML 系统上的应用,与“PL→AI”方向有交叉;但其核心是动态分析而非用户重点关注的静态分析,也未涉及 LLM/Agent、浮点或贝叶斯程序分析,因此匹配度中等。引用 4 inbox
Saeid Tizpaz-Niari, Pavol Černý, Ashutosh Trivedi
crossref: 2026-09-12

AI 速览

一句话:提出差分性能分析的模糊测试与决策树解释方法,发现并定位机器学习库中的性能缺陷。

性能退化类编程错误广泛存在,但缺乏有效的发现与诊断工具。本文提出差分性能分析方法:寻找规模相同但性能差异巨大的输入,并以按规模参数化的输入类为单位比较性能函数,从而保证差异在大输入上依然稳健。方法分为两阶段——基于进化模糊测试的发现与基于决策树分类器的解释,二者均借助聚类提升效率;解释结果以可直接用于修复性能缺陷的形式给出程序输入与内部信息(如方法和条件)。作者在微基准上证明该方法优于现有模糊器,并在真实机器学习库中发现并解释多个性能缺陷,例如 scikit-learn 中逻辑回归的实现;其中四个缺陷系本文首次报告,并已被开发者修复。

问题
性能退化类编程错误普遍存在,但现有工具难以发现并诊断这类缺陷,尤其是在机器学习库中。
方法
采用差分性能分析,以规模参数化的输入类为比较单位;先用进化模糊测试配合聚类生成刻画不同性能函数的输入类,再用带聚类的判别学习和决策树解释性能差异并定位可疑代码区域。
评估
在微基准上,与最先进模糊器比较发现差分性能输入的能力;在真实机器学习库上开展案例研究,发现并解释多个性能缺陷,其中四个已被开发者修复。
原文摘要(Abstract)

Programming errors that degrade the performance of systems are widespread, yet there is very little tool support for finding and diagnosing these bugs. We present a method and a tool based on differential performance analysis---we find inputs for which the performance varies widely, despite having the same size. To ensure that the differences in the performance are robust (i.e. hold also for large inputs), we compare the performance of not only single inputs, but of classes of inputs, where each class has similar inputs parameterized by their size. Thus, each class is represented by a performance function from the input size to performance. Importantly, we also provide an explanation for why the performance differs in a form that can be readily used to fix a performance bug. The two main phases in our method are discovery with fuzzing and explanation with decision tree classifiers, each of which is supported by clustering. First, we propose an evolutionary fuzzing algorithm to generate inputs that characterize different performance functions. For this fuzzing task, the unique challenge is that we not only need the input class with the worst performance, but rather a set of classes exhibiting differential performance. We use clustering to merge similar input classes which significantly improves the efficiency of our fuzzer. Second, we explain the differential performance in terms of program inputs and internals (e.g., methods and conditions). We adapt discriminant learning approaches with clustering and decision trees to localize suspicious code regions. We applied our techniques on a set of micro-benchmarks and real-world machine learning libraries. On a set of micro-benchmarks, we show that our approach outperforms state-of-the-art fuzzers in finding inputs to characterize differential performance. On a set of case-studies, we discover and explain multiple performance bugs in popular machine learning frameworks, for instance in implementations of logistic regression in scikit-learn. Four of these bugs, reported first in this paper, have since been fixed by the developers.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot6073,
  title = {Detecting and understanding real-world differential performance bugs in machine learning libraries},
  author = {Saeid Tizpaz-Niari and Pavol Černý and Ashutosh Trivedi},
  booktitle = {ISSTA},
  year = {2020},
  doi = {10.1145/3395363.3404540}
}