OCCAM: Towards Cost-Efficient and Accuracy-Aware Classification Inference
Dujian Ding, Bicheng Xu, Laks V. S. Lakshmanan
TL;DR
OCCAM tackles cost-aware classification by formulating an optimal model portfolio problem: assign queries to a pool of pre-trained classifiers to maximize overall accuracy under a user-specified budget $B$. It introduces a data-driven, unbiased low-variance accuracy estimator based on a nearest-neighbor approach under the $r$-separation assumption, and solves the resulting assignment with an integer linear program regularized to mitigate estimation risk. The method is evaluated on multiple image-classification benchmarks, showing up to $40\%$ cost reductions with negligible accuracy loss and favorable model-usage patterns across budgets. The work provides a training-free alternative to router-based or MoE approaches, with practical implications for cost-efficient and accuracy-aware inference in real-world services.
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.
