Contextual Active Model Selection

Authors: xuefeng  liu
fangfang  xia
rick l stevens
yuxin  chen
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 11:28:27

Abstract: While training models and labeling data are resource-intensive, a wealth of pre-trained models and unlabeled data exists. To effectively utilize these resources, we present an approach to actively select pre-trained models while minimizing labeling costs. We frame this as an online contextual active model selection problem: At each round, the learner receives an unlabeled data point as a context. The objective is to adaptively select the best model to make a prediction while limiting label requests. To tackle this problem, we propose CAMS, a contextual active model selection algorithm that relies on two novel components: (1) a contextual model selection mechanism, which leverages context information to make informed decisions about which model is likely to perform best for a given context, and (2)
an active query component, which strategically chooses when to request labels for data points, minimizing the overall labeling cost. We provide rigorous theoretical analysis for the regret and query complexity under both adversarial and stochastic settings. Furthermore, we demonstrate the effectiveness of our algorithm on a diverse collection of benchmark classification tasks. Notably, CAMS requires substantially less labeling effort (less than 10%) compared to existing methods on CIFAR10 and DRIFT benchmarks, while achieving similar or better accuracy.

Main paper: 
 introduction: 
 As pre-trained models become increasingly prevalent in a variety of real-world machine learning applications [2, 11, 53] , there is a growing demand for label-efficient approaches for model selection, especially when facing varying data distributions and contexts at run time. Oftentimes, no single pre-trained model achieves the best performance for every context, and a proper approach is to construct a policy for adaptively selecting models for specific contexts [48] . For instance, in medical diagnosis and drug discovery, accurate predictions are of paramount importance. The diagnosis of diseases through pathologist or the determination of compound chemical properties through lab testing can be costly and time-consuming. Different models may excel in analyzing different types of pathological images [1, 3, 23] or chemical compounds [17, 32, 46] . Furthermore, in many real-world applications, the collection of labels for model evaluation can be expensive and data instances may arrive as a stream rather than all at once. This scenario necessitates cost-effective and robust online algorithms capable of determining the most efficient model selection policy even when faced with a limited supply of labels, a scenario not fully addressed by previous works that typically assume access to all labels [6, 7, 27, 54] . × ✓ ✓ ✓ × ✓ ✓ full-information ✓ ✓ × × ✓ ✓ ✓ active queries × × × × ✓ ✓ ✓ context-aware × × × ✓ × × ✓ †We regard "arms" as "models" when comparing CAMS against bandit algorithms, such as EXP3/EXP4. * Online ensemble learning aims to build a composite model by aggregating multiple models rather than selecting the best model (for a given context).Table 1 : Comparing CAMS against related work in terms of problem setup.Table 1 , CAMS aims to address the need for adaptive and effective model selection, by bridging the gap between contextual bandits, online learning, and active learning.Our key contributions are summarized as follows:• We investigate a novel problem which we refer to as contextual active model selection, and introduce a novel principled algorithm that features two key technical components: (1) a contextual online model selection procedure, designed to handle both stochastic and adversarial settings, and (2) an active query strategy. The proposed algorithm is designed to be robust to heterogeneous data streams, accommodating both stochastic and adversarial online data streaming scenarios.• We provide rigorous theoretical analysis on the regret and query complexity of the proposed algorithms. We establish regret upper bounds for both adversarial and stochastic data streams under limited label costs. Our regret upper bounds are within constant factors of the existing lower bounds for online learning problems with expert advice under the full information setting.• Empirically, we demonstrate the effectiveness and robustness of our approach on a variety of online model selection tasks spanning different application domains (from generic ML benchmarks such as CIFAR10 to domain-specific tasks in biomedical analysis), data scales (ranging from 80 to 10K), data modalities (i.e., tabular, image, and graph-based data), and label types (binary or multiclass labels). For the tasks evaluated, (1) CAMS outperforms all competing baselines by a significant margin.(2) Asymptotically, CAMS performs no worse than the best single model. (3) CAMS is not only robust to adversarial data streams but also can efficiently recover from "malicious experts" (i.e. inferior pre-trained models). 
related work: 
 Contextual bandits. Classical bandit algorithms (e.g., [6, 7] ) aim to find the best arm(s) through a sequence of actions. When side information (e.g., user profile for recommender systems or environmental context for experimental design) is available, many bandit algorithms can be lifted to the contextual setting: For example, EXP4 [7, 9, 52] considers the bandit setting with expert advice: At each round, experts announce their predictions of which actions are the most promising for the given context, and the goal is to construct a expect selection policy that competes with the best expert from hindsight. In bandit problems, the learner only gets to observe the reward for each action taken. In contrast, for the online model selection problem considered in this work-where an action corresponds to choosing a model to make prediction on an incoming data point-we get to see the loss/reward of all models on the labeled data point. By utilizing the information from unchosen arms, it could significantly reduce the cumulative regret. In this regard, this work aligns more closely with online learning with full information setting, where the learner has access to the loss of all the arms at each round (e.g. as considered in the Hedge algorithm [13, 14, 27, 36] ).Online learning with full information. A clear distinction between our work and online learning is that we assume the labels of the online data stream are not readily available but can be acquired at each round with a cost. In addition, the learner only observes the loss incurred by all models on a data point when it decides to query its label. In contrast, in the canonical online learning setting, labels arrive with the data and one gets to observe the loss of all candidate models at each round. Similar setting also applies to other online learning problems, such as online boosting or bagging. A related work to ours is online learning with label-efficient prediction [16] , which proposes an online learning algorithm with matching upper and lower bounds on the regret. However, they consider a fixed query probability that leads to a linear query complexity. Our algorithm, inspired by uncertainty sampling in active learning, achieves an improved query complexity with the adaptive query strategy while maintaining a comparable regret.Stream-based Active learning. Active learning aims to achieve a target learning performance with fewer training examples [64] . The active learning framework closest to our setting is queryby-committee (QBC) [65] , in particular under the stream-based setting [35, 47] . QBC maintains a committee of hypotheses; each committee member votes on the label of an instance, and the instances with the maximal disagreement among the committee are considered the most informative labels. Note that existing stream-based QBC algorithms are designed and analyzed assuming i.i.d. data streams. In comparison, our work uses a different query strategy as well as a novel model recommendation strategy, which also applies to the adversarial setting.Active model selection. Active model selection captures a broad class of problems where model evaluations are expensive, either due to (1) the cost of evaluating (or "probing") a model, or (2) the cost of annotating a training example. Existing works under the former setting [49, 59] and online setting [21, 66] often ignore context information and data annotation cost, and only consider partial feedback on the models being evaluated/ probed on i.i.d. data. The goal is to identify the best model with as few model probes as possible. This is quite different from our problem setting which considers the full information setting as well as non-negligible data annotation cost. [71] proposes that the optimal model choice is influenced by the sample size rather than any individual sample feature. [44] addresses the active model selection problem, however both works do not adopt a stream-based approach. For the later, apart from Karimi et al. [39] , an online contextual-free model selection work, as shown in Table 1 , most existing works assume a pool-based setting where the learner can choose among the pool of unlabeled data [4, 29, 43, 49, 60, 61, 68, 76] , and the goal is to identify the best model with a minimal set of labels.Question: Does the paper discuss the limitations of the work performed by the authors?Answer: [Yes]Justification: We have discussed our limitation at Section 7 future direction. It summarizes the limitations of our approach and we hope to address in the future work.Guidelines:• The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper. • The authors are encouraged to create a separate "Limitations" section in their paper.• The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be. • The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated. • The authors should reflect on the factors that influence the performance of the approach.For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon. • The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size. • If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness. • While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations. 
problem statement: 
 Notations. Let X be the input domain and Y := {0, . . . , c -1} be the set of c possible class labels for each input instance. Let F = {f 1 , . . . , f k } be a set of k pre-trained classifiers over X × Y. A model selection policy π : X → ∆ k-1 maps any input instance x ∈ X to a distribution over the pre-trained classifiers F, specifying the probability π (x) of selecting each classifier under input x.Here, ∆ k-1 denotes the k-dimensional probability simplex w ∈ R k : |w| = 1, w ≥ 0 . One can interpret a policy π as an "expert" that suggests which model to select for a given context x.Let Π be a collection of model selection policies. In this paper, we propose an extended policy set Π * := Π ∪ {π const 1 , . . . , π const k } which also includes constant policies that always suggest a fixed model. Here, π const j (•) := e j , and e j ∈ ∆ k-1 denotes the canonical basis vector with e j = 1. Unless otherwise specified, we assume Π is finite with |Π| = n, and |Π * | ≤ n + k. As a special case, when Π = ∅, our problem reduces to the contextual-free setting.The contextual active model selection protocol. Assume that the learner knows the set of classifiers F as well as the set of model selection policies Π. At round t, the learner receives a data instance x t ∈ X as the context for the current round, and computes the predicted label ŷt,j = f j (x t ) for each pre-trained classifier indexed by j ∈ [k]. Denote the vector of predicted labels by all k models by ŷt := [ŷ t,1 , . . . , ŷt,k ] ⊤ . Based on previous observations, the learner identifies a model/classifier f jt and makes a prediction ŷt,jt for the instance x t . Meanwhile, the learner can obtain the true label y t only if it decides to query x t . Upon observing y t , the learner incurs a query cost, and receives a (full) loss vector ℓ ℓ ℓ t = I {ŷ t ̸ =yt} , where the jth entry ℓ t,j := I {ŷt,j ̸ =yt} corresponds to the 0-1 loss for model j ∈ [k] at round t. The learner can then use the queried labels to adjust its model selection criterion for future rounds.Performance metric. If x t is misclassified by the model j t selected by learner at round t, i.e. ŷt,jt ̸ = y t , it will be counted towards the cumulative loss of the learner, regardless of the learner making a query. Otherwise, no loss will be incurred for that round. For a learning algorithm A, its cumulative loss over T rounds is defined as L A T := T t=1 ℓ t,jt . In practice, the choice of model j t at round t by the learner A could be random: For stochastic data streams where (x, y) arrives i.i.d., the learner may choose different models for different random realizations of (x t , y t ). For the adversarial setting where the data stream {(x t , y t )} t≥1 is chosen by an adversary before each round, the learner may randomize its choice of model to avoid a constant loss at each round [33] . Therefore, due to the randomness of L A T , we consider the expected cumulative loss E[L A T ] as a key performance measure of the learner A. To characterize the progress of A, we consider the regret-formally defined as follows-as the difference between the cumulative loss received by the learner and the loss if the learner selects the "best policy" π * ∈ Π * in hindsight.For stochastic data streams, we assume that each policy i recommends the most probable model w.r.t. π i (x t ) for context x t . We use maxind(w) := arg max j:wj ∈w w j to denote the index of the maximalvalue entry2 of w. Since (x, y) are drawn i.i.d., we defineµ i = 1 T T t=1 E xt,yt ℓ t,maxind(πi(xt)). This leads to the pseudo-regret for the stochastic setting over T rounds, defined asEQUATIONIn an adversarial setting, since the data stream (and hence the loss vector) is determined by an adversary, we consider the reference best policy to be the one that minimizes the loss on the adversarial data stream, and the expected regretEQUATIONwhere lt,i := ⟨π i (x t ) , ℓ ℓ ℓ t ⟩ denotes the expected loss if the learner commits to policy π i , randomizes and selects j t ∼ π i (x t ) (and receives loss ℓ t,jt ) at round t. Our goal is to devise a principled online active model selection strategy to minimize the regret as defined in (1) or (2), while maintaining a low total query cost. For convenience, we refer the readers to App. B for a summary of the notations used in this paper.Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?• The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions). • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.) • The assumptions made should be given (e.g., Normally distributed errors). • It should be clear whether the error bar is the standard deviation or the standard error of the mean. Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.• Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML). 
