Towards Domain Adaptive Neural Contextual Bandits

## Abstract

Abstract Contextual bandit algorithms are essential for solving real-world decision making problems. In practice, collecting a contextual bandit’s feedback from different domains may involve different costs. For example, measuring drug reaction from mice (as a source domain) and humans (as a target domain). Unfortunately, adapting a contextual bandit algorithm from a source domain to a target domain with distribution shift still remains a major challenge and largely unexplored. In this paper, we introduce the first general domain adaptation method for contextual bandits. Our approach learns a bandit model for the target domain by collecting feedback from the source domain. Our theoretical analysis shows that our algorithm maintains a sub-linear regret bound even adapting across domains. Empirical results show that our approach outperforms the state-of-the-art contextual bandit algorithms on real-world datasets.

## 1 Introduction

Contextual bandit (CB) algorithms have shown great promise for naturally handling exploration/exploitation trade-off problems with optimal statistical properties. Notably, LinUCB (Li et al., ) and its various adaptations (Yue & Guestrin, , Agarwal et al., , Li et al., , Kveton et al., , Foster et al., , Korda et al., , Mahadik et al., , Zhou et al., ), have been shown to be able learn the optimal strategy when all data come from the same domain. However, these methods fall short when applied to data from a new domain. For example, a drug reaction prediction model trained by collecting feedback from mice (the source domain) may not work for humans (the target domain).

So, how does one effectively explore a high-cost target domain by only collecting feedback from a low-cost source domain, e.g., exploring drug reaction in humans by collecting feedback from mice or exploring real-world environments by collecting feedback from simulated environments?
The challenge of effective cross-domain exploration is multifaceted: (1) The need for *effective exploration* in both the source and target domains depends on *the quality of representations* learned in the source domain, which in turn requires *effective exploration*; this leads to a chicken-and-egg dilemma. (2) Aligning source-domain representations with target-domain representations is nontrivial in bandit settings, where ground-truth may still be unknown if the action is incorrect. (3) Balancing these aspects – effective exploration and accurate alignment in bandit settings – is also nontrivial.

To address these challenges, as the first step, we allow our method to simultaneously perform *effective exploration* and *representation alignment*, leveraging unlabeled data from both the source and target domains. Interestingly, our theoretical analysis reveals that naively doing so leads to sub-optimal accuracy/regret (verified by our empirical results) and naturally leads to additional terms in the target-domain regret bound. We then follow the regret bound derived from our analysis to develop an algorithm that adaptively collect feedback from the source domain while aligning representations from the source and target domains.
Our contributions are outlined as follows:

- •
We identify the problem of contextual bandits across domains and propose domain-adaptive contextual bandits (DABand) as a the first general method to explore a high-cost target domain while only collecting feedback from a low-cost source domain.
- •
Our theoretical analysis shows that our method can achieve a sub-linear regret bound in the target domain.
- •
Our empirical results on real-world datasets show our DABand significantly improve performance over the state-of-the-art contextual bandit methods when adapting across domains.

## 2 Related Work

Contextual Bandits. In the realm of adaptive decision-making, contextual bandit algorithms, epitomized by LinUCB (Li et al., ), have carved a niche in efficiently balancing the exploitation-exploration paradigm across a spectrum of use cases, notably in complex adaptive systems such as recommender systems (Li et al., , Wang et al., ). These algorithmic frameworks, along with their myriad adaptations (Yue & Guestrin, , Agarwal et al., , Li et al., , Korda et al., , Kveton et al., , Foster et al., , Zhou et al., , Mahadik et al., , Xu et al., ), have decisively outperformed conventional bandit models that operate devoid of contextual awareness (Auer, ). This superiority is underpinned by theoretical models, paralleling the insights in (Auer, ), where LinUCB variants are validated to conform to optimal regret boundaries in targeted scenarios (Chu et al., ). However, a discernible gap in these methodologies is their reduced efficacy in a new domain, particularly when getting feedback involves high cost.
Our proposed DABand bridges this gap by adeptly aligning both source-domain and target-domain representations in the latent space, thereby reducing performance drop when transfer across different domains.

Domain Adaptation. The landscape of domain adaptation has been extensively explored, as evidenced by a breadth of research (Pan & Yang, , Pan et al., , Long et al., , Saito et al., , Sankaranarayanan et al., , Zhang et al., , Peng et al., , Chen et al., , Dai et al., , Wang et al., , Nguyen-Meidine et al., , Xu et al., ). The primary objective of these studies has been the alignment of source and target domain distributions to facilitate the effective generalization of models trained on labeled source data to unlabeled target data. This alignment is conventionally attained either through the direct matching of distributional statistics (Pan et al., , Tzeng et al., , Sun & Saenko, , Peng et al., , Nguyen-Meidine et al., ) or via the integration of an adversarial loss (Ganin et al., , Zhao et al., , Tzeng et al., , Zhang et al., , Kuroki et al., , Chen et al., , Dai et al., , Wang et al., ). The latter, known as adversarial domain adaptation, has surged in prominence, bolstered by its theoretical foundation (Goodfellow et al., , Zhao et al., , Zhang et al., , Zhao et al., ), the adaptability of end-to-end training in neural network architectures, and its empirical efficacy. However, these methods only work in offline settings, and assumes complete observability of labels in the source domain. Therefore they are not applicable to our online bandit settings.

Domain Adaptation Related to Bandits.
There is also work related to both domain adaptation and bandits. Specifically, Guo et al. () propose a domain adaptation method using a bandit algorithm to select which domain to use during training.

We note that their goal and setting is different from our DABand’s.
(1) Guo et al. () focuses on improving accuracy in a typical, offline domain adaptation setting. In contrast, our DABand focuses on minimizing regret in an online bandit setting. (2) Guo et al. () assumes complete access to ground-truth labels in the source domain, while in our bandit setting, ground-truth may still be unknown if the action is incorrect. Therefore their work is not applicable to our setting.

## 3 Theory

In this section, we formalize the problem of contextual bandits across domains and derive the corresponding regret bound. We then develop our DABand inspired by this bound in Sec. 4. All proofs of lemmas, theorems can be found in the Appendix.

Notation. We use $[k]$ to denote the set $\{1,2,\cdots,k\}$, for $k\in\mathbb{N}^{+}$. The Euclidean norm of a vector ${\bf x}\in\mathbb{R}^{d}$ is denoted as $\|{\bf x}\|_{2}=\sqrt{{\bf x}^{T}{\bf x}}$. We denote the operator norm and Frobenius norm of a matrix ${\bf W}\in\mathbb{R}^{m\times n}$ as $\|W\|$ and $\|W\|_{F}$, respectively. Given a semi-definite matrix $A\in\mathbb{R}^{d\times d}$ and a vector ${\bf x}\in\mathbb{R}^{d}$, we denote the Mahalanobis norm as $\|{\bf x}\|_{A}=\sqrt{{\bf x}^{T}A{\bf x}}$.
For a function $\mathit{f}(T)$ of a parameter $T$, we denote as $\mathcal{O}(\mathit{f}(T))$ the terms growing in the order of $\mathit{f}(T)$, ignoring constant factors. We assume all the action spaces are identical and with cardinality of $K$, i.e., $|\mathcal{A}_{1}|=|\mathcal{A}_{2}|=\cdots=|\mathcal{A}_{N}|=K$. We use $\langle\cdot,\cdot\rangle$ to denote the inner product of two vectors. We denote as $a_{{\mathcal{D}},i}$ the action $i$ in domain ${\mathcal{D}}$, and omit the subscript ${\mathcal{D}}$ when the context is clear, e.g., $x_{i,a_{i}^{*}}^{\mathcal{D}}\equiv x_{i,a_{{\mathcal{D}},i}^{*}}^{\mathcal{D}}$.

### 3.1 Preliminaries

Typical Contextual Bandit Setting.
Suppose we have $N$ samples from an unknown domain $\mathcal{D}$, which is represented as $\{{\bf x}_{i,a}^{\mathcal{D}},a_{i}^{*}\}_{i\in[N],a\in[K]}$.
Here, ${\bf x}_{i,a}\in\mathcal{D}$ denotes the context for action $a\in\mathcal{A}_{i}$, and $a_{i}^{*}\in\mathcal{A}_{i}$ is the ground-truth action that will receive the optimal reward. We denote as $r_{i,a}$ the received reward in round $i$ after performing action $a$ and $\widehat{a}_{i}\in\mathcal{A}_{i}$ the chose action by a bandit algorithm in round $i$. The goal in typical contextual bandits is to learn a policy of choosing actions $\widehat{a}_{i}$ in each round to minimize the regret after $N$ rounds:

$$ $\displaystyle R=\sum\nolimits_{i=1}^{N}r_{i,a_{i}^{*}}-\sum\nolimits_{i=1}^{N} r_{i,\widehat{a}_{i}}.$ (1) $$

LinUCB.
LinUCB Li et al. () is a classic method for the typical contextual bandit setting. It assumes that the reward is linear to its input context, i.e., ${\bf x}_{i,a}$. During each round $i$, the agent selects an arm according to historical contexts and their corresponding rewards, $r_{i,a}$:

$$ $\displaystyle\widehat{a}_{i}=\mathop{\rm argmax}_{a\in\mathcal{A}_{i}}\left\{{ \bf x}_{i,a}^{T}\theta_{i}+\alpha\left\|{\bf x}_{i,a}\right\|_{A_{i-1}^{-1}} \right\},$ $$

where $A_{i-1}=\gamma{\bf I}_{d}+\sum\nolimits_{j=1}^{i-1}{\bf x}_{j,\widehat{a}_{j}}
{\bf x}_{j,\widehat{a}_{j}}^{T}$ with $\gamma>0$ and ${\bf x}_{j,\widehat{a}_{j}}^{T}$ as the historical selected action’s context, ${\bf x}_{i,a}$ is the context for the candidate action $a$ in round $i$, $\theta_{i}$ is the bandit parameter in round $i$ and $\alpha>0$ is a hyperparameter that adjusts the exploration rate.

LinUCB with Representation Learning.
In this paper, we use Neural LinUCB Xu et al. (), Wang et al. () as a backbone model to handle high-dimensional context with representation learning.
We assume that there exist a ground-truth encoder $\phi^{*}$ to encode the raw context ${\bf x}_{i,a}$ into a latent-space representation (encoding) $\phi^{*}({\bf x}_{i,a})$.
Subsequently, the reward for the context ${\bf x}_{i,a}$ is then $r({\bf x}_{i,a})=\langle\theta^{*},\phi^{*}({\bf x}_{i,a})\rangle$ plus some stochastic noise $\epsilon$. Furthermore, we use the same setting as in Xu et al. () where the ground-truth rewards are restricted to the range of $[0,1]$. Additionally, we further bound predicted rewards by normalizing $\|\widehat{\theta}\|=1$ and $\|\widehat{\phi}({\bf x}_{i,a})\|=1$.

In the single-domain typical setting, the goal is to learn an encoder $\widehat{\phi}$ and the contextual bandit parameter $\widehat{\theta}$, such that our estimated reward $\widehat{{r}}({\bf x}_{i,a})=\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i
,a})\rangle$ can be close to the ground-truth reward $r({\bf x}_{i,a})$. One can then use this to form derive policies to minimize the regret in Eqn. (1).

For simplicity, in Definition 3.1 below, we further denote as $f_{\mathcal{D}}$ the (ground-truth) labeling function for domain $\mathcal{D}$ and as $h\in\mathcal{H}$ a hypothesis such that $f$ is parameterized by $\phi_{\mathcal{D}}^{*},\theta_{\mathcal{D}}^{*}$, and $h$ is parameterized by $\widehat{\phi},\widehat{\theta}$.

### 3.2 Our Cross-Domain Contextual Bandit Setting

Typical contextual bandits operate in a single domain ${\mathcal{D}}$. In contrast, our cross-domain bandit setting involves a source domain $\mathcal{S}$ and a target domain $\mathcal{T}$. In this setting,
one can only collect feedback (reward) from the source domain, but not from the target domain. Specifically: (1) We assume a low-cost *source domain* (experiments on mice), where for each round $i$, one has access to the contexts $\{{\bf x}_{i,a}^{\mathcal{S}}\}_{a\in[K]}$ for each candidate actions, chooses one action $\widehat{a}_{i}$, and receives reward $r^{{\mathcal{S}}}_{i,\widehat{a}_{i}}$. (2) Additionally, we assume a high-cost *target domain* where collecting feedback (reward) is expensive (experiments on humans); therefore, one only has access to the contexts $\{{\bf x}_{i,a}^{\mathcal{T}}\}_{a\in[K]}$ for each candidate actions for each round, but cannot collect feedback (reward) $r^{{\mathcal{T}}}_{i,\widehat{a}_{i}}$ for any action in the target domain.
The goal in our cross-domain contextual bandits is to learn a policy of choosing actions $\widehat{a}_{i}$ in the target domain to minimize the target-domain zero-shot regret for $N$ (hypothetical) future rounds:

$$ $\displaystyle R_{{\mathcal{T}}}=\sum\nolimits_{i=1}^{N}r^{{\mathcal{T}}}_{i,a_ {i}^{*}}-\sum\nolimits_{i=1}^{N}r^{{\mathcal{T}}}_{i,\widehat{a}_{i}}.$ (2) $$

Difference between Eqn. (1) and Eqn. (2).
In the typical setting, Eqn. (1) uses different updated policies for each round; this is also true for the source domain. In contrast, the target regret in Eqn. (2) use the same fixed policy obtained from the source domain for all $N$ (hypothetical) rounds because
one cannot collect feedback from the target domain. See the difference between Definition 3.4 and Definition 3.5 below for a more formal comparison.

### 3.3 Formal Definitions of Error

###### Definition 3.1 ( Labeling Function and Hypothesis ) .

We define the labeling function $f_{\mathcal{D}}$ and the hypothesis $h$ for domain ${\mathcal{D}}$ as follows:

