Efficient Online ML API Selection for Multi-Label Classification Tasks
Lingjiao Chen, Matei Zaharia, James Zou
Abstract
Multi-label classification tasks such as OCR and multi-object recognition are a major focus of the growing machine learning as a service industry. While many multi-label prediction APIs are available, it is challenging for users to decide which API to use for their own data and budget, due to the heterogeneity in those APIs' price and performance. Recent work shows how to select from single-label prediction APIs. However the computation complexity of the previous approach is exponential in the number of labels and hence is not suitable for settings like OCR. In this work, we propose FrugalMCT, a principled framework that adaptively selects the APIs to use for different data in an online fashion while respecting user's budget. The API selection problem is cast as an integer linear program, which we show has a special structure that we leverage to develop an efficient online API selector with strong performance guarantees. We conduct systematic experiments using ML APIs from Google, Microsoft, Amazon, IBM, Tencent and other providers for tasks including multi-label image classification, scene text recognition and named entity recognition. Across diverse tasks, FrugalMCT can achieve over 90% cost reduction while matching the accuracy of the best single API, or up to 8% better accuracy while matching the best API's cost.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ef8b5085-c01f-4668-8f90-581bd09b5455Cited by top-tier papers4
- Are LLMs Correctly Integrated into Software Systems?Yuchen Shao, Yuheng Huang, Jiawei Shen, Lei Ma et al.ICSE 2025 · 4 citations
- OCCAM: Towards Cost-Efficient and Accuracy-Aware Classification InferenceDujian Ding, Bicheng Xu, Laks V. S. LakshmananICLR 2025
- A Unified Approach to Routing and Cascading for LLMsJasper Dekoninck, Maximilian Baader, Martin T. VechevICML 2025
- Comfrey: Mitigating Integration Failures in LLM-enabled Software at Run-TimeYuchen Shao, Yuheng Huang, Jiazhen Zou, Yuling Shi et al.ICSE 2026
Builds on1
Related papers
- FrugalML: How to use ML Prediction APIs more accurately and cheaplyLingjiao Chen, Matei Zaharia, James Y. ZouNeurIPS 2020 · 57 citations
- Cost Effective MLaaS Federation: A Combinatorial Reinforcement Learning ApproachShuzhao Xie, Yuan Xue, Yifei Zhu, Zhi WangINFOCOM 2022 · 16 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
- Cocktail: A Multidimensional Optimization for Model Serving in CloudJashwant Raj Gunasekaran, Cyan Subhra Mishra, Prashanth Thinakaran, Bikash Sharma et al.NSDI 2022
- Practical and Efficient Model Extraction of Sentiment Analysis APIsWeibin Wu, Jianping Zhang, Victor Junqiu Wei, Xixian Chen et al.ICSE 2023 · 10 citations
