Automated Testing of Software that Uses Machine Learning APIs

  • Chengcheng Wan
  • , Shicheng Liu
  • , Sophie Xie
  • , Yifan Liu
  • , Henry Hoffmann
  • , Michael Maire
  • , Shan Lu

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

22 Scopus citations

Abstract

An increasing number of software applications incorporate machine learning (ML) solutions for cognitive tasks that statistically mimic human behaviors. To test such software, tremendous human effort is needed to design image/text/audio inputs that are relevant to the software, and to judge whether the software is processing these inputs as most human beings do. Even when misbehavior is exposed, it is often unclear whether the culprit is inside the cognitive ML API or the code using the API. This paper presents Keeper, a new testing tool for software that uses cognitive ML APIs. Keeper designs a pseudo-inverse function for each ML API that reverses the corresponding cognitive task in an empirical way (e.g., an image search engine pseudo-reverses the image-classification API), and incorporates these pseudo-inverse functions into a symbolic execution engine to automatically gener-ate relevant image/text/audio inputs and judge output correctness. Once misbehavior is exposed, Keeper attempts to change how ML APIs are used in software to alleviate the misbehavior. Our evalu-ation on a variety of open-source applications shows that Keeper greatly improves the branch coverage, while identifying many pre-viously unknown bugs.

Original languageEnglish
Title of host publicationProceedings - 2022 ACM/IEEE 44th International Conference on Software Engineering, ICSE 2022
PublisherIEEE Computer Society
Pages212-224
Number of pages13
ISBN (Electronic)9781450392211
DOIs
StatePublished - 5 Jul 2022
Externally publishedYes
Event44th ACM/IEEE International Conference on Software Engineering, ICSE 2022 - Hybrid, Pittsburgh, United States
Duration: 22 May 202227 May 2022

Publication series

NameProceedings - International Conference on Software Engineering
Volume2022-May
ISSN (Print)0270-5257

Conference

Conference44th ACM/IEEE International Conference on Software Engineering, ICSE 2022
Country/TerritoryUnited States
CityHybrid, Pittsburgh
Period22/05/2227/05/22

Keywords

  • machine learning
  • machine learning API
  • software testing

Fingerprint

Dive into the research topics of 'Automated Testing of Software that Uses Machine Learning APIs'. Together they form a unique fingerprint.

Cite this