一句话:提出运行时中间层 SmartGear,自动检测并转换机器学习 API 的不匹配输出,防止软件集成失败。
机器学习 API 的接口规约往往不充分,开发者在软件中正确集成它们面临困难:即使 ML API 与软件各自设计良好,一旦 API 输出与软件期望不兼容,整个应用仍会行为异常。本文首先对真实应用中的 ML API 集成问题开展实证研究,据此设计并实现了 SmartGear。SmartGear 位于 ML API 与软件之间,作为中间层在运行时自动检测不匹配或错误的 ML API 输出,并将其转换为更符合软件需求的输出,从而阻断集成失败。作者在多个开源应用上进行评估,结果显示 SmartGear 能检测出 70% 的不兼容 API 输出,并阻止 67% 的潜在集成失败,效果优于对比方案。
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.
@article{paperbot1833,
title = {Run-Time Prevention of Software Integration Failures of Machine Learning APIs},
author = {Chengcheng Wan and Yuhan Liu and Kuntai Du and Henry Hoffmann and Junchen Jiang and Michael Maire and Shan Lu},
journal = {Proceedings of the ACM on Programming Languages},
volume = {7},
number = {OOPSLA2},
year = {2023},
doi = {10.1145/3622806}
}