cs.LGMay 24, 2026

Active Learning for Stochastic Contextual Linear Bandits

Authors: Emma BrunskillIshani KarmarkarZhaoqi Li

Organizations: Stanford University

Abstract

A key goal in stochastic contextual linear bandits is to efficiently learn a near-optimal policy. Prior algorithms for this problem learn a policy by strategically sampling actions but naively (passively) sampling contexts from the underlying context distribution. However, in many practical scenarios -- including online content recommendation, survey research, and clinical trials -- practitioners can actively sample or recruit contexts based on prior knowledge of the context distribution. Despite this potential for active learning, the role of strategic context sampling in stochastic contextual linear bandits is underexplored. We propose an algorithm that learns a near-optimal policy by strategically sampling rewards of context-action pairs. We prove instance-dependent theoretical guarantees demonstrating that our active context sampling strategy can improve over the minimax rate by up to a factor of d\sqrt{d}, where dd is the linear dimension. We show empirically that our algorithm reduces the number of samples needed to learn a near-optimal policy, in tasks such as warfarin dose prediction and joke recommendation.

Explore similar work

May 19, 2026cs.LG

Active Context Selection Improves Simple Regret in Contextual Bandits

We study the contextual multi-armed bandit problem with a finite context space (a.k.a. subpopulations), where the learner recommends a best action for each context and is evaluated by context-weighted simple regret. Our guarantees are worst-case over the reward distributions, while remaining instance-dependent with respect to the context distribution vector pp. Akin to experimental design problems where the population of interest is fixed but the sampled subpopulation can be controlled, we allow the learner to actively choose which context to sample from. For a known pp, we characterize tight regret rates: passive sampling where contexts are randomly revealed achieves regret of order n/Tp1/2\sqrt{n/T \, \lVert p \rVert_{1/2}}, whereas active sampling with allocation qjpj2/3q_j \propto p_j^{2/3} achieves the tight rate n/Tp2/3\sqrt{n/T} \, \lVert p \rVert_{2/3}. The resulting improvement can be as large as Θ(k1/4)Θ(k^{1/4}), where kk is the number of contexts. We further extend the analysis to budgeted active sampling, characterize the corresponding tight rate, and identify when a limited active budget suffices to recover the fully active rate. When pp is unknown, we propose the Explore-Explore-Then-Commit (EETC) algorithm, which optimally balances estimating the context distribution and the time to switch to active allocation, such that for large horizons, it matches the known-pp active rate up to constants. Experiments on synthetic and real-world data support our theoretical findings.
Mohammad Shahverdikondori, Jalal Etesami, Negar Kiyavash
Sep 14, 2026cs.LG

Nearly Minimax-Optimal Regret for Linear Contextual Bandits with Arbitrary Adaptive Action Sets

We study stochastic linear contextual bandits with arbitrary action menus that may depend on the fixed parameter and the interaction history. We establish matching upper and lower bounds, up to logarithmic factors. Let dd be the dimension, KK be the menu size, and TT the time horizon. For 2Kd2\le K\le d, we prove an upper bound O~(K1/4dT)\widetilde O(K^{1/4}\sqrt{dT}). When Td2T\ge d^2, we further prove a lower bound Ω(K1/4dT)Ω(K^{1/4}\sqrt{dT}). Thus, for Td2T\ge d^2 and 2Kd2\le K\le d, the upper and lower bounds match up to logarithmic factors, and the polynomial dependence on KK is optimal. Compared with the previous O~(dKT)\widetilde O(\sqrt{dKT}) bound, our upper bound improves the dependence on KK by a factor of K1/4K^{1/4}. For KdK\ge d, we prove an upper bound O~d,T(dTmin{d,(dlogK)1/4})\widetilde O_{d,T}\left(\sqrt{dT}\min\{\sqrt d,(d\log K)^{1/4}\}\right) and a lower bound Ω(dTmin{d,(dlogKlog(2d))1/4})Ω\left(\sqrt{dT}\min\left\{\sqrt d,\left(\frac{d\log K}{\log(2d)}\right)^{1/4}\right\}\right). Here, O~d,T\widetilde O_{d,T} omits logarithmic factors only in dd and TT. In particular, for polynomially large KdK\ge d, the upper and lower bounds both scale as d3/4Td^{3/4}\sqrt T up to logarithmic factors, improving the standard O~(dT)\widetilde O(d\sqrt T) rate by a factor of d1/4d^{1/4}. As KK grows further, the regret smoothly recovers the dTd\sqrt T scale once logK\log K reaches order dd.
Tianyuan Jin
May 31, 2026stat.ML

Practical and Optimal Algorithm for Linear Contextual Bandits with Rare Parameter Updates

We study linear contextual bandits under rare parameter updates: the learner may incorporate reward feedback into its parameter estimate only at a small number of update times, while still observing contexts online and selecting actions sequentially. This viewpoint clarifies a practical distinction that is often blurred in the literature: many "strictly batched" methods additionally restrict within-interval context adaptivity, meaning that the action rule inside an interval cannot depend on the sequence of realized contexts/actions in that interval (beyond the current round's context). For linear contextual bandits, we propose two practical algorithms with only O(loglogT)O(\log\log T) parameter updates. Our first algorithm BLCE-G attains minimax-optimal regret (up to polylogarithmic factors in TT) simultaneously in both the small-KK and large-KK regimes under a static schedule. Our second algorithm BLCE removes the near G-optimal design step -- a dominant computational bottleneck in prior strictly batched static-grid methods -- yet preserves minimax-optimal regret and achieves the lowest known runtime complexity among optimal algorithms. We further extend these rare-update and computational principles to generalized linear contextual bandits. Overall, our results yield statistically optimal algorithms under O(loglogT)O(\log\log T) parameter updates that are also computationally efficient in practice.
Sanghoon Yu, Min-hwan Oh