contextual active model selection: 
 In this section, we introduce our main algorithm for both stochastic and adversarial data streams. η t ← SETRATE(t, x t , |Π * |) 7: Set q t,i ∝ exp -η t Lt-1,i ∀i ∈ |Π * | 8: j t ← RECOMMEND(x t , q t ) 9:Output ŷt,jt ∼ f t,jt as the prediction for x t 10: Compute z t in Eq. (4) Query the label y t 14: Our key insight underlying the contextual model selection strategy extends from the online learning with expert advice framework [13, 27] . We start by appending the constant policies that always pick single pre-trained models to form the extended policy set Π * (Line 3, in Fig. 1 ). This allows CAMS to be at least as competitive as the best model. Then, at each round, CAMS maintains a probability distribution over the (extended) policy set Π * , and updates those according to the observed loss for each policy. We use q t := (q t,i ) i∈|Π * | to denote the probability distribution over Π * at t. Specifically, the probability q t,i is computed based on the exponentially weighted cumulative loss, i.e. q t,i ∝ exp -η t Lt-1,i where Lt,i := t τ =1 lτ,i denotes the cumulative loss of policy i.C t ← C t-1 + 1 15: Compute ℓ ℓ ℓ t : ℓ t,j = I {ŷ t,j ̸ = y t } , ∀j ∈ [|F|] 16: Estimate model loss: lt,j = ℓt,j zt , ∀j ∈ [|F|] 17: Update l ℓ ℓ t : lt,i ← ⟨π i (x t ), lt,j ⟩, ∀i ∈ [|Π * |] 18: Lt = Lt-1 + l ℓ ℓ t 19: else 20: Lt = Lt-1 21: C t ← C t-1w t = i∈|Π * | q t,i π i (x t )For adversarial data streams, it is natural for both the online learner and the model selection policies to randomize their actions to avoid linear regret [33] . Following this insight, CAMS randomly samples a policy i t ∼ q t , and-based on the current context x t -samples a classifier j t ∼ π it (x t ) to recommend at round t.Under the stochastic setting, CAMS adopts a weighted majority strategy [45] when selecting models. The vector of each model's weighted votes from the policies, w t = i∈|Π * | q t,i π i (x t ), is interpreted as a distribution induced by the weighted policy. The model j t = maxind(w t ) which receives the highest probability becomes the recommended model at round t. This deterministic model selection strategy is commonly used in stochastic online optimization [33] . An alternative strategy is to take a randomized approach as in the adversarial setting, or take a Follow-the-Leader approach [42] and go with the most probable model recommended by the most probable policy (i.e. use w t = π maxind(q t ) (x t )).As shown in experimental results section and further discussed in Appendix (outperformance over the best policy/expert section), CAMS outperforms these policies in a wide range of practical applications. The model selection steps are detailed in Line 5-9 in Fig. 1 .Active queries. Under a limited budget, we intend to query the labels of those instances that exhibit significant disagreement among the pre-trained models F. To achieve this goal, we design an adaptive query strategy with query probability z t . Concretely, given context x t , model predictions ŷt and model distribution w t , we denote by ly t := ⟨w t , I {ŷ t ̸ = y}⟩ as the expected loss if the true label is y. We characterize the model disagreement asE (ŷ t , w t ) := 1 cy∈Y, ly t ∈(0,1)EQUATIONIntuitively, when ly t is close to 0 or 1, there is little disagreement among the models in labeling x t as y, otherwise there is significant disagreement. We capture this insight with function h(x) = -x log x. Since the label y t is unknown upfront when receiving x t , we iterate through all the possible labels y ∈ Y and take the average value as in Eq. (3). Note that E takes a similar algebraic form to the entropy function, although it does not inherit the information-theoretic interpretation.With the model disagreement term defined above, we consider an adaptive query probability3 EQUATIONwhere δ t 0 = 1 √ t ∈ (0, 1] is an adaptive lower bound on the query probability to encourage exploration at an early stage. The query strategy is summarized in Line 10-14 in Fig. 1 .Model updates. Now define U t ∼ Ber (z t ) as a binary query indicator that is sampled from a Bernoulli distribution parametrized by z t . Upon querying the label y t , one can calculate the loss for each model f j ∈ F as ℓ t,j = I {ŷ t,j ̸ = y t }. Since CAMS does not query all the i.i.d. examples, we introduce an unbiased loss estimator for the models, defined as lt,j = ℓt,j zt U t . The unbiased loss of policy π i ∈ Π * can then be computed as lt,i = ⟨π i (x t ), lt,j ⟩. In the end, CAMS computes the (unbiased) cumulative loss of policy π i as LT,i = T t=1 lt,i , which is used to update the policy probability distribution in next round. Pseudocode for the model update steps is summarized in Line 15-21 in Fig. 1 .Remark. CAMS runs efficiently with time complexity O (nk) per round and space complexity O ((n + k) • k). At each round, each model selection policy specifies a probability distribution over the models for the given context. When these distributions correspond to constant Dirac delta distributions (regardless of the context), the problem reduces to the context-free problem investigated by Karimi et al. [39] . 
