Run-Time Prevention of Software Integration Failures of Machine Learning APIs
Chengcheng Wan, Yuhan Liu, Kuntai Du, Henry Hoffmann, Junchen Jiang, Michael Maire, Shan Lu
Abstract
Due to the under-specified interfaces, developers face challenges in correctly integrating machine learning (ML) APIs in software. Even when the ML API and the software are well designed on their own, the resulting application misbehaves when the API output is incompatible with the software. It is desirable to have an adapter that converts ML API output at runtime to better fit the software need and prevent integration failures. In this paper, we conduct an empirical study to understand ML API integration problems in real-world applications. Guided by this study, we present SmartGear, a tool that automatically detects and converts mismatching or incorrect ML API output at run time, serving as a middle layer between ML API and software. Our evaluation on a variety of open-source applications shows that SmartGear detects 70% incompatible API outputs and prevents 67% potential integration failures, outperforming alternative solutions.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get b13357ef-cc00-4435-9faf-393ca353d794Cited by top-tier papers3
- PyDex: Repairing Bugs in Introductory Python Assignments using LLMsJialu Zhang, José Pablo Cambronero, Sumit Gulwani, Vu Le et al.OOPSLA 2024 · 38 citations
- Are LLMs Correctly Integrated into Software Systems?Yuchen Shao, Yuheng Huang, Jiawei Shen, Lei Ma et al.ICSE 2025 · 4 citations
- Comfrey: Mitigating Integration Failures in LLM-enabled Software at Run-TimeYuchen Shao, Yuheng Huang, Jiazhen Zou, Yuling Shi et al.ICSE 2026
Related papers
- Are Machine Learning Cloud APIs Used Correctly?Chengcheng Wan, Shicheng Liu, Henry Hoffmann, Michael Maire et al.ICSE 2021 · 37 citations
- ChameleonAPI: Automatic and Efficient Customization of Neural Networks for ML ApplicationsYuhan Liu, Chengcheng Wan, Kuntai Du, Henry Hoffmann et al.OSDI 2024 · 1 citation
- SOAR: A Synthesis Approach for Data Science API RefactoringAnsong Ni, Daniel Ramos, Aidan Z. H. Yang, Inês Lynce et al.ICSE 2021 · 27 citations
- How Did the Model Change? Efficiently Assessing Machine Learning API ShiftsLingjiao Chen, Matei Zaharia, James ZouICLR 2022 · 5 citations
- LLMs Meet Library Evolution: Evaluating Deprecated API Usage in LLM-Based Code CompletionChong Wang, Kaifeng Huang, Jian Zhang, Yebo Feng et al.ICSE 2025 · 3 citations
