Batched Neural Bandits

Quanquan Gu, Amin Karbasi, Khashayar Khosravi, Vahab S. Mirrokni, Dongruo Zhou

Introduction

The stochastic contextual bandit problem is a fundamental framework for sequential decision-making, where a learner must choose actions based on observed features (contexts) to maximize cumulative rewards. While linear models have historically dominated this field due to their theoretical tractability, modern applications—ranging from personalized medicine to recommendation systems—often demand the expressive power of Deep Neural Networks (DNNs). Algorithms like NeuralUCB have successfully integrated DNNs into the "Optimism in the Face of Uncertainty" (UCB) paradigm. However, these sequential models face significant hurdles in production environments: the computational cost of updating a neural network after every single observation is often prohibitive, and many real-world systems are constrained to batch updates rather than continuous learning.

The Batching Challenge

The primary challenge in batched neural bandits is maintaining low regret while restricting the frequency of model updates. In many practical scenarios, such as clinical trials or large-scale crowdsourcing, it is impossible or inefficient to alter a policy for every individual interaction. Instead, data must be collected in groups, or "batches," before the model is re-trained.

BatchNeuralUCB is a framework designed to bridge the gap between the high performance of neural bandits and the practical necessity of batch processing. The goal is to achieve a regret bound comparable to fully sequential versions while reducing the number of policy updates by an order of magnitude.

Methodology: Fixed vs. Adaptive Batching

BatchNeuralUCB utilizes a neural network to estimate rewards and a UCB-style exploration bonus derived from the gradient of the network. The innovation lies in how the algorithm decides when to update its parameters. The paper explores two distinct schemes:

  1. Fixed Batch Size: The time horizon $T$ is divided into $B$ equal segments. The model is updated only at the end of each segment. While simple to implement, this approach does not account for the varying "informativeness" of the data collected.
  2. Adaptive Batch Size: This more sophisticated approach triggers an update only when the "information gain" exceeds a specific threshold $q$. This gain is measured by the determinant of the covariance matrix of the gradients. By monitoring the accumulation of new information, the algorithm ensures that updates occur only when they are likely to significantly improve the model's performance.

Theoretical Foundation: The NTK Regime

To provide rigorous performance guarantees, the authors leverage the Neural Tangent Kernel (NTK) regime. The NTK theory posits that sufficiently wide neural networks behave like linear models in a high-dimensional feature space defined by the network's initial gradients. This allows the researchers to bound the regret of a non-linear neural model using techniques similar to those used for linear bandits. Specifically, they utilize the effective dimension $\tilde{d}$ of the NTK to provide a theoretical ceiling on the cumulative regret.

Empirical Evaluation

The researchers benchmarked BatchNeuralUCB against several baselines using both synthetic and real-world datasets:

  • Synthetic Benchmarks: Using cosine and quadratic reward functions, the authors demonstrated the model's ability to capture complex non-linearities that linear models fail to resolve.
  • Mushroom Dataset: A standard UCI benchmark where the agent must distinguish between edible and poisonous mushrooms based on physical traits.
  • Magic Telescope Dataset: A high-energy physics dataset used to simulate complex decision-making environments.

Key Insights and Results

The study yields several critical insights for the deployment of neural bandits:

  • Regret Optimality: BatchNeuralUCB achieves an $O(\tilde{d}\sqrt{T})$ regret bound, matching the order of the fully sequential NeuralUCB. This proves that batching does not inherently degrade the theoretical performance of the learner.
  • Efficiency Gains: In experimental settings, BatchNeuralUCB was frequently 8 to 10 times faster than its sequential counterpart. This speedup is crucial for scaling neural bandits to high-throughput systems.
  • The Superiority of Adaptivity: The paper proves a significant gap between batching strategies. While a fixed batch scheme requires $\Omega(\sqrt{T})$ updates to match sequential performance, the adaptive scheme requires only $\Omega(\log T)$ updates. On the Mushroom dataset, for instance, an adaptive model with just 40 updates outperformed a fixed-batch model that utilized 250 updates.
  • Minimal Performance Trade-off: For most configurations, the total regret of the batched version remained within a factor of two of the sequential version, with the gap narrowing as the number of batches increased.

Limitations and Future Directions

Despite its strengths, BatchNeuralUCB has limitations that provide fertile ground for future research. The theoretical proofs rely on the NTK regime, which assumes extremely wide neural networks; it remains to be seen if these bounds hold for the narrower architectures typically used in practice. Additionally, the adaptive scheme introduces a hyperparameter $q$ (the trigger threshold) that requires careful tuning. Finally, while the algorithm reduces training frequency, calculating UCB bonuses still involves matrix inversions, which can be a bottleneck in very high-dimensional spaces. Future work may focus on approximating these bonuses to further enhance scalability.

Summary updated

BibTeX
@article{gu2024batched,
  author = {Quanquan Gu and Amin Karbasi and Khashayar Khosravi and Vahab S. Mirrokni and Dongruo Zhou},
  title = {{Batched Neural Bandits}},
  journal = {ACM / IMS Journal of Data Science},
  year = {2024},
  doi = {10.1145/3592474},
}
Figure