Active Context Selection Improves Simple Regret in Contextual Bandits

Mohammad Shahverdikondori, Jalal Etesami, Negar Kiyavash

TL;DR

This paper introduces active context selection to contextual multi-armed bandits, allowing the learner to actively choose which subpopulation to sample rather than passively waiting for contexts to appear. The authors prove that an active allocation strategy proportional to $p_j^{2/3}$ significantly reduces context-weighted simple regret compared to passive sampling, and they provide a practical algorithm (EETC) that achieves this optimal rate even when the subpopulation distribution is initially unknown.

What Problem Does This Paper Address?

In many sequential decision-making problems—such as clinical trials, targeted marketing, or online user engagement—the optimal action depends heavily on the subpopulation (or context) of the subject. Standard contextual bandit frameworks assume a passive setting: the environment randomly samples a context from a distribution $p$, and the learner merely chooses the best treatment.

However, in many real-world experimental designs, researchers possess partial or full control over recruitment. For example, a clinical trial can actively choose to recruit patients from specific age brackets or demographic groups. This paper addresses how to optimally leverage this active control to minimize context-weighted simple regret—the expected recommendation gap across all subpopulations, weighted by their actual frequency in the target population.

Methods

The authors analyze three distinct operational settings:

  1. Known Subpopulation Distribution ($p$): They prove that history-free policies (where context selection doesn't depend on past rewards) are minimax optimal. Instead of sampling according to the true distribution $p$ (passive), the optimal active strategy allocates samples proportionally to $p_j^{2/3}$. This mathematically shifts the sampling allocation toward a more uniform, exploratory distribution.
  2. Budgeted Interventions: When active context selection is costly or restricted, the authors consider a setting where only an $\alpha$ fraction of the total rounds can be active. They derive a convex optimization framework to determine the exact threshold budget $\alpha_{\min}(p)$ required to fully recover the unconstrained active learning rate.
  3. Unknown Subpopulation Distribution: To handle cases where $p$ is not known a priori, they introduce the Explore-Explore-Then-Commit (EETC) algorithm. EETC operates in three phases:
  4. Phase I: Passively observes the environment to estimate $p$ until a baseline sample count is achieved.
  5. Phase II: Continues passive sampling to refine the estimate without prematurely exhausting the active budget.
  6. Phase III: Freezes the estimate $\hat{p}^{\text{fr}}$ and commits entirely to the active allocation strategy derived from it.

Datasets

The authors evaluated their approaches using both synthetic benchmarks and a real-world dataset:

  • MovieLens 1M: Transformed into a bandit problem where the 5 most frequently rated movies serve as treatments ($n=5$) and 14 demographic groups (cross-product of gender and age) serve as subpopulations ($k=14$). Rewards are drawn from historical movie ratings.
  • Synthetic Datasets: Generated using independent Bernoulli reward distributions with specific gaps designed to mimic the theoretical worst-case instances and explicitly evaluate the active-passive gap across varying numbers of subpopulations ($k$) and treatments ($n$).

Key Insights and Ideas

  • The $2/3$ Power Rule: Intuitively, one might expect that the optimal strategy is to sample subpopulations proportionally to their real-world frequency $p$. However, because simple regret decreases nonlinearly with the number of samples ($\propto \sqrt{1/T_j}$), the optimal active allocation scales as $p_j^{2/3}$. This downweights massive subpopulations and upweights rare ones, ensuring that smaller groups get enough samples to accurately identify their best treatments.
  • Uncertainty is Asymptotically "Free": Remarkably, not knowing the subpopulation distribution $p$ beforehand does not worsen the long-term simple regret rate. The EETC algorithm spends just enough time passively learning $p$ ($\mathcal{O}(\log T)$ rounds) before executing the active allocation, matching the performance of a learner with perfect prior knowledge up to constant factors.
  • Visualizing the Shift: The optimal active policy systematically pushes the sampling allocation away from highly skewed population profiles toward a more uniform, exploratory center to optimize global recommendation accuracy.
Illustration of the active–passive gap on the probability simplex for k = 3

Key Results

  • Theoretical Speedup: Active context selection improves simple regret over passive sampling by a multiplicative factor of $R(p) = \sqrt{\|p\|_{1/2}} / \|p\|_{2/3}$, which can yield an improvement as large as $\Theta(k^{1/4})$ for highly non-uniform distributions (where $k$ is the number of contexts).
  • Empirical Performance: On the MovieLens dataset, EETC combined with standard bandit subroutines (Uniform or UCB) consistently outperformed passive baselines. For instance, at a horizon of $T=15,000$ using a UCB subroutine, the Passive policy achieved a regret of $0.47 \pm 0.11$, whereas EETC achieved $0.33 \pm 0.10$, closely approaching the known-$p$ active benchmark of $0.31 \pm 0.07$.

Limitations and Future Work

  • Worst-Case vs. Gap-Dependent Guarantees: The current bounds are worst-case over reward distributions. The authors note that developing gap-dependent guarantees would be a valuable extension, as optimal algorithms could then allocate fewer samples to subpopulations where the best action is easy to identify.
  • Post-Action Contexts: The paper assumes contexts can be selected before an action is taken. Extending this to causal or contextual settings where the context is only observed after an action/intervention is chosen remains an open challenge.

Summary updated

BibTeX
@inproceedings{shahverdikondori2026active,
  author = {Mohammad Shahverdikondori and Jalal Etesami and Negar Kiyavash},
  title = {{Active Context Selection Improves Simple Regret in Contextual Bandits}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=dJqzCskE60},
}
Figure