Differentially Private Kernelized Contextual Bandits

Nikola Pavlovic, Sudeep Salgia, Qing Zhao

Abstract

We consider the problem of contextual kernel bandits with stochastic contexts, where the underlying reward function belongs to a known Reproducing Kernel Hilbert Space (RKHS). We study this problem under the additional constraint of joint differential privacy, where the agents needs to ensure that the sequence of query points is differentially private with respect to both the sequence of contexts and rewards. We propose a novel algorithm that improves upon the state of the art and achieves an error rate of $\mathcal{O}\left(\sqrt{\dfrac{\gamma_T}{T}} + \dfrac{\gamma_T}{T \varepsilon}\right)$ after $T$ queries for a large class of kernel families, where $\gamma_T$ represents the effective dimensionality of the kernel and $\varepsilon > 0$ is the privacy parameter. Our results are based on novel estimator for the reward function that simultaneously enjoys high utility along with a low-sensitivity to observed rewards and contexts, which is crucial to obtain an improved performance.

Introduction

Contextual bandits are the engine behind modern recommendation systems, where an agent learns to suggest products or content based on user "contexts" (such as search history) and "rewards" (such as clicks). However, the data involved is often highly sensitive. If an algorithm is too "adaptive"—meaning it changes its recommendations based on every single piece of feedback—an adversary could potentially reverse-engineer a specific user's private information by observing the algorithm's choices over time.

While private algorithms exist for simple linear models, kernelized bandits—which handle complex, non-linear relationships—are significantly harder to privatize. Previous attempts were either restricted to specific kernels (like Squared Exponential) or utilized weaker privacy definitions. The core challenge lies in the "privacy-utility trade-off": adding enough noise to protect privacy usually destroys the algorithm's ability to learn effectively, especially when noise compounds through adaptive decision-making.

Methodology: The USCA Algorithm

This paper introduces USCA (Uniform Sampling with Covariance Approximation), the first algorithm for contextual kernel bandits that guarantees Joint Differential Privacy (JDP) for a wide range of kernels, including the Matérn family. The algorithm breaks the problem into three distinct stages to decouple data collection from reward estimation:

  1. Learning Stage (Non-Adaptive): Instead of picking the "best" action at every step, the agent samples actions uniformly at random. Because this strategy is independent of the actual rewards and contexts observed, it is private by design and avoids the noise compounding issues seen in adaptive strategies.
  2. Prediction Stage (Private Estimator): To make a final recommendation, the agent requires an estimate of the reward function. Standard estimators are highly sensitive to individual data points. USCA employs a novel low-sensitivity estimator that approximates the covariance structure using a separate, independently generated set of "artificial" points.
  3. Exponential Mechanism: For the final output, the algorithm does not simply pick the point with the highest estimated reward. Instead, it samples from a distribution (the Exponential Mechanism) that favors high-reward points but adds sufficient randomness to satisfy the $(\epsilon, \delta)$-JDP requirement.

Key Insights and Theoretical Results

A major theoretical contribution of this work is a new spectral bound for empirical covariance matrices in Reproducing Kernel Hilbert Spaces (RKHS). This allows the authors to prove that their "artificial" covariance approximation is nearly as accurate as the true covariance but with significantly lower sensitivity.

Theoretical Optimality

USCA achieves an error rate of $\mathcal{O}\left(\sqrt{\dfrac{\gamma_T}{T}} + \dfrac{\gamma_T}{T \varepsilon}\right)$, where $\gamma_T$ is the effective dimensionality of the kernel. As the privacy budget $\epsilon$ increases, this matches the known order-optimal rate for non-private kernel bandits. Unlike previous work, these results apply to any kernel with polynomial eigenvalue decay, making it applicable to the widely used Matérn family.

Empirical Validation

The algorithm was evaluated using the Hartmann-4D function, a standard benchmark for global optimization. Using a Squared Exponential kernel and contexts/actions distributed over $[0, 1]^2$, the experiments demonstrated that USCA's regret decreases as the privacy budget $\epsilon$ increases, eventually matching the performance of state-of-the-art non-private algorithms.

Conclusion

USCA represents a significant advancement in privatizing complex bandit problems. By shifting the focus toward non-adaptive sampling and low-sensitivity estimation, the authors provide a robust framework for privacy-preserving recommendations.

A primary limitation is that the algorithm is designed for simple regret (finding the best action after $T$ rounds) rather than cumulative regret (minimizing loss during the $T$ rounds). Extending these low-sensitivity estimation ideas to the cumulative regret setting remains a significant direction for future research, particularly for applications like medical trials where performance must be maintained throughout the learning process.

Summary updated

BibTeX
@inproceedings{pavlovic2025differentially,
  author = {Nikola Pavlovic and Sudeep Salgia and Qing Zhao},
  title = {{Differentially Private Kernelized Contextual Bandits}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2025},
  url = {https://openreview.net/forum?id=axgerltoda},
}
Figure