Introduction
Nonparametric contextual bandits provide a robust framework for sequential decision-making where an agent learns to select actions (arms) based on observed features (contexts). While most existing theoretical work assumes that contexts are drawn from a bounded support, real-world data in domains like finance and healthcare often exhibit heavy-tailed distributions. In such cases, the probability of observing extreme contexts is non-negligible, leading to data sparsity in the "tails" of the distribution. This paper introduces an adaptive $k$-nearest neighbor (kNN) algorithm designed to achieve minimax optimal regret in these unbounded settings.
Addressing the Tail: Adaptive kNN-UCB
The primary challenge in unbounded context spaces is the simultaneous management of the exploration-exploitation and bias-variance tradeoffs across regions of varying data density. Standard algorithms with fixed smoothing parameters (like a fixed number of neighbors $k$) struggle: a large $k$ reduces variance in high-density regions but introduces significant bias in sparse regions where neighbors are far apart.
The proposed Adaptive kNN-UCB algorithm solves this by dynamically selecting $k$ for each new context $X_t$. By matching the estimated bias (derived from the distance to the $k$-th neighbor) with the estimated variance (proportional to $1/\sqrt{k}$), the algorithm "zooms in" on high-density data and "zooms out" in the tails. This local adaptation ensures that the reward estimates remain accurate regardless of where the context falls in the distribution.
Theoretical Optimality
A key contribution of this work is the establishment of a minimax lower bound for regret in the unbounded context setting. The authors prove that the Adaptive kNN-UCB algorithm achieves an expected regret of $\tilde{O}(T^{1-\min\{\frac{(\alpha+1)\beta}{\alpha+(d+2)\beta}, \beta\}})$, where $\beta$ characterizes the tail of the distribution. This rate matches the lower bound, demonstrating that the adaptive approach is theoretically optimal.
Empirical Evaluation
The effectiveness of the adaptive approach is validated through extensive simulations on synthetic distributions (Uniform, Gaussian, $t_4$, and Cauchy) and the MNIST handwritten digit dataset.
As illustrated in the results, the adaptive method significantly outperforms non-adaptive baselines such as UCBogram and fixed-kNN variants. In heavy-tailed scenarios like the Cauchy distribution, where data sparsity is most acute, the adaptive algorithm's ability to reduce bias in the tails leads to a substantial reduction in cumulative regret. On the MNIST dataset, the algorithm successfully handles high-dimensional image contexts, further proving its practical utility.
Conclusion
This research breaks new ground by removing the restrictive assumption of bounded context support in nonparametric bandits. The Adaptive kNN-UCB algorithm provides a principled, data-driven way to handle heavy-tailed distributions, achieving both theoretical minimax optimality and superior empirical performance. Future work could explore extensions to more general smoothness classes or non-stationary environments.
Summary updated