theoretical analysis: 
 We now present theoretical bounds on the regret (defined in Eq. (1) and Eq. (2), respectively) and the query complexity of CAMS for both the stochastic and the adversarial settings.Under the stochastic setting, the cumulative loss of CAMS over T rounds-as specified by the RECOMMEND procedure-is L CAMS T = T t=1 lt,maxind(wt) where recall w t = i∈|Π * | q t,i π i (x t ) is the probability distribution over F induced by the weighted policy.Let i * = arg min i∈[|Π * |] µ i be the index of the best policy (µ i denotes the expected loss of policy i, as defined in problem statement section. The cumulative expected loss of policy i * is T µ i * ; therefore the expected pseudo-regret (Eq. ( 1)) is R T (CAMS) = E T t=1 lt,maxind(wt) -T µ i * .Define ∆ := min i̸ =i * (µ i -µ i * ) as the minimal sub-optimality gap 4 in terms of the expected loss against the best policy i * . Furthermore, let w t i * := π i * (x t ) be probability distribution over F induced by policy i * at round t. We define γ := min xt {max wj ∈w t i * w j -max wj ∈w t i * ,j̸ =maxind(w t i * ) w j } (5) as the minimal probability gap between the most probable model and the rest (assuming no ties) induced by the best policy i * . We further define b = p min log c (1/p min ), where p min = min s,i π(x s ) denotes the minimal model selection probability by any policy 5 . As our first main theoretical result, we show that, without exhaustively querying the labels of the stochastic stream, CAMS achieves constant expected regret. Theorem 1. (Regret) In the stochastic environment, with probability at least 1 -δ, CAMS achievesconstant expected pseudo regret R T (CAMS) = ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 .Note that in the stochastic setting, a lower bound of Ω ((log Π * ) /∆) was shown in Mourtada and Gaïffas [50] for online learning problems with expert advice under the full information setting (i.e. assuming labels are given for all data points in the stochastic stream). To establish the proof of Theorem 1, we consider a novel procedure to connect the weighted policy by CAMS to the best policy π i * . Conceptually, we would like to show that, after a constant number of rounds τ const , with high probability, the model selected by CAMS (Line 32) will be the same as the one selected by the best policy i * . In that way, the expected pseudo regret will be dominated by the maximal cumulative loss up to τ const . Toward this goal, we first bound the weight of the best policy w t,i * as a function of t, by choosing a proper learning rate η t (CAMS, Line 23). Then, we identify a constant threshold τ const , beyond which CAMS exhibits the same behavior as π i * with high probability. Finally, we obtain the regret bound by inspecting the regret at the two stages separately. The formal statement of Theorem 1 and the detailed proof are deferred to App. E.1.Next, we provide an upper bound on the query complexity in the stochastic setting. Theorem 2. (Query Complexity). For c-class classification problems, with probability at least 1 -δ, the expected number of queries made by CAMS over T rounds is upper bounded byln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 + T µ i * ln T c ln c .Theorem 2 is built upon Theorem 1, where the the key idea behind the proof is to relate the number of updates to the regret. When T µ i * , LT, * are regarded as constants (given by an oracle), the query-complexity bound is then sub-linear w.r.t. T . Note that the number of class labels c affects the quality of the query complexity bound. The intuition behind this result is, with larger number of classes, each query may carry more information upon observation. For instance, in an extreme case where only one expert always recommends the best model and others gives random recommendations of models (and predicts random labels), having more classes lowers the chance of a model making the correct guess, and therefore helps to "filter out" those suboptimal experts in fewer rounds-hence being more query efficient. We defer the proof of Theorem 2 to App. E.2.Now we consider the adversarial setting. Let LT, * := min i∈[|Π * |] T t=1 lt,i be the cumulative loss of the best policy. The expected regret (Eq. ( 2)) for CAMS equals to R T (CAMS) = E T t=1 ⟨q t , l ℓ ℓ t ⟩ -LT, * . We show that under the adversarial setting, CAMS achieves sub-linear regret in T without accessing all labels. Theorem 3. (Regret) Let c be the number of classes and ρ t be specified as Line 26-27 in the SETRATE procedure. Under the adversarial setting, the expected regret of CAMS is bounded by2c ln c/max{ρ T , 1/T } • T log |Π * |.The proof is provided in App. F.1. Assuming ρ t to be a constant, our regret upper bound in Theorem 3 matches (up to constants) the lower bound of Ω T ln |Π * | for online learning problems with expert advice under the full information setting [15, 63] (i.e. assuming labels are given for all data points). Hereby, the decaying learning rate η t as specified in Line 27 is based on two parameters, where 1/ √ t corresponds to the lower bound δ t 0 on the query probability, and ρ t ≜ 1 -max τ ∈[t-1] ⟨w τ , I {ŷ τ = y τ }⟩ (6) is a (data-dependent) term that is chosen to reduce the impact of the randomized query strategy on the regret bound (especially when t is large). Intuitively, ρ t relates to the skewness of the policy where the max term corresponds to the maximal probability of most probable mispredicted label over t rounds. Note that in theory ρ t can be small (e.g. CAMS may choose a constant policy π const i ∈ Π * that mispredict the label for x t , which leads to ρ t = 0); in such cases, our result still translates to a sublinear regret bound of O(c√ log c • T 3 4log |Π * |). Furthermore, in practice, we consider to "regularize" the policies (App. D.4) to ensure that probability a policy selecting any model is bounded away from 0.Finally, the following theorem (proof in App. F.2) establishes a query complexity bound of CAMS. Theorem 4. (Query Complexity). Under the adversarial setting, the expected query complexity overT rounds is O ln T T log |Π * | max{ρ T , √ 1/T } + LT, * . 
experiments: 
 Datasets. We evaluate our approach using five datasets: (1) CIFAR10 [41] contains 60,000 images from 10 different balanced classes. ( 2) DRIFT [73] is a tabular dataset with 128-dimensional features, based on 13,910 chemical sensor measurements of 6 types of gases at various concentration levels.(3) VERTEBRAL [5] is a biomedical tabular dataset which classifies 310 patients into three classes (Normal, Spondylolisthesis, Disk Hernia) based on 6 attributes. (4) HIV [74] contains over 40,000 compounds annotated with molecular graph features and binary labels (active, inactive) indicating their ability to inhibit HIV replication. ( 5) CovType [24] has 580K samples and contains details including slope, aspect, elevation, measurements of area, and type of forest cover.We construct the policy sets Π for each dataset following a procedure similar to Meta-selector [48] . In this approach, a set of recommender algorithms is considered, and Meta-selector assigns varying ratings to these algorithms based on the specific user. Concretely, we first construct a set of models trained on different subsamples from each dataset. We then construct a set of policies, which include malicious, normal, random, and biased policy types for each dataset based on different models and features. Details on the classifiers and policies are provided in the supplemental materials. The malicious policy provides contrary advice; the random policy provides random advice; the biased policy provides biased advice by training on a biased distribution for classifying specific classes. The normal policy gives reasonable advice, being trained under a standard process on the training set. We represent the output of the i th policy as π i (x t ), indicating the rewards distribution of all the base classifiers on x t . In total, we create 80, 10, 6, 4 classifiers and 85, 11, 17, 20 policies for CIFAR10, DRIFT, VERTEBRAL, and HIV, respectively.Baselines. We evaluate CAMS against both contextual and non-contextual active model selection baselines. We consider four non-contextual baselines: (1) Random Query Strategy (RS) which queries the instance label with a fixed probability b T ;(2) Model Picker (MP) [39] that employs variancebased active sampling with a coin-flip query probability max {v (ŷ t , w t ) , η t }, where the variance term is defined as v (ŷ t , w t ) = max y∈Y ly t 1 -ly t ;(3) Query by Committee (QBC) implementing committee-based sampling [22] ; and (4) Importance Weighted Active Learning (IWAL) [8] that calculates query probability based on labeling disagreements of surviving classifiers. Since no contextual baselines exist yet, we propose contextual versions of QBC and IWAL as (5) CQBC and (6) CIWAL. Both extensions maintain their respective original query strategies but incorporate the context into the cumulative rewards. For model selection, CAMS, MP, CQBC, and CIWAL recommend the classifier with the highest probability. The other baselines use Follow-the-Leader (FTL), recommending the model with the minimum cumulative loss for past queried instances. Finally, we add (7) Oracle to represent the best single policy with the minimum cumulative loss, with the same query strategy as CAMS.Fig. 2 visualizes the cost effectiveness of CAMS and the baselines. Here, we define cost effectiveness as the measure of how quickly the cumulative loss decreases in response to an increase in query cost. Fig. 2 demonstrates that CAMS outperforms all the comparison methods across all benchmarks. Remarkably, it outperforms even the oracle on the VERTEBRAL (Fig. 2c ) and HIV (Fig. 2d ) benchmarks with fewer than 10 and 20 queries, respectively. In the case of the VERTEBRAL benchmark, CAMS outperforms the best baseline in query cost by a margin of 20%, despite the fact that 11 out of the 17 experts provided malicious or random advice. This level of performance is attained by utilizing an active query strategy to retrieve highly informative data, thereby maximizing the differentiation between models and policies within the constraints of a limited budget. Additionally, the model selection strategy allows for effectively combining the expertise among the experts.Effectiveness of active querying. In Fig. 3a and Fig. 3b , we perform ablation studies to demonstrate the effectiveness of our active query strategy. We fix the model recommendation strategy as the one used by CAMS, and compare three query strategies: (1) CAMS, (2) the state-of-the-art variancebased query strategy from Model Picker [39] (referred to as "variance"), and (3) a random query strategy. Figure 3a demonstrates that CAMS has the fastest convergence rate in terms of cumulative loss on CIFAR10, implying effective use of queried labels. Furthermore, CAMS not only achieves the minimum cumulative loss but also incurs significantly lower query costs, with reductions of 71% and 95% compared to the variance and random strategies respectively as showed in Fig. 3b . This suggests that CAMS selectively queries data to optimize policy improvement, whereas the other strategies may query unnecessary labels, including potentially noisy or uninformative ones, which impede policy improvement and convergence.Robustness. In Fig. 2 , 3c, 3d,3e, 3f, and 3g, CAMS exhibits robustness in a variety of environmental settings. Firstly, As shown in Fig. 2 , CAMS outshines other methods in a contextual environment, whereas in Fig. 3c , a non-contextual (no experts) environment, it achieves comparable performance to the state-of-the-art Model Picker in identifying the best classifier. Secondly, CAMS is robust in both stochastic and adversarial environments. As demonstrated in Fig. 2 , CAMS surpasses other methods in a stochastic environment. Additionally, as illustrated in Fig. 3d , in a worst-case adversarial environment, CAMS effectively recovers from adversarial actions and approaches the performance of the best classifier (see App. G.5). We further observe that CAMS demonstrates robustness to varying scales of data, where the online stream sizes range from 80 to 10K (Fig. 2 ) to 100K (Fig. 3e , where we randomly sample 100K samples from the CovType dataset [24] ).In Fig. 2 , we assume that the stream length T is hidden and not used as input to CAMS. Under the stochastic setting, however, knowing T can provide additional information that one can leverage to optimize the query probability, thereby giving an advantage to some of the baseline algorithms (e.g. random). As an ablation study, in Fig. 3f and Fig. 3g , we assume the stochastic setting where the total length T of the online stream is given. Given the stream length T and query budget b, we may optimize each algorithm by scaling their query probabilities, so that each algorithm allocates its query budget to the top b informative labels in the entire online stream based on its own query criterion. CAMS still ourperform the baselines under the setting.Improvement over the best classifier and policy. Fig. 3h demonstrates that when provided with good policies, CAMS formulates a stronger policy which incurs no regret. CAMS has the potential to outperform an oracle, especially in rounds where the oracle does not make the optimal recommendation. For instance, in the stochastic version of CAMS (as shown in lines 22-23 and 30-32 of Fig. 1 ), CAMS recommends a model using a weighted majority vote among all policies, enabling the formation of a new policy in each round by amalgamating the strengths of each sub-optimal policy. This adaptive strategy can potentially outperform any single policy. Moreover, in most real-world scenarios and conducted experiments (as depicted in App. G.6), data streams may not be strictly stochastic, and therefore no single policy consistently performs the best. In such cases, CAMS's weighted policy may find an enhanced combination of "advices", leading to improved performance. 
conclusion: 
 We introduced CAMS, an online contextual active model selection framework based on a novel model selection and active query strategy. The algorithm was motivated by many real-world use cases that need to make decision by taking both contextual information and the cost into consideration. We have demonstrated CAMS's compelling performance of using the minimum query cost to learn the optimal contextual model selection policy on several diverse online model selection tasks. In addition to the promising empirical performance, we also provided rigorous theoretical guarantees on the regret and query complexity for both stochastic and adversarial settings. We hope our work can inspire future works to handle more complex real-world model selection tasks (e.g. beyond classification or non-uniform loss functions, etc. where our analysis does not readily apply). 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)? Answer: [NA] Justification: Guidelines:• The answer NA means that the paper poses no such risks.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort. 12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected? Answer: [NA] Justification: Guidelines:• The answer NA means that the paper does not use existing assets.• The authors should cite the original paper that produced the code package or dataset.• The authors should state which version of the asset is used and, if possible, include a URL. • The name of the license (e.g., CC-BY 4.0) should be included for each asset.• For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided. • If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset. 
 
 Appendix: This paper introduces a novel framework for adaptive model selection in label-efficient learning. By integrating robust online learning with active query strategies, our algorithm effectively adapts to varying data contexts and minimizes labeling efforts, crucial in domains requiring swift and accurate decisions, such as disease identification and financial predictions. Ethically, the framework's design promotes efficient and context-aware model selection, reducing potential biases associated with context-ignorant model selections. No major ethical concerns are anticipated, given the algorithm's generality and focus on solving practical problems. ∆ k-1 k-dimensional probability simplex w ∈ R k : |w| = 1, w ≥ 0 f single pre-trained classifier (model) F {f 1 , . . . , f k }, set of k pre-trained classifiers over X × Y π, π(x) model selection policy (expert) π : X → ∆ k-1 ,62 max i ∆ i k/ λ 2 log k λ = min j∈[k]\{i * } ∆ 2 j /θ j √ 2T log k(1 + 4 c ∆ ) Model Picker adversarial [39] 2 √ 2T log k 5 √ T log k + 2L T, * CAMS STOCHASTIC ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 + T µ i * ln T c ln c CAMS ADVERSARIAL 2c ln c/max{ρ T , 1/T } • T log |Π * | O T log |Π * | max{ρT , √ 1/T } + LT, * (ln T )Table 3 : Regret and query complexity bounds. For the notations in this table: i * is the model with the highest expected accuracy; θ j = P [ℓ .,j ̸ = ℓ .,i * ] is the probability that exactly one of j and i * correctly classifies a sample; γ and ρ T are defined in Eq. ( 5) and ( 6), respectively. b = p min log c (1/p min ), where p min = min s,i π(x s ) denotes the minimal model selection probability by any policy.Remark 5. When T µ i * , LT, * are regarded as constants (given by an oracle), the query-complexity bound is then sub-linear w.r.t. T . Remark 6. Note that the number of class labels c affects the quality of the query complexity bound. The intuition behind this result is, with larger number of classes, each query may carry more information upon observation. For instance, in an extreme case where only one expert always recommends the best model and others gives random recommendations of models (and predicts random labels), having more classes lowers the chance of a model making the correct guess, and therefore helps to "filter out" those suboptimal experts in fewer rounds-hence being more query efficient.Remark 7. To prove the practical feasibility of CAMS, we have analyzed its time and space complexity.Our analysis shows that CAMS has a time complexity of O (T nk) in total or O(nk) per round (due to the RECOMMEND procedure under the stochastic setting), and a space complexity of O ((n + k) • k).Here, T refers to the online horizon, n denotes the number of policies, and k denotes the number of models. Taking into account these complexities, we can confirm that CAMS is practically feasible.Model Picker (MP) Model Picker [39] is a context-free online active model selection method inspired by EXP3. Model Picker aims to find the best classifier in hindsight while making a small number of queries. For query strategy, it uses a variance-based active learning sampling method to select the most informative label to query to differentiate a pool of models, where the variance is defined as v (ŷ t , w t ) = max y∈Y ly t 1 -ly t . The coin-flip query probability is defined as max {v (ŷ t , w t ) , η t } when v (ŷ t , w t ) ̸ = 0, or 0 otherwise. For model recommendation, it uses an exponential weight algorithm to recommend the model with minimal exponential cumulative loss based on the past queried labels at each round.Query by Committee (QBC) For query strategy, we have adapted the method of [22] as a disagreement-based selective sampling query strategy for online streaming data. We treat each classifier as a committee member and compute the query probability by measuring disagreement between models for each instance. The query function is coin-flip by vote entropy probability -1 log min (k,|C|) c V (c,x) k log V (c,x) k, where V (c, x) stands for the number of committee members assigning a class c for input context x and k is the number of committee. For the model recommendation part, we use the method of Follow-the-Leader (FTL) [42] , which greedily recommends the model with the minimum cumulative loss for past queried instances.Importance Weighted Active Learning (IWAL) We have implemented [8] as the IWAL baseline. For the query strategy part, IWAL computes an adaptive rejection threshold for each instance and assigns an importance weight to each classifier in the hypothesis space H t . IWAL retains the classifiers in the hypothesis space according to their weighted error versus the current best classifier's weighted error at round t. The query probability is calculated based on labeling disagreements of surviving classifiers through function max i,j∈Ht,y∈[c] ℓ (y) t,i -ℓ (y) t,j . For model recommendation, we also adopt the Follow-the-Leader (FTL) strategy.Random Query Strategy (RS) The RS method queries the label of incoming instances by the coin-flip fixed probability b T . It also uses the FTL strategy based on queried instances for model recommendation.Contextual Query by Committee (CQBC) We have created a contextual variant of QBC termed CQBC, which has the same entropy query strategy as the original QBC. For model recommendation, we combine two model selection strategies. The first strategy calculates the cumulative reward of each classifier based on past queries and normalizes it as a probability simplex vector. We also adopt Exp4's arm recommending vector to use contextual information. Finally, we compute the element-wise product of the two vectors and normalize it to be CQBC's model recommendation vector. At each round, CQBC would recommend the top model based on the classifiers' historical performance on queried instances and the online advice matrix for streaming data.We have created a variant version of importance-weighted active learning. Similar to CQBC, CIWAL adopts the query strategy from IWAL and converts the model selection strategy to be contextual. For model selection, we incorporate Exp4's arm recommendation strategy based on the side-information advice matrix and each classifier's historical performance according to queried instances. We compute the element-wise product of the two vectors as the model selection vector of CIWAL and normalize it as a weighted vector. Finally, CIWAL recommends the classifier with the highest weight.Oracle: Among all the given policies, oracle represents the best single policy that achieves the minimum cumulative loss, and it has the same query strategy as CAMS.We constructed different expert-model configurations to reflect the cases in real-world applications 6 . This section lists the collection of policies and models used in our experiments.We have constructed 80 diversified classifiers based on VGG [67] , ResNet [34] , DenseNet [38] , GoogLeNet [69] . We have also used EfficientNet [70] , MobileNets [37] , RegNet [62] , and ResNet to construct 85 diversified policies.We have constructed ten classifiers using Decision Tree [55] , SVM [18] , AdaBoost [28] , Logistic Regression [20] , KNN [19] models. We have also created 8 diversified policies with multilayer perceptron (MLP) models of different layer configurations: (128, 30, 10); (128, 60, 30, 10); (128, 120, 30, 10); (128, 240, 120, 30, 10).We have built six classifiers using Random Forest [10] , Gaussian Process [56] , linear discriminant analysis [26] , Naive Bayes [31] algorithms. We have constructed policies by using standard scikit-learn built-in models including Random Forest Classifier, Extra Trees Classifier [30] , Decision Tree Classifier, Radius Neighbors Classifier [51] , Ridge Classifier [57] and K-Nearest-Neighbor classifiers. 6 To list a few other scenarios beyond the ones used in the paper: In healthcare, models could be the treatments, experts could be the doctors and the context could be the condition of a patient. For any patient (context), doctors (experts) will have their own advice on the treatment (model) recommendation for this patient based on their past experience. In the finance domain, models could be trading strategies, experts could be portfolio managers, and the context could be the stock/equity. Some trading strategies (models) might work well for the information technology sector, and some other models might work well for the energy sector, so depending on the sector of stock (context), different portfolio managers (experts) might have their own advice on different trading strategies (models) based their past trading experience.HIV: We have used graph convolutional networks (GCN) [40] , Graph Attention Networks (GAT) [72] , AttentiveFP [75] , and Random Forest to construct 4 classifiers. We have also used various feature representations of molecules such as MACCS key [25] , ECFP2, ECFP4, and ECFP6 [58] molecular fingerprints to build 6 MLP-based policies, respectively.CovType: We have built 6 classifiers using Random Forest, Gaussian Process, linear discriminant analysis, Naive Bayes algorithms. We have constructed 17 policies by using standard scikit-learn built-in models including Random Forest Classifier, Extra Trees Classifier, Decision Tree Classifier, Radius Neighbors Classifier, Ridge Classifier and K-Nearest-Neighbor classifiers.We build our evaluation pipeline on top of prior work [39] around the four benchmark datasets. Specifically,• Context x t is the raw context of the data (e.g., the 32x32 image for CIFAR10).• Predictions ŷt contain the predicted label vector of all the classifiers' predictions according to the online context x t . • Oracle contains the true label y t of x t .• Advice matrix contains all policies' probability distribution λ over all the classifiers on context x t .To adapt to an online setting, we sequentially draw random T i.i.d. instances x 1:T from the test pool and define it as a realization. For a fair comparison, all algorithms receive data instances in the same order within the same realization.Algorithm 1 Regularized policy π (x t )1: Input: context x t , Models F, policy π ∈ Π * 2: η = |F | j=1 [π (x t )] j -1 |F | 2 3: return πi(xt)+η 1+|F |•ηAs discussed in adversarial section, we wish to ensure that the probability a policy selecting any model is bounded away from 0 so that the regret bound in Theorem 3 is non vacuous. In our experiments, we achieve this goal by applying a regularized policy π as shown in Algorithm 1.We summarize the attributes of datasets, the models, and the model selection policies as follows. datasetWe performed our experiments on a Linux server with 80 Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz and total 528 Gigabyte memory.By considering the resource of server, We set 100 realizations and 3000 stream-size for DRIFT, 20 realizations and 10000 stream-size for CIFAR10, 200 realizations and 4000 stream size for HIV, 300 realization and 80 stream-size for VERTEBRAL. In each realization, we randomly selected stream-size aligned data from testing-set and make it as online streaming data which is the input of each algorithm. Thus, we got independent result for each realization.A small realization number would increase the variance of the results due to the randomness of stream order. A large realization number would make the result be more stable but at the cost of increasing computational cost (time, memory, etc.). We chose the realization number by balancing both aspects.In this section, we focus on the stochastic setting. We first prove the regret bound presented in Theorem 1 and then prove the query complexity presented in Theorem 2 for Algorithm 1.Before providing the proof of Theorem 1, we first introduce the following lemma. Lemma 8. Fix τ ∈ (0, 1). Let q t,i * be the probability of the optimal policy i * maintained by Algorithm 1 at t, and let b = p min log c (1/p min ), where p min = min s,i π(x s ) denotes the minimal model selection probability by any policy7 . When t ≥   ln(|Π * |-1)τ 1-τ √ ln |Π * | ∆-2b 2 t ln 2 δ   2, with probability at least 1 -δ, it holds that q t,i * ≥ τ .Proof of Lemma 8. W.l.o.g, we assume µ 1 ≤ µ 2 ≤ . . . µ n+k . Recall that we define ∆ =min i̸ =i * ∆ i = µ 2 -µ 1 = E[ Lt,2-Lt,1] t, and π 1 is the policy with the minimal expected loss.DefineEQUATIONwhere i ′ ≜ arg min i̸ =1 Lt-1,i denotes the index of the best empirical policy up to t -1 other than π 1 . Therefore for i ≥ 2, it holds thatL t-1,i ′ -L t-1,i = t-1 s=1 δ s ≤ 0.We have q t,i * = q t,1 = exp(-ηt Lt-1,1)|Π * | i=1 exp(-ηt Lt-1,i)as the weight of optimal expert at round t. ThereforeEQUATIONwhere step (a) is by dividing the cumulative loss of sub-optimal policy π i ′ and step (b) is by the definition of δ t in Equation (7) .Let τ ∈ (0, 1), such that q t,i EQUATIONHere, step (9a) is by the fact that ∆ 2 = min i̸ =1 ∆ i ≤ ∆ i ′ , and step (9b) is by Hoeffding's inequality where b denotes the upper bound on |δ s |. Further note that Let 2e -tϵ 2 2b 2 = δ. Therefore, when t ≥ lnδ s+1 = ls,i ′ -ls,1 = U s z s ⟨π i ′ (x s ) -π 1 (x s ), I {ŷ s ̸ = y s }⟩ ≤ ⟨π i ′ (x s ), I {ŷ s ̸ = y s }⟩ z s Eq. (4) ≤ U s ⟨π i ′ (x s ), I {ŷ s ̸ = y s }⟩(|Π * |-1)τ 1-τ √ ln |Π * |(∆-ϵ) 2 =   ln (|Π * |-1)τ 1-τ √ ln |Π * | ∆-2b 2 t ln 2 δ   2, it holds that q t,i * ≥ τ with probability at least 1 -δ.Lemma 9. At round t, when t ≥ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2, it holds that the arm chosen by the best policy i * will be the arm chosen by Algorithm 1 with probability at least 1 -δ. That is,arg max i∈[|Π * |] q t,i π i (x t ) = arg max {π i * (x t )}.Proof w j (10)= max {π i * (x t )} -max j [π i * (x t )] j̸ =maxind(π i * (xt)) ,as the minimal gap in model distribution space of best policy. The arm recommended by the best policy i * of CAMS will dominate CAMS's selection, when we haveEQUATIONRearranging the terms, and byq t,i * • γ Eq. (10) = q t,i * max {π i * (x t )} -max j [π i * (x t )] j̸ =maxind(π i * (xt)) ≥ (1 -q t,i * )Therefore, we get τ • (γ) ≥ (1 -τ ), and thus τ ≥ 1 γ+1 . Set τ ≥ 1 γ+1 . By Lemma 8, we gett ≥ ln |Π * -1|τ 1-τ ln |Π * | (∆ -ϵ) 2 ≥   ln |Π * |-1 γ ln |Π * | (∆ -ϵ)   2 (c) ≥   ln |Π * |-1 γ ln |Π * |∆ -ln |Π * | • 2b 2 t ln 2 δ   2where the last step is by applying 2e -tϵ 2 2b 2 = δ, thus, ϵ = 2b 2 t ln 2 δ . Dividing both sides by t1 (d) ≥   ln |Π * |-1 γ ln |Π * | • t∆ -ln |Π * | • 2b 2 ln 2 δ   2 ln |Π * |-1 γ ≤ √ t ln (|Π * |)∆ -ln (|Π * |) • 2b 2 ln 2 δ t ≥   ln |Π * |-1 γ + ln |Π * | • 2b 2 ln 2 δ ln |Π * |∆   2 . So, when t ≥ ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 , it holds that arg max i∈[|Π * |] q t,i π i (x t ) = arg max {π i * (x t )}.Proof of Theorem 1. Therefore, with probability at least 1 -δ , we get constant regretln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 .Furthermore, with probability at most δ, the regret is upper bounded by T . Thus, we haveR (T ) ≤ (1 -δ)   ln |Π * |-1 γ + ln |Π * | • 2b 2 ln 2 δ ln |Π * |∆   2 + δT (a) ≤ 1 - 1 T ln |Π * |-1 γ + b ln |Π * | • (2 ln T + 2 ln 2) ln |Π * |∆ 2 + 1 = O   b ln T ∆ 2 + ln |Π * |-1 γ ln |Π * |∆ 2   ,where step (a) by setting δ = 1 T , and where γ in Eq. ( 10) is the min gap.In this section, we analyze the query complexity of CAMS in the stochastic setting, where we take a similar approach as proposed by Karimi et al. [39] for the context-free model selection problem. Our main idea is to derive from query indicator U t and query probability z t . We first used Lemma 10 to bound the expected number of queries T t=1 U t by the sum of query probability asT t=1 δ t 0 + T t=1 E (ŷ t , w t ).Then we used Lemma 11 to bound the first item (which corresponds to the lower bound of query probability over T rounds) and applied Lemma 12 to bound the second term (which characterizes the model disagreement). Finally, we combined the upper bounds on the two parts to reach the desired result. Lemma 10. The query complexity of Algorithm 1 is upper bounded byEQUATION)Proof. Now we have model disagreement defined in Eq. ( 3), the query probability defined in Eq. ( 4), and the query indicator U. Let us assume, at each round, we have query probability z t > 0, which indicates we will not process the instance that all the models' prediction are the same.At round t, from query probability Eq. ( 4), we havez t = max δ t 0 , E (ŷ t , w t ) ≤δ t 0 + E (ŷ t , w t ), where the inequality is by applying that ∀A, B ≥ 0, max{A, B} ≤ A + B.Thus, in total round T , we could get the following equation as the cumulative query cost,EQUATION)where the inequality is by inputting δ t 0 = 1 √ t and Eq. ( 3).T t=11 √ t ≤ 2 √ T .Proof. We can bound the LHS as follows:T t=1 1 √ t = ⌊ √ T ⌋ t=1 1 √ t + T t=⌊ √ T ⌋+1 1 √ t ≤ √ T + T t=⌊ √ T ⌋+1 1 √ T = √ T + T - √ T 1 √ T ≤ 2 √ T .Lemma 12. Denote the true label at round t by y t , and define p t,y := j∈[k] I {ŷ t,j = y} w j . Further define R t := t 1 -p t,yt as the expected cumulative loss of Algorithm 1 at t.Then T t=1 y∈Y ⟨w t , ℓ ℓ ℓ y t ⟩ log |Y| 1 ⟨wt,ℓ ℓ ℓ y t ⟩ |Y| ≤ R T • log |Y| T 2 (|Y|-1) R 2 T |Y| .Proof of Lemma 12. Suppose at round t, the true label is y t .y̸ =yt p t,y = 1 -p t,yt = 1 - i∈|Π * | q t,i π i (x t ), ℓ ℓ ℓ t = r t , y∈Y ⟨w t , ℓ ℓ ℓ y t ⟩ log |Y| 1 ⟨wt,ℓ ℓ ℓ y t ⟩ |Y| = (1 -p t,yt ) log |Y| 1 1-pt,y t |Y| + y̸ =yt (1 -p t,y ) log |Y| 1 1-pt,y |Y| (a) ≤ (1 -p t,yt ) log |Y| 1 1-pt,y t |Y| + (|Y| -1) (1-pt,y t ) |Y|-1 log |Y| |Y|-1 1-pt,y t |Y| ≤ (1 -p t,yt ) log |Y| 1 1-pt,y t |Y| + (1 -p t,yt ) log |Y| |Y|-1 1-pt,y t |Y| = (1 -p t,yt ) log |Y| |Y|-1 (1-pt,y t ) 2 |Y| (b) ≤ r t log |Y| |Y|-1 r 2 t |Y| ,where step (a) is by applying Jensen's inequality and using 1 -p t,y = 1-pt,y t |Y|-1 , and step (b) is by replacing the expected loss 1 -p t,yt by its short-hand notation r t .Recall that we define the expected cumulative loss as R T = T t=1 r t . Since when r t ∈ [0, 1],EQUATION)Since R T is the cumulative loss up to round T , T 's incremental rate is no less than R T 's incremental rate. Thus, R T ≤ T and Tt Rt ≤ Tt+1 Rt+1 . So we get Eq. ( 14). Now we are ready to prove Theorem 2.Proof of Theorem 2. From Lemma 10, we get the following equation as the cumulative query costE T t=1 U t ≤ E T t=1 1 √ t + y∈Y ⟨w t , ℓ ℓ ℓ y t ⟩ log |Y| 1 ⟨wt,ℓ ℓ ℓ y t ⟩ |Y| .Let us assume the expected total loss of best policy is T µ i * . From Theorem 1, we getE [R T ] = E T t=1 r t ≤   ln |Π * |-1 γ + ln |Π * | • 2b 2 ln 2 δ ln |Π * |∆   2 + T µ i * .Plugging this result into the query complexity bound given by Lemma 11 and Lemma 12, we haveE T t=1 U t ≤ 2 √ T + ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 + T µ i * |Y| log |Y| T 2 (|Y| -1) ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 + T µ i * 2 ≤ ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 + T µ i * log |Y| (T |Y|) |Y| = ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 + T µ i * ln (T ) |Y| ln |Y| (a) = ln |Π * |-1 γ + √ ln |Π * |•2b 2 ln 2 δ √ ln |Π * |∆ 2 + T µ i * ln (T ) c ln c ,where γ is defined as Eq. ( 10) and step (a) by applying c = |Y|.In this section, we first prove the regret bound presented in Theorem 3 and then prove the query complexity bound presented in Theorem 4 for Algorithm 1 in the adversarial setting. Lemma 13 builds upon the proof of the hedge algorithm [27] , but with an adaptive learning rate.Lemma 13. Consider the setting of Algorithm 1, Let us define h t,i = exp -η t Lt-1,i ∀i ∈ |Π * | as exponential cumulative loss of policy i, η t is the adaptive learning rate and q t is the probability distribution of policies, thenlog i∈[|Π * |] h T +1,i i∈[|Π * |] h 1,i ≤ - T t=1 η t |Π * | i=1 q t,i ℓ t,i + T t=1 η 2 t 2 |Π * | i=1 q t,i ℓ t,i 2 .Proof. We first bound the following termi∈[|Π * |] h t+1,i i∈[|Π * |] h t,i = |Π * | i=1 h t+1,i i∈[|Π * |] h t,i = |Π * | i=1 q t,i exp -η t ℓ t,i ≤ |Π * | i=1 q t,i   1 -η t ℓ t,i + η 2 t ℓ t,i 2 2    = 1 -η t |Π * | i=1 q t,i ℓ t,i + η 2 t 2 |Π * | i=1 q t,i ℓ t,i 2 ,where the inequality is by applying that for x ≤ 0, we havee x ≤ 1 + x + x 2 2 .By taking log on both side, we getlog i∈[|Π * |] h t+1,i i∈[|Π * |] h t,i ≤ log   1 -η t |Π * | i=1 q t,i ℓ t,i + η 2 t |Π * | i=1 q t,i ℓ t,i 2   (a) ≤ -η t |Π * | i=1 q t,i ℓ t,i + η 2 t 2 |Π * | i=1 q t,i ℓ t,i 2 ,where step (a) is by applying that log (1 + x) ≤ x, when x ≥ -1.Now summing over t = 1 : T yields:log i∈[|Π * |] h T +1,i i∈[|Π * |] h 1,i = T t=1 log i∈[|Π * |] h t+1,i i∈[|Π * |] h t,i ≤ - T t=1 η t |Π * | i=1 q t,i ℓ t,i + T t=1 η 2 t 2 |Π * | i=1 q t,i ℓ t,i 2 .Lemma 14. Consider the setting of Algorithm 1. Let p t,y = j∈[k] I {ŷ t,j = y} w j . The query probability z t satisfiesz t ≥ 1 |Y| ln |Y| (p t,yt (1 -p t,yt ) + p t,y (1 -p t,y )) , ∀y ̸ = y t .Proof. We first bound the query probability termz t = max {δ t 0 , E (ŷ t , w t )} = max{δ t 0 , 1 |Y| y∈Y ⟨w t , ℓ ℓ ℓ y t ⟩ log |Y| 1 ⟨w t , ℓ ℓ ℓ y t ⟩ } = max{δ t 0 , 1 |Y| y∈Y (1 -p t,y ) • ln 1 1 -p t,y 1 ln |Y| } (a) ≥ max{δ t 0 , 1 |Y| y∈Y (1 -p t,y ) • p t,y • 1 ln |Y| } = max{δ t 0 , 1 |Y| ln |Y| y∈Y (1 -p t,y ) • p t,y } (b) ≥ 1 |Y| ln |Y| (p t,yt (1 -p t,yt ) + p t,y (1 -p t,y )) , ∀y ̸ = y t ,where step (a) is by applying ln Proof of Theorem 3. By applying Lemma 13, we gotEQUATIONEQUATION.For any policy s, we have a lower boundEQUATIONwhere step (a) in Eq. ( 15) is by initializing L 0 = 0, e 0 = 1, andi∈[|Π * |] h 1 = e (-ηt L0) = |Π * |.Thus, we haveEQUATION≤ log (n + k)EQUATION≤ log |Π * | η T + 1 η T T t=1 η 2 t 2 |Π * | i=1 q t,i ℓ t,i 2 ,where step (b) is by applyingη T T t=1 |Π * | i=1 q t,i ℓ t,i -η T T t=1 ℓ t,s ≤ T t=1 η t |Π * | i=1 q t,i ℓ t,i -η T T t=1 ℓ t,s ,and step (c) is by dividing η T on both side.Because we haveE T q t,i ℓ t,i 2 = q t,i E T π i (x t ) • ℓ ℓ ℓ t 2 = q t,i P (U t = 1) π i (x t ) • ℓ ℓ ℓ t z t 2 + P (U t = 0) • 0 = q t,i z t π i (x t ) • ℓ ℓ ℓ t z t 2 = q t,i z t (π i (x t ) • ℓ ℓ ℓ t ) 2 ≤ q t,i z t π i (x t ) • ℓ ℓ ℓ t = q t,i z t ⟨π i (x t ) , ℓ ℓ ℓ t ⟩, it leads to T t=1 |Π * | i=1 q t,i ℓ t,i - T t=1 ℓ t,s ≤ log |Π * | η T + 1 η T T t=1 η 2 t 2 |Π * | i=1 q t,i z t ⟨π i t ) , ℓ ℓ ℓ t ⟩ (d) ≤ log |Π * | η T + 1 η T T t=1 η 2 t 2 ⟨w t , ℓ ℓ ℓ t ⟩ z t ,where step (d) is by applying|Π * | i=1 q t,i ⟨π i (x t ) , ℓ ℓ ℓ t ⟩ = ⟨w t , ℓ ℓ ℓ t ⟩. So we have, T t=1 |Π * | i=1 q t,i ℓ t,i - T t=1 ℓ t,s ≤ log |Π * | η T + 1 η T T t=1 η 2 t 2 ⟨w t , ℓ ℓ ℓ t ⟩ z t (e) ≤ log |Π * | η T + 1 η T T t=1 η 2 t 2 1 -p t,yt z t (f ) ≤ log |Π * | η T + 1 η T T t=1 η 2 t 2 1 -p t,yt Y 0 ((1 -p t,yt ) p t,yt + (1 -p t,y ) p t,y ) ≤ log |Π * | η T + 1 η T T t=1 η 2 t 2 1 Y 0 p t,yt + 1-pt,y 1-pt,y t p t,y, where step (e) is by using ⟨w t , ℓ ℓ ℓ t ⟩ = 1 -p t,yt and step (f ) by using Lemma 14 and get lower bound of z t as 1 |Y| ln |Y| (p t,yt (1 -p t,yt ) + p t,y (1 -p t,y )) and applying1 |Y| ln |Y| = Y 0 . If p t,yt ≥ 1 |Y| , p t,yt + 1 -p t,y 1 -p t,yt p t,y ≥ 1 |Y| . If p t,yt < 1 |Y| , ∃y, p t,y → 1, δ t 1 = 1 -max y,τ ∈[t]p τ,y . Let p t,ŷ = max y p t,y . Thus, we havew ŷ > 1 |Y| and p t,yt + 1 -p t,y 1 -p t,yt p t,y ≥ p t,yt + w ŷ δ t 1 1 -p t,yt ≥ 0 + 1 |Y| δ t 1 1 = δ t 1 |Y| . Therefore max{p t,yt + p t,y 1 -p t,y 1 -p t,yt } = 1 |Y| if p t,yt ≥ 1 |Y| , δ t 1 |Y| if p t,yt < 1 |Y| .So we haveEQUATION≤ |Π * | η T + 1 η T T t=1 η 2 t 2 1 max{Y 0 δ t 1 |Y| , δ t 0 } = log |Π * | η T + 1 η T T t=1 η 2 t 2 |Y| 2 ln |Y| max{δ t 1 , δ t 0 |Y| 2 ln |Y|} (h) ≤ log |Π * | η T + 1 η T T t=1 η 2 t 2 • |Y| 2 ln |Y| δ t 1 +δ t 0 |Y| 2 ln |Y| 2 = log |Π * | η T + 1 η T T t=1 η 2 t 1 δ t 1 + δ t 0 |Y| 2 ln |Y| • |Y| 2 ln |Y|,where step (g) is by getting the lower bound of z t asδ t 1 |Y| ≤ 1 |Y| , δ t 0 ≤ δ t 0 1-pt,y t and step (h) is by applying max{A, B} ≥ A+B 2 . Let us define ρ t ≜ min τ ∈[t] δ τ 1 = 1 -max c,τ ∈[t] p τ t,y . We get E T [R T ] ≤ log * | η T + 1 η T T t=1 log |Π * | • 1 T ≤ 2 log |Π * | η T Let η t = ρt+δ t 0 |Y| 2 ln |Y| |Y| 2 ln |Y| • log |Π * | T , we obtain E T [R T ] ≤ 2 log |Π * | • √ T • |Y| 2 ln |Y| ρ T + δ T 0 |Y| 2 ln |Y| ≤ 2|Y| T ln |Y| log |Π * | max{ρ T , 1/T }where the last inequality is due to the fact thatρ T + δ T 0 |Y| 2 ln |Y| > max{ρ T , δ T 0 } = max{ρ T , 1/T }which completes the proof.Proof of Theorem 4. From Lemma 10, we get the following equation as the cumulative query costE T t=1 U t ≤ E T t=1 1 √ t + y∈Y ⟨w t , ℓ ℓ ℓ y t ⟩ log |Y| 1 ⟨wt,ℓ ℓ ℓ y t ⟩ |Y| .Let us assume the expected total loss of best policy is LT, * . Thus, from Theorem 3, we get the expected cumulative lossE [R T ] = E T t=1 r t ≤ 2|Y| T ln |Y| log |Π * | max{ρ T , 1/T } + LT, * .Now plugging the regret bound R T proved in Theorem 3 into the query complexity bound given by Lemma 12, we haveT t=1 y∈Y ⟨w t , ℓ ℓ ℓ y t ⟩ log |Y| 1 ⟨wt,ℓ ℓ ℓ y t ⟩ |Y| ≤ 2|Y| T ln |Y| log |Π * | max{ρ T , √ } + LT, *   log |Y| T 2 (|Y|-1) 2|Y| T ln |Y| log |Π * | max{ρ T , √ 1/T } + LT, * 2   |Y| ≤ 2|Y| T ln |Y| log |Π * | max{ρ T , √ 1/T } + LT, * log |Y| T |Y| |Y| = 2|Y| T ln |Y| log |Π * | max{ρ T , √ 1/T } + LT, * log |Y| T + 1 |Y| .Finally, by applying query complexity upper bound of Lemma 11, we gotE T t=1 U t ≤ 2 √ T + 2|Y| T ln |Y| log |Π * | max{ρ T , √ 1/T } + LT, * log |Y| T + 1 |Y| .Since the second term on the RHS dominates the upper bound, we haveO E T t=1 U t = O      T log |Π * | max{ρ T , √ 1/T } + LT, * (ln T ) ln (|Y|)      (a) = O T log |Π * | max{ρ T , 1/T } + LT, * (ln T ) ,where step (a) is obtained by suppressing constant coefficients involving |Y| into the O notation. We evaluate CAMS by comparing it with all the policies available in various benchmarks. The policies in each benchmark are summarized in App. D.2 and Table D .5. The empirical results in Fig. 6 demonstrate that CAMS could efficiently outperform all policies and converge to the performance of the best policy with only slight increase in query cost in all benchmarks. In particular, on the VERTEBRAL and HIV benchmarks, CAMS even outperforms the best policy.CAMS outperforms Model Picker in Fig. 2 , by leveraging the context information for adaptive model selection. In a context-free environment, Π = {∅}, so Π * := {π const 1 , . . . , π const k }, where π const j (•) := e j represents a policy that only recommends a fixed model. In this case, selecting the best policy to CAMS equals selecting the best single model. Fig. 7 demonstrates that the mean of CAMS and Model Picker lies the shades of each other, which means CAMS has approximately the same performance as model picker considering the randomness on all benchmarks.When given only malicious and random advice policies, the conventional contextual online learning from experts advice framework will be trapped in the malicious or random advice. In contrast, CAMS could efficiently identify these policies and avoid taking advice from them. Meanwhile, it also successfully identifies the best classifier to learn to reach its best performance. The novelty in CAMS that enables this robustness is that we add the constant policies {π const 1 , . . . , π const k } into the policy set Π to form the new set as Π * . To illustrate the performance difference, we have created a variant of CAMS by adapting to the conventional approach (named CAMS-conventional). Fig. 8 demonstrates that CAMS could outperform all the malicious and random policies and converge to the performance of the best classifier. CAMS-conventional: We create the CAMS-conventional algorithm as the CAMS using policy set Π, not Π * . Figure 8 : Evaluating the robustness of CAMS compared to the conventional learning from experts' advice (CAMS-conventional) in a complete malicious and random policies environment. When no good policy is available, CAMS could recover from malicious advice and successfully approach the performance of the best classifier. In contrast, the conventional approach will be trapped in malicious advice. 90% confident intervals are indicated in shades.We also observe that CAMS does not stop at approaching the best policy or classifier performance. Sometimes, it even outperforms all the policies and classifiers, and Fig. 9 demonstrates such a case. We evaluate the three algorithms on VERTEBRAL and HIV benchmarks in terms of (a) normal policies (Fig. 9 Left), (b) classifiers (Fig. 9 Middle), and (c) malicious and random policies (Fig. 9 Right). In the normal policies column, we only compare the policies with regular policies giving helpful advice. In the classifier column, we compare them with the performance of classifiers only.In the malicious and random policies column, we compare them with unreasonable policies only.Fig. 9 demonstrates that all three algorithms could outperform the malicious/random policies. However, CAMS-Random-Policy does not outperform the best classifier while both CAMS and CAMS-MAX can on both benchmarks. CAMS-MAX approaches the performance of the best policy but does not outperform the best policy on both benchmarks. Finally, perhaps surprisingly, CAMS outperforms the best policy (Oracle) on both benchmarks and continues to approach the hypothetical, optimal policy (with 0 cumulative loss).This surprising factor is contributed by the adaptive weighted policy of CAMS, which adaptively creates a better policy by combining the advantage of each sub-optimal policy and classifier to reach the performance of the hypothetical, optimal policy (defined asT t=1 min i∈[n+k] ℓ t,i ).The second reason could be that the benchmark we created, or any real-world cases, will not be strictly in a stochastic setting (in which a single policy outperforms all others or has lower µ in every round). The weight policy strategy can make a better combination of advice for this case. They outperform all the malicious/random policies. Moreover, CAMS and CAMS-MAX outperform the best classifier. Finally, only CAMS even exceeds the best policy (Oracle) in both benchmarks and continues approaching the hypothetical, optimal policy (0 cumulative loss). 90% confident intervals are indicated in shades.It randomly samples the policy from the probability distribution of policy q, and selects the model with max value in π i * (x t ) to recommendation. The difference is marked as blue color in Fig. 11 .Table 6 in this section summarizes the maximum query cost for a given data stream (of fixed total size), with its associated cumulative loss for all baselines (exclude Oracle) on all benchmarks in experiment section. The result in this table is slightly different from the query complexity curves of Fig. 2 (Middle). The curve in Fig. 2 To achieve the same level of prediction accuracy (measured by average cumulative loss over a fixed number of rounds), CAMS incurs less than 10% of the label cost of the best competing baselines on CIFAR10 (10K examples), and 68% the cost on VERTEBRAL (see Fig. 12 ); Fig. 12 8 and Table 6 also demonstrate the compelling effectiveness of CAMS's query strategy outperforming all baselines in terms of query cost in VERTEBRAL, DRIFT, and CIFAR10 benchmarks, which is consistent with our query complexity bound in Theorem 2. For the experimental results we reported in the main paper, we consider a streaming setting where the data arrives online in an arbitrary order and arbitrary length. Therefore, for both CAMS and the baselines, we used the exact off-the-shelf query criteria as described in experiment setup section without fine-tuning the query probabilities, which could be otherwise desirable in certain scenarios (e.g. for stochastic streams, where the query probability can be further optimized).In this section, we consider such scenarios, and conduct an additional set of experiments to further demonstrate the performance of CAMS assuming stochastic data streams. Given the stream length T and query budget b, we may optimize each algorithm by scaling their query probabilities, so that each algorithm allocates its query budget to the top b informative labels in the entire online stream based on its own query criterion. Note that in practice, finding the exact scaling parameter is infeasible, as we do not know the online performance unless we observe the entire data stream. While it is challenging to determine the scaling factor for each algorithm under the adversarial setting, one can effectively estimate the scaling factor for stochastic streams, where the context arrives i.i.d..Concretely, we use the early budget to decide the scaling parameter in our following evaluation: Firstly, we use a small fraction (i.e. T /10) of the online stream and see how much queries b early each algorithm consumed. Then we calculate the scaling parameter s = (b-bearly)T -T /10 • T /10 bearly and multiply the scaling factor with the query probability of each algorithm for the remaining 9 10 • T rounds. The results in Fig. 13 demonstrate that CAMS still outperforms all the baselines (excluding Oracle) when all algorithms select the top b data of the whole online stream to query. The improvement of CAMS over the baseline approaches does not differ much between the two versions (with or without scaling) of the experiments as shown in the bottom plots of Fig. 2 and Fig. 13 .For a head-to-head comparison between the bottom plots of Fig. 2 and Fig. 13 , note that the total number of rounds stays the same for DRIFT (T = 3000), VERTEBRAL (T = 80), and HIV (T = 4000); while we used half the rounds and half the maximal budget for CIFAR10 (T = 5000) for the version with scaling. Roughly speaking, the cumulative regret plots for the baselines were "streched out" to cover the full allocated budget after scaling, but we do not observe a significant difference in terms of the absolute gain in terms of the cumulative loss. Another way to read the difference between the two plots is to compare the cumulative losses at the budget range where all algorithms were not cut off early: e.g., for DRIFT, when Query Cost is 250, the cumulative losses for the competing algorithm stay roughly the same under the two evaluation scenarios. G.12 Ablation study on the active query strategyIn this section, we compare the performance of CAMS and its non-active variant (CAMS-nonactive), which queries the label for each incoming data point. As shown in Fig. 14 , CAMS performs equally well or better than CAMS-nonactive, even though it queries significantly less data. Surprisingly, on the DRIFT dataset, CAMS significantly outperforms CAMS-nonactive, even when using less than 10 percent of the query budget (Fig. 14b ). This demonstrates that CAMS selectively choose the data to query to maximal optimize policy improvement, while CAMS queries all data points, regardless of their usefulness or noise, which hampers policy improvement and convergence.round by combining the advantages of each sub-optimal policy, which may outperform any single expert/policy. Furthermore, for the experiments we ran (or in most real-world scenarios), the data streams are not strictly in a stochastic setting (in which a single policy outperforms all others or has a lower expected loss in every round). The weighted policy strategy may find a better combination of "advices" in such cases (see Fig. 2 and App. G.6). Justification: We list the paper's contribution and scope clearly at the last paragraph of Section 1× × × × ✓ ✓ Streaming, batch × × × × ✓ × × Pool-based, batch ✓ ✓ ✓ ✓ × × ×Guidelines:• The answer NA means that the abstract and introduction do not include the claims made in the paper. • The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers. • The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings. • It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.Assume ties are broken randomly.For convenience of discussion, we assume that those rounds where all policies in Π * select the same models or all models F make the same predictions are removed as a precondition.w.l.o.g. assume there is a single best policy, and thus ∆ > 0.We assume pmin > 0 per the policy regularization criterion in Appendix C.3. (cf. Algorithm 1 on "Regularized policy π(xt))".We assume pmin > 0 per the policy regularization criterion in Appendix C.3. (cf. Algorithm 1 on "Regularized policy π(xt))".We also consider variants for each algorithm (other than Random and Oracle) where we scale the query probabilities based on the early-phase performance and observe similar behavior. See App. G.11 for the corresponding results. 


