Reproduce “FrugalML: How to Use ML Prediction APIs More Accurately and Cheaply” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Lingjiao Chen, Matei Zaharia, James Zou
A framework developed by Stanford University researchers, FrugalML, enables the adaptive, cost-aware utilization of commercial machine learning prediction APIs. It selects and sequences API calls based on initial prediction confidence and class, achieving over 50% cost reduction (up to 90% in some cases) while maintaining or improving accuracy by up to 5% compared to using the best single API.
Key insights
- Commercial MLaaS APIs have specialized strengths and weaknesses; no single API is uniformly superior across all input classes or tasks.
- An optimal adaptive strategy for multi-API utilization exhibits a "2-sparsity" structure, meaning at most two services need to be considered as base services for initial predictions.
- Leveraging both the quality score (confidence) and the specific predicted class from an initial API call is essential for making effective, cost-efficient decisions about invoking additional services.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.