Dynamic Model Selection for Prediction Under a Budget

Feng Nan, Venkatesh SaligramaarXiv 2017

Abstract

In real-world machine learning deployments, prediction costs—ranging from feature extraction time to cloud service fees—often limit the use of high-performance models. This paper introduces DYNAMOD, a "bottom-up" dynamic model selection framework that adaptively routes data to either a low-cost predictor or a high-accuracy "legacy" model based on input difficulty. By jointly training a gating function and a low-cost model to approximate a complex one, DYNAMOD achieves state-of-the-art accuracy-to-cost trade-offs. We demonstrate its effectiveness across several benchmarks, showing significant cost reductions with minimal loss in accuracy.

Introduction

Machine learning models are increasingly deployed in resource-constrained environments such as mobile devices, healthcare systems, and web-scale ranking engines. In these scenarios, making a prediction is not free; costs arise from sensor data acquisition, feature computation, or querying remote high-performance servers. The central challenge is the "budget constraint": maintaining high accuracy without incurring the full cost of a massive model for every input.

Traditional "top-down" approaches typically start with a simple model and greedily add features or complexity. However, these methods are often sub-optimal because they lack global knowledge of the high-accuracy regime. DYNAMOD addresses this by using a "bottom-up" strategy, leveraging an existing expensive model to "filter" easy cases into cheaper pipelines, reserving the complex model only for instances where it is absolutely necessary.

Methodology

The DYNAMOD (Dynamic Model Selection) framework consists of three primary components: a high-accuracy/high-cost "legacy" model ($f_0$), a low-cost predictor ($f_1$), and a gating function ($g$). At test-time, the gating function evaluates the input and decides whether $f_1$ is sufficient or if the instance must be escalated to $f_0$.

Bottom-Up Strategy

Unlike top-down methods that are "blind" to the complex model's decision boundaries during training, DYNAMOD starts with a pre-trained $f_0$. It then learns to train $f_1$ and $g$ to mimic $f_0$ specifically in regions of the input space where a low-cost model can succeed. This ensures the gating function learns exactly where the cheap model's "blind spots" are relative to optimal performance.

Joint Optimization

The authors formulate an empirical risk minimization problem to jointly optimize the gating function and the low-cost predictor. This is achieved through an alternating minimization approach, instantiated as DYNAMOD-LIN for linear models and DYNAMOD-GBRT for Gradient Boosted Regression Trees.

Algorithm 1: The DYNAMOD-LIN iterative optimization procedure.

The optimization involves two main steps:

  1. Step A: Optimize the "ideal" gating likelihood ($q$) to balance accuracy loss against computational cost.
  2. Step B: Train the actual gating function ($g$) and predictor ($f_1$) to match that ideal behavior. To maximize efficiency, $g$ and $f_1$ often share features, ensuring that once a feature is "paid for" by the gate, it is available to the predictor at no additional cost.

Experimental Evaluation

The researchers evaluated DYNAMOD on several diverse benchmarks, including the Letters dataset, MiniBooNE particle identification, and Forest Covertype. A key evaluation was performed on the Yahoo! Learning to Rank dataset, which features 519 features and real-world CPU-time acquisition costs.

Key Results

  • Superior Trade-offs: DYNAMOD-GBRT consistently outperformed state-of-the-art methods like GreedyMiser and BudgetPrune. For any given computational budget, DYNAMOD achieved higher accuracy.
  • Efficiency in the Cloud: In "Local-Remote" scenarios—where $f_1$ resides on a local device and $f_0$ is in the cloud—DYNAMOD maintained near-peak accuracy while sending as few as 11-15% of examples to the expensive remote server.
  • Yahoo! Rank Performance: On the Yahoo! dataset, DYNAMOD showed significant performance gains in the mid-range cost region (40-80 units) compared to existing pruning methods.

Conclusion and Future Work

DYNAMOD represents a paradigm shift from greedy top-down feature selection to a more informed bottom-up dynamic selection. While the current work focuses on a two-stage system, the framework is theoretically recursive, allowing for deeply nested hierarchies of models with increasing costs. Future research will address the optimization challenges of linear gating functions and explore the guarantees of joint convexity for a broader range of parametric models.

Summary updated

BibTeX
@misc{nan2017dynamic,
  author = {Feng Nan and Venkatesh Saligrama},
  title = {{Dynamic Model Selection for Prediction Under a Budget}},
  year = {2017},
  eprint = {1704.07505},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1704.07505},
}
Figure