Decision: This paper poses and solves an important and interesting practical problem well, and we think this paper will be impactful. While the reviewers raised a number of interesting questions, there were no fundamental concerns, and most of the questions really just point to possible extensions, such as how to train good models given the proposed process, or how to adapt to changing models.

Reviews: review: paper_summary: paper_summary: The paper proposes an online active model selection strategy where at each round the learner receives an unlabeled data point as a context to adaptively select the best model to predict while limiting the label requests.
strength_weakness: strength_weakness: 1.	Mainstream large-scale datasets such as ImageNet, MS COCO etc. will be ideal to validate the all-around performance of the proposed CAMS framework, especially in the query cost and complexity studies.

2.	It will be interesting to check with some of the popular and more recent baselines such as CoreSet[1], BatchBALD[2], BADGE[3] on any of the large datasets mentioned in 1.


[1] Sener, O., & Savarese, S. (2017). Active Learning for Convolutional Neural Networks: A Core-Set Approach. ArXiv. /abs/1708.00489

[2] Andreas Kirsch, Joost van Amersfoort, and Yarin Gal. 2019. BatchBALD: efficient and diverse batch acquisition for deep Bayesian active learning. Proceedings of the 33rd International Conference on Neural Information Processing Systems. Curran Associates Inc., Red Hook, NY, USA, Article 631, 7026–7037.