$$ $\displaystyle f_{\mathcal{D}}({\bf x}_{i,a}^{\mathcal{D}})$ $\displaystyle={r}({\bf x}_{i,a}^{\mathcal{D}})=\langle\theta_{\mathcal{D}}^{*} ,\phi_{\mathcal{D}}^{*}({\bf x}_{i,a}^{\mathcal{D}})\rangle+\epsilon_{i}$ $\displaystyle h({\bf x}_{i,a}^{\mathcal{D}})$ $\displaystyle=\widehat{{r}}({\bf x}_{i,a}^{\mathcal{D}})=\langle\widehat{ \theta},\widehat{\phi}({\bf x}_{i,a}^{\mathcal{D}})\rangle+\epsilon_{i}$ $$

where $\theta_{\mathcal{D}}^{*}$ is the optimal predictor for domain ${\mathcal{D}}$, $\widehat{\theta}$ denotes the estimated predictor, and $\epsilon_{i}$ is the random noise.

Next, we analyze how well our hypothesis $h$ estimates the labeling function $f$ (i.e., ground-truth hypothesis). Definition 3.2 below quantifies the closeness between two hypotheses by calculating the absolute difference in their estimated rewards.

###### Definition 3.2 ( Estimated Error between Two Hypotheses ) .

Assuming all contexts ${\bf x}_{i,\widehat{a}_{i}}^{\mathcal{D}}$ are from domain $\mathcal{D}$, the error between two hypotheses $h_{1},h_{2}\in\mathcal{H}$ on domain ${\mathcal{D}}$ given selected actions $\{\widehat{a}_{i}\}_{i\in[N]}\in[K]$ is

$$ $\displaystyle\epsilon_{\mathcal{D}}(h_{1},h_{2})$ $\displaystyle=\sum\nolimits_{i=1}^{N}\Bigg{(}\big{|}h_{1}({\bf x}_{i,\widehat{ a}_{i}}^{\mathcal{D}})-h_{2}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{D}})\big{|} \Bigg{)}=\sum\nolimits_{i=1}^{N}\Bigg{(}\Big{|}\langle\widehat{\theta}_{1}, \widehat{\phi}_{1}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{D}})\rangle-\langle \widehat{\theta}_{2},\widehat{\phi}_{2}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{ D}})\rangle\Big{|}\Bigg{)}.$ (3) $$

Note that the domain ${\mathcal{D}}$ above can be the source domain ${\mathcal{S}}$ or the target domain ${\mathcal{T}}$. We then define the error of our estimated hypothesis in these domains.

###### Definition 3.3 ( Source- and Target-Domain Error ) .

With $N$ samples from the source domain $\mathcal{S}$, and $f_{S}$ denoting the labeling function for ${\mathcal{S}}$, the source-domain error is then

$$ $\displaystyle\epsilon_{\mathcal{S}}(f_{\mathcal{S}},h)$ $\displaystyle=\sum\nolimits_{i=1}^{N}\Bigg{(}\big{|}f_{S}({\bf x}_{i,\widehat{ a}_{i}}^{\mathcal{S}})-h({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\big{|} \Bigg{)}=\sum\nolimits_{i=1}^{N}\Bigg{(}\Big{|}\langle\theta_{\mathcal{S}}^{*} ,\phi_{\mathcal{S}}^{*}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle- \langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S }})\rangle\Big{|}\Bigg{)},$ $$

where ${\bf x}_{i,\cdot}^{\mathcal{S}}$ comes from $\mathcal{S}$. Furthermore, $\widehat{a}_{i}=\mbox{arg}\max_{a}h({\bf x}_{i,a}^{\mathcal{S}})$ and $a_{i}^{*}=\mbox{arg}\max_{a}f_{S}({\bf x}_{i,a}^{\mathcal{S}})$. For simplicity, we shorten the notation $\epsilon_{\mathcal{S}}(f_{\mathcal{S}},h)$ to $\epsilon_{\mathcal{S}}(h)$ and similarly use $\epsilon_{\mathcal{T}}(h)$ for domain $\mathcal{T}$. Assuming ${\bf x}_{i,\cdot}^{\mathcal{T}}$ comes from $\mathcal{\mathcal{T}}$, the estimated error for the target domain is then:

$$ $\displaystyle\epsilon_{\mathcal{T}}(f_{\mathcal{T}},h)$ $\displaystyle=\sum\nolimits_{i=1}^{N}\Bigg{(}\big{|}f_{\mathcal{T}}({\bf x}_{i ,\widehat{a}_{i}}^{\mathcal{T}})-h({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}}) \big{|}\Bigg{)}=\sum\nolimits_{i=1}^{N}\Bigg{(}\Big{|}\langle\theta_{\mathcal{ T}}^{*},\phi_{\mathcal{T}}^{*}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}}) \rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{ \mathcal{T}})\rangle\Big{|}\Bigg{)}.$ $$

###### Definition 3.1 ( Labeling Function and Hypothesis ) .

###### Definition 3.2 ( Estimated Error between Two Hypotheses ) .

###### Definition 3.3 ( Source- and Target-Domain Error ) .

### 3.4 Source Regret and Target Regret

Below define the regret for the source and target domains.

###### Definition 3.4 ( Source Regret ) .

Assuming ${\bf x}_{i,\cdot}^{\mathcal{S}}$ comes from domain $\mathcal{S}$, the source regret (i.e., the regret in the source domain) is

$$ $\displaystyle\mathit{R}_{\mathcal{S}}$ $\displaystyle=\sum\nolimits_{i=1}^{N}\Bigg{(}f_{\mathcal{S}}({\bf x}_{i,a_{i}^ {*}}^{\mathcal{S}})-f_{\mathcal{S}}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}}) \Bigg{)}=\sum\nolimits_{i=1}^{N}\Bigg{(}\langle\theta_{S}^{*},\phi_{\mathcal{S }}^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle-\langle\theta_{\mathcal{S}} ^{*},\phi_{S}^{*}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\Bigg{)}.$ (4) $$

The goal in our cross-domain contextual bandits is to learn a policy of choosing actions $\widehat{a}_{i}$ in the high-cost target domain (e.g., human experiments) by collecting feedback only in the source domain (e.g., mouse experiments). Formally, we would like to minimize the target regret as defined below.

###### Definition 3.5 ( Target Regret and Problem Formulation ) .

Denoting the estimated hypothesis as $\widehat{h}=\left\{\widehat{\phi},\widehat{\theta}\right\}$, the target regret we aim to minimize is defined as

$$ $\displaystyle\mathit{R}_{\mathcal{T}}$ $\displaystyle=\sum\nolimits_{i=1}^{N}\Bigg{(}f_{\mathcal{T}}({\bf x}_{i,a_{i}^ {*}}^{\mathcal{T}})-f_{\mathcal{T}}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}}) \Bigg{)}$ $\displaystyle\mbox{s.t. }\widehat{a}_{i}$ $\displaystyle=\mathop{\rm argmax}_{a}\widehat{h}({\bf x}_{i,a}^{\mathcal{T}})+ \alpha\|\widehat{\phi}({\bf x}_{i,a}^{\mathcal{T}})\|_{[A^{\mathcal{S}}]^{-1}} ,\quad\widehat{h}=\mathop{\rm argmin}_{h}\epsilon_{\mathcal{S}}(h),$ $$

where $A^{\mathcal{S}}=\gamma{\bf I}+\sum\nolimits_{i=1}^{N}[\widehat{\phi}({\bf x}_{
i,\widehat{a}_{i}}^{\mathcal{S}})][\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^
{\mathcal{S}})]^{T}$ denotes the context matrix accumulated by the selected context features in the source domain.

###### Definition 3.4 ( Source Regret ) .

###### Definition 3.5 ( Target Regret and Problem Formulation ) .

### 3.5 Cross-Domain Error Bound for Regression

Prior to introducing our final regret bound, it is necessary to define an additional component. A fundamental challenge in general domain adaptation problems is to manage the divergence between source and target domains. Unfortunately, previous domain adaptation theory only covers *classification* tasks Ben-David et al. (), Zhang et al. (). In contrast, the problem of contextual bandits is essentially a reward *regression* problem.
To address this challenge, we introduce the following new definition to bound the error between the source and target domains.

###### Definition 3.6 ( $\mathcal{H}\Delta\mathcal{H}$ Hypothesis Space for Regression ) .

For a hypothesis space $\mathcal{H}$, the symmetric difference hypothesis space $\mathcal{H}\Delta\mathcal{H}$ is the set of hypotheses s.t.

$$ $\displaystyle g\in\mathcal{H}\Delta\mathcal{H}\quad\iff\quad g(x)=|h({\bf x})- h^{\prime}({\bf x})|.$ $$

We then can further define the Divergence for $\mathcal{H}\Delta\mathcal{H}$ Hypothesis Space:

$$ $\displaystyle\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S},\mathcal{T})$ $\displaystyle=2\enspace\sup_{h,h^{\prime}\in\mathcal{H}}|\mathbb{E}_{x\sim \mathcal{S}}[|h(x)-h^{\prime}(x)|]-\mathbb{E}_{x\sim\mathcal{T}}[|h(x)-h^{ \prime}(x)|]|$ $$

###### Definition 3.7 ( Optimal Hypothesis ) .

The optimal hypothesis, denoted as $h^{*}$, can balance the estimated error for both source and target domain. Formally,

$$ $\displaystyle h^{*}$ $\displaystyle=\mbox{arg}\min_{h\in\mathcal{H}}\enspace\epsilon_{\mathcal{S}}(h )+\epsilon_{\mathcal{T}}(h),$ $$

and we define the minimum estimated error for the optimal hypothesis $h^{*}$ as

$$ $\displaystyle\psi$ $\displaystyle=\epsilon_{\mathcal{S}}(h^{*})+\epsilon_{\mathcal{T}}(h^{*}).$ $$

###### Definition 3.6 ( ℋ ⁢ Δ ⁢ ℋ ℋ Δ ℋ \mathcal{H}\Delta\mathcal{H} caligraphic_H roman_Δ caligraphic_H Hypothesis Space for Regression ) .

###### Definition 3.7 ( Optimal Hypothesis ) .

### 3.6 Final Regret Bound

With all the definitions of source/target regret in Definition 3.4 and Definition 3.5, we can then bound the target regret using Theorem 3.1 below.

###### Theorem 3.1 ( Target Regret Bound ) .

Denoting the contexts from the source domain ${\mathcal{S}}$ as $\{{\bf x}_{t,a}^{\mathcal{S}}\}_{i\in[N],a\in[K]}$, the associated ground-truth action as $\{a_{i}^{*}\}_{i=1}^{N}$, and the contexts from the target domain ${\mathcal{T}}$ as $\{{\bf x}_{t,a}^{\mathcal{T}}\}_{i\in[N],a\in[K]}$, the upper bound for our target regret $R_{{\mathcal{T}}}$ is

$$ $\displaystyle\mathit{R}_{\mathcal{T}}$ $\displaystyle\triangleq\sum_{i=1}^{N}\Bigg{(}\Big{|}\langle\theta_{\mathcal{T} }^{*},\phi_{\mathcal{T}}^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle- \langle\theta_{\mathcal{T}}^{*},\phi_{\mathcal{T}}^{*}({\bf x}_{i,\widehat{a}_ {i}}^{\mathcal{T}})\rangle\Big{|}\Bigg{)}$ $\displaystyle\leq{\color[rgb]{0,0.88,0}\definecolor[named]{pgfstrokecolor}{rgb }{0,0.88,0}\pgfsys@color@cmyk@stroke{0.91}{0}{0.88}{0.12} \pgfsys@color@cmyk@fill{0.91}{0}{0.88}{0.12}\underbrace{\mathit{R}_{\mathcal{S }}}_{Source~{}Regret}}+{\color[rgb]{1,0,0.5}\definecolor[named]{pgfstrokecolor }{rgb}{1,0,0.5}\pgfsys@color@cmyk@stroke{0}{1}{0.50}{0}\pgfsys@color@cmyk@fill {0}{1}{0.50}{0}\underbrace{2\cdot\epsilon_{\mathcal{S}}(h)}_{Regression~{} Error}}+{\color[rgb]{0,0.5,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0.5,1} \pgfsys@color@cmyk@stroke{1}{0.50}{0}{0}\pgfsys@color@cmyk@fill{1}{0.50}{0}{0} \underbrace{N\cdot\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S}, \mathcal{T})}_{Data~{}Divergence}}+{\color[rgb]{0.15,1,0.67}\definecolor[named ]{pgfstrokecolor}{rgb}{0.15,1,0.67}\pgfsys@color@cmyk@stroke{0.85}{0}{0.33}{0} \pgfsys@color@cmyk@fill{0.85}{0}{0.33}{0}\underbrace{\psi+C}_{Constant}}$ $\displaystyle\quad+{\color[rgb]{1,0.58,0}\definecolor[named]{pgfstrokecolor}{ rgb}{1,0.58,0}\pgfsys@color@cmyk@stroke{0}{0.42}{1}{0}\pgfsys@color@cmyk@fill{ 0}{0.42}{1}{0}\underbrace{\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta}, \widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right) +\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\left(\left| \langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S }})\rangle\right|\right)\right)}_{Predicted~{}Rewards}},$ (5) $$

where $\mathit{R}_{\mathcal{S}}$, $\epsilon_{\mathcal{S}}(h)$, and $\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}$ are the source regret, source-domain error, and ${\mathcal{H}\Delta\mathcal{H}}$ divergence defined in Definition 3.4,  Definition 3.3, and Definition 3.6, respectively. $\psi$ is a constant independent to the problem and and $C$ is a constant which can be ignored (see the Appendix for more details) .

Here we provide several observations (for more analysis, please refer to the Appendix):

- (1)
Since $R_{\mathcal{S}}$ is sub-linear w.r.t. the number of samples in the source domain, so is $R_{\mathcal{T}}$.
- (2)
Theorem 3.1 bounds the target regret using the source regret, enabling the exploration of the target domain by only collecting feedback (reward) from the source domain.
- (3)
Typical generalization bounds in DA naively minimize the source regret $R_{{\mathcal{S}}}$ while aligning source and target data in the latent space (i.e., minimizing $\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}$). This is not sufficient, as we need two additional terms, i.e., the regression error $\epsilon_{\mathcal{S}}(h)$ and the predicted reward $\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,
\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)+\mathbbm{1}{[a_{i}^{*}
\neq\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},
\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)\right)$, as regularization terms.
- (4)
Minimizing the regression error $\epsilon_{\mathcal{S}}(h)$ encourages accurate prediction of source rewards.
- (5)
Minimizing the predicted reward $\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,
\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)+\mathbbm{1}{[a_{i}^{*}
\neq\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},
\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)\right)$ regularizes the model to avoid overestimating rewards.

