Abstract
Bandits with covariates, a.k.a. contextual bandits, address situations where optimal actions (or arms) at a given time $t$, depend on a context $x_t$, e.g., a new patient’s medical history. Most existing research assumes either a static context distribution or an adversarial one. This paper explores the middle ground of covariate shift, where the marginal distribution of contexts changes over time while the conditional distribution of rewards remains fixed. We propose a nonparametric algorithm that automatically adapts to these shifts without prior knowledge of the shift time or the degree of distribution change.
Introduction
In contextual bandit problems, an agent selects actions based on observed contexts to maximize cumulative rewards. Traditional models typically assume the context distribution is either stationary or controlled by an adversary. However, many practical applications—such as seasonal shifts in consumer behavior or expanding clinical trials to new demographics—exhibit "covariate shift." In these cases, the types of contexts encountered change (the marginal distribution $X$), but the underlying relationship between context and reward ($Y|X$) remains constant.
The primary challenge is effectively leveraging historical data ($P$) to improve performance on the current distribution ($Q$) when the shift time $n_P$ and the nature of the shift are unknown.
Methodology: Adaptive Dyadic Partitioning
The authors propose Algorithm 1: Adaptive Bandits, which avoids the pitfalls of being overly conservative (adversarial approach) or ignoring shifts (static approach). The core of the method is a dyadic partitioning tree that recursively divides the context space into smaller "bins."
Local Adaptivity
Unlike global smoothing methods, this algorithm employs local adaptivity. For each new context $X_t$, it identifies the corresponding bin in the tree and selects a resolution level based on the number of samples ($n_r(X_t)$) already observed in that specific bin. This mechanism naturally balances:
- Bias: Larger bins provide more samples but may average over dissimilar contexts.
- Variance: Smaller bins offer higher precision but suffer from higher uncertainty due to fewer samples.
Crucially, the algorithm is agnostic; it does not require explicit detection of the change point or knowledge of the "transfer exponent" $\gamma$, which measures the discrepancy between distributions.
Key Insights
The Transfer Exponent ($\gamma$)
The relationship between the old distribution $P$ and the new distribution $Q$ is characterized by a transfer exponent $\gamma$. When $\gamma$ is small, the distributions are similar, allowing for significant knowledge transfer. As $\gamma$ increases, the distributions become more disjoint, and the algorithm gracefully transitions to learning primarily from the new data.
Robustness without Detection
A significant finding is that explicit "change detection" is unnecessary. By prioritizing local sample counts, the algorithm automatically focuses on recent data in regions where the distribution has shifted, while still utilizing relevant past data in regions where the distributions overlap.
Results and Performance
The theoretical analysis proves that the algorithm achieves a regret rate that is minimax optimal, interpolating between the amounts of past and current data.
In synthetic simulations (e.g., the "Bump" environment with a 2D context space), the self-tuning algorithm significantly outperformed standard adversarial baselines. While adversarial methods are often too conservative to utilize pre-shift data, the proposed adaptive approach effectively harvests the "hidden" value in historical observations, leading to faster learning rates.
Conclusion and Future Work
This work provides a robust framework for contextual bandits under unknown covariate shifts. By using local sample counts to guide tree resolution, the algorithm achieves optimal regret without needing to know when or how the environment changed.
A current limitation is the assumption of a fixed reward function ($Y|X$). Future research could extend this "self-tuning" philosophy to environments where both the context distribution and the reward functions evolve, requiring the algorithm to "unlearn" outdated reward estimates.
Summary updated