Definition
A contextual bandit is an online learner that, on each round, receives an input (the context), selects one of several available actions (arms), and observes a reward only for the chosen arm. The reward serves as a learning signal, and the goal of the algorithm is to maximize the total reward accumulated over the sequence of inputs it observes [Privacy-Preserving Multi-Party Contextual Bandits, arXiv:1910.05299].
Common Applications
Contextual bandits are commonly used to solve recommendation or ranking problems, where the context encodes user or item features and the arms correspond to candidate items to recommend [Privacy-Preserving Multi-Party Contextual Bandits, arXiv:1910.05299].
Specialized Variants and Settings
- Privacy-preserving multi-party contextual bandits. When multiple parties wish to collaboratively train a contextual bandit without revealing their private features, the chosen arm, or the observed reward, contextual bandits can be combined with secure multi-party computation and differentially private mechanisms such as ε-greedy exploration [Privacy-Preserving Multi-Party Contextual Bandits, arXiv:1910.05299].
- Linear contextual bandits and LinUCB. In linear contextual bandits, the expected reward of an arm is modeled as a linear function of the context–arm feature vector. LinUCB is a widely used linear contextual bandit algorithm that maintains confidence bounds on the unknown reward parameters to balance exploration and exploitation [Efficient Action Poisoning Attacks on Linear Contextual Bandits, arXiv:2112.05367].
- Adversarial / action-poisoning attacks. The robustness of contextual bandit algorithms has been studied through adversarial action-poisoning attacks, in which an adversary manipulates the action signal selected by the agent. Such attacks against linear contextual bandits (including LinUCB) have been shown to force a target arm to be pulled with only logarithmic cost in both white-box and black-box settings [Efficient Action Poisoning Attacks on Linear Contextual Bandits, arXiv:2112.05367].
Use in Hardware Security: ReFuzz
ReFuzz is a processor fuzzing technique that applies contextual bandits to learn from vulnerabilities discovered in prior processor generations. Using a contextual bandit policy, ReFuzz selects and mutates historically effective tests from earlier designs to dramatically improve vulnerability detection and coverage efficiency when targeting new processors [ReFuzz announcement, NDSS 2026 — evidence 39a3a314-1538-4f63-b7a6-a24863bed4c4].
References
- Dubey, A. et al. Privacy-Preserving Multi-Party Contextual Bandits, arXiv:1910.05299, 2019.
- Liu, K. et al. Efficient Action Poisoning Attacks on Linear Contextual Bandits, arXiv:2112.05367, 2021.
- Chen, C., Xu, Z., Rostami, M., Liu, D., Kalathil, D., Sadeghi, A.-R., Rajendran, J. ReFuzz: Reusing Tests for Processor Fuzzing with Contextual Bandits, NDSS 2026.