Note that Theorem 3.1 is nontrivial. While it does resemble the generalization bound in domain adaptation, there are key differences. As mentioned in Observation (3) above, our target regret bound includes two additional crucial terms not found in domain adaptation. Specifically:

- •
Regression Error in the Source Domain. $\sum\nolimits_{i=1}^{N}\Bigg{(}\Big{|}\langle\theta_{\mathcal{S}}^{*},\phi_{
\mathcal{S}}^{*}(x_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle-\langle\widehat{
\theta},\widehat{\phi}(x_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\Big{|}\Bigg
{)}$ (i.e., $\epsilon_{\mathcal{S}}(h)$ in Theorem 3.1) defines the difference between the true reward from selecting action $\widehat{a}_{i}$ and the estimated reward for this action.
- •
Predicted Reward. $\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,
\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)+\mathbbm{1}{[a_{i}^{*}
\neq\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},
\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)\right)$ serves as a regularization term to regularize the model to avoid overestimating rewards.

The results of the ablation study in Table 4 in Sec. 5 highlight the significance of these two terms. Details for more analysis are in Appendix G.4.1.

###### Theorem 3.1 ( Target Regret Bound ) .

## 4 Method

With Theorem 3.1, we can then design our DABand algorithm to obtain optimal target regret. We discuss how to translate each term in Eqn. (5) to a differential loss term in Sec. 4.1 and then put them together in Sec. 4.2.

### 4.1 From Theory to Practice: Translating the Bound in Eqn. ( 5 ) to Differentiable Loss Terms

Source Regret.
Inspired by Neural-LinUCB (Xu et al., ), we use LinUCB Li et al. () to update $\widehat{\theta}$ and the following empirical loss function when updating the encoder parameters $\widehat{\phi}$ by back-propagation in round $i$:

$$ $\displaystyle\mathcal{L}_{i}^{\mathit{R}_{\mathcal{S}}}=\sum\nolimits_{a=1}^{K }\left(\widehat{\theta}^{T}\widehat{\phi}({\bf x}_{i,a})-{r}({\bf x}_{i,a}) \right)^{2},$ (6) $$

where $\theta$ is the contextual bandit parameter, and $\widehat{\phi}$ is the encoder shared by the source and target domains, i.e., we set $\widehat{\phi}_{{\mathcal{S}}}=\widehat{\phi}_{{\mathcal{T}}}$ during training.

Insights. From Eqn. (6), a fundamental difference between classification problems and bandit problems becomes apparent. In classification tasks, both the ground-truth label and the estimated label are accessible. However, in bandit problems, we only know the estimated label and reward. If the estimated rewards align with our estimated label’s correctness, it suggests knowledge of the ground-truth label for that feature. If not, we can only deduce that the estimated label is inaccurate, without identifying the correct label among the other candidates. This uncertainty significantly amplifies the complexity of contextual bandit problems.

Figure: Algorithm 1 DABand Training Algorithm

Regression Error. We use $L_{1}$ loss to optimize the regression error, defined as the difference between the true reward from selecting action $\widehat{a}_{i}$ and the estimated reward for this action (see Definition 3.3 for a detailed explanation of this regression error). Minimizing the *regression error* term directly *encourages accurate prediction of source rewards* using $L_{1}$ loss. Specifically, we use

$$ $\displaystyle\mathcal{L}_{i}^{\epsilon_{\mathcal{S}}(h)}=\left|\langle\theta_{ \mathcal{S}}^{*},\phi_{\mathcal{S}}^{*}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{ S}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}} ^{\mathcal{S}})\rangle\right|,$ (7) $$

where $\langle\theta_{\mathcal{S}}^{*},\phi_{\mathcal{S}}^{*}({\bf x}_{i,\widehat{a}_
{i}}^{\mathcal{S}})\rangle$ is the reward received by the agent in the source domain.
Minimizing the regression error term above directly encourages accurate prediction of source rewards.

Data Divergence.
The data divergence term in Eqn. (5) leads to following loss term:

$$ $\displaystyle\mathcal{L}^{div}=\max_{g}N\cdot(\mathbb{E}^{\mathcal{S}}[ \mathcal{L}_{D}(g(\widehat{\phi}({\bf x})),0)]+\mathbb{E}^{\mathcal{T}}[ \mathcal{L}_{D}(g(\widehat{\phi}({\bf x})),1)]),$ $$

where $\mathbb{E}^{\mathcal{S}}$ and $\mathbb{E}^{\mathcal{T}}$ denote expectations over the data distributions of $({\bf x},a)$ in the source and target domains, respectively. $g$ is a discriminator that classifies whether ${\bf x}$ is from the source domain or the target domain. $\mathcal{L}_{D}$ is the binary classification accuracy, where labels 0 0 and $1$ indicate the source and target domains, respectively. In practice, we use the cross-entropy loss as a differentiable surrogate loss.
As in Ganin et al. (), solving the minimax optimization $\min\nolimits_{\widehat{\phi}}\max\nolimits_{g}{\mathcal{L}}^{div}$ is equivalent to aligning source- and target-domain data distributions in the latent (encoding) space induced by the encoder $\widehat{\phi}$.

Predicted Reward.
The predicted reward term in Eqn. (5), i.e., $\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,
\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)+\mathbbm{1}{[a_{i}^{*}
\neq\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},
\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)\right)$, can be translated to the loss term $\sum\nolimits_{i=1}^{N}\mathcal{L}_{i}^{reg}$, where for each round $i$ we have

