Proceedings

Lazy Testing of Machine-Learning Models

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 7428-7436.

https://doi.org/10.24963/ijcai.2025/826

Abstract

Checking the reliability of machine-learning models is a crucial, but challenging task. Nomos is an existing, automated framework for testing general, user-provided functional properties of models, including so-called hyperproperties expressed over more than one model execution. Nomos aims to find model inputs that expose ``bugs'', that is, property violations. However, performing thousands of model invocations during testing is costly both in terms of time and money (for metered APIs, such as OpenAI's).

We present LaZ (pronounced ``lazy''), an extension of Nomos that automatically minimizes the number of model invocations to boost the test throughput and thereby find bugs more efficiently. During test execution, LaZ automatically identifies redundant invocations---invocations where the model output does not affect the final test outcome---and skips them, much like lazy evaluation in certain programming languages. This optimization enables a second one that dynamically reorders model invocations to skip the more expensive ones. As a result, LaZ finds the same number of bugs as Nomos, but does so median 33% and up to 60% faster.

  1. [Albarghouthi et al., 2017] Aws Albarghouthi, Loris D'Antoni, Samuel Drews, and Aditya V. Nori. FairSquare: Probabilistic verification of program fairness. PACMPL, 1:80:1-80:30, 2017.
  2. [Athavale et al., 2024] Anagha Athavale, Ezio Bartocci, Maria Christakis, Matteo Maffei, Dejan Nickovic, and Georg Weissenbacher. Verifying global two-safety proper- ties in neural networks with confidence. In CAV, volume 14682 of LNCS, pages 329-351. Springer, 2024.
  3. [Bastani et al., 2019] Osbert Bastani, Xin Zhang, and Ar- mando Solar-Lezama. Probabilistic verification of fairness properties via concentration. PACMPL, 3:118:1-118:27, 2019.
  4. [Brockman et al., 2016] Greg Brockman, Vicki Cheung, Lud- wig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. OpenAI Gym. CoRR, abs/1606.01540, 2016.
  5. [Carlini and Wagner, 2017] Nicholas Carlini and David A. Wagner. Towards evaluating the robustness of neural net- works. In S&P, pages 39-57. IEEE Computer Society, 2017.
  6. [Chen et al., 1998] Tsong Yueh Chen, S. C. Cheung, and Siu- Ming Yiu. Metamorphic testing: A new approach for gener- ating next test cases. Technical Report HKUST-CS98-01, HKUST, 1998.
  7. [Christakis et al., 2016] Maria Christakis, Peter Müller, and Valentin Wüstholz. Guiding dynamic symbolic execution toward unverified program executions. In ICSE, pages 144-155. ACM, 2016.
  8. [Christakis et al., 2023] Maria Christakis, Hasan Ferit Eniser, Jörg Hoffmann, Adish Singla, and Valentin Wüstholz. Spec- ifying and testing k-safety properties for machine-learning models. In IJCAI, pages 4748-4757. ijcai.org, 2023. IJCAI
  9. [Clarkson and Schneider, 2008] Michael R. Clarkson and Fred B. Schneider. Hyperproperties. In CSF, pages 51-65. IEEE Computer Society, 2008.
  10. [Cousot and Cousot, 1976] Patrick Cousot and Radhia Cousot. Static determination of dynamic properties of programs. In ISOP, pages 106-130. Dunod, 1976.
  11. [Cousot and Cousot, 1977] Patrick Cousot and Radhia Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approx- imation of fixpoints. In POPL, pages 238-252. ACM, 1977.
  12. [Deng et al., 2021] Yao Deng, Guannan Lou, James Xi Zheng, Tianyi Zhang, Miryung Kim, Huai Liu, Chen Wang, and Tsong Yueh Chen. BMT: Behavior driven development- based metamorphic testing for autonomous driving mod- els. In MET@ICSE, pages 32-36. IEEE Computer Society, 2021.
  13. [Deng et al., 2022] Yao Deng, Xi Zheng, Tianyi Zhang, Huai Liu, Guannan Lou, Miryung Kim, and Tsong Yueh Chen. A declarative metamorphic testing framework for autonomous driving. TSE, pages 1-20, 2022.
  14. [Ferles et al., 2017] Kostas Ferles, Valentin Wüstholz, Maria Christakis, and Isil Dillig. Failure-directed program trim- ming. In ESEC/FSE, pages 174-185. ACM, 2017.
  15. [Fluri et al., 2024] Lukas Fluri, Daniel Paleka, and Florian Tramèr. Evaluating superhuman models with consistency checks. In SaTML, pages 194-232. IEEE Computer Society, 2024.
  16. [Galhotra et al., 2017] Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou. Fairness testing: Testing software for discrimination. In ESEC/FSE, pages 498-510. ACM, 2017.
  17. [Gehr et al., 2018] Timon Gehr, Matthew Mirman, Dana Drachsler-Cohen, Petar Tsankov, Swarat Chaudhuri, and Martin T. Vechev. AI2: Safety and robustness certification of neural networks with abstract interpretation. In S&P, pages 3-18. IEEE Computer Society, 2018.
  18. [Goodfellow et al., 2015] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015.
  19. [He et al., 2020] Pinjia He, Clara Meister, and Zhendong Su. Structure-invariant testing for machine translation. In ICSE, pages 961-973. ACM, 2020.
  20. [Hofmann, 1994] Hans Hofmann. The German credit dataset, 1994. https://archive.ics.uci.edu/ml/datasets/ Statlog+(German+Credit+Data). Link
  21. [Huang et al., 2017] Xiaowei Huang, Marta Kwiatkowska, Sen Wang, and Min Wu. Safety verification of deep neural networks. In CAV, volume 10426 of LNCS, pages 3-29. Springer, 2017.
  22. [Journault et al., 2019] Matthieu Journault, Antoine Miné, Raphaël Monat, and Abdelraouf Ouadjaout. Combina- tions of reusable abstract domains for a multilingual static analyzer. In VSTTE, volume 12031 of LNCS, pages 1-18. Springer, 2019.
  23. [Larson et al., 2016] Jeff Larson, Surya Mattu, Lauren Kirchner, and Julia Angwin. How we analyzed the COMPAS recidivism algo- rithm, 2016. https://www.propublica.org/article/ how-we-analyzed-the-compas-recidivism-algorithm. Link
  24. [LeCun et al., 1999] Yann LeCun, Corinna Cortes, and Christopher J.C. Burges. The MNIST database of handwrit- ten digits, 1999. http://yann.lecun.com/exdb/mnist. Link
  25. [Liu, 2017] Jiashen Liu. 515K hotel reviews data in Eu- rope, 2017. https://www.kaggle.com/datasets/jiashenliu/ 515k-hotel-reviews-data-in-europe. Link
  26. [Madry et al., 2018] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In ICLR. OpenReview.net, 2018.
  27. [Segura et al., 2016] Sergio Segura, Gordon Fraser, Ana B. Sánchez, and Antonio Ruiz Cortés. A survey on metamor- phic testing. TSE, 42:805-824, 2016.
  28. [Seshia et al., 2018] Sanjit A. Seshia, Ankush Desai, Tom- maso Dreossi, Daniel J. Fremont, Shromona Ghosh, Edward Kim, Sumukh Shivakumar, Marcell Vazquez- Chanlatte, and Xiangyu Yue. Formal specification for deep neural networks. In ATVA, volume 11138 of LNCS, pages 20-34. Springer, 2018.
  29. [Sharma and Wehrheim, 2020] Arnab Sharma and Heike Wehrheim. Higher income, larger loan? Monotonicity testing of machine learning models. In ISSTA, pages 200- 210. ACM, 2020.
  30. [Singh et al., 2019] Gagandeep Singh, Timon Gehr, Markus Püschel, and Martin T. Vechev. An abstract domain for certifying neural networks. PACMPL, 3:41:1-41:30, 2019.
  31. [Tian et al., 2018] Yuchi Tian, Kexin Pei, Suman Jana, and Baishakhi Ray. DeepTest: Automated testing of deep- neural-network-driven autonomous cars. In ICSE, pages 303-314. ACM, 2018.
  32. [Tramèr et al., 2017] Florian Tramèr, Vaggelis Atlidakis, Roxana Geambasu, Daniel J. Hsu, Jean-Pierre Hubaux, Mathias Humbert, Ari Juels, and Huang Lin. FairTest: Discovering unwarranted associations in data-driven ap- plications. In EuroS&P, pages 401-416. IEEE Computer Society, 2017.
  33. [Tran-Thanh et al., 2010] Long Tran-Thanh, Archie C. Chap- man, Enrique Munoz de Cote, Alex Rogers, and Nicholas R. Jennings. Epsilon-first policies for budget-limited multi- armed bandits. In AAAI, pages 1211-1216. AAAI, 2010.
  34. [Udeshi et al., 2018] Sakshi Udeshi, Pryanshu Arora, and Sudipta Chattopadhyay. Automated directed fairness test- ing. In ASE, pages 98-108. ACM, 2018.
  35. [Urban et al., 2020] Caterina Urban, Maria Christakis, Valentin Wüstholz, and Fuyuan Zhang. Perfectly parallel fairness certification of neural networks. PACMPL, 4:185:1-185:30, 2020.
  36. [Warden, 2018] Pete Warden. Speech commands: A dataset for limited-vocabulary speech recognition. CoRR, abs/1804.03209, 2018.
  37. [Wüstholz and Christakis, 2020] Valentin Wüstholz and Maria Christakis. Targeted greybox fuzzing with static lookahead analysis. In ICSE, pages 789-800. ACM, 2020.
  38. [Zhang et al., 2018] Mengshi Zhang, Yuqun Zhang, Ling- ming Zhang, Cong Liu, and Sarfraz Khurshid. Deep- Road: GAN-based metamorphic testing and input vali- dation framework for autonomous driving systems. In ASE, pages 132-142. ACM, 2018.
  39. [Zhou and Sun, 2019] Zhi Quan Zhou and Liqun Sun. Meta- morphic testing of driverless cars. CACM, 62:61-67, 2019.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards