NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient and robust algorithms for adversarial linear contextual bandits

Gergely Neu, Julia Olkhovskaya

Abstract

We consider an adversarial variant of the classic $K$-armed linear contextual bandit problem where the sequence of loss functions associated with each arm are allowed to change without restriction over time. Under the assumption that the $d$-dimensional contexts are generated i.i.d. at random from a known distribution, we develop computationally efficient algorithms based on the classic Exp3 algorithm. Our first algorithm, RealLinExp3, is shown to achieve a regret guarantee of $\widetilde{O}(\sqrt{KdT})$ over $T$ rounds, which matches the best known lower bound for this problem. Our second algorithm, RobustLinExp3, is shown to be robust to misspecification, in that it achieves a regret bound of $\widetilde{O}((Kd)^{1/3}T^{2/3}) + \varepsilon \sqrt{d} T$ if the true reward function is linear up to an additive nonlinear error uniformly bounded in absolute value by $\varepsilon$. To our knowledge, our performance guarantees constitute the very first results on this problem setting.

Introduction

Contextual bandit problems represent a fundamental framework for sequential decision-making under uncertainty, with applications ranging from personalized medicine to online advertising. While the stochastic version of this problem—where rewards are drawn from a fixed, unknown distribution—has been extensively studied, real-world environments are often dynamic and potentially adversarial. In such cases, the loss functions associated with different actions can change unpredictably over time.

This paper introduces the first computationally efficient algorithms for the adversarial linear contextual bandit problem. By extending the classic Exponential-weight algorithm for Exploration and Exploitation (EXP3) to the linear contextual setting, we provide robust guarantees that bridge the gap between theoretical optimality and practical implementation.

The Adversarial Challenge

In the adversarial linear contextual bandit setting, a learner observes a context $x_t$ and must choose one of $K$ actions. The adversary then reveals a loss for that action. The challenge is twofold:

  1. Dynamic Decision Sets: Unlike standard adversarial bandits, the "best" action is context-dependent and changes every round, making it difficult to apply traditional regret-minimization tools.
  2. Computational Complexity: Previous theoretical approaches to this problem were often computationally intractable, requiring complex optimizations that did not scale with the number of actions or dimensions.

Algorithmic Framework: LINEXP3

The authors propose a general template called LINEXP3. This framework maintains a weight distribution over the actions and updates these weights based on estimated losses. The paper develops two primary instantiations of this template:

1. RobustLinExp3

Designed for "nearly-linear" losses, this algorithm is resilient to model misspecification. It utilizes a loss estimator based on the global covariance matrix of the contexts. If the environment deviates from linearity by a factor of $\varepsilon$, RobustLinExp3 maintains a controlled regret bound, ensuring the algorithm does not fail when faced with real-world "noise."

2. RealLinExp3

Optimized for strictly linear loss functions, RealLinExp3 employs action-specific covariance matrices to achieve minimax optimal regret. To maintain computational efficiency, the authors introduce Matrix Geometric Resampling (MGR). While standard matrix inversion is computationally expensive ($O(d^3)$), MGR approximates the inverse covariance matrix through a series of vector-matrix multiplications, reducing the per-round runtime to $O(MKd)$.

Key Insights

  • Auxiliary Problem Reduction: A core theoretical contribution is the reduction of the complex contextual problem into a series of independent online learning problems for each possible context. This allows the application of EXP3-style updates in a high-dimensional space.
  • Handling Misspecification: The research proves that a perfectly linear model is not a prerequisite for effective learning. By accepting a slightly higher regret growth ($T^{2/3}$), the learner can accommodate nonlinear errors.
  • Efficiency via Resampling: The adaptation of MGR from optimization literature allows the algorithm to "sample" the geometry of the context space, avoiding the heavy computational overhead of traditional linear algebraic methods.

Performance and Results

The proposed algorithms achieve state-of-the-art theoretical performance:

  • Optimal Regret: RealLinExp3 achieves a regret bound of $\tilde{O}(\sqrt{KdT})$, matching the known theoretical lower bound for this problem class.
  • Robustness Guarantee: RobustLinExp3 provides a regret of $\tilde{O}((Kd)^{1/3}T^{2/3}) + \epsilon\sqrt{dT}$, the first guarantee of its kind for misspecified adversarial contexts.
  • Polynomial Efficiency: Both algorithms are computationally efficient, with runtimes that scale polynomially with the number of actions $K$, dimensions $d$, and time $T$.

Limitations and Future Directions

While these results represent a significant advancement, several open questions remain. Currently, the algorithms require prior knowledge of the context distribution $\mathcal{D}$. Future research may focus on estimating this distribution online. Additionally, while the current bounds hold in expectation, developing high-probability regret bounds remains a challenge. Finally, the assumption of i.i.d. contexts is central to the current analysis; extending these results to fully adversarial contexts (where the adversary chooses both the context and the loss) remains a difficult open problem in learning theory.

Summary updated

BibTeX
@inproceedings{neu2020efficient,
  author = {Gergely Neu and Julia Olkhovskaya},
  title = {{Efficient and robust algorithms for adversarial linear contextual bandits}},
  booktitle = {Conference on Learning Theory},
  year = {2020},
  url = {https://openreview.net/forum?id=KABkBSCiST},
}
Figure