Online Active Model Selection for Pre-trained Classifiers

Mohammad Reza Karimi, Nezihe Merve Gürel, Bojan Karlas, Johannes Rausch, Ce Zhang, Andreas Krause

Abstract

Given $k$ pre-trained classifiers and a stream of unlabeled data examples, how can we actively decide when to query a label so that we can distinguish the best model from the rest while making a small number of queries? Answering this question has a profound impact on a range of practical scenarios. In this work, we design an online selective sampling approach that actively selects informative examples to label and outputs the best model with high probability at any round. Our algorithm can also be used for online prediction tasks for both adversarial and stochastic streams. We establish several theoretical guarantees for our algorithm and extensively demonstrate its effectiveness in our experimental studies.

Introduction

In modern machine learning, the abundance of pre-trained models (experts) presents a unique challenge: selecting the optimal model for a specific, often shifting, data stream under limited labeling resources. While unlabeled data is typically plentiful, high-quality labels are expensive and require human expertise. This paper addresses the problem of Online Active Model Selection, where an algorithm must decide in real-time which specific data points to label to identify the best-performing model as quickly as possible within a strict budget.

Unlike traditional pool-based methods that require the entire dataset upfront, or methods assuming i.i.d. data, this work focuses on the streaming setting. This includes scenarios where data arrives sequentially and the distribution may be adversarial or non-stationary (drifting) over time.

The Model Picker Algorithm

The proposed Model Picker algorithm utilizes the principle of selective sampling to optimize label queries. It consists of two primary components:

  1. Adaptive Query Probability ($q_t$): Instead of a fixed sampling rate, Model Picker calculates a query probability for each instance based on the maximum possible variance among the models' predicted losses. If models largely agree, the instance is considered less informative (low variance), and the query probability is low. Significant disagreement triggers a higher query probability.
  2. Exponential Weights (EW) Update: The algorithm maintains a probability distribution over the $k$ models. Upon querying a label, it uses an unbiased loss estimator—weighting the observed loss by $1/q_t$—to update this distribution. This adaptation of the classic Hedge/EXP3 framework allows for robust performance even in adversarial environments.

Experimental Evaluation

The effectiveness of Model Picker was evaluated across four diverse datasets:

  • CIFAR-10: 80 image classifiers (55–92% accuracy).
  • ImageNet: 102 large-scale image classifiers (50–82% accuracy).
  • EmoContext: 8 text emotion detection models (88–92% accuracy).
  • Drift: 9 SVM classifiers on gas sensor data, representing a non-stationary environment with shifting distributions (25–60% accuracy).

Results and Discussion

Model Picker demonstrates significant improvements in label efficiency and model identification across all benchmarks. As shown in Figure 1, the algorithm consistently achieves lower regret and a faster reduction in the accuracy gap compared to baselines like Entropy-based sampling and Query-by-Committee (S-QBC).

Performance comparison of Model Picker against baselines across four datasets in terms of Regret, Accuracy Gap, and Identification Probability.

Key findings include:

  • Label Efficiency: Model Picker often requires up to 2.5× fewer labels to reach the same accuracy as competing methods. For instance, on CIFAR-10, it reaches a near-zero accuracy gap with significantly fewer queries than standard active learning baselines.
  • High-Confidence Identification: On ImageNet, the algorithm identified the best model among 102 candidates with 90% confidence using only 13% of the labels.
  • Robustness to Drift: In the non-stationary "Drift" dataset, Model Picker identified a model within 0.1% of the best expert's accuracy after querying only 11% of the stream, showcasing its resilience to distribution shifts.
  • Reliability: Figure 4 illustrates the 90th percentile accuracy gap, confirming that Model Picker not only performs well on average but also maintains a low error margin with high reliability across different labeling budgets.
90th percentile accuracy gap across different labeling budgets for all evaluated datasets.

Conclusion

Model Picker provides a theoretically grounded and empirically robust solution for online active model selection. By leveraging the variance of model losses to drive sampling, it achieves state-of-the-art label efficiency and matches theoretical no-regret lower bounds. Future work may explore "tracking the best expert" in scenarios where the optimal model changes over time, as well as optimizing computational overhead for extremely large model sets.

Summary updated

BibTeX
@inproceedings{karimi2021online,
  author = {Mohammad Reza Karimi and Nezihe Merve Gürel and Bojan Karlas and Johannes Rausch and Ce Zhang and Andreas Krause},
  title = {{Online Active Model Selection for Pre-trained Classifiers}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2021},
  url = {https://openreview.net/forum?id=COsNU67nWS},
}
Figure