面向机器学习应用的神经网络自动化高效定制方法
Automatic and Efficient Customization of Neural Networks for ML Applications
AI总结:
针对通用MLAPI无法适配不同应用故障容错需求的问题,提出无需修改应用代码的ChameleonAPI框架,通过解析应用决策生成专属损失函数定制模型,可将应用错误决策降低43%。
摘要:
机器学习API极大减轻了应用开发者设计和训练自有神经网络模型的负担——如今对图像中的物体进行分类,只需一行Python代码调用API即可实现。然而,无论不同应用如何使用API的输出,这些API提供的都是相同的预训练模型。这种方式可能并非最优,因为并非所有机器学习推理错误都会导致应用故障,且可能引发故障与不会引发故障的推理错误之间的界定,在不同应用间差异极大。\n 为解决这一问题,我们首先研究了77个真实应用,这些应用共使用了来自两家服务商的6个机器学习API,以揭示机器学习API输出影响应用决策过程的常见模式。受这些发现启发,我们提出了ChameleonAPI——一种面向机器学习API的优化框架,无需修改应用源代码即可生效。ChameleonAPI为应用开发者提供了一个解析器,可自动分析应用以生成其决策过程的抽象描述,随后利用该抽象设计出仅惩罚对应用至关重要的API输出错误的应用专属损失函数。ChameleonAPI使用该损失函数高效训练为每个应用定制的神经网络模型,并通过现有接口部署该模型,以响应对应应用的API调用。与从所有商用机器学习API中选取最优方案的基线相比,实验表明ChameleonAPI将应用错误决策的比例降低了43%。
英文摘要:
ML APIs have greatly relieved application developers of the burden to design and train their own neural network models -- classifying objects in an image can now be as simple as one line of Python code to call an API. However, these APIs offer the same pre-trained models regardless of how their output is used by different applications. This can be suboptimal as not all ML inference errors can cause application failures, and the distinction between inference errors that can or cannot cause failures varies greatly across applications. To tackle this problem, we first study 77 real-world applications, which collectively use six ML APIs from two providers, to reveal common patterns of how ML API output affects applications' decision processes. Inspired by the findings, we propose ChameleonAPI, an optimization framework for ML APIs, which takes effect without changing the application source code. ChameleonAPI provides application developers with a parser that automatically analyzes the application to produce an abstract of its decision process, which is then used to devise an application-specific loss function that only penalizes API output errors critical to the application. ChameleonAPI uses the loss function to efficiently train a neural network model customized for each application and deploys it to serve API invocations from the respective application via existing interface. Compared to a baseline that selects the best-of-all commercial ML API, we show that ChameleonAPI reduces incorrect application decisions by 43%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。