Detecting and understanding real-world differential performance bugs in machine learning libraries
Saeid Tizpaz-Niari, Pavol Cerný, Ashutosh Trivedi
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 054abc9c-c8a1-4861-9e7d-10b35ae24a0eCited by top-tier papers7
- DocTer: documentation-guided fuzzing for testing deep learning API functionsDanning Xie, Yitong Li, Mijung Kim, Hung Viet Pham et al.ISSTA 2022 · 72 citations
- Fairness-aware Configuration of Machine Learning LibrariesSaeid Tizpaz-Niari, Ashish Kumar, Gang Tan, Ashutosh TrivediICSE 2022 · 44 citations
- Are Machine Learning Cloud APIs Used Correctly?Chengcheng Wan, Shicheng Liu, Henry Hoffmann, Michael Maire et al.ICSE 2021 · 37 citations
- Understanding performance problems in deep learning systemsJunming Cao, Bihuan Chen, Chao Sun, Longjie Hu et al.FSE 2022 · 33 citations
- Reliability Assurance for Deep Neural Network Architectures Against Numerical DefectsLinyi Li, Yuhao Zhang, Luyao Ren, Yingfei Xiong et al.ICSE 2023 · 7 citations
Builds on3
- Stealing Hyperparameters in Machine LearningBinghui Wang, Neil Zhenqiang GongS&P 2018 · 504 citations
- SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity VulnerabilitiesTheofilos Petsios, Jason Zhao, Angelos D. Keromytis, Suman JanaCCS 2017 · 214 citations
- Data-Driven Debugging for Functional Side ChannelsSaeid Tizpaz-Niari, Pavol Cerný, Ashutosh TrivediNDSS 2020
Related papers
- Exposing numerical bugs in deep learning via gradient back-propagationMing Yan, Junjie Chen, Xiangyu Zhang, Lin Tan et al.FSE 2021 · 47 citations
- Regression Fuzzing for Deep Learning SystemsHanmo You, Zan Wang, Junjie Chen, Shuang Liu et al.ICSE 2023 · 28 citations
- NEUZZ: Efficient Fuzzing with Neural Program SmoothingDongdong She, Kexin Pei, Dave Epstein, Junfeng Yang et al.S&P 2019 · 220 citations
- Muffin: Testing Deep Learning Libraries via Neural Architecture FuzzingJiazhen Gu, Xuchuan Luo, Yangfan Zhou, Xin WangICSE 2022 · 63 citations
- Fuzzing Automatic Differentiation in Deep-Learning LibrariesChenyuan Yang, Yinlin Deng, Jiayi Yao, Yuxing Tu et al.ICSE 2023 · 34 citations