$$ $\displaystyle\mathcal{L}_{i}^{reg}=\left|\langle\widehat{\theta},\widehat{\phi }({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|+\mathbbm{1}{[a_{i}^ {*}\neq\widehat{a}_{i}]}\left(\left|\langle\widehat{\theta},\widehat{\phi}({ \bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right).$ (8) $$

Minimizing the predicted reward $\mathcal{L}_{i}^{reg}$ regularizes the model to avoid overestimating rewards.

Constant Term.
In Eqn. (5), $\psi+C$ is the constant term, where $\psi$ is defined in Definition 3.7, and $C$ contains some small constants which can be ignored (see the Appendix for more details).

### 4.2 Putting Everything Together: DABand Training Algorithm

Putting all non-constant loss terms above together, we have the final minimax optimization problem

$$ $\displaystyle\min\nolimits_{\widehat{\phi}}\max\nolimits_{g}\mathcal{L}^{ DABand},$ (9) $$

where the value function (objective function):

$$ $\displaystyle{\mathcal{L}}^{DABand}=\sum\nolimits_{i=1}^{N}(\mathcal{L}_{i}^{ \mathit{R}_{\mathcal{S}}}+2\cdot\mathcal{L}_{i}^{\epsilon_{\mathcal{S}}(h)}+ \mathcal{L}_{i}^{reg})+\lambda\cdot\mathcal{L}_{i}^{div}.$ (10) $$

Note that we need to alternate between updating $\widehat{\theta}$ using LinUCB Li et al. () and updating the encoder $\widehat{\phi}$ with the discriminator $g$ in Eqn. (9).

Formally, our method, described in Alg. 1, operates as follows: In each iteration, we access the context in the original feature space (i.e., $\mathbb{R}^{d}$) for each action from both source and target domains, denoted as $\left\{x_{i,a}^{\mathcal{S}}\right\}_{a\in[K]}$ and $\left\{x_{i,a}^{\mathcal{T}}\right\}_{a\in[K]}$ respectively. Subsequently, we compute the latent representation using the encoder $\phi(\cdot)$ and select the action $\widehat{a}_{i}$ for iteration $i$ based on the LinUCB selection rule. The bandit parameters (i.e., $\theta,A,b$) are updated in each iteration. The weights in $\phi$ are updated every episode of length $H$ (i.e., a batch with $H$ past iterations) using our objective function in Eqn. (9), following the same rule as in Neural-LinUCB (Xu et al., ).

## 5 Experiments

In this section, we compare DABand with existing methods on real-world datasets.

Datasets.
To demonstrate the effectiveness of our DABand,
We evaluate our methods in terms of prediction accuracy and zero-shot target regret on three datasets, i.e., DIGIT (Ganin et al., ), VisDA17 (Peng et al., ), and S2RDA49 (Tang & Jia, ). See details for each dataset in Appendix B.

Baselines. We compare our DABand with both classic and state-of-the-art contextual bandit algorithms, including LinUCB (Li et al., ), LinUCB with principle component analysis (PCA) pre-processing (i.e., LinUCB-P), Neural-LinUCB (Xu et al., ) (NLinUCB), and Neural-LinUCB variant that incorporates PCA (i.e., NLinUCB-P). Details for each baselines and discussion are in Appendix C.
Note that domain adaptation baselines are not applicable to our setting because it only works in offline settings and assumes complete observability of labels in the source domain (see Appendix C for details).

**Table 1: Accuracy on the target domain for the DIGIT dataset. Note that in this zero-shot target regret setting, the accuracy $ACC=1-\tfrac{1}{N}R_{{\mathcal{T}}}$, where $R_{{\mathcal{T}}}$ is the target regret.**
| Metrics | Acc Per Class $\uparrow$ | Acc $\uparrow$ |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Test Accuracy | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Average |
| LinUCB (Li et al., ) | 0.3667$\pm$0.03 | 0.4045$\pm$0.02 | 0.5102$\pm$0.03 | 0.3811$\pm$0.01 | 0.3157$\pm$0.04 | 0.3445$\pm$0.01 | 0.4229$\pm$0.03 | 0.4595$\pm$0.03 | 0.3489$\pm$0.02 | 0.2449$\pm$0.01 | 0.3808$\pm$0.02 |
| LinUCB-P (Li et al., ) | 0.3645$\pm$0.02 | 0.6398$\pm$0.04 | 0.3151$\pm$0.02 | 0.2709$\pm$0.03 | 0.2258$\pm$0.01 | 0.1995$\pm$0.02 | 0.1752$\pm$0.01 | 0.3786$\pm$0.04 | 0.1273$\pm$0.02 | 0.2992$\pm$0.03 | 0.3060$\pm$0.02 |
| NLinUCB (Xu et al., ) | 0.3781$\pm$0.04 | 0.3228$\pm$0.03 | 0.3569$\pm$0.03 | 0.3381$\pm$0.04 | 0.3663$\pm$0.04 | 0.4312$\pm$0.05 | 0.4766$\pm$0.05 | 0.4004$\pm$0.05 | 0.4034$\pm$0.02 | 0.3613$\pm$0.03 | 0.3816$\pm$0.04 |
| NLinUCB-P (Xu et al., ) | 0.8588$\pm$0.03 | 0.2224$\pm$0.02 | 0.3880$\pm$0.03 | 0.3029$\pm$0.02 | 0.2978$\pm$0.03 | 0.0000$\pm$0.01 | 0.1869$\pm$0.02 | 0.2243$\pm$0.01 | 0.2148$\pm$0.01 | 0.0000$\pm$0.00 | 0.2706$\pm$0.02 |
| DABand (Ours) | 0.6891$\pm$0.10 | 0.6662$\pm$0.03 | 0.6188$\pm$0.01 | 0.5703$\pm$0.05 | 0.6008$\pm$0.05 | 0.5534$\pm$0.03 | 0.6010$\pm$0.02 | 0.5709$\pm$0.01 | 0.6266$\pm$0.04 | 0.5023$\pm$0.02 | 0.6002$\pm$0.02 |
| Ours vs. NLinUCB | +0.3110 | +0.3434 | +0.2619 | +0.2322 | +0.2345 | +0.1222 | +0.1244 | +0.1705 | +0.2232 | +0.1410 | +0.2186 |

**Table 2: Accuracy on the target domain for the VisDA17 dataset. Note that in this zero-shot target regret setting, the accuracy $ACC=1-\tfrac{1}{N}R_{{\mathcal{T}}}$, where $R_{{\mathcal{T}}}$ is the target regret.**
| Metrics | Acc Per Class $\uparrow$ | Acc $\uparrow$ |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Test Accuracy | aeroplane | bicycle | bus | car | horse | knife | motorcycle | person | plant | skateboard | train | truck | Average |
| LinUCB (Li et al., ) | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| LinUCB-P (Li et al., ) | 0.0510$\pm$0.02 | 0.0190$\pm$0.00 | 0.1360$\pm$0.05 | 0.0440$\pm$0.02 | 0.0390$\pm$0.01 | 0.5580$\pm$0.06 | 0.0410$\pm$0.02 | 0.2050$\pm$0.05 | 0.0850$\pm$0.04 | 0.0920$\pm$0.13 | 0.0580$\pm$0.02 | 0.0460$\pm$0.12 | 0.1145$\pm$0.06 |
| NLinUCB (Xu et al., ) | 0.2870$\pm$0.03 | 0.0220$\pm$0.02 | 0.0000$\pm$0.00 | 0.1250$\pm$0.02 | 0.0000$\pm$0.00 | 0.0130$\pm$0.02 | 0.0470$\pm$0.02 | 0.0000$\pm$0.00 | 0.0460$\pm$0.02 | 0.0050$\pm$0.00 | 0.6550$\pm$0.04 | 0.0000$\pm$0.00 | 0.1001$\pm$0.02 |
| NLinUCB-P (Xu et al., ) | 0.0060$\pm$0.01 | 0.0020$\pm$0.01 | 0.9222$\pm$0.02 | 0.0010$\pm$0.00 | 0.0080$\pm$0.01 | 0.0990$\pm$0.03 | 0.0030$\pm$0.00 | 0.0020$\pm$0.00 | 0.0180$\pm$0.02 | 0.0420$\pm$0.01 | 0.0000$\pm$0.00 | 0.0150$\pm$0.01 | 0.0932$\pm$0.01 |
| DABand (Ours) | 0.5504$\pm$0.02 | 0.3562$\pm$0.04 | 0.4462$\pm$0.02 | 0.3844$\pm$0.01 | 0.5582$\pm$0.04 | 0.2632$\pm$0.03 | 0.6474$\pm$0.03 | 0.2396$\pm$0.03 | 0.4882$\pm$0.04 | 0.4062$\pm$0.02 | 0.7685$\pm$0.05 | 0.1968$\pm$0.02 | 0.4644$\pm$0.03 |
| Ours vs. NLinUCB | +0.2634 | +0.3342 | +0.4462 | +0.2594 | +0.5582 | +0.2502 | +0.6004 | +0.2396 | +0.4422 | +0.4012 | +0.1135 | +0.1968 | +0.3643 |

Zero-Shot Target Regret (Accuracy).
We evaluate different methods on the zero-shot target regret setting in Definition 3.5, where all methods can only collect feedback from the source domain, but not the target domain.
In this setting, accuracy is equal to $1$ minus the average target regret, i.e., $ACC=1-\tfrac{1}{N}R_{{\mathcal{T}}}$, where $R_{{\mathcal{T}}}$ is defined in Eqn. (2) and Definition 3.5. Therefore higher accuracy indicates lower target regret and better performance.

We report the per-class accuracy and average accuracy of different methods in Table 1, Table 2 and Table 3 for DIGIT, VisDA17 and S2RDA49, respectively.
Our DABand demonstrates favorable performance against NLinUCB, a leading contextual bandit algorithm with representation learning. Despite NLinUCB’s superior representation learning capabilities through neural networks (NN) over LinUCB – yielding impressive performance in single-domain applications – its efficacy in cross-domain tasks is heavily contingent on the disparity between the source and target domains. Typically, the strengths of NN, which include enhanced representation learning (feature extraction), may inadvertently amplify this domain divergence, potentially leading to overfitting on the source domain. Conversely, our DABand algorithm not only improves accuracy but also adeptly addresses the challenges posed by domain divergence. Note that LinUCB encounters an out-of-memory issue due to the high-dimensionality of the data in VisDA17 and S2RDA49, marked as “N/A” in Table 2 and Table 3, respectively.

**Table 3: Accuracy on the target domain for the S2RDA49 dataset. Note that in this zero-shot target regret setting, the accuracy $ACC=1-\tfrac{1}{N}R_{{\mathcal{T}}}$, where $R_{{\mathcal{T}}}$ is the target regret.**
| Metrics | Acc Per Class $\uparrow$ | Acc $\uparrow$ |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Test Accuracy | aeroplane | bicycle | bus | car | knife | motorcycle | plant | skateboard | train | truck | Average |
| LinUCB (Li et al., ) | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| LinUCB-P (Li et al., ) | 0.1430$\pm$0.02 | 0.2600$\pm$0.03 | 0.0810$\pm$0.01 | 0.0240$\pm$0.01 | 0.1070$\pm$0.02 | 0.0570$\pm$0.01 | 0.1060$\pm$0.01 | 0.0390$\pm$0.01 | 0.0960$\pm$0.02 | 0.1260$\pm$0.03 | 0.1039$\pm$0.02 |
| NLinUCB (Xu et al., ) | 0.0350$\pm$0.00 | 0.1210$\pm$0.02 | 0.0510$\pm$0.01 | 0.0870$\pm$0.02 | 0.0270$\pm$0.00 | 0.0240$\pm$0.01 | 0.2720$\pm$0.04 | 0.0090$\pm$0.00 | 0.1730$\pm$0.02 | 0.0309$\pm$0.01 | 0.1108$\pm$0.02 |
| NLinUCB-P (Xu et al., ) | 0.0000$\pm$0.00 | 0.0000$\pm$0.00 | 0.0000$\pm$0.00 | 0.2990$\pm$0.03 | 0.7000$\pm$0.02 | 0.0000$\pm$0.00 | 0.0000$\pm$0.00 | 0.0000$\pm$0.00 | 0.0000$\pm$0.00 | 0.1160$\pm$0.01 | 0.1115$\pm$0.01 |
| DABand (Ours) | 0.5501$\pm$0.03 | 0.6418$\pm$0.03 | 0.5844$\pm$0.03 | 0.2346$\pm$0.01 | 0.0410$\pm$0.01 | 0.7580$\pm$0.04 | 0.5689$\pm$0.04 | 0.1345$\pm$0.02 | 0.1118$\pm$0.02 | 0.3126$\pm$0.02 | 0.3923$\pm$0.03 |
| Ours vs. NLinUCB | +0.5151 | +0.5208 | +0.5334 | +0.1476 | +0.0140 | +0.7340 | +0.2969 | +0.1255 | -0.0612 | +0.2817 | +0.2815 |

Figure: Figure 1: The cumulative regrets of different methods for 1,920 rounds on DIGIT (left), VisDA17 (middle), and S2RDA49 (right). Results are averaged over 5 runs. LinUCB is not reported for VisDA17 and S2RDA49 due to out-of-memory issues.
Refer to caption: x1.png

Continued Training in Target Domains and Cumulative Regret.
Besides zero-shot target regret, we also evaluate how different methods perform when one continues their training in the high-cost target domain and starts to collect feedback (reward) after the model is trained in the source domain. A good cross-domain bandit model can provide a head-start in this setting, therefore enjoying significantly lower cumulative regret in the target domain and saving substantial cost in collecting feedback in the high-cost target domain.

Fig. 1 shows the cumulative regrets of different methods on DIGIT, VisDA17 and S2RDA49, respectively. We show results averaged over five runs with different random seeds. Our DABand consistently surpasses all baselines for all rounds in terms of both cumulative regrets and their increase rates, demonstrating DABand’s potential to significantly reduce the cost in high-cost target domains.

**Table 4: Results of the ablation study in terms of accuracy (higher is better). Note that the accuracy $ACC=1-\tfrac{1}{N}R_{{\mathcal{T}}}$, where $R_{{\mathcal{T}}}$ is the target regret. “R” and “P” is short for “Regression Error” and “Predicted Reward”, respectively.**
| Datasets | w/o R $\&$ P | w/o R | w/o P | DABand (Full) |
| --- | --- | --- | --- | --- |
| DIGIT | 0.5676 | 0.5682 | 0.5768 | 0.6002 |
| VisDA17 | 0.4088 | 0.4096 | 0.4304 | 0.4644 |
| S2RDA49 | 0.3691 | 0.3694 | 0.3719 | 0.3923 |

Ablation Study.
To verify the effectiveness of each term in our DABand’s regret bound (Theorem 3.1, we report the accuracy of our proposed DABand after removing the Regression Error term and/or the Predicted Reward term (during training) in Table 4 for DIGIT, VisDA17 and S2RDA49. Results on all datasets show that removing either term will lead to performance drop. For example, in VisDA17, our full DABand achieves accuracy of $0.4642$; the accuracy drops to $0.4238$ after removing the Regression Error (R) term, and further drops to $0.4088$ after removing the Predicted Reward (P) term. These results verify the effectiveness of these two terms in our DABand.

## 6 Conclusion

In this paper, we introduce a novel domain adaptive neural contextual bandit algorithm, DABand, which adeptly combines effective exploration with representation alignment, utilizing unlabeled data from both source and target domains. Our theoretical analysis demonstrates that DABand can attain a sub-linear regret bound within the target domain. This marks the first regret analysis for domain adaptation in contextual bandit problems incorporating deep representation, shallow exploration, and adversarial alignment. We show that all these elements are instrumental in the domain adaptive bandit setting on real-world datasets.
Moving forward, interesting future research could be to uncover more innovative techniques for aligning the source and target domains (mentioned in Appendix F), particularly within the constraints of: (1) bandit settings, as opposed to classification settings, and (2) the high-dimensional and dense nature of the target domain, contrasted with the sparse and simplistic nature of the source domain.

## Appendix A Proofs

### A.1 Proofs for Lemmas

###### Lemma A.1 .

For any hypotheses $h,h^{\prime}\in\mathcal{H}$ and $a\in\mathcal{A}$ is selected by either $h$ or $h^{\prime}$,

$$ $\displaystyle|\epsilon_{\mathcal{S}}(h,h^{\prime})-\epsilon_{\mathcal{T}}(h,h^ {\prime})|\leq\dfrac{N}{2}\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{ S},\mathcal{T}).$ $$

###### Proof.

By definition of $\mathcal{H}\Delta\mathcal{H}$ (as defined in Def. 3.6), we have

$$ $\displaystyle\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S},\mathcal{T})$ $\displaystyle\stackrel{{\scriptstyle\mbox{Def.~{}\ref{def:h_delta_h}}}}{{=}}$ $\displaystyle 2\enspace\sup_{h,h^{\prime}\in\mathcal{H}}|\mathbb{E}_{{\bf x} \sim\mathcal{S}}[|h({\bf x})-h^{\prime}({\bf x})|]-\mathbb{E}_{{\bf x}\sim \mathcal{T}}[|h({\bf x})-h^{\prime}({\bf x})|]|$ $\displaystyle=$ $\displaystyle\dfrac{2}{N}\enspace\sup_{h,h^{\prime}\in\mathcal{H}}\Big{|}N \cdot\mathbb{E}_{{\bf x}\sim\mathcal{S}}[|h({\bf x})-h^{\prime}({\bf x})|]-N \cdot\mathbb{E}_{{\bf x}\sim\mathcal{T}}[|h({\bf x})-h^{\prime}({\bf x})|]\Big {|}$ $\displaystyle\stackrel{{\scriptstyle\mbox{Def.~{}\ref{def: Train_error}}}}{{=}}$ $\displaystyle\dfrac{2}{N}\enspace\sup_{h,h^{\prime}\in\mathcal{H}}\Big{|} \epsilon_{\mathcal{S}}(h,h^{\prime})-\epsilon_{\mathcal{T}}(h,h^{\prime})\Big{|}$ $\displaystyle\geq$ $\displaystyle\dfrac{2}{N}\enspace\Big{|}\epsilon_{\mathcal{S}}(h,h^{\prime})- \epsilon_{\mathcal{T}}(h,h^{\prime})\Big{|}.$ $$

∎

###### Lemma A.2 .

Given three hypotheses $h_{1},h_{2},h_{3}\in\mathcal{H}$, we have the following triangle inequality:

$$ $\displaystyle\epsilon_{\mathcal{D}}(h_{1},h_{2})\leq\epsilon_{\mathcal{D}}(h_{ 1},h_{3})+\epsilon_{\mathcal{D}}(h_{2},h_{3}).$ (11) $$

###### Proof.

The hypothesis difference

$$ $\displaystyle\epsilon_{\mathcal{D}}(h_{1},h_{2})$ $\displaystyle=$ $\displaystyle\sum\nolimits_{i=1}^{N}\bigg{|}h_{1}(x^{\mathcal{D}})-h_{2}(x^{ \mathcal{D}})\bigg{|}$ $\displaystyle\stackrel{{\scriptstyle\mbox{Def.~{}\ref{def:err_2_model}}}}{{=}}$ $\displaystyle\sum\nolimits_{i=1}^{N}\bigg{|}h_{1}(x^{\mathcal{D}})-h_{2}(x^{ \mathcal{D}})+h_{3}(x^{\mathcal{D}})-h_{3}(x^{\mathcal{D}})\bigg{|}$ $\displaystyle\leq$ $\displaystyle\sum\nolimits_{i=1}^{N}\bigg{|}h_{1}(x^{\mathcal{D}})-h_{3}(x^{ \mathcal{D}})\bigg{|}+\sum\nolimits_{i=1}^{N}\bigg{|}h_{3}(x^{\mathcal{D}})-h_ {2}(x^{\mathcal{D}})\bigg{|}$ $\displaystyle=$ $\displaystyle\epsilon_{S}(h_{1},h_{3})+\epsilon_{S}(h_{2},h_{3}).$ $$

∎

###### Lemma A.3 .

Let $\mathcal{H}$ be a hypothesis space. Then for every $h\in\mathcal{H}$:

$$ $\displaystyle\epsilon_{\mathcal{T}}(h)\leq\epsilon_{\mathcal{S}}(h)+\dfrac{N}{ 2}\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S},\mathcal{T})+\psi,$ (12) $$

where $\psi$ is defined in Definition 3.7.

###### Proof.

By definition in Definition 3.3 in main paper, we start from $\epsilon_{\mathcal{T}}(h)=\epsilon_{\mathcal{T}}(h,f_{\mathcal{T}})$, then we have

$$ $\displaystyle\epsilon_{\mathcal{T}}(h)$ $\displaystyle=$ $\displaystyle\epsilon_{\mathcal{T}}(f_{\mathcal{T}},h)$ $\displaystyle\stackrel{{\scriptstyle\mbox{Lm.~{}\ref{lemma:A2}}}}{{\leq}}$ $\displaystyle\epsilon_{\mathcal{T}}(f_{\mathcal{T}},h^{*})+\epsilon_{\mathcal{ T}}(h,h^{*})$ $\displaystyle\leq$ $\displaystyle\epsilon_{\mathcal{T}}(h^{*})+\epsilon_{\mathcal{S}}(h,h^{*})+| \epsilon_{\mathcal{T}}(h,h^{*})-\epsilon_{\mathcal{S}}(h,h^{*})|$ $\displaystyle\stackrel{{\scriptstyle\mbox{Lm.~{}\ref{lemma:A1}}}}{{\leq}}$ $\displaystyle\epsilon_{\mathcal{T}}(h^{*})+\epsilon_{\mathcal{S}}(h,h^{*})+ \dfrac{N}{2}\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S},\mathcal{T})$ $\displaystyle\leq$ $\displaystyle\epsilon_{\mathcal{T}}(h^{*})+\epsilon_{\mathcal{S}}(h)+\epsilon_ {\mathcal{S}}(h^{*})+\dfrac{N}{2}\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}( \mathcal{S},\mathcal{T})$ $\displaystyle=$ $\displaystyle\epsilon_{\mathcal{S}}(h)+\psi+\dfrac{N}{2}\widehat{d}_{\mathcal{ H}\Delta\mathcal{H}}(\mathcal{S},\mathcal{T}).$ $$

