O FFLINE N EURAL C ONTEXTUAL B ANDITS : P ESSIMISM , O PTIMIZATION AND G ENERALIZATION
A BSTRACT
Offline policy learning (OPL) leverages existing data collected a priori for policy optimization without any active exploration.
Despite the prevalence and recent interest in this problem, its theoretical and algorithmic foundations in function approximation settings remain under-developed.
In this paper, we consider this problem on the axes of distributional shift, optimization, and generalization in offline contextual bandits with neural networks.
In particular, we propose a provably efficient offline contextual bandit with neural network function approximation that does not require any functional assumption on the reward.
We show that our method provably generalizes over unseen contexts under a milder condition for distributional shift than the existing OPL works.
Notably, unlike any other
OPL method, our method learns from the offline data in an online manner using stochastic gradient descent, allowing us to leverage the benefits of online learning into an offline setting.
Moreover, we show that our method is more computationally efficient and has a better dependence on the effective dimension of the neural network than an online counterpart.
Finally, we demonstrate the empirical effectiveness of our method in a range of synthetic and real-world OPL problems.
I NTRODUCTION
We consider the problem of offline policy learning (OPL) (Lange et al., 2012; Levine et al., 2020) where a learner infers an optimal policy given only access to a fixed dataset collected a priori by unknown behaviour policies, without any active exploration.
There has been growing interest in this problem recently, as it reflects a practical paradigm where logged experiences are abundant but an interaction with the environment is often limited, with important applications in practical settings such as healthcare (Gottesman et al., 2019; Nie et al., 2021), recommendation systems (Strehl et al., 2010; Thomas et al., 2017), and econometrics (Kitagawa & Tetenov, 2018; Athey & Wager, 2021).
Despite the importance of OPL, theoretical and algorithmic progress on this problem has been rather limited.
Specifically, most existing works are restricted to a strong parametric assumption of environments such as tabular representation (Yin & Wang, 2020; Buckman et al., 2020;
Yin et al., 2021;
Yin & Wang, 2021; Rashidinejad et al., 2021; Xiao et al., 2021) and more generally as linear models (Duan & Wang, 2020; Jin et al., 2020; Tran-The et al., 2021).
However, while the linearity assumption does not hold for many problems in practice, no work has provided a theoretical guarantee and a practical algorithm for OPL with neural network function approximation.
In OPL with neural network function approximation, three fundamental challenges arise:
Distributional shift .
As OPL is provided with only a fixed dataset without any active exploration, there is often a mismatch between the distribution of the data generated by a target policy and that of the offline data.
This distributional mismatch can cause erroneous value overestimation and render many standard online policy learning methods unsuccessful (Fujimoto et al., 2019).
To guarantee an efficient learning under distributional shift, common analyses rely on a sort of uniform data coverage assumptions (Munos & Szepesv´ari, 2008; Chen & Jiang, 2019; Brandfonbrener et al., 2021;
Nguyen-Tang et al., 2021) that require the offline policy to be already sufficiently explorative over the entire state space and action space.
To mitigate this strong assumption, a pessimism principle that constructs a lower confidence bound of the reward functions for decision-making (Rashidinejad et al., 2021) can reduce the requirement to a single-policy concentration condition that requires the coverage of the offline policy only on the target policy.
However, Rashidinejad et al.
(2021) only uses this condition for tabular representation and it is unclear whether complex environments such as ones that require neural network function approximation can benefit from this condition.
Moreover, the single-policy concentration condition still requires the offline policy to be stationary (e.g., the actions in the offline data are independent and depend only on current state).
However, this might not hold for many practical scenarios, e.g., when the offline data was collected by an active learner (e.g., by an Q-learning algorithm).
Thus, it remains unclear what is a minimal structural assumption on the distributional shift that allows a provably efficient OPL algorithm.
Optimization .
Solving OPL often involves in fitting a model into the offline data via optimization.
Unlike in simple function approximations such as tabular representation and linear models where closed-form solutions are available, OPL with neural network function approximation poses an additional challenge that involves a non-convex, non-analytical optimization problem.
However, existing works of OPL with function approximation ignore such optimization problems by assuming free access to an optimization oracle that can return a global minimizer (Brandfonbrener et al., 2021;
Duan et al., 2021; Nguyen-Tang et al., 2021) or an empirical risk minimizer with a pointwise convergence bound at an exponential rate (Hu et al., 2021).
This is largely not the case in practice, especially in
OPL with neural network function approximation where a model is trained by gradient-based methods such as stochastic gradient descents (SGD).
Thus, to understand OPL in more practical settings, it is crucial to consider optimization in design and analysis.
To our knowledge, such optimization problem has not been studied in the context of OPL with neural network function approximation.
Generalization .
In OPL, generalization is the ability to generalize beyond the states (or contexts as in the specific case of stochastic contextual bandits) observed in the offline data.
In other words, an offline policy learner with good generalization should obtain high rewards not only in the observed states but also in the entire (unknown) state distribution.
The challenge of generalization in OPL is that as we learn from the fixed offline data, the learned policy has highly correlated structures where we cannot directly use the standard concentration inequalities (e.g. Hoeffding’s inequality,
Bernstein inequality) to derive a generalization bound.
The typical approaches to overcome this difficulty are data splitting and uniform convergence.
While data splitting splits the offline data into disjoint folds to break the correlated structures (Yin & Wang, 2020), uniform convergence establishes generalization uniformly over a class of policies learnable by a certain model (Yin et al., 2021).
However, in the setting where the offline data itself can have correlated structures (e.g., an offline action can depend on the previous offline data) and the model used is sufficiently large that renders a uniform convergence bound vacuous, neither the data splitting technique in (Yin & Wang, 2020) nor the uniform convergence argument in (Yin et al., 2021) yield a good generalization.
Thus, it is highly non-trivial to guarantee a strong generalization in OPL with neural network function approximation from highly correlated offline data.
In this paper, we consider the problem of OPL with neural network function approximation on the axes of distributional shift, optimization and generalization via studying the setting of stochastic contextual bandits with overparameterized neural networks.
Specifically, we make three contributions toward enabling OPL in more practical settings:
• First, we propose an algorithm that uses a neural network to model any bounded reward function without assuming any functional form (e.g., linear models) and uses a pessimistic formulation to deal with distributional shifts.
Notably, unlike any standard offline learning methods, our algorithm learns from the offline data in an online-like manner, allowing us to leverage the advantages of online learning into offline setting.
• Second, our theoretical contribution lies in making the generalization bound of OPL more realistic by taking into account the optimization aspects and requiring only a milder condition for distributional shifts.
In particular, our algorithm uses stochastic gradient descent and updates the network completely online, instead of retraining it from scratch for every iteration.
Moreover, the distributional shift condition in our analysis, unlike in the existing works, does not require the offline policy to be uniformly explorative or stationary.
Specifically, we prove that, under mild conditions with practical considerations above, our algorithm learns the optimal policy with an expected error of ˜ O
( κ ˜ d 1 / 2 n − 1 / 2 ) , where n is the number of offline samples, κ measures the distributional shift, and ˜ d is an effective dimension of the neural network that is much smaller than the network capacity (e.g., the network’s VC dimension and Rademacher complexity).
Third, we evaluate our algorithm in a number of synthetic and real-world OPL benchmark problems, verifying its empirical effectiveness against the representative methods of OPL.
Notation .
We use lower case, bold lower case, and bold upper case to represent scalars, vectors and matrices, respectively.
For a vector v = [ v 1 , . .
. , v d ] T ∈ R d and p > 1 , denote ∥ v ∥ p
= ( (cid:80) di =1 v pi )
1 /p and let [ v ] j be the j th element of v .
For a matrix A
=
( A i,j ) m × n , denote ∥
A ∥ F = (cid:113)(cid:80) i,j A 2 i,j , ∥
A ∥ p = max v : ∥ v ∥ p =1 ∥
Av ∥ p , ∥
A ∥ ∞ = max i,j | A i,j | and let vec( A )
∈
R mn be the vectorized representation of A .
For a square matrix A , a vector v , and a matrix X , denote ∥ v ∥ A = √ v T Av and ∥ X
∥
A = ∥ vec( X ) ∥ A .
For a collection of matrices W =
( W 1 , . . .
, W L ) and a square matrix A , denote ∥ W ∥ F = (cid:113) (cid:80) Ll =1 ∥ W l ∥ 2 F , and
∥ W ∥ A = (cid:113) (cid:80) Ll [-=
-]=1 ∥ W l ∥ 2 A .
For a collection of matrices W (0) =
( W (0)1 , . . .
, W (0) L ) , denote B ( W (0) , R ) =
{ W = ( W 1 , . . .
, W L ) :
∥ W l − W (0) l ∥ F ≤ R } .
Denote [ n ] = { 1 , 2 , . . . , n } , and a ∨ b = max { a, b } .
We write ˜ O ( · ) to hide logarithmic factors in the standard Big-Oh notation, and write m ≥ Θ( f ( · )) to indicate that there is an absolute constant C > 0 that is independent of any problem parameters ( · ) such that m ≥ Cf ( · ) .
B ACKGROUND
In this section, we provide essential background on offline stochastic contextual bandits and overparameterized neural networks.
2. S TOCHASTIC C ONTEXTUAL B ANDITS
We consider a stochastic K -armed contextual bandit where at each round t , an online learner observes a full context x t := { x t,a ∈ R d : a ∈ [ K ] } sampled from a context distribution ρ , takes an action a t ∈ [ K ] , and receives a reward r t ∼ P ( ·| x t,a t ) .
A policy π maps a full context (and possibly other past information) to a distribution over the action space [ K ] .
For each full context x := { x a ∈ R d : a ∈ [ K ] } , we define v π ( x ) =
E a ∼ π ( ·| x ) ,r ∼ P ( ·| x a ) [ r ] and v ∗ ( x ) = max π v π ( x ) , which is attainable due to the finite action space.
In the offline contextual bandit setting, the goal is to learn an optimal policy only from an offline data D n = { ( x t , a t , r t ) } nt
=1 collected a priori by a behaviour policy µ .
The goodness of a learned policy ˆ π is measured by the (expected) sub-optimality the policy achieves in the entire (unknown) context distribution ρ :
SubOpt [Equation] π
[Equation]
:= E [Equation] [SubOpt(ˆ π ; x )] , where SubOpt(ˆ π ; x ) :
= v ∗ ( x ) − v ˆ π ( x ) .
In this work, we make the following assumption about reward generation:
For each t , r t = h ( x t,a t )+ ξ t , where h : R d → [0 , 1] is an unknown reward function, and ξ t is a R -subgaussian noise conditioned on ( D t − 1 , x t , a t ) where we denote D t = { ( x τ , a τ , r τ ) } 1 ≤ τ ≤ t , ∀ t .
The R -subgaussian noise assumption is standard in stochastic bandit literature (Abbasi-Yadkori et al., 2011; Zhou et al., 2020; Xiao et al., 2021) and is satisfied e.g. for any bounded noise.
2. O VERPARAMETERIZED N EURAL N ETWORKS
To learn the unknown reward function without any prior knowledge about its parametric form, we approximate it by a neural network.
In this section, we define the class of overparameterized neural networks that will be used throughout this paper.
We consider fully connected neural networks with depth L ≥ 2 defined on R d as
[Equation]
where σ ( · ) = max {· , 0 } is the rectified linear unit (ReLU) activation function, W 1 ∈ R m × d , W i ∈
R m × m , ∀ i ∈ [2 , L − 1] , W L ∈ R m × 1 , and W :=
( W 1 , . . .
, W L ) with vec( W ) ∈
R p where p = md + m + m 2 ( L − 2) .
We assume that the neural network is overparameterized in the sense that the width m is sufficiently larger than the number of samples n .
Under such an overparameterization regime, the dynamics of the training of the neural network can be captured in the framework of socalled neural tangent kernel (NTK) (Jacot et al., 2018).
Overparameterization has been shown to be effective to study the interpolation phenomenon and neural training for deep neural networks (Arora et al., 2019; Allen-Zhu et al., 2019; Hanin & Nica, 2019; Cao & Gu, 2019; Belkin, 2021).
A LGORITHM
In this section, we present our algorithm, namely NeuraLCB (which stands for Neura l L ower
C onfidence B ound).
A key idea of NeuraLCB is to use a neural network f W ( x a ) to learn the reward function h ( x a ) and use a pessimism principle based on a lower confidence bound (LCB) of the reward function (Buckman et al., 2020; Jin et al., 2020) to guide decision-making.
The details of NeuraLCB are presented in Algorithm 1.
Notably, unlike any other OPL methods, NeuraLCB learns in an online-like manner.
Specifically, at step t , Algorithm 1 retrieves ( x t , a t , r t ) from the offline data D n , computes a lower confidence bound L t for each context and action based on the current network parameter W ( t − 1) , extracts a greedy policy ˆ π t with respect to L t , and updates W ( t ) by minimizing a regularized squared loss function L t ( W ) using stochastic gradient descent.
Note that Algorithm 1 updates the network using one data point at time t , does not use the last sample ( x n , a n , r n ) for decision-making and takes the average of an ensemble of policies { ˆ π t } nt =1 as its returned policy.
These are merely for the convenience of theoretical analysis.
In practice, we can either use the ensemble average, the best policy among the ensemble or simply the latest policy ˆ π n as the returned policy.
At step t , we can also train the network on a random batch of data from D t (the “B-mode” variant as discussed in Section 6).
G ENERALIZATION A NALYSIS
In this section, we analyze the generalization ability of NeuraLCB.
Our analysis is built upon the neural tangent kernel (NTK) (Jacot et al., 2018).
We first define the NTK matrix for the neural network function in Eq.
Definition 4.1 (Jacot et al.
(2018); Cao & Gu (2019)
; Zhou et al.
Denote { x ( i ) } nKi =1 = { x t,a ∈ R d : t ∈ [ n ] , a ∈ [ K ] } , ˜ H (1) i,j = Σ (1) i,j = ⟨ x ( i ) , x ( j ) ⟩ , and [Equation]
[Equation]
The neural tangent kernel (NTK) matrix is then defined as H =
( ˜ H ( L ) + Σ ( L ) ) / 2 .
Here, the Gram matrix H is defined recursively from the first to the last layer of the neural network using Gaussian distributions for the observed contexts { x ( i ) } nKi =1 .
Next, we introduce the assumptions for our analysis.
First, we make an assumption about the NTK matrix H and the input data.
Assumption 4.1.
∃ λ 0 > 0 , H ⪰ λ
I , and ∀ i ∈ [ nK ] , ∥ x ( i ) ∥ 2 = 1 .
Moreover, [ x ( i ) ]
j = [ x ( i ) ]
j + d/ 2 , ∀ i ∈
[ nK ] , j ∈ [ d/ 2] .
The first part of Assumption 4.1 assures that H is non-singular and that the input data lies in the unit sphere S d − 1 .
Such assumption is commonly made in overparameterized neural network literature (Arora et al., 2019; Du et al., 2019b;a; Cao & Gu, 2019).
While the non-singularity is satisfied when e.g. any two contexts in { x ( i ) } are not parallel, the unit sphere condition is merely for the sake of analysis and can be relaxed to the case that the input data is bounded in 2 -norm.
As for any input data point x such that ∥ x ∥ 2 = 1 we can always construct a new input x ′ = 1 √ 2 [ x , x ] T , the second part of Assumption 4.1 is mild and used merely for the theoretical analysis ( ? ).
In particular, under Assumption 4.1 and the initialization scheme in Algorithm 1, we have f W (0)
( x ( i ) ) = 0 , ∀ i ∈ [ nK ] .
Next, we make an assumption on the data generation.
Assumption 4.2.
∀ t, x t is independent of D t − 1 , [Table] [Table]
The first part of Assumption 4.2 says that the full contexts are generated by a process independent of any policy.
This is minimal and standard in stochastic contextual bandits (Lattimore & Szepesv ´ ari, 2020; Rashidinejad et al., 2021;
Papini et al., 2021), e.g., when { x t } nt =1 i.i.d.
∼ ρ .
The second part of Assumption 4.2, namely empirical single-policy concentration (eSPC) condition, requires that the behaviour policy µ has sufficient coverage over only the optimal policy π ∗ in the observed contexts.
Our data coverage condition is significantly milder than the common uniform data coverage assumptions in the OPL literature (Munos & Szepesv´ari, 2008; Chen & Jiang, 2019; Brandfonbrener et al., 2021; Jin et al., 2020; Nguyen-Tang et al., 2021) that requires the offline data to be sufficiently explorative in all contexts and all actions.
Moreover, our data coverage condition can be considered as an extension of the single-policy concentration condition in (Rashidinejad et al., 2021) where both require coverage over the optimal policy.
However, the remarkable difference is that, unlike (Rashidinejad et al., 2021), the behaviour policy µ in our condition needs not to be stationary and the concentration is only defined on the observed contexts; that is, a t can be dependent on both x t and
D t − 1 .
This is more practical as it is natural that the offline data was collected by an active learner such as a Q-learning agent (Mnih et al., 2015).
Next, we define the effective dimension of the NTK matrix on the observed data as ˜ d
= logdet( I + H /λ ) log(1+ nK/λ ) .
This notion of effective dimension was used in (Zhou et al., 2020) for online neural contextual bandits while a similar notion was introduced in (Valko et al., 2013) for online kernelized contextual bandits, and was also used in (Yang & Wang, 2020; Yang et al., 2020) for online kernelized reinforcement learning.
Although being in offline policy learning setting, the online-like nature of NeuraLCB allows us to leverage the usefulness of the effective dimension.
Intuitively, ˜ d measures how quickly the eigenvalues of H decays.
For example, ˜ d only depends on n logarithmically when the eigenvalues of H have a finite spectrum (in this case ˜ d is smaller than the number of spectrum which is the dimension of the feature space) or are exponentially decaying (Yang et al., 2020).
We are now ready to present the main result about the sub-optimality bound of NeuraLCB.
Theorem 4.1.
For any δ ∈ (0 , 1) , under Assumption 4.1 and 4.2, if the network width m , the regularization parameter λ , the confidence parameters { β t } and the learning rates { η t } in Algorithmsatisfy m ≥ poly ( n, L, K, λ − 1 , λ − 1 0 , log(1 /δ )) , λ ≥ max { 1 , Θ( L ) } , β {+t = (cid:113) λ + C 23 tL · ( t 1 / 2 λ − 1 / 2 + ( nK ) 1 / 2 λ − 1 / 2) · m − 1 / 2 for some absolute constant C 3 , η t = ι √ t , where ι − 1 = Ω( n 2 / 3 m 5 / 6 λ − 1 / 6 L 17 / 6 log 1 / 2 m ) ∨ Ω( mλ 1 / 2 log 1 / 
+}
( nKL 2 (10 n + 4) /δ )) , then with probability at least 1 − δ over the randomness of W (0) and D n , the sub-optimality of ˆ π returned by Algorithm 1 is bounded as
[Equation]
where ˜ d is the effective dimension of the NTK matrix, and κ is the empirical single-policy concentration (eSPC) coefficient in Assumption 4.2.
Our bound can be further simplified as E [SubOpt(ˆ π )]
=
˜ O ( κ · max { (cid:112) ˜
d, 1 } · n − 1 / 2 ) .
A detailed proof for Theorem 4.1 is omitted to Section A.
We make several notable remarks about our result.
First , our bound does not scale linearly with p or √ p as it would if the classical analyses (Abbasi-Yadkori et al., 2011; Jin et al., 2020) had been applied.
Such a classical bound is vacuous for overparameterized neural networks where p is significantly larger than n .
Specifically, the online-like nature of NeuraLCB allows us to leverage a matrix determinant lemma and the notion of effective dimension in online learning (Abbasi-Yadkori et al., 2011;
Zhou et al., 2020) which avoids the dependence on the dimension p of the feature space as in the existing OPL methods such as (Jin et al., 2020).
Second , as our bound scales linearly with (cid:112) ˜ d where ˜ d scales only logarithmically with n in common cases (Yang et al., 2020), our bound is sublinear in such cases and presents a provably efficient generalization.
Third , our bound scales linearly with κ which does not depend on the coverage of the offline data on other actions rather than the optimal ones.
This eliminates the need for a strong uniform data coverage assumption that is commonly used in the offline policy learning literature (Munos & Szepesv ´ ari, 2008; Chen & Jiang, 2019; Brandfonbrener et al., 2021; Nguyen-Tang et al., 2021).
Moreover, the online-like nature of our algorithm does not necessitate the stationarity of the offline policy, allowing an offline policy with correlated structures as in many practical scenarios.
Note that Zhan et al.
(2021) have also recently addressed the problem of off-policy evaluation with such offline adaptive data but used doubly robust estimators instead of direct methods as in our paper.
Fourth , compared to the regret bound for online learning setting in (Zhou et al., 2020), we achieve an improvement by a factor of (cid:112) ˜
d while reducing the computational complexity from O ( n 2 ) to O ( n ) .
On a more technical note, a key idea to achieve such an improvement is to directly regress toward the optimal parameter of the neural network instead of toward the empirical risk minimizer as in (Zhou et al., 2020).
Finally , to further emphasize the significance of our theoretical result, we summarize and compare it with the state-of-the-art (SOTA) sub-optimality bounds for OPL with function approximation in
Table 1.
From the leftmost to the rightmost column, the table describes: the related works – the function approximation – the types of algorithms where Pessimism means a pessimism principle based on a lower confidence bound of the reward function while Greedy indicates being uncertaintyagnostic (i.e., an algorithm takes an action with the highest predicted score in a given context) – the optimization problems in OPL where Analytical means optimization has an analytical solution,
Oracle means the algorithm relies on an oracle to obtain the global minimizer, and SGD means the optimization is solved by stochastic gradient descent – the sub-optimality bounds – the data coverage assumptions where Uniform indicates sufficiently explorative data over the context and action spaces, SPC is the single-policy concentration condition, and eSPC is the empirical SPC – the nature of data generation required for the respective guarantees where I (Independent) means that the offline actions must be sampled independently while D (Dependent) indicates that the offline actions can be dependent on the past data.
It can be seen that our result has a stronger generalization under the most practical settings as compared to the existing SOTA generalization theory for OPL.
We also remark that the optimization design and guarantee in NeuraLCB (single data point SGD) are of independent interest that do not only apply to the offline setting but also to the original online setting in (Zhou et al., 2020) to improve their regret and optimization complexity.
R ELATED W ORK
OPL with function approximation .
Most OPL works, in both bandit and reinforcement learning settings, use tabular representation (Yin & Wang, 2020; Buckman et al., 2020;
Yin et al., 2021;
Yin & Wang, 2021; Rashidinejad et al., 2021; Xiao et al., 2021) and linear models (Duan & Wang,
[Table]
2020; Jin et al., 2020; Tran-The et al., 2021).
The most related work on OPL with neural function approximation we are aware of are (Brandfonbrener et al., 2021; Nguyen-Tang et al., 2021; Uehara et al., 2021).
However, Brandfonbrener et al.
Nguyen-Tang et al.
; Uehara et al.
(2021) rely on a strong uniform data coverage assumption and an optimization oracle to the empirical risk minimizer.
Other OPL analyses with general function approximation (Duan et al., 2021;
Hu et al., 2021) also use such optimization oracle, which limit the applicability of their algorithms and analyses in practical settings.
To deal with nonlinear rewards without making strong functional assumptions, other approaches rather than neural networks have been considered, including a family of experts (Auer, 2003), a reduction to supervised learning (Langford & Zhang, 2007; Agarwal et al., 2014), and nonparametric models (Kleinberg et al., 2008; Srinivas et al., 2009; Krause & Ong, 2011; Bubeck et al., 2011; Valko et al., 2013).
However, they are all in the online policy learning setting instead of the OPL setting.
Moreover, these approaches have time complexity scaled linearly with the number of experts, rely the regret on an oracle, and have cubic computational complexity, respectively, while our method with neural networks are both statically and computationally efficient where it achieves a √ n -type suboptimality bound and only linear computational complexity.
Neural networks .
Our work is inspired by the theoretical advances of neural networks and their subsequent application in online policy learning (Yang et al., 2020;
Zhou et al., 2020; Xu et al., 2020).
For optimization aspect, (stochastic) gradient descents can provably find global minima of training loss of neural networks (Du et al., 2019a;b; Allen-Zhu et al., 2019; Nguyen, 2021).
For generalization aspect, (stochastic) gradient descents can train an overparameterized neural network to a regime where the neural network interpolates the training data (i.e., zero training error) and has a good generalization ability (Arora et al., 2019; Cao & Gu, 2019; Belkin, 2021).
Regarding the use of neural networks for policy learning, NeuraLCB is similar to the NeuralUCB algorithm
(Zhou et al., 2020), that is proposed for the setting of online contextual bandits with neural networks, in the sense that both algorithms use neural networks, learn with a streaming data and construct a (lower and upper, respectively) confidence bound of the reward function to guide decision-making.
Besides the apparent difference of offline and online policy learning problems, the notable difference of NeuraLCB from NeuralUCB is that while NeuralUCB trains a new neural network from scratch at each iteration (for multiple epochs), NeuraLCB trains a single neural network completely online.
That is, NeuraLCB updates the neural network in light of the data at a current iteration from the trained network of the previous iteration.
Such optimization scheme in
NeuraLCB greatly reduces the computational complexity from O ( n 2 ) 1 to O ( n ) , while still guaranteeing a provably efficient algorithm.
Moreover, NeuraLCB achieves a suboptimality bound with a better dependence on the effective dimension than NeuralUCB.
E XPERIMENTS
In this section, we evaluate NeuraLCB and compare it with five representative baselines: (1) LinLCB (Jin et al., 2020), which also uses LCB but relies on linear models, (2) KernLCB, which approximates the reward using functions in a RKHS and is an offline counterpart of KernelUCB (Valko et al., 2013), (3) NeuralLinLCB, which is the same as LinLCB except that it uses [Figure]
ϕ ( x a ) = vec( ∇ f W (0) ( x a ))
as the feature extractor for the linear model where f W (0) is the same neural network of NeuraLCB at initialization, (4) NeuralLinGreedy, which is the same as NeuralLinLCB except that it relies on the empirical estimate of the reward function for decision-making, and (5) NeuralGreedy, which is the same as NeuraLCB except that NeuralGreedy makes decision based on the empirical estimate of the reward.
For more details and completeness, we present the pseudo-code of these baseline methods in Section D. Here, we compare the algorithms by their generalization ability via their expected sub-optimality.
For each algorithm, we vary the number of (offline) samples n from 1 to T where T will be specified in each dataset, and repeat each experiment for 10 times.
We report the mean results and their 95% confidence intervals.
Approximation .
To accelerate computation, we follow (Riquelme et al., 2018;
Zhou et al., 2020) to approximate large covariance matrices and expensive kernel methods.
Specifically, as NeuraLCB and NeuralLinLCB involve computing a covariance matrix
Λ t of size p × p where p = md + m + m 2 ( L − 2) is the number of the neural network parameters which could be large, we approximate Λ t by its diagonal.
Moreover, as KernLCB scales cubically with the number of samples, we use
KernLCB fitted on the first 1 , 000 samples if the offline data exceeds 1 , 000 samples.
Data generation .
We generate offline actions using a fixed ϵ -greedy policy with respect to the true reward function of each considered contextual bandit, where ϵ is set to 0 .
1 for all experiments in this section.
In each run, we randomly sample n te = 10 , 000 contexts from ρ and use this same test contexts to approximate the expected sub-optimality of each algorithm.
Hyperparameters .
We fix λ = 0 .
1 for all algorithms.
For NeuraLCB, we set β t = β , and for NeuraLCB, LinLCB, KernLCB, and NeuralLinLCB, we do grid search over { 0 . 01 , 0 . 05 , 0 . 1 , 1 , 5 , 10 } for the uncertainty parameter β .
For KernLCB, we use the radius basis function (RBF) kernel with parameter σ and do grid search over { 0 . 1 , 1 , 10 } for σ .
For NeuraLCB and NeuralGreedy, we use
Adam optimizer (Kingma & Ba, 2014) with learning rate η grid-searched over { 0 . 0001 , 0 . 001 } and set the l 2 -regularized parameter to 0 . 0001 .
For NeuraLCB, for each D t , we use ˆ π t as its final returned policy instead of averaging over all policies { ˆ π τ } t τ =1 .
Moreover, we grid search NeuraLCB and NeuralGreedy over two training modes, namely { S-mode , B-mode } where at each iteration t , Smode updates the neural network for one step of SGD (one step of Adam update in practice) on one single data point ( x t , a t , r t ) while B-mode updates the network for 100 steps of SGD on a random batch of size 50 of data D t (details at Algorithm 7).
We remark that even in the B-mode, NeuraLCB is still more computationally efficient than its online counterpart
NeuralUCB
(Zhou et al., 2020) as
NeuraLCB reuses the neural network parameters from the previous iteration instead of training it from scratch for each new iteration.
For NeuralLinLCB, NeuralLinGreedy, NeuraLCB, and NeuralGreedy, we use the same network architecture with L = 2 and add layer normalization (Ba et al., 2016) in the hidden layers.
The network width m will be specified later based on datasets.
6. S YNTHETIC D ATASETS
For synthetic experiments, we evaluate the algorithms on contextual bandits with the synthetic nonlinear reward functions h used in (Zhou et al., 2020):
[Equation]
[Figure] where a ∈ R d is randomly generated from uniform distribution over the unit sphere, and each entry of A ∈ R d × d is independently and randomly generated from N (0 , 1) .
For each reward function h
i , r t = h i ( x t,a t ) + ξ t where ξ t ∼ N (0 , 0 . 1) .
The context distribution ρ for three cases is the uniform distribution over the unit sphere.
All contextual bandit instances have context dimension d =and K = 30 actions.
Moreover, we choose the network width m = 20 and the maximum number of samples T = 10 , 000 for the synthetic datasets.
6. R EAL - WORLD D ATASETS
We evaluate the algorithms on real-world datasets from UCI Machine Learning Repository (Dua & Graff, 2017): Mushroom , Statlog , and Adult , and MNIST (LeCun et al., 1998).
They represent a good range of properties: small versus large sizes, dominating actions, and stochastic versus deterministic rewards (see Section E in the appendix for details on each dataset).
Besides the Mushroom bandit, Statlog , Adult , and MNIST are K -class classification datasets, which we convert into
K -armed contextual bandit problems, following (Riquelme et al., 2018;
Zhou et al., 2020).
Specifically, for each input x ∈ R d in a K -class classification problem, we create K contextual vectors x 1 = ( x , 0 , . .
, x K = ( 0 , . . .
, 0 , x ) ∈ R dK .
The learner receives reward 1 if it selects context x y where y is the label of x , and receives reward 0 otherwise.
Moreover, we choose the network width m = 100 and the maximum sample number T = 15 , 000 for these datasets.
6. R ESULTS
Figure 1 and 2 show the expected sub-optimality of all algorithms on synthetic datasets and realworld datasets, respectively.
First, due to the non-linearity of the reward functions, methods with linear models (LinLCB, NeuralLinLCB, NeuralLinGreedy, and KernLCB) fail in almost all tasks (except that LinLCB and KernLCB have competitive performance in Mushroom and Adult , respectively).
In particular, linear models using neural network features without training (NeuralLinLCB and NeuralLinGreedy) barely work in any datasets considered here.
In contrast, our method NeuraLCB outperforms all the baseline methods in all tasks.
We remark that NeuralGreedy has a substantially lower sub-optimality in synthetic datasets (and even a comparable performance with NeuraLCB in h 1 ) than linear models, suggesting the importance of using trainable neural representation in highly non-linear rewards instead of using linear models with fixed feature extractors.
On the other hand, our method NeuraLCB outperforms NeuralGreedy in real-world datasets by a large margin (even though two methods are trained exactly the same but different only in decision-making), confirming the effectiveness of pessimism principle in these tasks.
Second, KernLCB performs reasonably in certain OPL tasks ( Adult and slightly well in Statlog and MNIST ), but the cubic computational complexity of kernel methods make it less appealing in OPL with offline data at more than moderate sizes.
Note that due to such cubic computational complexity, we follow (Riquelme et al., 2018; Zhou et al., 2020) to learn the kernel in KernLCB for only the first 1 , 000 samples and keep the fitted kernel for the rest of the data (which explains the straight line of KernLCB after n = 1 ,in our experiments).
Our method NeuraLCB, on the other hand, is highly computationally efficient as the computation scales only linearly with n (even in the B-mode – a slight modification of the original algorithm to include batch training).
In fact, in the real-world datasets above, the S-mode (which trains in a single data point for one SGD step at each iteration) outperforms the B-mode, further confirming the effectiveness of the online-like nature in NeuraLCB.
In Section F, we reported the performance of S-mode and B-mode together and evaluated on dependent offline data.
C ONCLUSION
In this paper, we proposed NeuraLCB, a new algorithm for offline contextual bandits with neural network function approximation and pessimism principle.
We proved that our algorithm achieves a sub-optimality bound of ˜ O
( κ · (cid:112) ˜ d · n − 1 / 2 ) under our new data coverage condition that is milder than the existing ones.
This is also the first provably efficient result of OPL with neural network function approximation that considers practical optimization.
The promising empirical results in both synthetic and real-world datasets suggested the effectiveness of our algorithm in practice.
A CKNOWLEDGEMENT
This research was partially funded by the Australian Government through the Australian Research Council (ARC).
Prof. Venkatesh is the recipient of an ARC Australian Laureate Fellowship (FL170100006).
A P ROOF OF T HEOREM 4.
In this section
[Equation]
we provide the proof of Theorem 4.1.
Let D t
= { ( x τ , a τ , r τ ) } 1 ≤ τ ≤ t .
Note that ˆ π t returned by Algorithm 1 is D t − 1 -measurable.
Denote E t [ · ] = E [ ·|D t − 1 , x t ] .
Let the step sizes { η t } defined as in Theorem 4.1 and the confidence trade-off parameters { β t } defined as in Algorithm 1, we present main lemmas below which will culminate into the proof of the main theorem [Equation]
Lemma A.1.
There exists absolute constants C 1 , C 2 > 0 such that for any δ ∈ (0 , 1) , if m satisfies
[Equation]
then with probability at least 1 − δ
[Equation]
it holds uniformly over all t ∈ [ n ] that
[Equation]
Lemma A.1 gives an upper bound on the sub-optimality of the returned step-dependent policy ˆ π t on the observed context x t for each t ∈ [ n ] .
We remark that the upper bound depends on the rate at which the confidence width of the NTK feature vectors shrink along the direction of only the optimal actions, rather than any other actions.
This is an advantage of pessimism where it does not require the offline data to be informative about any sub-optimal actions.
However, the upper bound depends on the unknown optimal policy π ∗ while the offline data has been generated a priori by a different unknown behaviour policy.
This distribution mismatch is handled in the next lemma.
Lemma A.2.
There exists an absolute constant C 3 > 0 such that for any δ ∈ (0 , 1) , if m and λ satisfy
[Equation] [Equation]
then with probability at least 1 − δ , we have
[Equation]
where C 2 is from Lemma A.1.
We also remark that the upper bound in Lemma A.2 scales linearly with (cid:112) ˜
d instead of with √ p if a standard analysis were applied.
This avoids a vacuous bound as p is large with respect to n .
The upper bounds in Lemma A.1 and Lemma A.2 are established for the observed contexts only.
The next lemma generalizes these bounds to the entire context distribution, thanks to the onlinelike nature of Algorithm 1 and an online-to-batch argument.
In particular, a key technical property of Algorithm 1 that makes this generalization possible without a uniform convergence is that ˆ π t is
D t − 1 -measurable and independent of ( x t , a t , r t ) .
Lemma A.3.
For any δ ∈ (0 , 1) , with probability at least 1 − δ over the randomness of D n , we have
E [SubOpt(ˆ π )] ≤ 1 n (cid:80) n t =
SubOpt(ˆ π t ; x t ) + (cid:113) 2 n log(1 /δ ) .
We are now ready to prove the main theorem.
Proof of Theorem 4.1.
Combining Lemma A.1, Lemma A.2, and Lemma A.3 via the union bound, we have
[Equation]
where m is chosen to be sufficiently large as a polynomial of ( n
[Equation]
L
[Equation]
K [Equation] λ − 1 , λ − 1 0 , log(1 /δ ))
such that
[Equation]
B P ROOF OF L EMMAS IN S ECTION A B. P ROOF OF L EMMA A.
We start with the following lemmas whose proofs are deferred to Appendix B.
Lemma B.1.
Let h =
[ h ( x (1) ) , . . .
, h ( x ( nK ) )]
T ∈ R nK .
There exists W ∗ ∈ W such that for any δ ∈ (0 , 1) , if m ≥ Θ( L 6 n 4 K 4 λ − 4 0 log( nKL/δ )) , with probability at least 1 − δ over the randomness of W (0) , it holds uniformly for all i ∈
[ nK ] that
[Equation]
Remark B.1 .
Lemma B.1 shows that for a sufficiently wide network, there is a linear model that uses the gradient of the neural network at initialization as a feature vector and interpolates the reward function in the training inputs.
Moreover, the weights W ∗ of the linear model is in a neighborhood of the initialization W (0) .
Note that we also have
[Equation]
where the second inequality is by Assumption 4.1 and Cauchy-Schwartz inequality with h ( x ) ∈ [0 , 1] , ∀ x .
Lemma B.2.
For any δ ∈ (0 , 1) , if m satisfies
[Equation]
) , and the step sizes satisfy
[Equation]
then with probability at least 1 − δ over the randomness of W (0) and D , it holds uniformly for all t ∈ [ n ] , l ∈
[ L ] that
[Equation]
where C 3 > 0 is an absolute constant from Lemma C.2.
Remark B.2 .
Lemma B.2 controls the growth dynamics of the learned weights W t around its initialization and bounds the spectral norm of the empirical covariance matrix Λ t when the model is trained by SGD.
Lemma B.3 (Allen-Zhu et al.
(2019, Theorem 5), Cao & Gu (2019, Lemma B.5)) .
There exist an absolute constant C 2 > 0 such that for any δ ∈ (0 , 1) , if ω satisfies
[Equation]
with probability at least 1 − δ over the randomness of W (0) , it holds uniformly for all W ∈
B ( W (0) ; ω ) and i ∈ [ nK ] that
[Equation]
Remark B.3 .
Lemma B.3 shows that the gradient in a neighborhood of the initialization differs from the gradient at the initialization by an amount that can be explicitly controlled by the radius of the neighborhood and the norm of the gradient at initialization.
Lemma B.4 (Cao & Gu (2019, Lemma 4.1)) .
There exist an absolute constant C 1 > 0 such that for any δ ∈ (0 , 1) over the randomness of W (0) , if ω satisfies
[Equation]
with probability at least 1 − δ , it holds uniformly for all W , W
′ ∈ B ( W (0) ; ω ) and i ∈ [ nK ] that
[Equation]
m log m.
Remark B.4 .
Lemma B.4 shows that near initialization the neural network function is almost linear in terms of its weights in the training inputs.
Proof of Lemma A.1.
For all t ∈ [ n ] , u ∈ R d , we define
[Equation]
Let E be the event in which Lemma B.1, Lemma B.3, Lemma B.3 for all ω ∈ (cid:110)(cid:113) i mλL : 1 ≤ i ≤ n (cid:111) , and Lemma B.4 for all ω ∈ (cid:110)(cid:113) i mλL : 1 ≤ i ≤ n (cid:111) hold simultaneously.
Under event E , for all t ∈ [ n ] , we have
[Equation]
where the second inequality is by the triangle inequality, and the third inequality is by Lemma B. and Lemma B.2.
Thus, W ∗ ∈ C t , ∀ t ∈ [ n ] .
Denoting a ∗ t ∼ π ∗ ( ·| x t ) and ˆ a t ∼ ˆ π t ( ·| x t ) , under event E , we have
SubOpt
[Equation] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
where ( a ) is by Lemma B.1, ( b ) is by the triangle inequality, ( c ) is by Lemma B.1,
Lemma B.
[Equation]
and
Lemma B.3, ( d ) is by W ∗
∈ C t , and by that max u :
∥ u − b ∥
A ≤ γ ⟨ a , u − b 0 ⟩ = ⟨ a , b − b 0 ⟩ + γ ∥ a ∥ A − 1 , and min u : ∥
u − b ∥
A ≤ γ ⟨ a , u − b 0 ⟩ = ⟨ a , b − b 0 ⟩ − γ ∥ a ∥
A − 1 , ( e ) is by Lemma B.4 and by that f W (0)
( x ( i ) ) = 0 , ∀ i ∈ [ nK ] , and ( f ) is by that ˆ a t is sampled from the policy ˆ π t which is greedy with respect to L t .
By the union bound and the choice of m , we conclude our proof.
B. P ROOF OF L EMMA A.
We first present the following lemma.
Lemma B.5.
For any δ ∈ (0 , 1) , if m satisfies
[Equation]
[Equation]
[Equation]
, and λ ≥ max { C 23 L, 1 } , then with probability at least 1 − δ , it holds simultaneously that t (cid:88) i = ∥∇ [Equation] λ I )
[Equation]
∀ t ∈ [ n ] [Equation] (cid:12)(cid:12)(cid:12)(cid:12) [Equation]
) det( λ
[Equation]
log det
[Equation]
) det
[Equation]
[Equation]
6 λ −
[Equation]
[Equation]
∀ t ∈ [ n ] , log det( ¯ Λ n ) det( λ I )
[Equation]
where ¯ Λ t :
= λ I + (cid:80) ti =1 vec( ∇ f W (0) ( x i,a i )) · vec( ∇ f W (0) ( x i,a i ))
T /m , and C 2 , C 3 > 0 are absolute constants from Lemma B.3 and Lemma B.2, respectively.
We are now ready to prove Lemma A.2.
Proof of Lemma A.2.
First note that ∥ Λ t − 1 ∥ 2 ≥ λ, ∀ t .
Let E be the event in which Lemma B.2,
Lemma C.2 for all ω ∈ (cid:110)(cid:113) imλL : 1 ≤ i ≤ n (cid:111) , and Lemma B.5 simultaneously hold.
Thus, under event E , we have
[Equation]
where the second inequality is by Lemma B.2 and Lemma C.2.
Thus, by Assumption 4.2, Hoeffding’s inequality, and the union bound, with probability at least 1 − δ , it holds simultaneously for all t ∈ [ n ] that
[Equation]
Hence, for the choice of m in Lemma A.2, with probability at least 1 − δ
[Equation]
we have
[Equation]
where the first inequality is by β t ≤ β n , ∀ t ∈ [ n ] , the second inequality is by Cauchy-Schwartz inequality, the second inequality and the third inequality are by Lemma B.5.
B. P ROOF OF L EMMA A.
Proof of Lemma A.3.
We follow the same online-to-batch conversion argument in (Cesa-Bianchi et al., 2004).
For each t ∈ [ n ] , define
[Equation]
Since ˆ π t is D t − 1 -measurable and is independent of x t , and x t are independent of D t − 1 (by Assumption 4.2), we have E [ Z t |D t − 1 ] = 0 , ∀ t ∈ [ n ] .
Note that − 1 ≤ Z t ≤ 1 .
Thus, by the
Hoeffding-Azuma inequality, with probability at least 1 − δ , we have
[Equation]
≤n n (cid:88) t =
SubOpt(ˆ π t ; x t ) + (cid:114)n log(1 /δ ) .
C P ROOF OF L EMMAS IN S ECTION B C. P ROOF OF L EMMA B.
We first restate the following lemma.
Lemma C.1 (Arora et al.
There exists an absolute constant c 1 > 0 such that for any ϵ > 0 , δ ∈ (0 , 1) , if m ≥ c 1 L 6 ϵ − 4 log( L/δ ) , for any i, j ∈ [ nK ] , with probability at least 1 − δ over the randomness of W (0) , we have
[Equation]
Lemma C.1 gives an estimation error between the kernel constructed by the gradient at initialization as a feature map and the NTK kernel.
Unlike Jacot et al.
(2018), Lemma C.1 quantifies an exact non-asymptotic bound for m .
Proof of Lemma B.1.
Let G = m − 1 / 2 · [vec( ∇ f W (0) ( x (1) )) , . .
, vec( ∇ f W (0) ( x ( nK ) ))]
∈ R p × nK .
For any ϵ > 0 , δ ∈ (0 , 1) , it follows from Lemma C.1 and union bound, if m ≥ Θ( L 6 ϵ − 4 log( nKL/δ )) , with probability at least 1 − δ , we have ∥ G T G − H ∥ F ≤ nK ∥
G T G − H ∥ ∞ =
nK max i,j | m − 1 ⟨∇ f W (0) ( x ( i ) ) , ∇ f W (0) ( x ( j ) ) ⟩ − H i,j | ≤ nKϵ.
Under the event that the inequality above holds, by setting ϵ = λ 0 2 nK , we have
[Equation]
Let G = P Λ Q T be the singular value decomposition of G where P ∈ R p × nK , Q ∈ R nK × nK have orthogonal columns, and Λ ∈ R nK × nK is a diagonal matrix.
Since G T G ⪰ 12 H ⪰ λ 0
I is positive definite, Λ is invertible.
Let W ∗ ∈
W such that vec( W ∗ ) =
vec( W (0) )
+ m − 1 / 2 ·
P Λ − 1 Q T h , we have
[Equation]
Moreover, we have
[Equation]
where the inequality is by Equation (2).
C. P ROOF OF L EMMA B.
We present the following lemma that will be used in this proof.
Lemma C.2 (Cao & Gu (2019, Lemma B.3)) .
There exist an absolute constant C 3 > 0 such that for any δ ∈ (0 , 1) over the randomness of W (0) , if ω satisfies
[Equation]
) , with probability at least 1 − δ , it holds uniformly for all W ∈ B ( W (0) ; ω ) , i ∈
[ nK ] , l ∈
[ L ] that
[Equation]
Proof of Lemma B.2.
Let δ ∈ (0 , 1) .
Let L t ( W [Equation] =
[Equation]
x
[Equation] [Equation]
2 +
[Equation] [Equation]
W − W
[Equation]
∥ 2 F be the regularized squared loss function on the data point ( x t,a t , r t ) .
Recall that W ( t ) =
W ( t − 1) − η t ∇ L t ( W ( t − 1) ) .
By Hoelfding’s inequality and that r t is R -subgaussian, for any t ∈ [ n ] , with probability at least 1 − δ , we have
[Equation]
By union bound and (3), for any sequence { ω t } t ∈ [ n ] such that
[Equation]
) , ∀ t ∈ [ n ] , with probability at least 1 − δ , it holds uniformly for all W ∈ B ( W (0) ; ω t ) , l ∈ [ L ] , t ∈ [ n ] that
[Equation]
where the first inequality is triangle’s inequality, and the second inequality is by Lemma B.4,
Lemma
C.2 and (3).
We now prove by induction that under the same event that (4) with ω t = (cid:113) tmλL holds, W ( t ) ∈
B ( W (0) ; (cid:113) tmλL ) , ∀ t ∈ [ n ] .
It trivially holds for t = 0 .
Assume W ( i ) ∈
B ( W (0) ; (cid:113) imλL ) , ∀ i ∈
[ t − 1] , we will prove that W ( t ) ∈ B ( W (0) ; (cid:113) tmλL ) .
Indeed, it is easy to verify that there exist absolute constants { C i } 2 i =1 >
such that if m satisfies the inequalities in Lemma B.2, then Θ( m − 3 / 2 L − 3 / 2 log 3 / 2 (3 n 2 KL 2 /δ )) ≤ (cid:113) imλL ≤ Θ( L − 6 log − 3 m )
∧ Θ( L − 6 log − 3 / 2 m ) , ∀ i ∈ [ n ] .
Thus, under the same event that (4) holds, we have ∥ W ( t ) l
[Equation]
where the first inequality is by triangle’s inequality, the first equation is by the SGD update for each
W ( i ) , the second inequality is by (4) and the last inequality is due to ι be chosen as  
[Equation]
, which is satisfied for ι −
= Ω( n 2 / 3 m 5 / 6 λ − 1 / 6 L 17 / 6 log 1 / 2 m ) ∨ Ω( Rmλ 1 / 2 log 1 / 2 ( n/δ )) .
For the second part of the lemma, we have
[Equation]
[Equation]
where the first inequality is by triangle’s inequality and the second inequality is by ∥ W ( i ) −
W (0) ∥ F ≤ (cid:113) imλ , ∀ i ∈ [ n ] and Lemma C.2.
C. P ROOF OF L EMMA B.
Proof of Lemma B.5.
Let E ( δ ) be the event in which the following ( n + 2) events hold simultaneously: the events in which Lemma B.3 for each ω ∈ (cid:110)(cid:113) imλL : 1 ≤ i ≤ n (cid:111) holds, the event in which Lemma C.1 for ϵ = ( nK ) − 1 holds, and the event in which Lemma C.2 holds.
Under event E ( δ ) , we have
[Equation]
Thus, by (Abbasi-Yadkori et al., 2011, Lemma 11), if we choose λ ≥ max { 1 , c 2 6 L } , we have
[Equation]
For the second part of Lemma B.5, for any t ∈ [ n ] , we define
[Equation]
t .
We have ¯ Λ t =
λ I + ¯ M t
¯ M Tt and Λ t
= λ
I + M t M Tt , and (cid:12)(cid:12)(cid:12)(cid:12) log det ( Λ t ) det ( λ I ) − log det ( ¯ Λ t ) det ( λ I ) (cid:12)(cid:12)(cid:12)(cid:12) =
| log det( I + M t M Tt /λ )
− log det( I + ¯ M t ¯ M Tt /λ )
| = | log det( I + M Tt M t /λ )
− log det( I +
¯ M Tt ¯ M t /λ ) | ≤ max {∥⟨ ( I + M Tt M t /λ ) − 1 , M Tt M t − ¯ M Tt ¯ M t ⟩∥ , ∥⟨ ( I + ¯ M Tt ¯ M t /λ )
− 1 , M Tt M t −
¯ M Tt ¯ M t ⟩∥} = ∥⟨ ( I + M Tt M t /λ ) − 1 , M Tt M t − ¯ M Tt ¯ M t ⟩∥ ≤ ∥ ( I + M Tt M t /λ ) − 1 ∥ F · ∥ M Tt M t −
¯ M Tt ¯ M t ∥ F ≤ √ t ∥ ( I + M Tt M t /λ ) − 1 ∥ 2 · ∥ M Tt M t −
¯ M Tt ¯ M t ∥ F ≤ √ t ∥ M T t M t − ¯ M T t ¯ M t ∥ F ≤ √ tt max 1 ≤
i,j ≤ t m − 1 · (cid:12)(cid:12)(cid:12)(cid:12) ⟨∇ f W ( t − 1) ( x i,a i ) , ∇ f W ( t − 1) ( x j,a j ) ⟩ − ⟨∇ f W (0) ( x i,a i ) , ∇ f W (0) ( x j,a j ) ⟩ (cid:12)(cid:12)(cid:12)(cid:12) ≤ t 3 / 2 m − 1 max 1 ≤ i,j ≤ t (cid:18)(cid:12)(cid:12)(cid:12)(cid:12) ⟨∇ f W ( t − 1)
[Equation]
where the second equality is by det( I + AA T )
= det( I + A T A ) , the first inequality is by that log det is concave, the third equality is assumed without loss of generality, the second inequality is by that ⟨ A , B ⟩ ≤ ∥
A ∥ F ∥ B ∥ F , the third inequality is by that ∥ A ∥ F ≤ √ t ∥
A ∥ 2 for A ∈ R t × t , the fourth inequality is by that I + M Tt M t /λ
⪰ I , the fifth inequality is by that
∥ A ∥ F ≤ t ∥
A ∥ ∞ for A ∈ R t × t , the sixth inequality is by the triangle inequality, and the last inequality is by Lemma B.3, and Lemma C.2.
The third part of Lemma B.5 directly follows the argument in ( ? , (B.18)) and uses Lemma C.1 for ϵ = ( nK ) − 1 .
Finally, it is easy to verify that the condition of m in Lemma B.5 satisfies the condition of m for
E ( δ/ ( n + 2)) , and union bound we have P ( E ( δ/ ( n + 2))) ≥ 1 − δ .
D D ETAILS OF BASELINE ALGORITHMS IN S ECTION
In this section, we present the details of each representative baseline methods and of the B-mode version of NeuraLCB in Section 6.
We summarize the baseline methods in Table 2.
[Table]
Input: Offline data D n = { ( x t , a t , r t ) } nt =1 ,
reg parameter λ > confidence parameters β >
1: Λ n ← λ
I + (cid:80) nt
=1 x t,a t x Tt,a t ˆ θ
n ← Λ − 1 n (cid:80) nt
=1 x t,a t r t
3: L ( u ) ← ⟨ ˆ θ n , u ⟩ − β ∥
u ∥ Λ − 1 n , ∀ u ∈ R d
Output: ˆ π ( x ) ← arg max a ∈ [ K ] L ( x a )
Input
: Offline data D = ( x t , a t , r t ) } nt =
reg. parameter λ >
confidence parameters β > 0 , kernel k : R d × R d → R .
1: k n ( u ) ← [ k ( u , x 1 ,a 1 ) , . . .
, k ( u , x n,a n )] T , ∀ u ∈ R d
: K n ← [ k ( x i,a i , x j,a j )] 1 ≤ i,j ≤ n n
[ r 1 , .
, r n ] T
L u ) k n ( u )
( K n + λI ) − 1 y n − β (cid:112) k
( u , u ) − k Tn ( u )( K n + λI ) − 1 k n , ∀ u ∈ R d K [Table]
[Table] [Table] [Table] [Table]
[Table] [Table] [Table] [Table]
[Table] [Table] [Table] [Table]
[Table]
[Table]
[Table] [Table]
[Table]
[Table]
[Table] [Table]
[Table]
: end for 14:
W ( t ) ← ˜ W ( J ) 15: end for Output: Randomly sample ˆ π uniformly from { ˆ π 1 , . . . , ˆ π n } .
E D ATASETS
We present a detailed description about the UCI datasets used in our experiment.
• Mushroom data : Each sample represents a set of attributes of a mushroom.
There are two actions to take on each mushroom sample: eat or no eat.
Eating an editable mushroom
[Table]
generates a reward of +5 while eating a poisonous mushroom yields a reward of +5 with probability 0 .
5 and a reward of − 35 otherwise.
No eating gives a reward of 0 .
• Statlog data : The shuttle dataset contains the data about a space shuttle flight where the goal is to predict the state of the radiator subsystem of the shuttle.
There are total K =states to predict where approximately 80% of the data belongs to one state.
A learner receives a reward of 1 if it selects the correct state and 0 otherwise.
• Adult data : The Adult dataset contains personal information from the US Census Bureau database.
Following (Riquelme et al., 2018), we use the K = 14 different occupations as actions and d = 94 covariates as contexts.
As in the Statlog data, a learner obtains a reward of 1 for making the right prediction, and 0 otherwise.
• MNIST data: The MNIST data contains images of various handwritten digits from 0 to 9 .
We use K = 10 different digit classes as actions and d = 784 covariates as contexts.
As in the Statlog and Adult data, a learner obtains a reward of 1 for making the right prediction, and 0 otherwise.
We summarizes the statistics of the above datasets in Table 3.
F A DDITIONAL E XPERIMENTS
In this section, we complement the experimental results in the main paper with additional experiments regarding the learning ability of our algorithm on dependent data and the different behaviours of S-mode and B-mode training.
F. D EPENDENT DATA
As the sub-optimality guarantee in Theorem 4.1 does not require the offline policy to be stationary, we evaluate the empirical performance of our algorithm and the baselines on a new setup of offline data collection that represents dependent actions.
In particular, instead of using a stationary policy to collect offline actions as in Section 6, here we used an adaptive policy µ defined as
[Equation]
where π ∗ is the optimal policy and π LinUCB is the linear UCB learner (Abbasi-Yadkori et al., 2011).
This weighted policy makes the collected offline data a t dependent on D t − 1 while making sure that the offline data has a sufficient coverage over the data of the optimal policy, as LinUCB does not perform well in several non-linear data.
We used ϵ = 0 .
9 in this experiment.
The results on Statlog and MNIST are shown in Figure 3.
We make two important observations.
First, on this dependent data, the baseline methods with linear models (LinLCB, NeuralLinLCB and
NeuralLinGreedy) 3 perform almost as bad as when they learn on the independent data in Figure 2, suggesting that linear models are highly insufficient to learn complex rewards in real-world data, regardless of how offline data were collected.
Secondly, the main competitor of our method, NeuralGreedy suffers an apparent performance degradation (especially in a larger dataset like MNIST) while NeuraLCB maintains a superior performance, suggesting the effectiveness of pessimism in our method on dealing with offline data and the robustness of our method toward dependent data.
[Figure]
F. S- MODE VERSUS B- MODE TRAINING
As in Section 6 we implemented two different training modes: S-mode (Algorithm 1) and B-mode (Algorithm 7).
We compare the empirical performances of S-mode and B-mode on various datasets.
As this variant is only applicable to NeuralGreedy and NeuraLCB, we only depict the performances of these algorithms.
The results on Cosine (synthetic dataset), Statlog, Adult and MNIST are shown in Figure 4.
We make the following observations, which are consistent with the conclusion in the main paper while giving more insights.
While the B-mode outperforms the S-mode on Cosine, the S-mode significantly outperforms the B-mode in all the tested real-world datasets.
Moreover, the B-mode of NeuraLCB outperforms or at least is compatible to the S-mode of NeuralGreedy in the real-world datasets.
First, these observations suggest the superiority of our method on the real-world datasets.
Second, to explain the performance difference of S-mode and B-mode on synthetic and real-world datasets in our experiment, we speculate that the online-like nature of our algorithm tends to reduce the need of B-mode in practical datasets because B-mode in the streaming data might cause overfitting (as there could be some data points in the past streaming that has been fitted for multiple times).
In synthetic and simple data such as Cosine, over-fitting tends to associate with strong prediction of the underlying reward function as the simple synthetic reward function such as Cosine is sufficiently smooth, unlike practical reward functions in the real-world datasets.
[Figure]