[3] Ash, J. T., Zhang, C., Krishnamurthy, A., Langford, J., & Agarwal, A. (2019). Deep Batch Active Learning by Diverse, Uncertain Gradient Lower Bounds. ArXiv. /abs/1906.03671
questions: questions: Please refer to the weaknesses section.
limitations: limitations: The paper is somewhat difficult to read due to its proposal’s components explained in disconnected sections. The framework is not exactly flexible to be applied to regression or segmentation problems.  As reported, this is primarily applicable to classification problems.
paper_summary: paper_summary: This paper proposes a Contextual Active Model Selection (CAMS) method for addressing the problem in the online setting by selecting the optimal pre-trained model for given data points while minimizing labeling costs. CAMS utilizes contextual information to make informed model selection decisions and employs an adaptive query strategy to determine when to request labels, thereby reducing overall labeling efforts.
strength_weakness: strength_weakness: - The effectiveness of CAMS heavily relies on the pre-trained models. CAMS may not perform well if the pre-trained models are diverse or representative enough or have a large domain gap with the target task.

- The theoretical guarantee of regret bounds and query complexity in this manuscript, are derived under strong assumptions like stochastic, adversarial settings.

- The authors use the cumulative loss as the evaluation metric, it is indeed an overall measure of performance but the normal evaluation metrics like accuracy, precision, and recall should also be considered.
questions: questions: The author should carefully check if typos exist in the manuscript, e.g., the caption of Table 3, "Eq. (??)".
limitations: limitations: The authors have adequately addressed the limitations and potential negative societal impact of their work.
paper_summary: paper_summary: The paper introduces CAMS, an algorithm designed for online contextual active model selection. CAMS minimizes labeling costs by selecting the most appropriate pre-trained models for given contexts and strategically querying labels. The paper provides theoretical analysis of regret and query complexity in both adversarial and stochastic settings. Empirical evaluations on benchmark tasks such as CIFAR10 and DRIFT show that CAMS reduces labeling effort significantly while maintaining or improving accuracy.
strength_weakness: strength_weakness: -  The method does not discuss how it handles dynamic updates to the set of classifiers or policies. In practical applications, the set of available models may change over time. The lack of a mechanism to incorporate such updates limits the robustness and adaptability of the proposed solution.
- While the datasets chosen provide a range of scenarios, the empirical evaluation could benefit from more recent and complex datasets to better demonstrate CAMS' capabilities. Additionally, the comparisons are primarily with older methods or basic variants, and a broader set of state-of-the-art methods, including recent advances in contextual bandits and active learning, are not fully explored.
- Some of the mathematical notations and their explanations are dense and could be clarified further. For instance, the derivation and intuition behind the exponential weighting and the specific choice of ηt could be more thoroughly explained to improve understanding.
- The paper does not discuss the stability of empirical results across multiple runs. Given that the evaluation relies on certain stochastic processes, it would be beneficial to report the variance or standard deviation of the results to provide a clearer picture of the method's reliability.
questions: questions: - How does CAMS handle scenarios where the set of pre-trained classifiers is not fixed or continuously updated?
- Can more details be provided on the selection and construction of the policy set used in experiments?
- How does the method perform when applied to tasks beyond classification, such as regression or ranking problems?
limitations: limitations: The author mentions the limited focus on classification and non-uniform loss functions in this work.
paper_summary: paper_summary: This paper focuses on the online contextual active model selection problem. Specifically, the learner receives an unlabeled data point as a context at each round, and the objective is to adaptively select the best model to predict while limiting label requests. To address this problem, the authors proposed a CAMS method that contains a contextual active model selection algorithm and an active query component. Theoretical results about regret in both adversarial and stochastic settings are provided.
strength_weakness: strength_weakness: About the problem setting, I have some concerns and questions:

