FrugalML: How to use ML Prediction APIs more accurately and cheaply
Lingjiao Chen, Matei Zaharia, James Y. Zou
Abstract
Prediction APIs offered for a fee are a fast-growing industry and an important part of machine learning as a service. While many such services are available, the heterogeneity in their price and performance makes it challenging for users to decide which API or combination of APIs to use for their own data and budget. We take a first step towards addressing this challenge by proposing FrugalML, a principled framework that jointly learns the strength and weakness of each API on different data, and performs an efficient optimization to automatically identify the best sequential strategy to adaptively use the available APIs within a budget constraint. Our theoretical analysis shows that natural sparsity in the formulation can be leveraged to make FrugalML efficient. We conduct systematic experiments using ML APIs from Google, Microsoft, Amazon, IBM, Baidu and other providers for tasks including facial emotion recognition, sentiment analysis and speech recognition. Across various tasks, FrugalML can achieve up to 90% cost reduction while matching the accuracy of the best single API, or up to 5% 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 e1ff3da8-4316-41f7-b530-0bee2fa2c725Cited by top-tier papers5
- ALICE: Active Learning with Contrastive Natural Language ExplanationsWeixin Liang, James Zou, Zhou YuEMNLP 2020 · 36 citations
- The Product Beyond the Model - An Empirical Study of Repositories of Open-Source ML ProductsNadia Nahar, Haoran Zhang, Grace A. Lewis, Shurui Zhou et al.ICSE 2025 · 2 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
- Ken: An Execution Engine for Unstructured Database SystemsFerdinand Kossmann, Ziniu Wu, Alex Turk, Nesime Tatbul et al.VLDB 2026
- Comfrey: Mitigating Integration Failures in LLM-enabled Software at Run-TimeYuchen Shao, Yuheng Huang, Jiazhen Zou, Yuling Shi et al.ICSE 2026
Related papers
- Efficient Online ML API Selection for Multi-Label Classification TasksLingjiao Chen, Matei Zaharia, James ZouICML 2022 · 22 citations
- How Did the Model Change? Efficiently Assessing Machine Learning API ShiftsLingjiao Chen, Matei Zaharia, James ZouICLR 2022 · 5 citations
- Cost Effective MLaaS Federation: A Combinatorial Reinforcement Learning ApproachShuzhao Xie, Yuan Xue, Yifei Zhu, Zhi WangINFOCOM 2022 · 16 citations
- Practical and Efficient Model Extraction of Sentiment Analysis APIsWeibin Wu, Jianping Zhang, Victor Junqiu Wei, Xixian Chen et al.ICSE 2023 · 10 citations
- Are Machine Learning Cloud APIs Used Correctly?Chengcheng Wan, Shicheng Liu, Henry Hoffmann, Michael Maire et al.ICSE 2021 · 37 citations
