OCCAM: Towards Cost-Efficient and Accuracy-Aware Classification Inference
Dujian Ding, Bicheng Xu, Laks V. S. Lakshmanan
Abstract
Classification tasks play a fundamental role in various applications, spanning domains such as healthcare, natural language processing and computer vision. With the growing popularity and capacity of machine learning models, people can easily access trained classifiers as a service online or offline. However, model use comes with a cost and classifiers of higher capacity (such as large foundation models) usually incur higher inference costs. To harness the respective strengths of different classifiers, we propose a principled approach, OCCAM, to compute the best classifier assignment strategy over classification queries (termed as the optimal model portfolio) so that the aggregated accuracy is maximized, under user-specified cost budgets. Our approach uses an unbiased and low-variance accuracy estimator and effectively computes the optimal solution by solving an integer linear programming problem. On a variety of real-world datasets, OCCAM achieves 40% cost reduction with little to no accuracy drop.
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.
Cited by top-tier papers2
- ThinkingViT: Matryoshka Thinking Vision Transformer for Elastic InferenceAli Hojjat, Janek Haberer, Sören Pirk, Olaf LandsiedelCVPR 2026 · 6 citations
- Interactive Speculative Planning: Enhance Agent Efficiency through Co-design of System and User InterfaceWenyue Hua, Mengting Wan, Jagannath Shashank Subramanya Sai Vadrevu, Ryan Nadel et al.ICLR 2025
Builds on10
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
- Swin Transformer V2: Scaling Up Capacity and ResolutionZe Liu, Han Hu, Yutong Lin, Zhuliang Yao et al.CVPR 2022 · 2,138 citations
- A Closer Look at Accuracy vs. RobustnessYao-Yuan Yang, Cyrus Rashtchian, Hongyang Zhang, Ruslan Salakhutdinov et al.NeurIPS 2020 · 336 citations
Related papers
- OctoSelector: Efficient and Effective Batch-Aware Model Selection for Large Language ModelsGuangxue Zhang, Yiming Lin, Sharad MehrotraSIGMOD 2026
- Efficient Online ML API Selection for Multi-Label Classification TasksLingjiao Chen, Matei Zaharia, James ZouICML 2022 · 22 citations
- ThriftLLM: On Cost-Effective Selection of Large Language Models for Classification QueriesKeke Huang, Yimin Shi, Dujian Ding, Yifei Li et al.VLDB 2025 · 18 citations
- FrugalML: How to use ML Prediction APIs more accurately and cheaplyLingjiao Chen, Matei Zaharia, James Y. ZouNeurIPS 2020 · 57 citations
- C3PO: Optimized Large Language Model Cascades with Probabilistic Cost Constraints for ReasoningAntonios Valkanas, Soumyasundar Pal, Pavel Rumiantsev, Yingxue Zhang et al.NeurIPS 2025 · 10 citations
