The K-Nearest Neighbour UCB Algorithm for Multi-Armed Bandits with Covariates

Joseph Charles Mellor, Gavin Brown, Henry ReeveAlgorithmic Learning Theory 2025

TL;DR

This paper introduces the k-Nearest Neighbour UCB (k-NN UCB) algorithm for multi-armed bandits with covariates, designed for scenarios where data lies on low-dimensional manifolds within high-dimensional spaces. The algorithm achieves near-optimal regret bounds without needing prior knowledge of the data's intrinsic dimension or the time horizon, making it more flexible than existing methods.

What Problem Does This Paper Address?

The paper tackles the challenge of multi-armed bandit problems where decisions are influenced by side information, known as covariates. Traditional bandit algorithms often assume covariates are in a simple Euclidean space and require knowledge of the data's intrinsic dimension. However, many real-world scenarios involve data residing on complex, low-dimensional structures (like manifolds) embedded in high-dimensional spaces, where the intrinsic dimension is unknown. Existing methods like UCBogram and ABSE struggle with non-Euclidean metric spaces and require prior knowledge of this intrinsic dimension, limiting their applicability. This paper aims to develop a bandit algorithm that can effectively handle covariates on metric spaces, adapt to unknown intrinsic dimensions, and achieve strong theoretical guarantees.

Methods

The core contribution is the k-Nearest Neighbour UCB (k-NN UCB) algorithm. It combines the Upper Confidence Bound (UCB) principle with k-nearest neighbour (k-NN) regression. Instead of partitioning the covariate space into fixed regions (like UCBogram or ABSE), k-NN UCB uses the k-NN method to locally estimate reward functions. A key innovation is how it selects the number of neighbors, $k$, by minimizing an uncertainty measure, thus avoiding the need to know the intrinsic dimension or time horizon beforehand. The paper also proposes a variant, k-NN KL-UCB, adapted for bounded rewards, which is an analogue of the KL-UCB algorithm. Theoretical analysis provides minimax-optimal regret bounds (up to logarithmic factors) under assumptions of low intrinsic dimension, Lipschitz continuity of reward functions, and a margin condition (indicating low noise).

Datasets

Not discussed in the paper. The paper uses synthetic data generated for experimental evaluation.

Key Insights and Ideas

  • Adaptability to Intrinsic Dimension: The k-NN UCB algorithm inherently adapts to the low intrinsic dimensionality of the covariate space without explicit knowledge, a significant advantage over methods requiring this parameter.
  • Metric Space Flexibility: By leveraging k-NN, the algorithm can operate on general metric spaces, not just Euclidean ones, broadening its applicability.
  • Simplicity and Anytime Nature: The algorithm is conceptually simple and naturally "anytime," meaning it can be stopped at any time and still provide a reasonable policy, without needing complex tricks like doubling the time horizon.
  • Robustness to Ambient Dimension: Experimental results show that the k-NN UCB algorithms are robust to the dimensionality of the ambient feature space, outperforming methods that are sensitive to it.

Key Results

  • Regret Bounds: The paper proves theoretical regret bounds for both k-NN UCB and k-NN KL-UCB. These bounds are shown to be minimax optimal up to logarithmic factors, meaning they are as good as theoretically possible for this class of problems.
  • Empirical Performance: Experiments on synthetic data demonstrate that the k-NN UCB algorithms significantly outperform UCBogram and ABSE, especially as the ambient dimension of the feature space increases. This highlights the practical benefits of their adaptability.
  • Comparison of Variants: The k-NN KL-UCB algorithm, designed for bounded rewards, is shown to typically outperform the standard k-NN UCB, mirroring the performance difference between KL-UCB and standard UCB in simpler settings.

Limitations and Future Work

  • Hölder Exponent Adaptivity: A challenging open question is whether algorithms can be developed that automatically adapt to an unknown Hölder exponent (a measure of smoothness). While the current algorithms can be adapted for known Hölder exponents less than 1, automatic adaptation remains an open problem.
  • Assumptions: The theoretical guarantees rely on specific assumptions, including the existence of a margin condition (low noise) and the data lying on a manifold with a certain reach. While these are common in the literature, their strict adherence might limit applicability in some real-world scenarios.

Summary updated

BibTeX
@inproceedings{mellor2025k,
  author = {Joseph Charles Mellor and Gavin Brown and Henry Reeve},
  title = {{The K-Nearest Neighbour UCB Algorithm for Multi-Armed Bandits with Covariates}},
  booktitle = {Algorithmic Learning Theory},
  year = {2025},
  url = {https://openreview.net/forum?id=KAN9aWJDrq},
}
Figure