1) In different tasks, such as image classification, and tabular data, we may have many different pre-trained models. For example, in the image classification tasks, we may choose the deep neural network trained on the ImageNet, or we can also adopt the CLIP model. How to construct the candidate model pool? 

2) Given a model pool, in the first round, we have already selected a model. How do we decide whether we need to choose a new model or continue using the previous one?

3) In the proposal, given a new instance, the algorithm needs to run each candidate model on the instance, which requires a lot of computation cost. There are also some methods proposed to assign each model a specification to describe its functionality[1]. Can these methods be combined with the proposal?

4) In many cases, we may need to ensemble multiple models, can the proposal be extended to multiple model selection?

[1] Lan-Zhe Guo, Zhi Zhou, Yu-Feng Li, Zhi-Hua Zhou. Identifying Useful Learnwares for Heterogeneous Label Spaces. In: Proceedings of the 40th International Conference on Machine Learning (ICML 2023), Hawaii, 2023. Page: 12122-12131.
questions: questions: As discussed above.
limitations: limitations: No

Comments: title: Please respond
Please respond
Please update your review and engage with the authors
Please update your review and engage with the authors
Please update your review and engage with the authors
response
comment: Thanks for your response, I maintain my initial score.
Dear reviewer,

Thanks again for your thoughtful review. As this paper is a bit borderline, I would really like to know if the rebuttal had any affect on your review. 