∎

###### Lemma A.4 .

Denoting the contexts from the target domain ${\mathcal{T}}$ as $\{{\bf x}_{t,a}^{\mathcal{T}}\}_{i\in[N],a\in[K]}$ and the associated ground-truth action as $\{a_{i}^{*}\}_{i=1}^{N}$, the estimated regret (i.e., using the trained model $\widehat{\theta}$ from the source domain) for the target domain is

$$ $\displaystyle\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}( {\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{ \phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)$ $\displaystyle\leq\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{ \phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)+\sum^{N} _{i=1}\alpha\cdot\kappa_{i}^{\mathcal{T}},$ $$

where $\kappa_{i}^{\mathcal{T}}$ is $\max\left\{2\left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})
\right\|_{A_{i-1}^{-1}},\left\|\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{
T}})\right\|_{A_{i-1}^{-1}}+\left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^
{\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right\}$.

###### Proof.

By definition, we have

$$ $\displaystyle\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}( {\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{ \phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)$ $\displaystyle=\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi} ({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{ \phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle+\alpha\left\|\widehat{ \phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}-\alpha \left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\right\|_{A_{i -1}^{-1}}+\alpha\left\|\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}}) \right\|_{A_{i-1}^{-1}}-\alpha\left\|\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{ \mathcal{T}})\right\|_{A_{i-1}^{-1}}\right|\right)$ $\displaystyle=\sum^{N}_{i=1}\left(\left|\left(\langle\widehat{\theta},\widehat {\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle+\alpha\left\|\widehat{\phi} ({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right)-\left( \langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T }})\rangle+\alpha\left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T }})\right\|_{A_{i-1}^{-1}}\right)\right|\right)$ $\displaystyle\quad+\sum^{N}_{i=1}\alpha\left(\left|\left\|\widehat{\phi}({\bf x }_{i,\widehat{a}_{i}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}-\left\|\widehat{ \phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right|\right)$ $\displaystyle\leq\sum^{N}_{i=1}\left(\left|\left(\langle\widehat{\theta}, \widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle+\alpha\left\| \widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}} \right)-\left(\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i }}^{\mathcal{T}})\rangle+\alpha\left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i }}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right)\right|\right)$ $\displaystyle\quad+\sum^{N}_{i=1}\alpha\max\left\{\left\|\widehat{\phi}({\bf x }_{i,\widehat{a}_{i}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}},\left\|\widehat{ \phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right\}$ (13) $\displaystyle\leq\sum^{N}_{i=1}\left(\left|\left(\langle\widehat{\theta}, \widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle+\alpha\left\| \widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1 }}\right)\right|\right)+\sum^{N}_{i=1}\alpha\max\left\{\left\|\widehat{\phi}({ \bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}},\left\| \widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right\}$ (14) $\displaystyle\leq\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{ \phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)+\sum^{N} _{i=1}\alpha\cdot\max\left\{2\left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}} ^{\mathcal{T}})\right\|_{A_{i-1}^{-1}},\left\|\widehat{\phi}({\bf x}_{i,a_{i}^ {*}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}+\left\|\widehat{\phi}({\bf x}_{i, \widehat{a}_{i}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right\}$ $\displaystyle\coloneq\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta}, \widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right) +\sum^{N}_{i=1}\alpha\cdot\kappa_{i}^{\mathcal{T}},$ (15) $$

where the inequality in Eqn. (13) is based on the fact that for any $a,b>0$, $\left|a-b\right|\leq\max\{a,b\}$. The inequality in Eqn. (14) is derived from the definition of $\widehat{a}_{i}$, since $\widehat{a}_{i}$ is selected from the maximum value of $\left(\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a}^{\mathcal{T}})
\rangle+\alpha\left\|\widehat{\phi}({\bf x}_{i,a}^{\mathcal{T}})\right\|_{A_{i
-1}^{-1}}\right)$, therefore we guarantee that $\left(\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{
\mathcal{T}})\rangle+\alpha\left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{
\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right)\geq\left(\langle\widehat{\theta},
\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle+\alpha\left\|
\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right)$. In addition,  Eqn. (15) holds by definition as we define $\kappa_{i}^{\mathcal{T}}$ as $\max\left\{2\left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})
\right\|_{A_{i-1}^{-1}},\left\|\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{
T}})\right\|_{A_{i-1}^{-1}}+\left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^
{\mathcal{T}})\right\|_{A_{i-1}^{-1}}\right\}$.
∎

Next, we discuss the property of $\kappa_{i}^{\mathcal{T}}$ in the following lemma.

###### Lemma A.5 .

For any arbitrary domain $\mathcal{D}$, we denote

$\kappa_{i}^{\mathcal{D}}=\max\left\{2\left\|\widehat{\phi}({\bf x}_{i,\widehat
{a}_{i}}^{\mathcal{D}})\right\|_{A_{i-1}^{-1}},\left\|\widehat{\phi}({\bf x}_{
i,a_{i}^{*}}^{\mathcal{D}})\right\|_{A_{i-1}^{-1}}+\left\|\widehat{\phi}({\bf x
}_{i,\widehat{a}_{i}}^{\mathcal{D}})\right\|_{A_{i-1}^{-1}}\right\}$. Then, by our DABand algorithm, as the time step $i\to\infty$, we have $\kappa_{i}^{\mathcal{D}}\to 0$.

###### Proof.

By definition of $A$, its singular value increase as $i$ increase, which means that the singular values in its inverse matrix, $A^{-1}$, will decrease to 0 0. Therefore, for any new array $u$, $||u||_{A^{-1}}=\sqrt{uA^{-1}u^{T}}\to 0$. Then when $i\to\infty$, we have

$$ $\displaystyle\lim_{i\to\infty}\kappa_{i}^{\mathcal{D}}$ $\displaystyle=\max\left\{2\left\|\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{ \mathcal{D}})\right\|_{A_{i-1}^{-1}},\left\|\widehat{\phi}({\bf x}_{i,a_{i}^{* }}^{\mathcal{D}})\right\|_{A_{i-1}^{-1}}+\left\|\widehat{\phi}({\bf x}_{i, \widehat{a}_{i}}^{\mathcal{D}})\right\|_{A_{i-1}^{-1}}\right\}$ $\displaystyle\approx 0.$ $$

∎

###### Lemma A.6 .

Denoting the contexts from the source domain ${\mathcal{S}}$ as $\{{\bf x}_{t,a}^{\mathcal{S}}\}_{i\in[N],a\in[K]}$, the associated ground-truth action as $\{a_{i}^{*}\}_{i=1}^{N}$, we have the following inequality:

$$ $\displaystyle\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}( {\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle-\langle\theta^{*},\phi^{*}({\bf x} _{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)\leq\epsilon_{\mathcal {S}}(h)+\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\left( \left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{ \mathcal{S}})\rangle\right|\right)+\sum^{N}_{i=1}\alpha\cdot\kappa_{i}^{ \mathcal{S}}\right),$ $$

where $\kappa_{i}^{\mathcal{S}}$ is defined in Lemma A.5.

###### Proof.

By definition, we have

$$ $\displaystyle\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}( {\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle-\langle\theta^{*},\phi^{*}({\bf x} _{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)$ $\displaystyle=$ $\displaystyle\sum^{N}_{i=1}\left[\mathbbm{1}{[a_{i}^{*}=\widehat{a}_{i}]}\left (\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{ S}})\rangle-\langle\theta^{*},\phi^{*}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S }})\rangle\right|\right)+\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{i}]}\left( \left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S }})\rangle-\langle\theta^{*},\phi^{*}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S} })\rangle\right|\right)\right]$ $\displaystyle\leq$ $\displaystyle\sum^{N}_{i=1}\left[\mathbbm{1}{[a_{i}^{*}=\widehat{a}_{i}]}\left (\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{ \mathcal{S}})\rangle-1\right|\right)+\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{i} ]}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{ \mathcal{S}})\rangle-0\right|\right)\right]$ $\displaystyle\leq$ $\displaystyle\sum^{N}_{i=1}\left[\mathbbm{1}{[a_{i}^{*}=\widehat{a}_{i}]}\left (\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{ \mathcal{S}})\rangle-1\right|\right)+\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{i} ]}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{ \mathcal{S}})\rangle+\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i, \widehat{a}_{i}}^{\mathcal{S}})\rangle-\langle\widehat{\theta},\widehat{\phi}( {\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)\right]$ $\displaystyle\leq$ $\displaystyle\sum^{N}_{i=1}\left[\mathbbm{1}{[a_{i}^{*}=\widehat{a}_{i}]}\left (\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{ \mathcal{S}})\rangle-1\right|\right)+\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{i} ]}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i }}^{\mathcal{S}})\rangle-0\right|\right)+\mathbbm{1}{[a_{i}^{*}\neq\widehat{a} _{i}]}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}} ^{\mathcal{S}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i, \widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)\right]$ $\displaystyle\stackrel{{\scriptstyle\mbox{L.m.~{}\ref{lemma:A3}}}}{{\leq}}$ $\displaystyle\sum_{i=1}^{N}\left(\left|\langle\theta_{\mathcal{S}}^{*},\phi_{ \mathcal{S}}^{*}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle-\langle \widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}}) \rangle\right|\right)+\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{i}]}\left(\sum^{N }_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{ a}_{i}}^{\mathcal{S}})\rangle\right|\right)+\sum^{N}_{i=1}\alpha\cdot\kappa_{i }^{\mathcal{S}}\right)$ $\displaystyle\equiv$ $\displaystyle\epsilon_{\mathcal{S}}(h)+\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{ i}]}\left(\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({ \bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)+\sum^{N}_{i=1} \alpha\cdot\kappa_{i}^{\mathcal{S}}\right),$ $$

∎

###### Lemma A.1 .

###### Proof.

###### Lemma A.2 .

###### Proof.

###### Lemma A.3 .

###### Proof.

###### Lemma A.4 .

###### Proof.

###### Lemma A.5 .

###### Proof.

###### Lemma A.6 .

###### Proof.

### A.2 Proof for the Target Regret Bound

###### Theorem A.1 ( Target Regret Bound ) .

Denoting the contexts from the source domain ${\mathcal{S}}$ as $\{{\bf x}_{t,a}^{\mathcal{S}}\}_{i\in[N],a\in[K]}$, the associated ground-truth action as $\{a_{i}^{*}\}_{i=1}^{N}$, and the contexts from the target domain ${\mathcal{T}}$ as $\{{\bf x}_{t,a}^{\mathcal{T}}\}_{i\in[N],a\in[K]}$, the upper bound for our target regret $R_{{\mathcal{T}}}$ is

$$ $\displaystyle\mathit{R}_{\mathcal{T}}$ $\displaystyle\triangleq\sum_{i=1}^{N}\Bigg{(}\Big{|}\langle\theta_{\mathcal{T} }^{*},\phi_{\mathcal{T}}^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle- \langle\theta_{\mathcal{T}}^{*},\phi_{\mathcal{T}}^{*}({\bf x}_{i,\widehat{a}_ {i}}^{\mathcal{T}})\rangle\Big{|}\Bigg{)}$ $\displaystyle\leq{\color[rgb]{0,0.88,0}\definecolor[named]{pgfstrokecolor}{rgb }{0,0.88,0}\pgfsys@color@cmyk@stroke{0.91}{0}{0.88}{0.12} \pgfsys@color@cmyk@fill{0.91}{0}{0.88}{0.12}\underbrace{\mathit{R}_{\mathcal{S }}}_{Source~{}Regret}}+{\color[rgb]{1,0,0.5}\definecolor[named]{pgfstrokecolor }{rgb}{1,0,0.5}\pgfsys@color@cmyk@stroke{0}{1}{0.50}{0}\pgfsys@color@cmyk@fill {0}{1}{0.50}{0}\underbrace{2\cdot\epsilon_{\mathcal{S}}(h)}_{Regression~{} Error}}+{\color[rgb]{0,0.5,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0.5,1} \pgfsys@color@cmyk@stroke{1}{0.50}{0}{0}\pgfsys@color@cmyk@fill{1}{0.50}{0}{0} \underbrace{N\cdot\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S}, \mathcal{T})}_{Data~{}Divergence}}+{\color[rgb]{0.15,1,0.67}\definecolor[named ]{pgfstrokecolor}{rgb}{0.15,1,0.67}\pgfsys@color@cmyk@stroke{0.85}{0}{0.33}{0} \pgfsys@color@cmyk@fill{0.85}{0}{0.33}{0}\underbrace{\psi+C}_{Constant}}$ $\displaystyle\quad+{\color[rgb]{1,0.58,0}\definecolor[named]{pgfstrokecolor}{ rgb}{1,0.58,0}\pgfsys@color@cmyk@stroke{0}{0.42}{1}{0}\pgfsys@color@cmyk@fill{ 0}{0.42}{1}{0}\underbrace{\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta}, \widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right) +\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\left(\left| \langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S }})\rangle\right|\right)\right)}_{Predicted~{}Rewards}},$ (16) $$

where $\mathit{R}_{\mathcal{S}}$, $\epsilon_{\mathcal{S}}(h)$, and $\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}$ are the source regret, source-domain error, and ${\mathcal{H}\Delta\mathcal{H}}$ divergence defined in Definition 3.4,  Definition 3.3, and Definition 3.6, respectively. $\psi$ is a constant independent to the problem and and $C$ is a constant which can be ignored.

###### Proof.

Please check the full proof in the next page.

By the definition of the Target Regret Bound, we have

