Second Order Bounds for Contextual Bandits with Function Approximation

Aldo Pacchiano

Introduction

In the contextual bandit problem, a learner observes a context (such as a user profile), selects an action (like an advertisement), and receives a reward. To handle complex, real-world scenarios, researchers rely on function approximation, assuming the relationship between contexts, actions, and rewards belongs to a specific class of functions, $\mathcal{F}$.

Standard algorithms for this problem, such as optimistic least squares, typically yield a "first-order" regret bound that scales with $\sqrt{T}$, where $T$ is the total number of rounds. However, a significant limitation of this bound is that it remains $\sqrt{T}$ even if the rewards are extremely consistent and exhibit almost no noise. Ideally, in a "quiet" environment with low variance, the learner should be able to identify the optimal actions much faster. While "second-order" (variance-aware) bounds have been established for simple linear models, they have remained elusive for general, non-linear function classes. This paper bridges that gap, introducing the first second-order regret bounds for contextual bandits using general function approximation.

The Core Innovation: Uncertainty-Filtered Multi-scale Least Squares

To achieve these tighter bounds, the authors propose a novel approach called Uncertainty-Filtered Multi-scale Least Squares. The methodology is split into two primary algorithms: one for known variance and another for unknown, potentially changing variance.

The approach relies on four key mechanisms:

  • Uncertainty Filtering: Instead of performing standard least squares regression on all historical data, the algorithms selectively use data points. They only incorporate data where the "uncertainty radius"—a measure of how much the functions in the current version of $\mathcal{F}$ can disagree—falls below a specific threshold.
  • Multi-scale Bucketing: The algorithms maintain multiple regression models simultaneously. Each model corresponds to a different uncertainty threshold (specifically, scales of $B/2^i$). This bucketing allows the learner to apply sharper, variance-sensitive concentration inequalities, such as Freedman’s inequality.
  • Variance Estimation: In realistic settings where noise levels are unknown, the authors introduce a method to estimate cumulative variance dynamically using the sum of squared residuals from their filtered estimators.
  • Optimism in the Face of Uncertainty (OFU): Both algorithms follow the OFU principle, consistently choosing actions that maximize the upper bound of the estimated reward.

Key Insights and Theoretical Results

Because this is a theoretical work, the results are established through rigorous mathematical proofs rather than empirical benchmarks. The central insight of the paper is the realization that filtering out high-uncertainty data allows the model's error to be bounded by the actual variance of the noise, rather than a worst-case global bound. Furthermore, the authors successfully integrate the eluder dimension—a standard statistical measure of the complexity of a function class, denoted as $d_{\mathrm{eluder}}(\mathcal{F})$—into these variance-aware analyses.

The paper provides new, tighter upper bounds for cumulative regret:

  • Constant Unknown Variance ($\sigma^2$): The regret scales as $\widetilde{\mathcal{O}}\left( \sigma \sqrt{d_{\mathrm{eluder}}(\mathcal{F}) \log(\mathcal{F}) T } + d_{\mathrm{eluder}}(\mathcal{F}) \cdot \log(|\mathcal{F}|)\right)$. This matches the best-known lower bounds for this setting.
  • Time-Varying Unknown Variance ($\sigma_t^2$): When variances change at every time-step, the regret scales as $\widetilde{\mathcal{O}}\left( d_{\mathrm{eluder}}(\mathcal{F})\sqrt{\log(\mathcal{F})\sum_{t=1}^T \sigma_t^2 } + d_{\mathrm{eluder}}(\mathcal{F}) \cdot \log(|\mathcal{F}|)\right)$.

Ultimately, in low-noise settings (where $\sigma$ is small), these bounds are significantly tighter than the standard $\mathcal{O}(\sqrt{T})$ bounds. This theoretically proves that an agent's learning accelerates when the environment's data is cleaner.

Limitations and Future Directions

While groundbreaking, the work presents a few areas for future refinement:

  • Sub-optimal Scaling in Changing Variance: In the time-varying variance scenario, the leading term in the bound scales linearly with the eluder dimension ($d_{\mathrm{eluder}}$). The authors hypothesize that a more refined analysis could improve this to a square-root dependence ($\sqrt{d_{\mathrm{eluder}}}$), matching the efficiency seen in the constant-variance case.
  • Extension to Reinforcement Learning: The uncertainty-filtering techniques introduced here could potentially be extended to the broader and more complex setting of Reinforcement Learning (RL) to derive similar variance-aware bounds.
  • Alternative Algorithm Styles: Future research could investigate whether second-order bounds can be achieved using algorithms that do not rely on optimism, such as those based on inverse gap weighting (e.g., SquareCB).

Summary updated

BibTeX
@inproceedings{pacchiano2025second,
  author = {Aldo Pacchiano},
  title = {{Second Order Bounds for Contextual Bandits with Function Approximation}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=h6ktwCPYxE},
}
Figure