Therefore please provide an update to your review and acknowledge that you have read the rebuttal and clarify if you want to adjust your score.

Many thanks, Your AC.
Dear reviewer,

Thanks again for your thoughtful review. As this paper is a bit borderline, I would really like to know if the rebuttal had any affect on your review. 

Therefore please provide an update to your review and acknowledge that you have read the rebuttal and clarify if you want to adjust your score.

Many thanks, Your AC.
Dear reviewer,

Please provide an update to your review. The authors have provided a quite substantial rebuttal. Please acknowledge that you have read the rebuttal, and please post any questions that you may still have. Also clarify if you want to adjust your score.

Many thanks, Your AC.

PS: Sorry for the double message, but this is now a reply to the review, so I hope this will automatically reach your inbox now.
Dear reviewer,

Please provide an update to your review. The authors have provided a quite substantial rebuttal. Please acknowledge that you have read the rebuttal, and please post any questions that you may still have. Also clarify if you want to adjust your score.

Many thanks, Your AC.
Dear reviewer,

Please provide an update to your review. The authors have provided a quite substantial rebuttal. Please acknowledge that you have read the rebuttal, and please post any questions that you may still have. Also clarify if you want to adjust your score. 

Many thanks,
Your AC.
Thank you for your response, I decide to keep my attitude towards borderline accept.
> ***Q5:*** "How does CAMS handle scenarios where the set of pre-trained classifiers is not fixed or continuously updated?" 

***A:*** CAMS is primarily designed for pre-trained classifiers. However, it also provides performance guarantees for scenarios where classifiers are not fixed, continuously updated, or exhibit unexpected or adversarial behavior. We have both algorithms and theoretical bounds in adversarial settings to ensure performance in these situations.

> ***Q6:*** "Can more details be provided on the selection and construction of the policy set used in experiments?"

***A:*** We select and construct policies with the goal of creating a more diversified policy set, incorporating diversity in features, architecture, and behavior. To achieve this, we adopt models with entirely different architectures to learn contextual representations alongside classifier behavior. Ultimately, we combine these policies to form a stronger model selection strategy.

> ***Q7:*** "How does the method perform when applied to tasks beyond classification, such as regression or ranking problems?"

***A:***  Currently, CAMS only covers classification tasks where the oracle policy provides a label. When the oracle policy provides a regression value or a ranking list, one possible solution is to convert the problem into a classification problem. This could involve marking the true label as the top in the ranking list or identifying the value closest to the true value as the highest.

---
We hope our response has addressed your concerns. If you have any further inquiries, please let us know. Thank you!