$$ $\displaystyle\mathit{R}_{\mathcal{T}}$ $\displaystyle=$ $\displaystyle\sum^{N}_{i=1}\left(\left|\langle\theta^{*},\phi^{*}({\bf x}_{i,a _{i}^{*}}^{\mathcal{T}})\rangle-\langle\theta^{*},\phi^{*}({\bf x}_{i,\widehat {a}_{i}}^{\mathcal{T}})\rangle\right|\right)$ $\displaystyle=$ $\displaystyle\sum^{N}_{i=1}\left(\left|\langle\theta^{*},\phi^{*}({\bf x}_{i,a _{i}^{*}}^{\mathcal{T}})\rangle-\langle\theta^{*},\phi^{*}({\bf x}_{i,\widehat {a}_{i}}^{\mathcal{T}})\rangle+\langle\widehat{\theta},\widehat{\phi}({\bf x}_ {i,\widehat{a}_{i}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{ \phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)$ $\displaystyle\leq$ $\displaystyle\sum^{N}_{i=1}\left(\left|\langle\theta^{*},\phi^{*}({\bf x}_{i, \widehat{a}_{i}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{\phi}( {\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)+\sum^{N}_{i=1} \left(\left|\langle\theta^{*},\phi^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}}) \rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{ \mathcal{T}})\rangle\right|\right)$ $\displaystyle\leq$ $\displaystyle{\color[rgb]{0.15,1,0.67}\definecolor[named]{pgfstrokecolor}{rgb} {0.15,1,0.67}\pgfsys@color@cmyk@stroke{0.85}{0}{0.33}{0} \pgfsys@color@cmyk@fill{0.85}{0}{0.33}{0}\epsilon_{\mathcal{T}}(h)}+\sum^{N}_{ i=1}\left(\left|\langle\theta^{*},\phi^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}} )\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{ \mathcal{T}})\rangle+\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{ *}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_ {i}^{*}}^{\mathcal{T}})\rangle\right|\right)$ $\displaystyle\leq$ $\displaystyle{\color[rgb]{0.15,1,0.67}\definecolor[named]{pgfstrokecolor}{rgb} {0.15,1,0.67}\pgfsys@color@cmyk@stroke{0.85}{0}{0.33}{0} \pgfsys@color@cmyk@fill{0.85}{0}{0.33}{0}\epsilon_{\mathcal{T}}(h)}+{\color[ rgb]{1,0.58,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0.58,0} \pgfsys@color@cmyk@stroke{0}{0.42}{1}{0}\pgfsys@color@cmyk@fill{0}{0.42}{1}{0} \sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_ {i}^{*}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_ {i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)}+{\color[rgb]{0.5,1,0} \definecolor[named]{pgfstrokecolor}{rgb}{0.5,1,0}\pgfsys@color@cmyk@stroke{0.5 0}{0}{1}{0}\pgfsys@color@cmyk@fill{0.50}{0}{1}{0}\sum^{N}_{i=1}\left(\left| \langle\theta^{*},\phi^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle-\langle \widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle \right|\right)}$ $\displaystyle\leq$ $\displaystyle{\color[rgb]{0.15,1,0.67}\definecolor[named]{pgfstrokecolor}{rgb} {0.15,1,0.67}\pgfsys@color@cmyk@stroke{0.85}{0}{0.33}{0} \pgfsys@color@cmyk@fill{0.85}{0}{0.33}{0}\epsilon_{\mathcal{T}}(h)}+{\color[ rgb]{1,0.58,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0.58,0} \pgfsys@color@cmyk@stroke{0}{0.42}{1}{0}\pgfsys@color@cmyk@fill{0}{0.42}{1}{0} \sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_ {i}^{*}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_ {i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)}+{\color[rgb]{0.5,1,0} \definecolor[named]{pgfstrokecolor}{rgb}{0.5,1,0}\pgfsys@color@cmyk@stroke{0.5 0}{0}{1}{0}\pgfsys@color@cmyk@fill{0.50}{0}{1}{0}\sum^{N}_{i=1}\left(\left| \langle\theta^{*},\phi^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle-\langle \widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{T}})\rangle \right|\right)}$ $\displaystyle+{\color[rgb]{1,0.52,1}\definecolor[named]{pgfstrokecolor}{rgb}{ 1,0.52,1}\pgfsys@color@cmyk@stroke{0}{0.48}{0}{0}\pgfsys@color@cmyk@fill{0}{0. 48}{0}{0}\sum^{N}_{i=1}\left(\left|\langle\theta^{*},\phi^{*}({\bf x}_{i,a_{i} ^{*}}^{\mathcal{S}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i, a_{i}^{*}}^{\mathcal{S}})\rangle\right|\right)}-{\color[rgb]{ 0.0600000000000001,0.46,1}\definecolor[named]{pgfstrokecolor}{rgb}{ 0.0600000000000001,0.46,1}\pgfsys@color@cmyk@stroke{0.94}{0.54}{0}{0} \pgfsys@color@cmyk@fill{0.94}{0.54}{0}{0}\sum^{N}_{i=1}\left(\left|\langle \theta^{*},\phi^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle-\langle \widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle \right|\right)}$ $\displaystyle\leq$ $\displaystyle{\color[rgb]{0.15,1,0.67}\definecolor[named]{pgfstrokecolor}{rgb} {0.15,1,0.67}\pgfsys@color@cmyk@stroke{0.85}{0}{0.33}{0} \pgfsys@color@cmyk@fill{0.85}{0}{0.33}{0}\epsilon_{\mathcal{T}}(h)}+{\color[ rgb]{1,0.58,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0.58,0} \pgfsys@color@cmyk@stroke{0}{0.42}{1}{0}\pgfsys@color@cmyk@fill{0}{0.42}{1}{0} \sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_ {i}^{*}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_ {i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)}+{\color[rgb]{1,0.52,1 }\definecolor[named]{pgfstrokecolor}{rgb}{1,0.52,1}\pgfsys@color@cmyk@stroke{0 }{0.48}{0}{0}\pgfsys@color@cmyk@fill{0}{0.48}{0}{0}\sum^{N}_{i=1}\left(\left| \langle\theta^{*},\phi^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle-\langle \widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle \right|\right)}$ $\displaystyle+\Bigg{|}{\color[rgb]{0.5,1,0}\definecolor[named]{pgfstrokecolor} {rgb}{0.5,1,0}\pgfsys@color@cmyk@stroke{0.50}{0}{1}{0}\pgfsys@color@cmyk@fill{ 0.50}{0}{1}{0}\sum^{N}_{i=1}\left(\left|\langle\theta^{*},\phi^{*}({\bf x}_{i, a_{i}^{*}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x }_{i,a_{i}^{*}}^{\mathcal{T}})\rangle\right|\right)}-{\color[rgb]{ 0.0600000000000001,0.46,1}\definecolor[named]{pgfstrokecolor}{rgb}{ 0.0600000000000001,0.46,1}\pgfsys@color@cmyk@stroke{0.94}{0.54}{0}{0} \pgfsys@color@cmyk@fill{0.94}{0.54}{0}{0}\sum^{N}_{i=1}\left(\left|\langle \theta^{*},\phi^{*}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle-\langle \widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle \right|\right)}\Bigg{|}$ $\displaystyle\leq$ $\displaystyle{\color[rgb]{0.15,1,0.67}\definecolor[named]{pgfstrokecolor}{rgb} {0.15,1,0.67}\pgfsys@color@cmyk@stroke{0.85}{0}{0.33}{0} \pgfsys@color@cmyk@fill{0.85}{0}{0.33}{0}\epsilon_{\mathcal{T}}(h)}+\dfrac{N}{ 2}\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S},\mathcal{T})+{\color[ rgb]{1,0.58,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0.58,0} \pgfsys@color@cmyk@stroke{0}{0.42}{1}{0}\pgfsys@color@cmyk@fill{0}{0.42}{1}{0} \sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_ {i}^{*}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_ {i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)}$ $\displaystyle+{\color[rgb]{1,0.52,1}\definecolor[named]{pgfstrokecolor}{rgb}{ 1,0.52,1}\pgfsys@color@cmyk@stroke{0}{0.48}{0}{0}\pgfsys@color@cmyk@fill{0}{0. 48}{0}{0}\sum^{N}_{i=1}\left(\left|\langle\theta^{*},\phi^{*}({\bf x}_{i,a_{i} ^{*}}^{\mathcal{S}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i, a_{i}^{*}}^{\mathcal{S}})\rangle+\langle\theta^{*},\phi^{*}({\bf x}_{i, \widehat{a}_{i}}^{\mathcal{S}})\rangle-\langle\theta^{*},\phi^{*}({\bf x}_{i, \widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)}$ $\displaystyle\stackrel{{\scriptstyle\mbox{Def.~{}\ref{lemma:A3}}}}{{\leq}}$ $\displaystyle{\color[rgb]{0.15,1,0.67}\definecolor[named]{pgfstrokecolor}{rgb} {0.15,1,0.67}\pgfsys@color@cmyk@stroke{0.85}{0}{0.33}{0} \pgfsys@color@cmyk@fill{0.85}{0}{0.33}{0}\epsilon_{\mathcal{S}}(h)+\psi+\dfrac {N}{2}\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S},\mathcal{T})}+ \dfrac{N}{2}\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S},\mathcal{T} )+{\color[rgb]{1,0.58,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0.58,0} \pgfsys@color@cmyk@stroke{0}{0.42}{1}{0}\pgfsys@color@cmyk@fill{0}{0.42}{1}{0} \sum^{N}_{i=1}\left(\left|\langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_ {i}^{*}}^{\mathcal{T}})\rangle-\langle\widehat{\theta},\widehat{\phi}({\bf x}_ {i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right)}$ $\displaystyle+{\color[rgb]{0,0.88,0}\definecolor[named]{pgfstrokecolor}{rgb}{ 0,0.88,0}\pgfsys@color@cmyk@stroke{0.91}{0}{0.88}{0.12}\pgfsys@color@cmyk@fill {0.91}{0}{0.88}{0.12}\sum^{N}_{i=1}\left(\left|\langle\theta^{*},\phi^{*}({\bf x }_{i,a_{i}^{*}}^{\mathcal{S}})\rangle-\langle\theta^{*},\phi^{*}({\bf x}_{i, \widehat{a}_{i}}^{\mathcal{S}})\rangle\right|\right)}+{\color[rgb]{1,0,0.5} \definecolor[named]{pgfstrokecolor}{rgb}{1,0,0.5}\pgfsys@color@cmyk@stroke{0}{ 1}{0.50}{0}\pgfsys@color@cmyk@fill{0}{1}{0.50}{0}\sum^{N}_{i=1}\left(\left| \langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S}}) \rangle-\langle\theta^{*},\phi^{*}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}}) \rangle\right|\right)}$ $\displaystyle\stackrel{{\scriptstyle\mbox{L.m.~{}\ref{lemma:A3}}}}{{\leq}}$ $\displaystyle\epsilon_{\mathcal{S}}(h)+\psi+N\widehat{d}_{\mathcal{H}\Delta \mathcal{H}}(\mathcal{S},\mathcal{T})+{\color[rgb]{1,0.58,0}\definecolor[named ]{pgfstrokecolor}{rgb}{1,0.58,0}\pgfsys@color@cmyk@stroke{0}{0.42}{1}{0} \pgfsys@color@cmyk@fill{0}{0.42}{1}{0}\sum^{N}_{i=1}\left(\left|\langle \widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}}) \rangle\right|\right)+\sum^{N}_{i=1}\alpha\cdot\kappa_{i}^{\mathcal{T}}}$ $\displaystyle+{\color[rgb]{0,0.88,0}\definecolor[named]{pgfstrokecolor}{rgb}{ 0,0.88,0}\pgfsys@color@cmyk@stroke{0.91}{0}{0.88}{0.12}\pgfsys@color@cmyk@fill {0.91}{0}{0.88}{0.12}\mathit{R}_{S}}+{\color[rgb]{1,0,0.5}\definecolor[named]{ pgfstrokecolor}{rgb}{1,0,0.5}\pgfsys@color@cmyk@stroke{0}{1}{0.50}{0} \pgfsys@color@cmyk@fill{0}{1}{0.50}{0}\sum^{N}_{i=1}\left(\left|\langle \widehat{\theta},\widehat{\phi}({\bf x}_{i,a_{i}^{*}}^{\mathcal{S}})\rangle- \langle\theta^{*},\phi^{*}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle \right|\right)}$ $\displaystyle\stackrel{{\scriptstyle\mbox{L.m.~{}\ref{lemma:A6}}}}{{\leq}}$ $\displaystyle\epsilon_{\mathcal{S}}(h)+\psi+N\widehat{d}_{\mathcal{H}\Delta \mathcal{H}}(\mathcal{S},\mathcal{T})+\sum^{N}_{i=1}\left(\left|\langle \widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}}) \rangle\right|\right)+\sum^{N}_{i=1}\alpha\cdot\kappa_{i}^{\mathcal{T}}$ $\displaystyle+\mathit{R}_{S}+{\color[rgb]{1,0,0.5}\definecolor[named]{ pgfstrokecolor}{rgb}{1,0,0.5}\pgfsys@color@cmyk@stroke{0}{1}{0.50}{0} \pgfsys@color@cmyk@fill{0}{1}{0.50}{0}\epsilon_{\mathcal{S}}(h)+\mathbbm{1}{[a _{i}^{*}\neq\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\left(\left|\langle\widehat{ \theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\right |\right)+\sum^{N}_{i=1}\alpha\cdot\kappa_{i}^{\mathcal{S}}\right)}$ $\displaystyle\stackrel{{\scriptstyle\mbox{L.m.~{}\ref{lemma:A5}}}}{{=}}$ $\displaystyle{\color[rgb]{0,0.88,0}\definecolor[named]{pgfstrokecolor}{rgb}{ 0,0.88,0}\pgfsys@color@cmyk@stroke{0.91}{0}{0.88}{0.12}\pgfsys@color@cmyk@fill {0.91}{0}{0.88}{0.12}\underbrace{\mathit{R}_{\mathcal{S}}}_{Source~{}Regret}}+ {\color[rgb]{1,0,0.5}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0.5} \pgfsys@color@cmyk@stroke{0}{1}{0.50}{0}\pgfsys@color@cmyk@fill{0}{1}{0.50}{0} \underbrace{2\cdot\epsilon_{\mathcal{S}}(h)}_{Regression~{}Error}}+{\color[rgb ]{0,0.5,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0.5,1} \pgfsys@color@cmyk@stroke{1}{0.50}{0}{0}\pgfsys@color@cmyk@fill{1}{0.50}{0}{0} \underbrace{N\cdot\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S}, \mathcal{T})}_{Data~{}Divergence}}+{\color[rgb]{0.15,1,0.67}\definecolor[named ]{pgfstrokecolor}{rgb}{0.15,1,0.67}\pgfsys@color@cmyk@stroke{0.85}{0}{0.33}{0} \pgfsys@color@cmyk@fill{0.85}{0}{0.33}{0}\underbrace{\psi+C}_{Constant}}$ $\displaystyle+{\color[rgb]{1,0.58,0}\definecolor[named]{pgfstrokecolor}{rgb}{ 1,0.58,0}\pgfsys@color@cmyk@stroke{0}{0.42}{1}{0}\pgfsys@color@cmyk@fill{0}{0. 42}{1}{0}\underbrace{\sum^{N}_{i=1}\left(\left|\langle\widehat{\theta}, \widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{T}})\rangle\right|\right) +\mathbbm{1}{[a_{i}^{*}\neq\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\left(\left| \langle\widehat{\theta},\widehat{\phi}({\bf x}_{i,\widehat{a}_{i}}^{\mathcal{S }})\rangle\right|\right)\right)}_{Predicted~{}Rewards}},$ $$

where $C=\sum^{N}_{i=1}\alpha\cdot\kappa_{i}^{\mathcal{T}}+\mathbbm{1}{[a_{i}^{*}\neq
\widehat{a}_{i}]}\left(\sum^{N}_{i=1}\alpha\cdot\kappa_{i}^{\mathcal{S}}\right)$ is a small number which can be ignored as $i\to\infty$ (i.e., see Lemma A.5).
∎

###### Theorem A.1 ( Target Regret Bound ) .

###### Proof.

## Appendix B Datasets

To evaluate the effectiveness of our DABand, for each dataset, we treat the “easy” domain as the low-cost source domain and the more challenging one as the high-cost target domain. This allows us to demonstrate the efficacy of our method by adapting from a simpler to a more complex domain within a contextual bandit setting.

*DIGIT.* Our DIGIT dataset consists of MNIST and MNIST-M. MNIST is a gray-scale hand-written digit dataset, while MNIST-M (Ganin et al., ) features color digits. In this paper, MNIST serves as our source domain, and MNIST-M as our target domain, offering a more challenging adaptation path. The MNIST digits are gray-scale and uniform in size, aspect ratio, and intensity range, in stark contrast to the colorful and varied digits of MNIST-M. Therefore, adapting from MNIST to MNIST-M presents a greater challenge than adapting from MNIST-M to MNIST, where the target domain is less complex.

*VisDA17.* The VisDA-2017 image classification challenge (Peng et al., ) addresses a domain adaptation problem across 12 classes, involving three distinct datasets. The training set consists of 3D rendering images, whereas the validation and test sets feature real images from the COCO (Lin et al., ) and YouTube Bounding Boxes (Real et al., ) datasets, respectively. Ground truth labels were provided only for the training and validation sets. Scores for the test set were calculated by a server operated by the competition organizers. For our purposes, we use the training set as the source domain and the validation set as the target domain.

*S2RDA49.* The S2RDA49 (Synthetic-to-Real) is a new benchmark dataset (Tang & Jia, ) constructed in 2023. This dataset contains $49$ classes. The source domain (i.e., the synthetic domain) is synthesized by rendering 3D models from ShapeNet (Chang et al., ). The used 3D models are in the same label space as the target/real domain, and
each class has 12K rendered RGB images. The target domain (i.e., the real domain) of S2RDA49 contains $60535$ images from $49$ classes, collected from the ImageNet validation set (Deng et al., ), ObjectNet (Barbu et al., ), VisDA2017 validation set (Peng et al., ), and the web. In this paper, we select the only $10$ class that matches the VisDA17 dataset.

## Appendix C Baselines

We compare our DABand with both classic and state-of-the-art contextual bandit algorithms. We start with LinUCB (Li et al., ), a typical baseline for linear contextual bandit problems. To enable comprehensive comparisons, we extend our evaluation to include LinUCB augmented with pre-processed features using principle component analysis (PCA), referred to as LinUCB-P. In LinUCB-P, we first apply PCA to fit on training data (without labels/feedback) in both source and target domain. Then, with transformed, lower-dimensional context data, LinUCB is performed to see whether this pre-alignment procedure can transfer the knowledge to the target domain. Another pivotal baseline in our study is Neural-LinUCB (Xu et al., ) (NLinUCB), which utilizes several layers of fully connected neural networks to dynamically process the original features at the beginning of every iteration. Similar to LinUCB-P, we introduce a NLinUCB variant that incorporates PCA, i.e., NLinUCB-P. Note that domain adaptation baselines are not applicable to our setting. Specifically, domain adaptation methods only work in offline settings, and assume complete observability of labels in the source domain. In contrast, contextual bandit is an online setting where the oracle is revealed only when correctly predicted. Therefore domain adaptation methods are not applicable to our online bandit settings.

## Appendix D Implementation Details

In this section, we provide detailed insights into the implementation of our approach, applied to two distinct datasets: DIGIT and VisDA17. We use Pytorch to implement our method, and all experiments are run on servers with NVIDA A5000 GPUs.

DIGIT. Within the DIGIT dataset framework, we use the MNIST dataset as the source domain and MNIST-M as the target domain. To ensure compatibility between the datasets, we standardize the channel size of images in the source domain ($c_{\mathcal{S}}=1$) to align with that in the target domain ($c_{\mathcal{T}}=3$). Each image undergoes normalization and is resized to $28\times 28$ pixels with 3 channels to accommodate the format requirements of both domains. Then, an encoder is utilized to diminish the data’s dimensionality to a more manageable latent space. Following this reduction, the data is processed through two fully connected neural network layers, ending in the final latent space necessary for loss computation as delineated in main paper. For the optimal hyperparameters, we set the learning rate to $1\times e^{-5}$, with $\lambda$ is chosen from $\{1.0,5.0,10.0,15.0,20.0\}$ and kept the same for all experiments. Additionally, we set the exploration rate $\alpha$ to $0.05$.

VisDA17. We use the VisDA17 dataset’s training set as the source domain, with the validation set functioning as the target domain. We adhere to preprocessing steps established by (Prabhu et al., ) to ensure uniformity across domains: Each image is normalized and resized to $224\times 224$ pixels with 3 channels, matching the requisite specifications for both source and target domains. For hyperparameters, the learning rate of $1\times e^{-5}$ is applied, with $\lambda$ is chosen from $\{1.0,5.0,10.0,15.0,20.0\}$ and then kept the same for all experiments. We set the exploration rate $\alpha$ to $0.05$.

S2RDA49. We selects $10$ classes from the original $49$ classes since it matches the target domain samples in VisDA17 (Peng et al., ). We adhere to preprocessing steps established by (Prabhu et al., ) to ensure uniformity across domains: Each image is normalized and resized to $224\times 224$ pixels with 3 channels. For hyperparameters, the learning rate of $1\times e^{-3}$ is applied, with $\lambda$ chosen from $\{1.0,5.0,10.0,15.0,20.0\}$ and then kept the same for all experiments. We set the exploration rate $\alpha$ to $0.01$.

**Table 5: Results of the ablation studies in terms of accuracy (higher is better). Note that the accuracy $ACC=1-\tfrac{1}{N}R_{{\mathcal{T}}}$, where $R_{{\mathcal{T}}}$ is the target regret. “R”, “P” and “D” are short for “Regression Error”, “Predicted Reward” and “Data Divergence” (i.e., adversarial loss and the discriminator), respectively.**
| Datasets | w/o R$\&$P$\&$D | w/o R$\&$P | w/o R$\&$D | w/o P$\&$D | w/o R | w/o P | w/o D | DABand (Full) |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| DIGIT | 0.3816$\pm$0.04 | 0.5676$\pm$0.02 | 0.3793$\pm$0.02 | 0.3544$\pm$0.01 | 0.5682$\pm$0.01 | 0.5768$\pm$0.01 | 0.3649$\pm$0.02 | 0.6002$\pm$0.02 |
| VisDA17 | 0.1001$\pm$0.02 | 0.4088$\pm$0.03 | 0.1010$\pm$0.02 | 0.0936$\pm$0.01 | 0.4096$\pm$0.01 | 0.4304$\pm$0.01 | 0.1098$\pm$0.01 | 0.4644$\pm$0.03 |
| S2RDA49 | 0.1108$\pm$0.02 | 0.3691$\pm$0.02 | 0.0918$\pm$0.01 | 0.1032$\pm$0.01 | 0.3694$\pm$0.03 | 0.3719$\pm$0.02 | 0.1121$\pm$0.02 | 0.3923$\pm$0.03 |

## Appendix E Total Ablation Studies

The full ablation study is shown in Table 5. Furthermore, we ran the corresponding hypothesis tests, and the p values are in the range of $(3.201\times 10^{-21},1.504\times 10^{-2})$, much lower than the threshold of $0.05$ and therefore verifying the significance of DABand’s performance improvement.

## Appendix F Limitation

This work contains several limitations. Specifically, we highlight below:

Intuitive Perspective. The bandit algorithm indeed enjoys interpretability and the accuracy of its closed-form updates, but this is true only because it typically employs a linear model.

Unfortunately, linear models do not work very well for real-world data, which is often high-dimensional. For example, the empirical results for LinUCB and LinUCB-P in Table 1 and Table 2 show that such linear contextual bandit algorithms significantly underperform state-of-the-art neural bandit algorithms, which use back-propagation (similar results are shown in (Zhou et al., , Xu et al., )). In summary deep learning models with back-propagation is necessary due to the following reasons:

- •
High-Dimensional Data. To enhance performance in real-world high-dimensional data (e.g., images), the integration of deep learning (and back-propagation) is necessary, though this may sacrifice a portion of the algorithm’s explanatory power.
- •
Covariate Shift and Aligning Source and Target Domains in the Latent Space. In our settings where there is covariance shift between the source and target domains, a deep (nonlinear) encoder is required to transform the original context into a latent space where source-domain encodings and target-domain encoders can align. This also necessitates deep learning models with back-propagation.

Indeed, there is a trade-off between interpretability and performance. This would certainly be an interesting future direction, but it is out of the scope of this paper.

Theoretical Perspective. Our Theorem 3.1 is sharp, as all the inequalities are based on lemmas in the paper and the Cauchy inequality. Identifying the criteria under which the target regret bound reaches equality as well as how one can achieve it in practice would be interesting future work.

Empirical Perspective. The performance of DABand largely relies on the alignment quality between the source and target domains. Therefore, for two domains that cannot be aligned (for example, most domain adaptation tasks are predefined, and the data for both domains is pre-processed and cleaned, not original real-world data), it is challenging to evaluate how DABand can still transfer knowledge across different domains. Furthermore, it is still unknown whether, if we increase the domain shift in a dataset from another domain, our DABand can still perform well. These issues are beyond the scope of this paper, but they represent interesting areas for future work.

## Appendix G Discussions

### G.1 Difference between Bandit and Classification Settings

In the classification setting, given a sample ${\bf x}$, a model predicts its label $\widehat{y}$. Since its ground-truth label is known, one can directly apply the cross-entropy loss to perform back-propagation and update our model.
In contrast, in bandit settings, for each sample ${\bf x}$, our model predicts an action $\widehat{a}$ by optimizing the estimated rewards. One then submits this predicted action to the environment and receives feedback that only indicates whether the predicted action $\widehat{a}$ is the optimal action $a^{*}$ or not. If not, we are informed that our prediction is incorrect, yet we do not receive information on what the correct (optimal) action should be.
Moreover, during training, we only train on 300 episodes for DIGIT and VisDA17 and 100 episodes for S2RDA49. Each episode contains 64 samples. This implies that compared with those DA methods which train on multiple epochs, in our settings, all of the models only see a sample once. Such complexity makes the bandit setting much more challenging.

Why Simultaneously Training Source and Target Domains is Needed and Helpful. It is also noteworthy that our DABand is an end-to-end model that enables two-way feedback between source and target domains:

- •
Source to Target: Collecting source-domain rewards helps DABand to learn a better encoder (which transforms raw contexts into encodings in the latent space) because the reward signals help the encoder extract more relevant encodings (embeddings) from target-domain contexts, thereby reducing the target-domain regret.
- •
Target to Source: After aligning source-domain and target-domain encodings in the shared latent space (i.e., minimizing the data divergence term in Eqn. (5)), the information from the target-domain context can then help the source domain to explore arms that are more relevant to the target domain. Ultimately, this also helps reduce the target-domain regret even without collecting target-domain rewards.

### G.2 Importance of Bandits and DABand

Bandit algorithms are designed to navigate environments where feedback is sparse, costly, and indirect. By efficiently learning from limited feedback – identifying not just when a prediction is wrong but adapting without explicit guidance on the right choice – bandit algorithms offer a strategic advantage in dynamically evolving settings. Our DABand exemplifies this by leveraging a low-cost source domain to improve performance in a high-cost target domain, thereby reducing cumulative regret (improving accuracy) while minimizing operational costs. DABand not only reduces the expense associated with acquiring and labeling vast datasets but also capitalizes on the intrinsic adaptability of bandit algorithms to learn and optimize in complex, uncertain environments.

### G.3 Novelties Restatement

Theoretical Novelty. In general, DABand is the first work to perform contextual bandit in a domain adaptation setting, i.e., adapt from a source domain with feedback to a target domain without feedback. Moreover, our theoretical analysis presents two major technical challenges/novelties below:

- •
Generalization of $\mathcal{H}\Delta\mathcal{H}$ Distance to Regression. In the original multi-domain generalization bound (Ben-David et al., ), the $\mathcal{H}\Delta\mathcal{H}$ divergence between source and target domains is derived for classification models. However, contextual bandit is essentially a reward regression problem, and therefore necessitates generalizing the $\mathcal{H}\Delta\mathcal{H}$ distance from the classification case to the regression case. This presents a significant technical challenge, and leads to a series of modifications in the proof.
- •
Decomposing the Target Regret into the Source Regret with Other Terms. The subsequent major challenge our DABand addresses involves decomposing the regret bound for the target domain (i.e., the target regret) into a source regret term and other terms to upper-bound the target regret. This is necessary because we do not have access to feedback/reward from the target domain (we only have access to feedback/reward in the source domain). This process requires a nuanced understanding of the interplay between source and target domain dynamics within our model’s framework.

Other Technical Novelties. Moreover, our contribution goes beyond the theoretical analysis itself. Specifically,

- •
We identify the problem of contextual bandits across domains and propose domain-adaptive contextual bandits (DABand) as the first general method to explore a high-cost target domain while only collecting feedback from a low-cost source domain.
- •
Our theoretical analysis shows that our method can achieve a sub-linear regret bound in the target domain.
- •
Our empirical results on real-world datasets show our DABand significantly improves performance over the state-of-the-art contextual bandit methods when adapting across domains.

### G.4 Discussion on Zero-shot Target Regret Bound

#### G.4.1 Significance of Theorem 3.1

Note that Theorem 3.1 is nontrivial. While it does resemble the generalization bound in domain adaptation, there are key differences. As mentioned in Observation (3) in Sec. 3.6, our target regret bound includes two additional crucial terms not found in domain adaptation. Specifically:

- •
Regression Error in the Source Domain. $\sum\nolimits_{i=1}^{N}\Bigg{(}\Big{|}\langle\theta_{\mathcal{S}}^{*},\phi_{
\mathcal{S}}^{*}(x_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle-\langle\widehat{
\theta},\widehat{\phi}(x_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\Big{|}\Bigg
{)}$, which defines the difference between the true reward from selecting action $\widehat{a}_{i}$ and the estimated reward for this action.
- •
Predicted Reward. $\sum\nolimits_{i=1}^{N}\Bigg{(}\Big{|}\langle\widehat{\theta},\widehat{\phi}(x
_{i,\widehat{a}_{i}}^{\mathcal{S}})\rangle\Big{|}\Bigg{)}$, which serves as a regularization term to regularize the model to avoid overestimating rewards.

The results of the ablation study in Table 4 in Sec. 5 highlight the significance of these two terms.
Moreover, we would also like to highlight the key novelty/challenges in deriving Theorem 3.1:

- •
Generalization of $\mathcal{H}\Delta\mathcal{H}$ Distance to Regression. In the original multi-domain generalization bound [1], the $\mathcal{H}\Delta\mathcal{H}$ divergence between source and target domains is derived for classification models. However, contextual bandit is essentially a reward regression problem, and therefore necessitates generalizing the $\mathcal{H}\Delta\mathcal{H}$ distance from the classification case to the regression case. This presents a significant technical challenge, and leads to a series of modification in the proof.
- •
Decomposing the Target Regret into the Source Regret with Other Terms. The subsequent challenge involves decomposing the regret bound for the target domain (i.e., the target regret) into a source regret term and other terms to upper-bound the target regret. This is necessary because we do not have access to feedback/reward from the target domain (we only have access to feedback/reward in the source domain). This process requires a nuanced understanding of the interplay between source and target domain dynamics within our model’s framework.

#### G.4.2 Testing Phase rather than Traditional Bandit Learning Settings

Our regret bound in Theorem 3.1 is a zero-shot regret bound for the target domain (with empirical results in the Zero-Shot Target Regret paragraph of Sec. 5), which corresponds to a testing phase.

However, we would like to clarify that extending this bound to handle continued training in the target domain (corresponding to the Continued Training in Target Domains and Cumulative Regret paragraph of Sec. 5) is straightforward. At a high level, we can have

$$ $\displaystyle R_{\mathcal{T}}^{total}=R_{\mathcal{T}}^{zero-shot}+R_{\mathcal{ T}}^{continued},$ $$

with the first term handled by our DABand’s Theorem 3.1 and the second term handled by typical single-domain contextual bandit.

#### G.4.3 Scale of Source Regret and Predicted Rewards

Similar to Neural-LinUCB, in our DABand, the true reward is restricted to the range of $[0,1]$ (as we mentioned in Sec. 3.1); therefore it will not make the source regret unbounded.

Furthermore, our DABand algorithm tries to minimize the source regret while aligning the source and target domains. The minimization of the source regret is theoretically guaranteed, as discussed in recent work such as Neural-LinUCB (Xu et al., ).

### G.5 Are the Comparisons Fair?

Leveraging Target-Domain Contexts. A lot of our baselines do leverage the contexts of the target domain. For example, our baseline LinUCB-P starts by performing PCA jointly on both source-domain and target-domain contexts and then perform LinUCB. Therefore LinUCB-P does leverage the contexts of the target domain. Similarly, NLinUCB-P starts by performing PCA jointly on both source-domain and target-domain context and then perform NLinUCB. It therefore also leverages target-domain contexts.

Seeing Target-Domain Rewards. Note that in our domain adaptive bandit settings:

- •
During the zero-shot phase, target rewards are not visible for all methods (include both baselines and our DABand); it is therefore fair comparison.
- •
During the continued-training phase, all methods (include both baselines and our DABand) start to see the target reward and update their parameters; it is therefore also fair comparison.

### G.6 Why Minimize the Predicted Reward on the Source Domain?

While the predicted-reward term is naturally derived from our theoretical analysis, we do find interesting insights when examining this term and its relation to our model. Specifically:

- •
Indirect Regularization on Bandit Parameters $\widehat{\theta}$ and the Encoder $\widehat{\phi}(\cdot)$. One can see this term as an L1 regularization term. It does not directly regularize the bandit parameter $\widehat{\theta}$; however, minimizing the L1 norm of the predicted reward (i.e., a $K$-dimensional vector for a $K$-arm bandit) does indirectly regularize the bandit parameter $\widehat{\theta}$ and the encoder $\widehat{\phi}(\cdot)$, thereby preventing the L1 norm of the predicted reward from getting to large.
- •
Smaller Predicted Rewards for Smaller Variance and Better Stability. Furthermore, this regularization can help avoid predicting high rewards for all arms in the bandit.
–
Note that for the bandit algorithm to achieve low regret, predicting large rewards are not necessary. This is because one uses the argmax operation (i.e., Line 6 in Alg. 1) to select the best arm; an arm $k$ with a small predicted reward can still be selected as long as all other arms have even smaller predicted rewards.
–
Too higher predicted rewards are not desirable because they increase the model’s sensitivity, leading to higher variance and subsequently increasing the generalization error (i.e., the target regret’s bound).

### G.7 Clarification of DABand’s Contributions

Our DABand is the first general method to explore a target domain while only collecting feedback from the source domain, regardless of linear or nonlinear assumptions. No prior methods have explored this setting of exploring a target domain while only collecting feedback from the source domain.

Therefore, DABand’s contribution is two-fold: (1) DABand is the first general method to explore a target domain while only collecting feedback from the source domain; (2) DABand is also the first general method in this domain-adaptive bandit setting that works even under general nonlinear assumptions.

### G.8 Importance of the Discriminator.

Our bandit setting aims to explore a target domain while only collecting feedback from the source domain. All reward feedback in the target domain is unknown, making this approach very challenging. Therefore, using a discriminator to align representations for both domains is necessary.
If we ignore the discriminator, the method will not work in our settings. This is also evidenced by the whole results for ablation studies in Table 5.

### G.9 How the Terms in the Regret Decay as N increases.

To see how the terms in the regret decay:

- •
Decay in the Source Regret. Most of the decay occurs in the first term (i.e., Source Regret $\mathit{R}_{\mathcal{S}}$), which has been discussed in the NLinUCB paper (Xu et al., ). Specifically the cumulative source regret is $O(\sqrt{N})$. Then, dividing both sides of Eqn. (5) by $N$, we will get the average source regret term with $O(\sqrt{N}/N)$, which does decay with $N$.
- •
Decay in the Data Divergence Term. Decay in the Data Divergence Term. The data divergence term, $\widehat{d}_{\mathcal{H}\Delta\mathcal{H}}(\mathcal{S},\mathcal{T})$, can actually be further decomposed into
–
an empirical term that estimates the divergence using $N$ source-domain contexts and $N$ target-domain contexts, and
–
a term related to $N$ with complexity $\mathcal{O}(\log(2N)/N)$ (Ben-David et al., ).
Therefore, the second term with $\mathcal{O}(\log(2N)/N)$ does also decay as $N$ increases.

### G.10 Understanding the Bound if the Source and Target Domains are equivalent

Even if the input distributions of the two domains match, it does not imply that the relationship between the input context $\mathbf{x}$ and the predicted reward is the same for them, since the data divergence term is only responsible for aligning the distribution of $\mathbf{x}$ (input); it is irrelevant to the output and rewards. This is why other terms are needed to characterize the difference in the relationship between the context $\mathbf{x}$ and the reward in the source and target domains. The data divergence term alone is not sufficient.

### G.11 Clarification on the Problem Setting.

Simultaneous Observation. In our setting, source-domain contexts and target-domain contexts are simultaneously observed, with only the reward of the source domain being observed.

Target-Domain Contexts Available Even Before Running Alg. 1. Note that in practice, target-domain contexts are usually available even before Algorithm 1 starts and before observing any reward from the source domain. (This makes it possible to train our DABand by simultaneously using source-domain and target-domain contexts.)

For example, in the case of testing drug reactions on mice (source domain) and humans (target domain), usually one already has the human subjects’ genomics, demographic, and other data as target-domain contexts, even before testing the drug on mice (i.e., the source domain) and collecting rewards.

This is because these human genomics/demographic data are easy to collect at a low cost; in contrast, testing the drug on humans (i.e., the target domain) and collecting rewards involves extremely high costs, due to the risks of fatality, side effects, and the enormous costs of conducting clinical trials.

## Appendix H Potential Impact of DABand

Our DABand has many potential real-world applications, especially when obtaining responses is costly. For instance, in testing new drugs, we can construct responses from mice for new drug A, and then use DABand to obtain the zero-shot hypothetical regret bound for responses in humans. In another scenario, we can collect data (responses) on humans for another published, similar drug B, and then transfer knowledge by aligning the divergence between drug A and drug B. If both regrets reveal acceptable performance, we might not need excessive costs for back-and-forth testing, which significantly speeds up the process and reduces costs.

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: See weakness.
soundness: 3
strengths: 1. The design of the new algorithm originates from an observation that leveraging data across domains leads to sub-linear regrets, which makes the whole method simple, yet elegant.

2. Theoretical proof has been provided to support the performance of the method.

3. The algorithm is extensively tested on three datasets.
summary: The manuscript introduces a domain adaption algorithm for contextual bandit. It further proves that the proposed method achieves a sub-linear regret bound. Empirical experiments conducted on real-world data shows the the proposed method outperforms existing state-of-the-art contextual bandit methods for cross domains.
weaknesses: It would be helpful to elaborate on why the data divergence term is sub-linear in the proof.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: See weakness.
soundness: 3
strengths: (1) The proposed problem setting of contextual bandits in a domain adaptation scenario is interesting and challenging.

(2) The method utilizes unlabeled data from both source and target domains for effective representation learning and alignment across different domains.

(3) The algorithm is capable of attaining a sub-linear regret bound in the target domain by solving an online network lasso problem with time-dependent regularization.
summary: The paper introduces an algorithm for domain adaptation in contextual bandits. This method aims to adapt a neural contextual bandit algorithm from a low-cost source domain to a high-cost target domain, to address the challenge of distribution shifts between the two domains. The theoretical analysis conducted demonstrates that DABand achieves a sub-linear regret bound in the target domain, which is interesting. Empirical results are presented using real-world datasets, which show that DABand outperforms existing contextual bandit methods. The proposed work has broader implications, including potential insights into reinforcement learning with human feedback algorithms.
weaknesses: The method leverages unlabeled data from both source and target domains to learn robust representations and aligns them effectively across different domains, enabling efficient domain adaptation. While the proposed algorithm builds upon the NeuralLinUCB framework, it introduces an adaptation in the loss function specifically tailored for updating the neural network. This loss function integrates insights from classic domain adaptation techniques, and thereby has some similarity with existing methods.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 2
questions: - Besides the presentation in Theorem 3.1, are there any regret scale for linear contextual bandits to help me better understand the performance of the algorithm?
soundness: 3
strengths: - The authors provide a theoretical justification on the decomposition for the domain-transfer issue for contextual bandits. 
- The authors provide empirical evaluation demonstrating the performance of the algorithm.
summary: This paper studies the domain transfer in (neural) contextual bandits. The authors provide a decomposition of the domain transfer in contextual bandits, and proposed an algorithm leveraging the adversarial training in domain-transfer. Theoretical results are presented understanding this decomposition and empirical evaluation are performed to validate the performance of the algorithm
weaknesses: - (Minor) Definition 3.6 is hard to understand for me. In particular, are $\mathbf x$ and $x$ referring to the same thing? Are the authors implicitly assumes $h \in \mathcal H$ and $x \in \mathbb R^n$ in this case? It would be helpful if the authors could rephrase the mathematical formulation on this. 
- In Theorem 3.1 needs further justification. For example, I wonder why the sublinear in $R_S$ will lead to the sublinear result in $R_T$. I checked the proof for Theorem 3.1 in appendix but found nowhere explicitly discuss this part. In addition, why the data-divergence term is sublinear? 
- The adversarial training paradigm adapted in controlling the data divergence term in the proposed algorithm requires better justification: why the hypothesis class here is the same with the hypothesis class used in contextual bandits?
- It lacks some discussions on the performance analysis in linear contextual bandits or discussions in related literautre. The authors might want to provide more discussion on the theoretical insight of this. 

- (Minor) Section 4.1 title: eq (16) -> eq (5)

Meta-review: The reviewers generally appreciate the novel algorithm for domain adaptation in bandits. I only have one more thing to add. Domain adaptation ultimately is a form of distributional shift. Another approach to deal with is through distributional robustness (see Distributionally Robust Batch Contextual Bandits, Si et al). The authors should discuss the merits and drawbacks of the current work with respect to this approach. But overall a good paper.

Decision: Accept (Poster)