Title: Marginal Density Ratio for Off-Policy Evaluation in Contextual Bandits
Venue: NeurIPS 2023
Accepted: yes
Keywords: contextual bandits

variance reduction

off-policy evaluation
Abstract: Off-Policy Evaluation (OPE) in contextual bandits is crucial for assessing new policies using existing data without costly experimentation. However, current OPE methods, such as Inverse Probability Weighting (IPW) and Doubly Robust (DR) estimators, suffer from high variance, particularly in cases of low overlap between target and behaviour policies or large action and context spaces. In this paper, we introduce a new OPE estimator for contextual bandits, the Marginal Ratio (MR) estimator, which focuses on the shift in the marginal distribution of outcomes $Y$ instead of the policies themselves. Through rigorous theoretical analysis, we demonstrate the benefits of the MR estimator compared to conventional methods like IPW and DR in terms of variance reduction. Additionally, we establish a connection between the MR estimator and the state-of-the-art Marginalized Inverse Propensity Score (MIPS) estimator, proving that MR achieves lower variance among a generalized family of MIPS estimators. We further illustrate the utility of the MR estimator in causal inference settings, where it exhibits enhanced performance in estimating Average Treatment Effects (ATE). Our experiments on synthetic and real-world datasets corroborate our theoretical findings and highlight the practical advantages of the MR estimator in OPE for contextual bandits.

Marginal Density Ratio for Off-Policy Evaluation in Contextual Bandits

Abstract

Off-Policy Evaluation (OPE) in contextual bandits is crucial for assessing new policies using existing data without costly experimentation. However, current OPE methods, such as Inverse Probability Weighting (IPW) and Doubly Robust (DR) estimators, suffer from high variance, particularly in cases of low overlap between target and behavior policies or large action and context spaces. In this paper, we introduce a new OPE estimator for contextual bandits, the Marginal Ratio (MR) estimator, which focuses on the shift in the marginal distribution of outcomes Y instead of the policies themselves. Through rigorous theoretical analysis, we demonstrate the benefits of the MR estimator compared to conventional methods like IPW and DR in terms of variance reduction. Additionally, we establish a connection between the MR estimator and the state-of-the-art Marginalized Inverse Propensity Score (MIPS) estimator, proving that MR achieves lower variance among a generalized family of MIPS estimators. We further illustrate the utility of the MR estimator in causal inference settings, where it exhibits enhanced performance in estimating Average Treatment Effects (ATE). Our experiments on synthetic and real-world datasets corroborate our theoretical findings and highlight the practical advantages of the MR estimator in OPE for contextual bandits.

1 Introduction

In contextual bandits, the objective is to select an action A , guided by contextual information X , to maximize the resulting outcome Y . This paradigm is prevalent in many real-world applications such as healthcare, personalized recommendation systems, or online advertising [1-3]. The objective is to perform actions, such as prescribing medication or recommending items, which lead to desired outcomes like improved patient health or higher click-through rates. Nonetheless, updating the policy presents challenges, as naïvely implementing a new, untested policy may raise ethical or financial concerns. For instance, prescribing a drug based on a new policy poses risks, as it may result in unexpected side effects. As a result, recent research [4-11] has concentrated on evaluating the performance of new policies (target policy) using only existing data that was generated using the current policy (behaviour policy). This problem is known as Off-Policy Evaluation (OPE).

Current OPE methods in contextual bandits, such as the Inverse Probability Weighting (IPW) [12] and Doubly Robust (DR) [13] estimators primarily account for the policy shift by re-weighting the

data using the ratio of the target and behaviour polices to estimate the target policy value. This can be problematic as it may lead to high variance in the estimators in cases of substantial policy shifts. The issue is further exacerbated in situations with large action or context spaces [14], since in these cases the estimation of policy ratios is even more difficult leading to extreme bias and variance.

In this work we show that this problem of high variance in OPE can be alleviated by using methods which directly consider the shift in the marginal distribution of the outcome Y resulting from the policy shift, instead of considering the policy shift itself (as in IPW and DR). To this end, we propose a new OPE estimator for contextual bandits called the Marginal Ratio (MR) estimator, which weights the data directly based on the shift in the marginal distribution of outcomes Y and consequently is much more robust to increasing sizes of action and context spaces than existing methods like IPW or DR. Our extensive theoretical analyses show that MR enjoys better variance properties than the existing methods making it highly attractive for a variety of applications in addition to OPE. One such application is the estimation of Average Treatment Effect (ATE) in causal inference, for which we show that MR provides greater sample efficiency than the most commonly used methods.

Our contributions in this paper are as follows:

Firstly, we introduce MR, an OPE estimator for contextual bandits, that focuses on the shift in the marginal distribution of Y rather than the joint distribution of ( X,A,Y ) . We show that MR has favourable theoretical properties compared to existing methods like IPW and DR. Our analysis also encompasses theory on the approximation errors of our estimator.

Secondly, we explicitly lay out the connection between MR and Marginalized Inverse Propensity Score (MIPS) [14], a recent state-of-the-art contextual bandits OPE method, and prove that MR attains lowest variance among a generalized family of MIPS estimators.

Thirdly, we show that the MR estimator can be applied in the setting of causal inference to estimate average treatment effects (ATE), and theoretically prove that the resulting estimator is more data-efficient with higher accuracy and lower variance than commonly used methods.

Finally, we verify all our theoretical analyses through a variety of experiments on synthetic and real-world datasets and empirically demonstrate that the MR estimator achieves better overall performance compared to current state-of-the-art methods.

2 Background

2.1 Setup and Notation

Weconsider the standard contextual bandit setting. Let X ∈ X be a context vector (e.g., user features), A ∈ A denote an action (e.g., recommended website to the user), and Y ∈ Y denote a scalar reward or outcome (e.g., whether the user clicks on the website). The outcome and context are sampled from unknown probability distributions p ( y | x, a ) and p ( x ) respectively. Let D := { ( x i , a i , y i ) } n i =1 be a historically logged dataset with n observations, generated by a (possibly unknown) behaviour policy π b ( a | x ) . Specifically, D consists of i.i.d. samples from the joint density under behaviour policy ,

We denote the joint density of ( X,A,Y ) under the target policy as

Moreover, we use p π b ( y ) to denote the marginal density of Y under the behaviour policy,

and likewise for the target policy π ∗ . Similarly, we use E π b and E π ∗ to denote the expectations under the joint densities p π b ( x, a, y ) and p π ∗ ( x, a, y ) respectively.

Off-policy evaluation (OPE) The main objective of OPE is to estimate the expectation of the outcome Y under a given target policy π ∗ , i.e., E π ∗ [ Y ] , using only the logged data D .

Throughout this work, we assume that the support of the target policy π ∗ is included in the support of the behaviour policy π b . This is to ensure that importance sampling yields unbiased off-policy estimators, and is satisfied for exploratory behaviour policies such as the ϵ -greedy policies.

Assumption 2.1 (Support) . For any x ∈ X , a ∈ A , π ∗ ( a | x ) > 0 = ⇒ π b ( a | x ) > 0 .

2.2 Existing off-policy evaluation methodologies

Next, we will present some of the most commonly used OPE estimators before outlining the limitations of these methodologies. This motivates our proposal of an alternative OPE estimator.

The value of the target policy can be expressed as the expectation of outcome Y under the target data distribution p π ∗ ( x, a, y ) . However in most cases, we do not have access to samples from this target distribution and hence we have to resort to importance sampling methods.

Inverse Probability Weighting (IPW) estimator One way to compute the target policy value, E π ∗ [ Y ] , when only given data generated from p π b ( x, a, y ) is to rewrite the policy value as follows:

where ρ ( a, x ) := p π ∗ ( x,a,y ) p π b ( x,a,y ) = π ∗ ( a | x ) π b ( a | x ) , given the factorizations in Eqns. (1) and (2). This leads to the commonly used Inverse Probability Weighting (IPW) [12] estimator:

When the behaviour policy is known, IPW is an unbiased and consistent estimator. However, it can suffer from high variance, especially as the overlap between the behaviour and target policies decreases.

Doubly Robust (DR) estimator To alleviate the high variance of IPW, [13] proposed a Doubly Robust (DR) estimator for OPE. DR uses an estimate of the conditional mean ˆ µ ( a, x ) ≈ E [ Y | X = x, A = a ] ( outcome model ), as a control variate to decrease the variance of IPW. It is also doubly robust in that it yields accurate value estimates if either the importance weights ρ ( a, x ) or the outcome model ˆ µ ( a, x ) is well estimated [13, 15]. The DR estimator for E π ∗ [ Y ] can be written as follows:

where ˆ η ( π ∗ ) = 1 n ∑ n i =1 ∑ a ′ ∈A ˆ µ ( a ′ , x i ) π ∗ ( a ′ | x i ) ≈ E π ∗ [ˆ µ ( A,X )] . Here, ˆ η ( π ∗ ) is referred to as the Direct Method (DM) as it uses ˆ µ ( a, x ) directly to estimate target policy value.

2.3 Limitation of existing methodologies

To estimate the value of the target policy π ∗ , the existing methodologies consider the shift in the joint distribution of ( X,A,Y ) as a result of the policy shift (by weighting samples by policy ratios). As we show in Section 3.1, considering the joint shift can lead to inefficient policy evaluation and high variance especially as the policy shift increases [16]. Since our goal is to estimate E π ∗ [ Y ] , we will show in the next section that considering only the shift in the marginal distribution of the outcomes Y from p π b ( Y ) to p π ∗ ( Y ) , leads to a more efficient OPE methodology compared to existing approaches.

To better comprehend why only considering the shift in the marginal distribution is advantageous, let us examine an extreme example where we assume that Y ⊥ ⊥ A | X , i.e., the outcome Y for a user X is independent of the action A taken. In this specific instance, E π ∗ [ Y ] = E π b [ Y ] ≈ 1 /n ∑ n i =1 y i , indicating that an unweighted empirical mean serves as a suitable unbiased estimator of E π ∗ [ Y ] . However, IPW and DR estimators use policy ratios ρ ( a, x ) = π ∗ ( a | x ) π b ( a | x ) as importance weights. In case of large policy shifts, these ratios may vary significantly, leading to high variance in IPW and DR.

In this particular example, the shift in policies is inconsequential as it does not impact the distribution of outcomes Y . Hence, IPW and DR estimators introduce additional variance due to the policy ratios when they are not actually required. This limitation is not exclusive to this special case; in general, methodologies like IPW and DR exhibit high variance when there is low overlap between target and behavior policies [16] even if the resulting shift in marginals of the outcome Y is not significant.

Therefore, we propose the Marginal Ratio (MR) OPE estimator for contextual bandits in the subsequent section, which circumvents these issues by focusing on the shift in the marginal distribution of the outcomes Y . Additionally, we provide extensive theoretical insights on the comparison of MR to existing state-of-the-art methods, such as IPW and DR.

3 Marginal Ratio (MR) estimator

Our method's key insight involves weighting outcomes by the marginal density ratio of outcome Y :

where w ( y ) := p π ∗ ( y ) p π b ( y ) . This leads to the Marginal Ratio OPE estimator:

In Section 3.1 we prove that by only considering the shift in the marginal distribution of outcomes, the MR estimator achieves a lower variance than the standard OPE methods. In fact, this estimator does not depend on the shift between target and behaviour policies directly. Instead, it depends on the shift between the marginals p π b ( y ) and p π ∗ ( y ) .

Estimation of w ( y ) When the weights w ( y ) are known exactly, the MR estimator is unbiased and consistent. However, in practice the weights w ( y ) are often not known and must be estimated using the logged data D . Here, we outline an efficient way to estimate w ( y ) by first representing it as a conditional expectation, which can subsequently be expressed as the solution to a regression problem.

Lemma 3.1 allows us to approximate w ( y ) using a parametric family { f ϕ : R → R | ϕ ∈ Φ } (e.g. neural networks) and defining ˆ w ( y ) := f ϕ ∗ ( y ) , where ϕ ∗ solves the regression problem in Eq. (3).

Note that MR can also be estimated alternatively by directly estimating h ( y ) := w ( y ) y using a similar regression technique as above and computing ˆ θ MR = 1 /n ∑ n i =1 h ( y i ) . We include additional details along with empirical comparisons in Appendix F.1.1.

3.1 Theoretical analysis

Recall that the traditional OPE estimators like IPW and DR use importance weights which account for the the shift in the joint distributions of ( X,A,Y ) . In this section, we prove that by considering only the shift in the marginal distribution of Y instead, MR achieves better variance properties than these estimators. Our analysis in this subsection assumes that the ratios ρ ( a, x ) and w ( y ) are known exactly. Since the OPE estimators considered are unbiased in this case, our analysis of variance is analogous to that of the mean squared error (MSE) here. We address the case where the weights are not known exactly in Section 3.1.2. First, we make precise our intuition that the shift in the joint distribution of ( X,A,Y ) is 'greater' than the shift in the marginal distribution of outcomes Y . We formalise this using the notion of f -divergences.

Proposition 3.2. Let f : [0 , ∞ ) → R be a convex function with f (1) = 0 , and D f ( P || Q ) denotes the f -divergence between distributions P and Q . Then,

Intuition Proposition 3.2 shows that the shift in the joint distributions is at least as 'large' as the shift in the marginals of the outcome Y . Traditional OPE estimators, therefore take into consideration more of a distribution shift than needed, and consequently lead to inefficient estimators. In contrast, the MR estimator mitigates this problem by only considering the shift in the marginal distributions of outcomes resulting from the policy shift. This provides further intuition on why the MR estimator has lower variance compared to existing methods.

Proposition 3.3 (Variance comparison with IPW estimator) . When the weights ρ ( a, x ) and w ( y ) are known exactly, we have that Var π b [ ˆ θ MR ] ≤ Var π b [ ˆ θ IPW ] . In particular,

Intuition Proposition 3.3 shows that the variance of MR estimator is smaller than that of the IPW estimator when the weights are known exactly. Moreover, the proposition also shows that the difference between the two variances will increases as the variance Var π b [ ρ ( A,X ) | Y ] increases. This variance is likely to be large when the policy shift between π b and π ∗ is large, or when the dimensions of contexts X and/or the actions A is large, and therefore in these cases the MR estimator will perform increasingly better than the IPW estimator. A similar phenomenon occurs for DR as we show next, even though in this case the variance of MR is not in general smaller than that of DR.

Proposition 3.4 (Variance comparison with DR estimator) . When the weights ρ ( a, x ) and w ( y ) are known exactly and µ ( A,X ) := E [ Y | X,A ] , we have that,

Intuition Proposition 3.4 shows that if Var π b [ ρ ( A,X ) Y | Y ] is greater than Var π b [ ρ ( A,X ) µ ( A,X ) | X ] on average, the variance of the MR estimator will be less than that of the DR estimator. Intuitively, this will occur when the dimension of context space X is high because in this case the conditional variance over X and A , Var π b [ ρ ( A,X ) Y | Y ] is likely to be greater than the conditional variance over A , Var π b [ ρ ( A,X ) µ ( A,X ) | X ] . Our empirical results in Appendix F.2 are consistent with this intuition. Additionally, we also provide theoretical comparisons with other extensions of DR, such as Switch-DR [5] and DR with Optimistic Shrinkage (DRos) [17] in Appendix B, and show that a similar intuition applies for these results. We emphasise that the well known results in [5] which show that IPW and DR estimators achieve the optimal worst case variance (where the worst case is taken over a class of possible outcome distributions Y | X,A ) are not at odds with our results presented here (as the distribution of Y | X,A is fixed in our setting).

3.1.1 Comparison with Marginalised Inverse Propensity Score (MIPS) [14]

In this section, we compare MR against the recently proposed Marginalised Inverse Propensity Score (MIPS) estimator [14], which uses a marginalisation technique to reduce variance and provides a robust OPE estimate specifically in contextual bandits with large action spaces. We prove that the MRestimator achieves lower variance than the MIPS estimator and doesn't require new assumptions.

MIPS estimator As we mentioned earlier, the variance of the IPW estimator may be high when the action A is high dimensional. To mitigate this, the MIPS estimator assumes the existence of a (potentially lower dimensional) action embedding E , which summarises all 'relevant' information about the action A . Formally, this assumption can be written as follows:

Assumption 3.5. The action A has no direct effect on the outcome Y , i.e., Y ⊥ ⊥ A | X,E .

For example, in the setting of a recommendation system where A corresponds to the items recommended, E may correspond to the item categories. Assumption 3.5 then intuitively means that item category E encodes all relevant information about the item A which determines the outcome Y . Assuming that such action embedding E exists, [14] prove that the MIPS estimator ˆ θ MIPS, defined as

provides an unbiased estimator of target policy value E π ∗ [ Y ] . Moreover, Var π b [ ˆ θ MIPS ] ≤ Var π b [ ˆ θ IPW ] .

(

X,A

)

(

X,E

)

Y

Intuition The context-embedding pair ( X,E ) can be seen as a representation of the context-action pair ( X,A ) which contains less 'redundant information' regarding the outcome Y . Intuitively, the MIPS estimator, which only considers the shift in the distribution of ( X,E ) is therefore more efficient than the IPW estimator (which considers the shift in the distribution of ( X,A ) instead).

MRachieves lower variance than MIPS Given the intuition above, we should achieve greater variance reduction as the amount of redundant information in the representation ( X,E ) decreases. We formalise this in Appendix D and show that the variance of MIPS estimator decreases as the representation gets closer to Y in terms of information content. As a result, we achieve the greatest variance reduction by considering the marginal shift in the outcome Y itself (as in MR) rather than the shift in the representation ( X,E ) (as in MIPS). The following result formalizes this finding.

Theorem 3.6. When the weights w ( y ) , p π ∗ ( e,x ) p π b ( e,x ) and ρ ( a, x ) are known exactly, then under Assumption

This analysis provides a link between the MR and MIPS estimators in the framework of contextual bandits, and shows that the MR estimator achieves lower variance than MIPS estimator while not requiring any additional assumptions (e.g. Assumption 3.5 as in MIPS). We also verify this empirically in Section 5.1 by reproducing the experimental setup in [14] along with the MR baseline.

3.1.2 Weight estimation error

Our analysis so far assumes prior knowledge of the behavior policy π b and the marginal ratios w ( y ) . However, in practice, both quantities are often unknown and must be estimated from data. To this end, we assume access to an additional training dataset D tr = { ( x tr i , a tr i , y tr i ) } i m =1 (for weight estimation), in addition to the evaluation dataset D = { ( x i , a i , y i ) } n i =1 (for computing the OPE estimate). The estimation of ˆ w ( y ) involves a two-step process that exclusively utilizes data from D tr :

(i) First, we estimate the policy ratio ˆ ρ ( a, x ) ≈ π ∗ ( a | x ) π b ( a | x ) . This can be achieved by estimating the behaviour policy ̂ π b , and defining ˆ ρ ( a, x ) := π ∗ ( a | x ) ̂ π b ( a | x ) . Alternatively, ˆ ρ ( a, x ) can also be estimated directly by using density ratio estimation techniques as in [18].

(ii) Secondly, we estimate the weights ˆ w ( y ) using Eq. (3) with ˆ ρ instead of ρ .

In practice, one may consider splitting D tr for each estimation step outlined above. Moreover, each approximation step may introduce bias and therefore, the MR estimator may have two sources of bias. While classical OPE methods like IPW and DR also suffer from bias because of ˆ ρ estimation, the estimation of ˆ w ( y ) is specific to MR. However, we show below that given any policy ratio estimate ˆ ρ , if ˆ w ( y ) approximates E π b [ ˆ ρ ( A,X ) | Y = y ] 'well enough' (i.e., the estimation step (ii) shown above is 'accurate enough'), then MR achieves a lower variance than IPW and incurs little extra bias.

Proposition 3.7. Suppose that the IPW and MR estimators are defined as,

and define the approximation error as ϵ := ˆ w ( Y ) -˜ w ( Y ) , where ˜ w ( Y ) := E π b [ ˆ ρ ( A,X ) | Y ] . Then we have that, Bias ( ˜ θ MR ) -Bias ( ˜ θ IPW ) = E π b [ ϵ Y ] . Moreover,

Intuition The ϵ term defined in Proposition 3.7 denotes the error of the second approximation step outlined above. As a direct consequence of this result, we show in Appendix C that as the error ϵ becomes small (specifically as E π b [ ϵ 2 ] → 0 ), the difference between biases of MR and IPW estimator becomes negligible. Likewise, the terms Var π b [ ϵ Y ] and Cov ( ˜ w ( Y ) Y, ϵ Y ) in Eq. (4) will also be small and as a result the variance of MR will be lower than that of IPW (as the first term is positive).

In fact, using recent results regarding the generalisation error of neural networks [19], we show that when using 2-layer wide neural networks to approximate the weights ˆ w ( y ) , the estimation error ϵ declines with increasing training data size m . Specifically, under certain regularity assumptions we obtain E π b [ ϵ 2 ] = O ( m -2 / 3 ) . Using this we show that as the training data size m increases, the biases of MR and IPW estimators become roughly equal with a high probability, and

Therefore the variance of MR estimator falls below that of IPW for large enough m . The empirical results shown in Appendix F.2 are consistent with this result. Due to space constraints, the main technical result has been included in Appendix C.

3.2 Application to causal inference

Beyond contextual bandits, the variance reduction properties of the MR estimator make it highly useful in a wide variety of other applications. Here, we show one such application in the field of causal inference, where MR can be used for the estimation of average treatment effect (ATE) [20] and leads to some desirable properties in comparison to the conventional ATE estimation approaches. Specifically, we illustrate that the MR estimator for ATE utilizes the evaluation data D more efficiently and achieves lower variance than state-of-the-art ATE estimators and consequently provides more accurate ATE estimates. To be concrete, the goal in this setting is to estimate ATE, defined as follows:

Here Y ( a ) corresponds to the outcome under a deterministic policy π a ( a | x ) := ✶ ( a = a ) . Hence any OPE estimator can be used to estimate E [ Y ( a )] (and therefore ATE) by considering target policy π ∗ = π a . An important distinction between MR and existing approaches (like IPW or DR) is that, when estimating E [ Y ( a )] , the existing approaches only use datapoints in D with A = a . To see why this is the case, we note that the policy ratios π ∗ ( A | X ) π b ( A | X ) = ✶ ( A = a ) π b ( A | X ) are zero when A = a . In contrast, the MR weights p π ∗ ( Y ) p π b ( Y ) are not necessarily zero for datapoints with A = a , and therefore the MR estimator uses all evaluation datapoints when estimating E [ Y ( a )] .

̸

As such we show that MR applied to ATE estimation leads to a smaller variance than the existing approaches. Moreover, because MR is able to use all datapoints when estimating E [ Y ( a )] , MRwill generally be more accurate than the existing methods especially in the setting where the data is imbalanced, i.e., the number of datapoints with A = a is small for a specific action a . In Appendix E, we formalise this variance reduction of the MR ATE estimator compared to IPW and DR estimators, by deriving analogous results to Propositions 3.3 and 3.4. In addition, we also show empirically in Section 5.3 that the MR ATE estimator outperforms the most commonly used ATE estimators.

4 Related Work

Off-Policy evaluation is a central problem both in contextual bandits [13, 5, 21, 6, 7, 17, 22, 8, 23] and in RL [24-27]. Existing OPE methodologies can be broadly categorised into Direct Method (DM), Inverse Probability Weighting (IPW), and Doubly Robust (DR). While DM typically has a low variance, it suffers from high bias when the reward model is misspecified [28]. On the other hand, IPW [12] and DR [13, 5, 17] use policy ratios as importance weights when estimating policy value and suffer from high variance as overlap between behaviour and target policies increases or as the action/context space gets larger [29, 14]. To circumvent this problem, techniques like weight clipping or normalisation [4, 30, 31] are often employed, however, these can often increase bias.

In contrast to these approaches, [14] propose MIPS, which considers the marginal shift in the distribution of a lower dimensional embedding of the action space. While this approach reduces the variance associated with IPW, we show in Section 3.1.1 that the MR estimator achieves a lower variance than MIPS while not requiring any additional assumptions (like Assumption 3.5).

In the context of Reinforcement Learning (RL), various marginalisation techniques of importance weights have been used to propose OPE methodologies. [21, 25, 26] use methods which considers the shift in the marginal distribution of the states, and applies importance weighting with respect to this marginal shift rather than the trajectory distribution. Similarly, [32] use marginalisation for OPE in deep RL, where the goal is to consider the shift in marginal distributions of state and action. Although marginalization is a key trick of these estimators, these techniques do not consider the marginal shift in reward as in MR and are aimed at resolving the curse of horizon, a problem specific to RL. Apart from this, [33] propose a general framework of OPE based on conditional expectations of importance ratios for variance reduction. While their proposed framework includes reward conditioned importance ratios, this is not the main focus and there is little theoretical and empirical comparison of their proposed methodology with existing state-of-the-art methods like DR.

′ ′

̸

MSE

MSE

102

102

DM

101

100

100

DR

100

IPW

100

MIPS

10-1

10-1

MR (Ours)

10-1

10-2

10-2

10-2

10-2

0

Numberofevaluationdata

2000

4000

6000

8000

10000

0

Numberofevaluationdata

2000

4000

6000

8000

10000

0.0

0.2

0.4

α

0.6

0.8

1.0

0.0

0.2

0.4

α

0.6

0.8

1.0

(a) Results with varying size of evaluation dataset n .

(b) Results with varying α ∗ .

Finally we note that the idea of approximating the ratio of intractable marginal densities via leveraging the fact that this ratio can be reformulated as the conditional expectation of a ratio of tractable densities is a standard idea in computational statistics [34] and has been exploited more recently to perform likelihood-free inference [35]. In particular, while [34] typically approximates this expectation through Markov chain Monte Carlo, [35] uses regression instead, however without any theory.

5 Empirical Evaluation

In this section, we provide empirical evidence to support our theoretical results by investigating the performance of our MR estimator against the current state-of-the-art OPE methods. The code to reproduce our experiments has been made available at: github.com/faaizT/MR-OPE.

5.1 Experiments on synthetic data

For our synthetic data experiment, we reproduce the experimental setup for the synthetic data experiment in [14] by reusing their code with minor modifications. Specifically, X ⊆ R d , for various values of d as described below. Likewise, the action space A = { 0 , . . . , n a -1 } , with n a taking a range of different values. Additional details regarding the reward function, behaviour policy π b , and the estimation of weights ˆ w ( y ) have been included in Appendix F.2 for completeness.

Target policies To investigate the effect of increasing policy shift, we define a class of policies,

where α ∗ ∈ [0 , 1] allows us to control the shift between π b and π ∗ . In particular, as we show later, the shift between π b and π ∗ increases as α ∗ → 1 . Using the ground truth behaviour policy π b , we generate a dataset which is split into training and evaluation datasets of sizes m and n respectively.

Baselines We compare our estimator with DM, IPW, DR and MIPS estimators. Our setup includes action embeddings E satisfying Assumption 3.5, and so MIPS is unbiased. Additional baselines have been considered in Appendix F.2. For MR, we split the training data to estimate ̂ π b and ˆ w ( y ) , whereas for all other baselines we use the entire training data to estimate ̂ π b for a fair comparison.

Results We compute the target policy value using the n evaluation datapoints. Here, the MSE of the estimators is computed over 10 different sets of logged data replicated with different seeds. The results presented have context dimension d = 1000 , number of actions n a = 100 and training data size m = 5000 . More experiments for a variety of parameter values are included in Appendix F.2.

Varying number of evaluation data n In Figure 2a we plot the results with increasing size of evaluation data n increases. MR achieves the smallest MSE among all the baselines considered when n is small, with the MSE of MR being at least an order of magnitude smaller than every baseline for n ≤ 500 . This shows that MR is significantly more accurate than the baselines when the size of the evaluation data is small. As n →∞ , the difference between the results for MR and MIPS decreases. However, MR attains smaller variance and MSE than MIPS generally, verifying our analysis in Section 3.1.1. Moreover, Figure 2a shows that while the variance of MR is greater than that of DM, it still achieves the lowest MSE overall, owing to the high bias of DM.

Varying α ∗ As α ∗ parameter of the target policy increases, so does the shift between the policies π b and π α ∗ as illustrated by the figure on the right, which plots the KL-divergence D KL ( π b || π α ∗ ) as a function of α . Figure 2b plots the results for increasing policy shift. Overall, the MSE of MR estimator is lowest among all the baselines. Moreover, while the MSE and variance of all estimators increase with increasing α ∗ the increase in these quantities is lower for the MR estimator than for the other baselines. Therefore, the relative performance of MR estimator improves with increasing policy shift and MR remains robust to increase in policy shift.

Additional ablation studies In Appendix F.2, we investigate the effect of varying context dimensions d , number of actions n a and number of training data m . In every case, we observe that the MR estimator has a smaller MSE than all other baselines considered. In particular, MR remains robust to increasing n a whereas the MSE and variance of IPW and DR estimators degrade substantially when n a ≥ 2000 . Likewise, MR outperforms the baselines even when the training data size m is small.

5.2 Experiments on classification datasets

Following previous works on OPE in contextual bandits [13, 22, 36, 5], we transform classification datasets into contextual bandit feedback data in this experiment. We consider five UCI classification datasets [37] as well as Mnist [38] and CIFAR-100 [39] datasets, each of which comprises { ( x i , a gt i ) } i , where x i ∈ X are feature vectors and a gt i ∈ A are the ground-truth labels. In the contextual bandits setup, the feature vectors x i are considered to be the contexts, whereas the actions correspond to the possible class of labels. For the context vector x i and the action a i , the reward y i is defined as y i := ✶ ( a i = a gt i ) , i.e., the reward is 1 when the action is the same as the ground truth label and 0 otherwise. Here, the baselines considered include the DM, IPW and DR estimators as well as Switch-DR [5] and DR with Optimistic Shrinkage (DRos) [17]. We do not consider a MIPS baseline here as there is no natural embedding E of A . Additional details are provided in Appendix F.3.

In Table 1, we present the results with number of evaluation data n = 1000 and number of training data m = 500 . The table shows that across all datasets, MR achieves the lowest MSE among all methods. Moreover, for the Letter and CIFAR-100 datasets the IPW and DR yield large bias and variance arising from poor policy estimates ̂ π b . Despite this, the MR estimator which utilizes the same ̂ π b for the estimation of ˆ w ( y ) leads to much more accurate results. We also verify that MR outperforms the baselines for increasing policy shift and evaluation data n in Appendix F.3.

5.3 Application to ATE estimation

In this experiment, we investigate the empirical performance of the MR estimator for ATE estimation.

Twins dataset We use the Twins dataset studied in [40], which comprises data from twin births in the USA between 1989-1991. The treatment a = 1 corresponds to being born the heavier twin and the outcome Y corresponds to the mortality of each of the twins in their first year of life. Specifically, Y (1) corresponds to the mortality of the heavier twin (and likewise for Y (0) ). To simulate the observational study, we follow a similar strategy as in [40] to selectively hide one of the two twins as explained in Appendix F.4. We obtain a total of 11,984 datapoints, of which 5000 datapoints are used to train the behaviour policy ̂ π b and outcome model ˆ q ( x, a ) .

Here, we consider the same baselines as the classification data experiments in previous section. For our evaluation, we consider the absolute error in ATE estimation, ϵ ATE, defined as: ϵ ATE := | ˆ θ ( n ) ATE -θ ATE | . Here, ˆ θ ( n ) ATE denotes the value of the ATE estimated using n evaluation datapoints. We compute the ATE value using the n evaluation datapoints, over 10 different sets of observational data (using different seeds). Table 2 shows that MR achieves the lowest estimation error ϵ ATE for all values of n considered here. While the performance of other baselines improves with increasing n , MR outperforms them all.

6 Discussion

In this paper, we proposed an OPE method for contextual bandits called marginal ratio (MR) estimator, which considers only the shift in the marginal distribution of the outcomes resulting from the policy shift. Our theoretical and empirical analysis showed that MR achieves better variance and MSE compared to the current state-of-the-art methods and is more data efficient overall. Additionally, we demonstrated that MR applied to ATE estimation provides more accurate results than most commonly used methods. Next, we discuss limitations of our methodology and possible avenues for future work.

Limitations The MR estimator requires the additional step of estimating ˆ w ( y ) which may introduce an additional source of bias in the value estimation. However, ˆ w ( y ) can be estimated by solving a simple 1d regression problem, and as we show empirically in Appendix F, MR achieves the smallest bias among all baselines considered in most cases. Most notably, our ablation study in Appendix F.2 shows that even when the training data is reasonably small, MR outperforms the baselines considered.

Future work The MR estimator can also be applied to policy optimisation problems, where the data collected using an 'old' policy is used to learn a new policy. This approach has been used in Proximal Policy Optimisation (PPO) [41] for example, which has gained immense popularity and has been applied to reinforcement learning with human feedback (RLHF) [42]. We believe that the MR estimator applied to these methodologies could lead to improvements in the stability and convergence of these optimisation schemes, given its favourable variance properties.

References

Lihong Li, Wei Chu, John Langford, and Robert E. Schapire. A contextual-bandit approach to personalized news article recommendation. In Proceedings of the 19th International Conference on World Wide Web , WWW '10, page 661-670, New York, NY, USA, 2010. Association for Computing Machinery. ISBN 9781605587998. doi: 10.1145/1772690.1772758. URL https://doi.org/10.1145/1772690.1772758 .

Hamsa Bastani and Mohsen Bayati. Online decision making with high-dimensional covariates. Operations Research , 68, 11 2019. doi: 10.1287/opre.2019.1902.

Xiao Xu, Fang Dong, Yanghua Li, Shaojian He, and Xin Li. Contextual-bandit based personalized recommendation with time-varying user interests. Proceedings of the AAAI Conference on Artificial Intelligence , 34:6518-6525, 04 2020. doi: 10.1609/aaai.v34i04.6125.

Adith Swaminathan and Thorsten Joachims. Counterfactual risk minimization: Learning from logged bandit feedback. In Proceedings of the 32nd International Conference on International Conference on Machine Learning - Volume 37 , ICML'15, page 814-823. JMLR.org, 2015.

Yu-Xiang Wang, Alekh Agarwal, and Miroslav Dudík. Optimal and adaptive off-policy evaluation in contextual bandits. In Proceedings of the 34th International Conference on Machine Learning - Volume 70 , ICML'17, page 3589-3597. JMLR.org, 2017.

Mehrdad Farajtabar, Yinlam Chow, and Mohammad Ghavamzadeh. More robust doubly robust off-policy evaluation. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning , volume 80 of Proceedings of Machine Learning Research , pages 1447-1456. PMLR, 10-15 Jul 2018. URL https://proceedings. mlr.press/v80/farajtabar18a.html .

Yi Su, Lequn Wang, Michele Santacatterina, and Thorsten Joachims. CAB: Continuous adaptive blending for policy evaluation and learning. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning , volume 97 of Proceedings of Machine Learning Research , pages 6005-6014. PMLR, 09-15 Jun 2019. URL https://proceedings.mlr.press/v97/su19a.html .

Alberto Maria Metelli, Alessio Russo, and Marcello Restelli. Subgaussian and differentiable importance sampling for off-policy evaluation and learning. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems , volume 34, pages 8119-8132. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/ 4476b929e30dd0c4e8bdbcc82c6ba23a-Paper.pdf .

Anqi Liu, Hao Liu, Anima Anandkumar, and Yisong Yue. Triply robust off-policy evaluation, 2019. URL https://arxiv.org/abs/1911.05811 .

Masashi Sugiyama and Motoaki Kawanabe. Machine Learning in Non-Stationary Environments: Introduction to Covariate Shift Adaptation . The MIT Press, 2012. ISBN 9780262017091. URL http://www.jstor.org/stable/j.ctt5hhbtm .

Adith Swaminathan, Akshay Krishnamurthy, Alekh Agarwal, Miroslav Dudík, John Langford, Damien Jose, and Imed Zitouni. Off-policy evaluation for slate recommendation. In Proceedings of the 31st International Conference on Neural Information Processing Systems , NIPS'17, page 3635-3645, Red Hook, NY, USA, 2017. Curran Associates Inc. ISBN 9781510860964.

D. G. Horvitz and D. J. Thompson. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association , 47(260):663-685, 1952. ISSN 01621459. URL http://www.jstor.org/stable/2280784 .

Miroslav Dudík, Dumitru Erhan, John Langford, and Lihong Li. Doubly robust policy evaluation and optimization. Statistical Science , 29(4):485-511, 2014. ISSN 08834237, 21688745. URL http://www.jstor.org/stable/43288496 .

Yuta Saito and Thorsten Joachims. Off-policy evaluation for large action spaces via embeddings. In Proceedings of the 39th International Conference on Machine Learning , pages 19089-19122. PMLR, 2022.

Nan Jiang and Lihong Li. Doubly robust off-policy value evaluation for reinforcement learning. In Maria Florina Balcan and Kilian Q. Weinberger, editors, Proceedings of The 33rd International Conference on Machine Learning , volume 48 of Proceedings of Machine Learning Research , pages 652-661, New York, New York, USA, 20-22 Jun 2016. PMLR. URL https://proceedings.mlr.press/v48/jiang16.html .

Fan Li, Laine E Thomas, and Fan Li. Addressing Extreme Propensity Scores via the Overlap Weights. American Journal of Epidemiology , 188(1):250-257, 09 2018. ISSN 0002-9262. doi: 10.1093/aje/kwy201. URL https://doi.org/10.1093/aje/kwy201 .

Yi Su, Maria Dimakopoulou, Akshay Krishnamurthy, and Miroslav Dudík. Doubly robust off-policy evaluation with shrinkage. In Proceedings of the 37th International Conference on Machine Learning , ICML'20. JMLR.org, 2020.

Arjun Sondhi, David Arbour, and Drew Dimmery. Balanced off-policy evaluation in general action spaces. In Silvia Chiappa and Roberto Calandra, editors, Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics , volume 108 of Proceedings of Machine Learning Research , pages 2413-2423. PMLR, 26-28 Aug 2020. URL https: //proceedings.mlr.press/v108/sondhi20a.html .

Jianfa Lai, Manyun Xu, Rui Chen, and Qian Lin. Generalization ability of wide neural networks on R , 2023. URL https://arxiv.org/abs/2302.05933 .

Judea Pearl. Causality . Cambridge University Press, 2 edition, 2009. doi: 10.1017/ CBO9780511803161.

Qiang Liu, Lihong Li, Ziyang Tang, and Dengyong Zhou. Breaking the curse of horizon: Infinitehorizon off-policy estimation. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. CesaBianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems , volume 31. Curran Associates, Inc., 2018. URL https://proceedings.neurips.cc/paper/2018/ file/dda04f9d634145a9c68d5dfe53b21272-Paper.pdf .

Nathan Kallus, Yuta Saito, and Masatoshi Uehara. Optimal off-policy evaluation from multiple logging policies. In International Conference on Machine Learning , pages 5247-5256. PMLR, 2021.

Yuta Saito, Aihara Shunsuke, Matsutani Megumi, and Narita Yusuke. Open bandit dataset and pipeline: Towards realistic and reproducible off-policy evaluation. arXiv preprint arXiv:2008.07146 , 2020.

Philip S. Thomas and Emma Brunskill. Data-efficient off-policy policy evaluation for reinforcement learning. In Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48 , ICML'16, page 2139-2148. JMLR.org, 2016.

Tengyang Xie, Yifei Ma, and Yu-Xiang Wang. Towards optimal off-policy evaluation for reinforcement learning with marginalized importance sampling. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems , volume 32. Curran Associates, Inc., 2019. URL https://proceedings. neurips.cc/paper/2019/file/4ffb0d2ba92f664c2281970110a2e071-Paper.pdf .

Nathan Kallus and Masatoshi Uehara. Double reinforcement learning for efficient off-policy evaluation in markov decision processes. J. Mach. Learn. Res. , 21(1), jun 2022. ISSN 15324435.

Yao Liu, Pierre-Luc Bacon, and Emma Brunskill. Understanding the curse of horizon in offpolicy evaluation via conditional importance sampling. In Proceedings of the 37th International Conference on Machine Learning , ICML'20. JMLR.org, 2020.

Cameron Voloshin, Hoang Minh Le, Nan Jiang, and Yisong Yue. Empirical study of offpolicy policy evaluation for reinforcement learning. In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 1) , 2021. URL https://openreview.net/forum?id=IsK8iKbL-I .

Noveen Sachdeva, Yi Su, and Thorsten Joachims. Off-policy bandits with deficient support. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining , KDD '20, page 965-975, New York, NY, USA, 2020. Association for Computing Machinery. ISBN 9781450379984. doi: 10.1145/3394486.3403139. URL https://doi.org/ 10.1145/3394486.3403139 .

Adith Swaminathan and Thorsten Joachims. The self-normalized estimator for counterfactual learning. In C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems , volume 28. Curran Associates, Inc., 2015. URL https://proceedings.neurips.cc/paper_files/paper/2015/file/ 39027dfad5138c9ca0c474d71db915c3-Paper.pdf .

Ben London and Ted Sandler. Bayesian counterfactual risk minimization. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning , volume 97 of Proceedings of Machine Learning Research , pages 41254133. PMLR, 09-15 Jun 2019. URL https://proceedings.mlr.press/v97/london19a. html .

Scott Fujimoto, David Meger, and Doina Precup. A deep reinforcement learning approach to marginalized importance sampling with the successor representation. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pages 3518-3529. PMLR, 18-24 Jul 2021. URL https://proceedings.mlr.press/v139/fujimoto21a.html .

Mark Rowland, Anna Harutyunyan, Hado Hasselt, Diana Borsa, Tom Schaul, Rémi Munos, and Will Dabney. Conditional importance sampling for off-policy learning. In International Conference on Artificial Intelligence and Statistics , pages 45-55. PMLR, 2020.

Xiao-Li Meng and Wing Hung Wong. Simulating ratios of normalizing constants via a simple identity: a theoretical exploration. Statistica Sinica , pages 831-860, 1996.

Johann Brehmer, Gilles Louppe, Juan Pavez, and Kyle Cranmer. Mining gold from implicit models to improve likelihood-free inference. Proceedings of the National Academy of Sciences , 117(10):5242-5249, 2020.

Mehrdad Farajtabar, Mohammad Ghavamzadeh, and Yinlam Chow. More robust doubly robust off-policy evaluation. 2018.

Dheeru Dua and Casey Graff. UCI machine learning repository, 2017. URL http://archive. ics.uci.edu/ml .

Li Deng. The mnist database of handwritten digit images for machine learning research. IEEE Signal Processing Magazine , 29(6):141-142, 2012.

Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.

Christos Louizos, Uri Shalit, Joris Mooij, David Sontag, Richard Zemel, and Max Welling. Causal effect inference with deep latent-variable models. In Proceedings of the 31st International Conference on Neural Information Processing Systems , NIPS'17, page 6449-6459, Red Hook, NY, USA, 2017. Curran Associates Inc. ISBN 9781510860964.

John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms, 2017.

Nathan Lambert, Louis Castricato, Leandro von Werra, and Alex Havrilla. Illustrating reinforcement learning from human feedback (rlhf). Hugging Face Blog , 2022. https://huggingface.co/blog/rlhf.

Junhong Lin, Alessandro Rudi, Lorenzo Rosasco, and Volkan Cevher. Optimal rates for spectral algorithms with least-squares regression over hilbert spaces. Applied and Computational Harmonic Analysis , 48(3):868-890, 2020. ISSN 1063-5203. doi: https://doi.org/10. 1016/j.acha.2018.09.009. URL https://www.sciencedirect.com/science/article/ pii/S1063520318300174 .

James Robins. A new approach to causal inference in mortality studies with a sustained exposure period-application to control of the healthy worker survivor effect. Mathematical Modelling , 7(9):1393-1512, 1986. ISSN 0270-0255. doi: https://doi.org/10.1016/0270-0255(86)90088-6. URL https://www.sciencedirect.com/science/article/pii/0270025586900886 .

Leo Breiman. Random forests. Machine Learning , 45(1):5-32, 2001. doi: 10.1023/A: 1010933404324. URL https://doi.org/10.1023/A:1010933404324 .

Whitney K. Newey and James R. Robins. Cross-fitting and fast remainder rates for semiparametric estimation, 2018. URL https://arxiv.org/abs/1801.09138 .

A Proofs

Proof of Lemma 3.1. First, we express the weights w ( y ) as the conditional expectation as follows:

where ρ ( a, x ) = p π ∗ ( x,a,y ) p π b ( x,a,y ) = π ∗ ( a | x ) π b ( a | x ) . Since conditional expectations can be defined as the solution of regression problem, the result follows.

Proof of Proposition 3.2. We have

Proof of Proposition 3.3. Since E π b [ ˆ θ IPW ] = E π b [ ˆ θ MR ] = E π ∗ [ Y ] , we have that,

In the second last step above, we use the fact that w ( y ) = E π b [ ρ ( A,X ) | Y = y ] .

Proof of Proposition 3.4. Let ˆ µ ( a, x ) ≈ E [ Y | X = x, A = a ] denote the outcome model in DR estimator. Then, using multiple applications of the law of total variance we get that

Using this, we get that

2

Again, using the law of total variance,

Rearranging and substituting back into the expression earlier, we get that

Now, from Proposition 3.3 we know that n ( Var π b [ ˆ θ IPW ] -Var π b [ ˆ θ MR ]) = Var π b [ ρ ( A,X ) Y ] -Var π b [ w ( Y ) Y ] = E π b [ Var π b [ ρ ( A,X ) | Y ] Y 2 ] . Therefore,

Proof of Theorem 3.6. This result follows straightforwardly from Proposition D.4 in Appendix D.

Proof of Proposition 3.7.

Next, to prove the variance result, we first use the law of total variance to obtain

Moreover, using the fact that ˆ w ( Y ) = ˜ w ( Y ) + ϵ we get that,

Putting together the two variance expressions derived above, we get that

B Comparison with extensions of the doubly robust estimator

In this section, we theoretically investigate the variance of MR against the commonly used extensions of the DR estimator, namely Switch-DR [5] and DR with Optimistic Shrinkage (DRos) [17]. At a high level, these estimators seek to reduce the variance of the vanilla DR estimator by considering modified importance weights, thereby trading off the variance for additional bias. Below, we provide the explicit definitions of these estimators for completeness.

Switch-DR estimator The original DR estimator can still have a high variance when the importance weights are large due to a large policy shift. Switch-DR [5] aims to circumvent this problem by switching to DM when the importance weights are large:

where τ ≥ 0 is a hyperparameter, ˆ µ ( a, x ) ≈ E [ Y | X = x, A = a ] is the outcome model, and

where a ∗ i ∼ π ∗ ( · | x i ) .

Doubly Robust with Optimal Shrinkage (DRos) DRos proposed by [17] uses new weights ˆ ρ λ ( a i , x i ) which directly minimises sharp bounds on the MSE of the resulting estimator,

where λ ≥ 0 is a pre-defined hyperparameter and ˆ ρ λ is defined as

When λ = 0 , ˆ ρ λ ( a, x ) = 0 leads to DM, whereas as λ →∞ , ˆ ρ λ ( a, x ) → ρ ( a, x ) leading to DR.

More generally, both of these estimators can be written as follows:

Here, when ˜ ρ ( a, x ) = ρ ( a, x ) ✶ ( ρ ( a i , x i ) ≤ τ ) , we recover the Switch-DR estimator and likewise when ˜ ρ ( a, x ) = ˆ ρ λ ( a, x ) , we recover DRos.

B.1 Variance comparison with the DR extensions

Next, we provide a theoretical result comparing the variance of the MR estimator with these DR extension methods.

Proposition B.1. When the weights w ( y ) are known exactly and the outcome model is exact, i.e., ˆ µ ( a, x ) = µ ( a, x ) = E [ Y | X = x, A = a ] in the DR estimator ˆ θ ˜ ρ DR defined above,

Proof of Proposition B.1. Using the fact that ˆ µ ( a, x ) = µ ( a, x ) and the law of total variance, we get that

Again, using the law of total variance we can rewrite the second term on the RHS above as,

Putting this together, we get that

where in the last step above, we again use the law of total variance. Rearranging the above leads us to the result.

Intuition Note that for both of the DR extensions under consideration, the modified ratios ˜ ρ ( a, x ) satisfy 0 ≤ ˜ ρ ( a, x ) ≤ ρ ( a, x ) and hence ∆ ≥ 0 (using the definition of ∆ in Proposition B.1). When the modified ratios ˜ ρ ( a, x ) are 'close' to the true policy ratios ρ ( a, x ) , then using the definition of ∆ , we have that ∆ ≈ 0 . In this case, the result above provides a similar intuition to Proposition 3.4 in the main text. Specifically, in this case we have that if Var π b [ ρ ( A,X ) Y | Y ] is greater than Var π b [ ρ ( A,X ) µ ( A,X ) | X ] on average, the variance of the MR estimator will be less than that of the DR extension under consideration. Intuitively, this will occur when the dimension of context space X is high because in this case the conditional variance over X and A , Var π b [ ρ ( A,X ) Y | Y ] is likely to be greater than the conditional variance over A , Var π b [ ρ ( A,X ) µ ( A,X ) | X ] .

In contrast if the modified ratios ˜ ρ ( a, x ) differ substantially from ρ ( a, x ) , then ∆ will be large and the variance of MR may be higher than that of the resulting DR extension. However, this comes at the cost of significantly higher bias in the DR extension and consequently MSE of the DR extension will be high in this case.

C Weight estimation error

In this section, we theoretically investigate the effects of using the estimated importance weights ˆ w ( y ) rather than ˆ ρ ( a, x ) on the bias and variance of the resulting OPE estimator. Further to our discussion in Section 3.1.2, we focus in this section on the approximation error when using a wide neural network to estimate the weights ˆ w ( y ) . To this end, we use recent results regarding the generalization of wide neural networks [19] to show that the estimation error of the approximation step (ii) in the Section 3.1.2 declines with increasing number of training data when ˆ w ( y ) is estimated using wide neural networks. Before providing the main result, we explicitly lay out the assumptions needed.

C.1 Using wide neural networks to approximate the weights ˆ w ( y )

Assumption C.1. Let ˜ w ( y ) := E π b [ ˆ ρ ( A,X ) | Y = y ] . Suppose ˜ w ∈ H 1 and || ˜ w || H 1 ≤ R for some constant R , where H 1 is the reproducing kernel Hilbert space (RKHS) associated with the Neural Tangent Kernel K 1 associated with 2 layer neural network defined on R .

Assumption C.2. There exists an M ∈ [0 , ∞ ) such that P π b ( | Y | ≤ M ) = 1 .

Assumption C.3. ˆ ρ ( a i , x i ) satisfies

where η i iid ∼ N (0 , σ 2 ) for some σ > 0 .

Theorem C.4. Suppose that the IPW and MR estimators are defined as,

where ˆ w m ( y ) is obtained by regressing to the estimated policy ratios ˆ ρ ( a, x ) using m i.i.d. training samples D tr := { ( x tr i , a tr i , y tr i ) } i m =1 , i.e., by minimising the loss

Suppose Assumptions C.1-C.3 hold, then for any given δ ∈ (0 , 1) , if f ϕ is a two-layer neural network with width k that is sufficiently large and stops the gradient flow at time t ∗ ∝ m 2 / 3 , then for sufficiently large m , there exists a constant C 1 independent of δ and m , such that

holds with probability at least (1 -δ )(1 -o k (1)) . Moreover, there exist constants C 2 , C 3 independent of δ and m such that

holds with probability at least (1 -δ )(1 -o k (1)) . Here, the randomness comes from the joint distribution of training samples and random initialization of parameters in the neural network f ϕ .

Proof of Theorem C.4. The proof of this theorem relies on [19, Theorem 4.1]. Recall the definition ˜ w ( Y ) := E π b [ ˆ ρ ( A,X ) | Y ] . We can rewrite our setup in the setting of [19, Theorem 4.1], by relabelling ˆ ρ ( a, x ) in our setup as y in their setup and relabelling y in our setup as x in their setup. Then, given δ ∈ (0 , 1) , from [19, Theorem 4.1], it follows that under Assumptions C.1-C.3 that there exists a constant C independent of δ and m , such that

holds with probability at least (1 -δ )(1 -o k (1)) , where ϵ := ˆ w m ( Y ) -˜ w ( Y ) . Recall from Proposition 3.7 that

From this it follows using Cauchy-Schwarz inequality that,

Combining the above with Eqn. (5), it follows that,

holds with probability at least (1 -δ )(1 -o k (1)) , where C 1 = C 1 / 2 ( E π b [ Y 2 ]) 1 / 2 .

Next, to prove the variance result, we recall from Proposition 3.7 that n ( Var π b [ ˜ θ IPW ] -Var π b [ ˜ θ MR ]) = E π b [ Var π b [ ˆ ρ ( A,X ) | Y ] Y 2 ] -Var π b [ ϵ Y ] -2 Cov ( ϵ Y, ˜ w ( Y ) Y ) Now note that, under Assumption C.2,

holds with probability at least (1 -δ )(1 -o k (1)) , where C 2 = C M 2 . Similarly, we have that with probability at least (1 -δ )(1 -o k (1)) ,

where C 3 = C ( E π b [ ˜ w ( Y ) 2 Y 4 ]) 1 / 2 +( E π b [ Y 2 ]) 1 / 2 | E π b [ ˜ w ( Y ) Y ] | , and we use Cauchy-Schwarz inequality in the third step above. Putting this together, we obtain the required result.

Intuition This theorem shows that as the number of training samples m increases, the biases of MRand IPW estimators become roughly equal, whereas the variance of MR estimator falls below that of the IPW estimator. The empirical results shown in Appendix F.2 are consistent with this result. Moreover, in Theorem C.4, the estimated policy ratio ˆ ρ ( a, x ) is fixed for increasing m , i.e., we do not update ˆ ρ ( a, x ) as more training data becomes available. While this may seem as a disadvantage for the IPW estimator, we point out that the result also holds when the policy ratio is exact (i.e., ˆ ρ ( a, x ) = ρ ( a, x ) ) and hence the IPW estimator is unbiased.

Relaxing Assumption C.3 [19][Theorem 4.1] suppose that the data has the relationship shown in Assumption C.3. However, the theorem relies on Corollary 4.4 in [43], which requires a strictly weaker assumption (Assumption 1 in [43]). Therefore, we can relax Assumption C.3 to the following assumption.

Assumption C.5. There exists positive constants Q and M such that for all l ≥ 2 with l ∈ N

p π b -almost surely.

It is easy to check that Assumption C.5 is strictly weaker than Assumption C.3, and is also satisfied if the policy ratio ˆ ρ ( A,X ) is almost surely bounded. For simplicity, we use the stronger assumption in our Proposition C.4.

D Generalised formulation of the MIPS estimator [14]

As described in Section 3.1.1, the MIPS estimator proposed by [14] assumes the existence of action embeddings E which summarise all relevant information about the action A , and achieves a lower variance than the IPW estimator. To achieve this, the MIPS estimator only considers the shift in the distribution of ( X,E ) as a result of policy shift, instead of considering the shift in ( X,A ) (as in IPW estimator). In this section, we show that this idea can be generalised to instead consider general representations R of the context-action pair ( X,A ) , which encapsulate all relevant information about the outcome Y . The MIPS estimator is a special case of this generalised setting where the representation R is of the form ( X,E ) .

Generalised MIPS (G-MIPS) estimator Suppose that there exists an embedding R of the contextaction pair ( X,A ) , with the Bayesian network shown in Figure 3. Here, R may be a lower-dimensional representation of the ( X,A ) pair which contains all the information necessary to predict the outcome Y . This corresponds to the following conditional independence assumption:

Assumption D.1. The context-action pair ( X,A ) has no direct effect on the outcome Y given R , i.e., Y ⊥ ⊥ ( X,A ) | R .

(

X,A

)

R

Y

As illustrated in Figure 3, Assumption D.1 means that the embedding R fully mediates every possible effect of ( X,A ) on Y . The generalised MIPS estimator ˆ θ G-MIPS of target policy value, E π ∗ [ Y ] , is defined as

where p π b ( r ) denote the density of R under the behaviour policy (likewise for p π ∗ ( r ) ). Under assumption D.1,

ˆ θ G-MIPS provides an unbiased estimator of target policy value. Similar to Lemma 3.1, the density ratio p π ∗ ( r ) p π b ( r ) can be estimated by solving the regression problem

D.1 Variance reduction of G-MIPS estimator

By only considering the shift in the embedding R , the G-MIPS estimator achieves a lower variance relative to the vanilla IPW estimator. The following result, which is a straightforward extension of [14, Theorem 3.6], formalises this.

Proposition D.2 (Variance reduction of G-MIPS) . When the ratios ρ ( a, x ) and p π ∗ ( r ) p π b ( r ) are known exactly then under Assumption D.1, we have that E π b [ ˆ θ IPW ] = E π b [ ˆ θ G-MIPS ] = E π ∗ [ Y ] . Moreover,

Proof of Proposition D.2. The following proof, which is included for completeness, is a straightforward extension of [14, Theorem 3.6].

Now using the conditional independence Assumption D.1, the first term on the RHS above becomes,

where in the last step above we use the fact that

Putting this together, we get that

Since we have that

Eq. (7) becomes,

Intuition Here, R contains all relevant information regarding the outcome Y . Moreover, intuitively R can be thought of as the state obtained by 'filtering out' relevant information about Y from ( X,A ) . Therefore, R contains less 'redundant' information regarding the outcome Y as compared to the covariate-action pair ( X,A ) . As a result, the G-MIPS estimator which only considers the shift in the marginal distribution of R due to the policy shift is more efficient than the IPW estimator, which considers the shift in the joint distribution of ( X,A ) instead. In fact, as the amount of 'redundant' information regarding Y decreases in the embedding R , the G-MIPS estimator becomes increasingly efficient with decreasing variance. We formalise this as follows:

Assumption D.3. Assume there exist embeddings R (1) , R (2) of the covariate-action pair ( X,A ) , with Bayesian network shown in Figure 4. This corresponds to the following conditional independence assumptions:

(

X,A

)

R

(1)

R

(2)

Y

We can define G-MIPS estimators for these embeddings to obtain unbiased OPE estimators under Assumption D.3 as follows:

for j ∈ { 1 , 2 } . Here, p π ∗ ( r ( j ) ) p π b ( r ( j ) ) is the ratio of marginal densities of R ( j ) under target and behaviour policies. We next show that the variance of ˆ θ ( j ) G-MIPS decreases with increasing j .

Proposition D.4. When the ratios ρ ( a, x ) , w ( y ) and p π ∗ ( r ( j ) ) p π b ( r ( j ) ) are known exactly for j ∈ { 1 , 2 } , then under Assumption D.3 we get that

Moreover,

Proof of Proposition D.4. First, we prove that the G-MIPS estimators are unbiased using induction on j . We define R (0) := ( X,A ) and ˆ θ (0) G-MIPS defined as

recovers the IPW estimator ˆ θ IPW. When j = 0 , we know that ˆ θ (0) G-MIPS = ˆ θ IPW is unbiased. Now, assume that E π b [ ˆ θ ( j ) G-MIPS ] = E π ∗ [ Y ] .

Conditional on R ( j ) , R ( j +1) does not depend on the policy. Therefore,

And therefore,

Using this and the fact that R ( j ) ⊥ ⊥ Y | R ( j +1) , we get that

Next, to prove the variance result we consider the difference

where in the last step we use the law of total variance. Now, using the fact that R ( j ) ⊥ ⊥ Y | R ( j +1) , we can rewrite the expression above as

Moreover, again using the conditional independence R ( j ) ⊥ ⊥ Y | R ( j +1) , we can expand the first term in the expression above as follows:

Here, to get the inequality above, we use the fact that E [ X 2 ] ≥ ( E [ X ]) 2 . Putting this together, we get that Var π b [ ˆ θ ( j ) G-MIPS ] -Var π b [ ˆ θ ( j +1) G-MIPS ] ≥ 0 .

Moreover, the result Var π b [ ˆ θ (2) G-MIPS ] ≥ Var π b [ ˆ θ MR ] follows straightforwardly from above by defining R (3) := Y . Then, the embeddings satisfy the causal structure

Using the result above, we know that Var π b [ ˆ θ (2) G-MIPS ] ≥ Var π b [ ˆ θ (3) G-MIPS ] . But now it is straightforward to see that ˆ θ (3) G-MIPS = ˆ θ MR, and the result follows.

Intuition Here, R ( j +1) can be thought of as the embedding obtained by 'filtering out' relevant information about Y from R ( j ) . As such, the amount of 'redundant' information regarding the outcome Y decreases successively along the sequence R (0) (:= ( X,A )) , R (1) , R (2) . As a result, the G-MIPS estimators which only consider the shift in the marginal distributions of R ( j ) due to policy shift become increasingly efficient with decreasing variance as j increases. Define the representation R (3) := Y , then the corresponding G-MIPS estimator reduces to the MR estimator, i.e., ˆ θ (3) G-MIPS = ˆ θ MR. Moreover, this estimator has minimum variance among all the G-MIPS estimators { ˆ θ ( j ) G-MIPS } 0 ≤ j ≤ k , as the representation R (3) contains precisely the least amount of information necessary to obtain the outcome Y . In other words, Y itself serves as the 'best embedding' of covariate-action pair R (0) which contains all relevant information regarding Y . We verify this empirically in Appendix F.2 by reproducing the experimental setup in [14] along with the MR baseline. Additionally, the MR estimator does not rely on assumptions like D.1 for unbiasedness.

In addition to this, solving the regression problem in Eq. (6) will typically be more difficult when R is higher dimensional (as is likely to be the case for many choices of embeddings R ), leading to high bias. In contrast, for MR the embedding R = Y is one dimensional and therefore the regression problem is significantly easier to solve and yields lower bias. Our empirical results in Appendix F confirm this.

D.2 Doubly robust G-MIPS estimators

Consider the setup for the G-MIPS estimator shown in Figure 3. In this case, we can derive a doubly robust extension of the G-MIPS estimator, denoted as GM-DR, which uses an estimate of the conditional mean ˜ µ ( r ) ≈ E [ Y | R = r ] as a control variate to decrease the variance of G-MIPS estimator. This can be explicitly written as follows:

where ˜ η ( π ∗ ) = 1 n ∑ n i =1 ∑ r ′ ∈R ˜ µ ( r ′ ) p π ∗ ( r ′ | x i ) is the analogue of the direct method. Here, R denotes the space of the possible of the representations R 2 . Moreover, given the density p ( r | x, a ) , we can compute p π ∗ ( r | x ) using

It is straightforward to extend ideas from [13] to show that estimator ˜ θ DM-DR is doubly robust in that it will yield accurate value estimates if either the importance weights p π ∗ ( r ) p π b ( r ) or the outcome model ˜ µ ( r ) is well estimated.

There is no analogous DR extension of the MR estimator A consequence of considering the embedding R = Y (as in MR) is that in this case we do not have an analogous doubly robust extension as above. To see why this is the case, note that when R = Y , we get that ˜ µ ( r ) = E [ Y | R = r ] = E [ Y | Y = y ] = y . If we substitute this ˜ µ ( r ) in (8), we are simply left with ˜ η ( π ∗ ) on the right hand side (as the first term cancels out). This means that the resulting estimator does not retain the doubly robust nature as we no longer obtain an accurate estimate if either the outcome model or the importance ratios are well estimated.

E Application to causal inference

In this section, we investigate the application of the MR estimator for the estimation of average treatment effect (ATE). In this setting, we suppose that A = { 0 , 1 } , and the goal is to estimate ATE defined as follows:

Here, we use the potential outcomes notation [44] to denote the outcome under a deterministic policy π ∗ ( a ′ | x ) = ( a ′ = a ) as Y ( a ) .

✶ Specifically, the IPW estimator applied to ATE estimation yields:

where

Similarly, the MR estimator can be written as

where and π ( a ) ( a ′ | x ) := ✶ ( a ′ = a ) for a ∈ { 0 , 1 } . Again, using the fact that w ATE ( Y ) a.s. = E [ ρ ATE ( A,X ) | Y ] , we can obtain w ATE by minimising a simple mean-squared loss:

Proposition E.1 (Variance comparison with IPW ATE estimator) . When the weights ρ ATE ( a, x ) and w ATE ( y ) are known exactly, we have that Var [ ̂ ATEMR ] ≤ Var [ ̂ ATEIPW ] . Specifically,

Proof of Proposition E.1. We have

Using the tower law of variance, we get that

Putting this together with (9) we obtain,

which straightforwardly leads to the result.

Given the above definitions, the IPW estimator for E [ Y ( a )] would only consider datapoints with A = a , as it weights the samples using the policy ratios ✶ ( A = a ) /π b ( A | X ) which are only nonzero when A = a . This is however not the case with the MR estimator, as it uses the weights p π ∗ ( Y ) /p π b ( Y ) which are not necessarily zero for A = a . Therefore, MR uses all evaluation

̸

datapoints D when estimating E [ Y ( a )] . The MR estimator therefore leads to a more efficient use of evaluation data in this example.

Likewise, the doubly robust (DR) estimator applied to ATE estimation yields,

where ˆ µ ( a, x ) ≈ E [ Y | X = x, A = a ] . Like in classical off-policy evaluation, DR yields an accurate estimator of ATE when either the weights ρ ATE ( a, x ) or the outcome model i.e., ˆ µ ( a, x ) = E [ Y | X = x, A = a ] , are well estimated. However, despite this doubly robust nature of the estimator, we can show that the variance of the DR estimator may be higher than that of the MR estimator in many cases. The following result formalises this variance comparison between the DR and MR estimators, and is analogous to the result in Proposition 3.4 derived for classical off-policy evaluation.

Proposition E.2 (Variance comparison with DR ATE estimator) . When the weights ρ ATE ( a, x ) and w ATE ( y ) are known exactly,

where µ ( A,X ) := E [ Y | X,A ] .

Proof of Proposition E.2. Using the law of total variance, we get that

Again, using the law of total variance we can rewrite the first term on the RHS above as,

where, in the second last step above we use the fact that

Putting this together, we get that

Therefore,

Proposition E.2 shows that if Var [ Y ρ ATE ( A,X ) | Y ] is greater than Var [ ρ ATE ( A,X ) µ ( A,X ) | X ] on average, the variance of the MR estimator will be less than that of the DR estimator. Intuitively, this is likely to happen when the dimension of context space X is high because in this case, the conditional variance over X and A , Var [ Y ρ ATE ( A,X ) | Y ] is likely to be greater than the conditional variance over A , Var [ ρ ATE ( A,X ) µ ( A,X ) | X ] .

F Experimental Results

In this section, we provide additional experimental details for the results presented in the main text. We also include extensive experimental results to provide further empirical evidence in favour of the MRestimator.

Computational details We ran our experiments on Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz with 8GB RAM per core. We were able to use 150 CPUs in parallel to iterate over different configurations and seeds. However, we would like to note that for each run our algorithms only requires 1 CPU and at most 30 minutes to run as our neural networks are relatively small. Throughout our experiments, whenever the outcome Y was continuous, we used a fully connected neural network with three hidden layers with 512, 256 and 32 nodes respectively (and ReLU activation function) to estimate the weights ˆ w ( y ) . On the other hand, when the outcome is discrete we can directly estimate ˆ w ( y ) ≈ E [ ˆ ρ ( A,X ) | Y = y ] by calculating the sample mean of ˆ ρ ( A,X ) on samples with Y = y . Additionally, for each configuration of parameters in our experiments, we ran experiments for 10 different seeds (in {0, 1, . . . , 9}).

F.1 Alternative methodology of estimating MR

In addition to the OPE baselines like IPW, DM and DR estimators considered in the main text, we also include empirically investigate an alternative methodology of estimating MR. Below we describe this methodology, denoted as 'MR (alt)', in greater detail:

F.1.1 MR(alt)

Recall our definition of MR estimator:

In the main text, we propose estimating the weights w ( y ) first and using this to estimate ˆ θ MR using the above expression. Alternatively, we can estimate h ( y ) := y w ( y ) using

Subsequently, the MR estimator can be written as:

We refer to this alternative methodology as 'MR-alt' and compare it empirically against the original methodology (which we simply refer to as 'MR'). In general, it is difficult to say which of the two methods will perform better. Intuitively speaking, in cases where the behaviour of the quantity Y π ∗ ( A | X ) π b ( A | X ) with varying Y is 'smoother' than that of π ∗ ( A | X ) π b ( A | X ) , the alternative method is expected to perform better. Our empirical results in the next sections show that the relative performance of the two methods varies for different data generating mechanisms.

F.2 Synthetic data experiments

Here, we include additional experimental details for the synthetic data experiments presented in Section 5.1 for completeness. For this experiment, we use the same setup as the synthetic data experiment in [14], reproduced by reusing their code with minor modifications.

Setup Here, we sample the d -dimensional context vectors x from a standard normal distribution. The setup used also includes 3 -dimensional categorical action embeddings E ∈ E , which are sampled from the following conditional distribution given action A = a ,

which is independent of the context X . { α a,e k } is a set of parameters sampled independently from the standard normal distribution. Each dimension of E has a cardinality of 10 , i.e., E k = { 1 , 2 , . . . , 10 } .

Reward function The expected reward is then defined as:

where M , θ x and θ e are parameter matrices or vectors sampled from a uniform distribution with range [ -1 , 1] . x e k is a context vector corresponding to the k -th dimension of the action embedding, which is unobserved to the estimators. η k specifies the importance of the k -th dimension of the action embedding, sampled from Dirichlet distribution so that ∑ 3 k =1 η k = 1 .

Behaviour and target policies The behaviour policy π b is defined by applying the softmax function to q ( x, a ) = E [ q ( X,E ) | A = a, X = x ] as

For the target policy, we define the class of parametric policies,

where α ∗ ∈ [0 , 1] controls the shift between the behaviour and target policies. As shown in the main text, as α ∗ → 1 , the shift between behaviour and target policies increases.

Baselines In the main text, we compare MR with DM, IPW, DR and MIPS estimators. In addition to these baselines, here we also consider Switch-DR [5] and DR with Optimistic Shrinkage (DRos) [17]. Following [14], we use the random forest [45] along with 2-fold cross-fitting [46] to obtain ˆ q ( x, e ) for DR and DM methods. To estimate p π b ( a | x, e ) for MIPS estimator, we use logistic regression. We also include the results for MR estimated using the alternative methodology described in Section F.1.1. We refer to this as 'MR (alt)'.

Estimation of behaviour policy ̂ π b and marginal ratio ˆ w ( y ) We do not assume that the true behaviour policy π b is known, and therefore estimate ̂ π b using the available training data. For the MR estimator, we estimate the behaviour policy using a random forest classifier trained on 50% of the training data and use the rest of the training data to estimate the marginal ratios ˆ w ( y ) using multi-layer perceptrons (MLP). Moreover, for a fair comparison we use a different behaviour policy estimate ̂ π b for all other baselines which is trained on the entire training data.

(a)

d

= 1000

,

n

a

= 100

,

α

∗

= 0

.

8

(b)

d

= 5000

,

n

a

= 250

,

α

∗

= 0

.

8

(c)

d

= 5000

,

n

a

= 250

,

α

∗

= 1

.

0

DM

— DR

DRos

IPW

MIPS

SwitchDR

MR (alt)

MR

MSE

SquaredBias

101

101

101

10-1

100

100

10-1

10-3

10-1

10-2

10-5

10-3

10-2

Q

200040006000800010000

200040006000800010000

0

200040006000800010000

Numberofevaluationdata

Number of evaluation data

Number of evaluation data

MSE

Squared Bias

100

100

10-1

10-1

10-2

10-2

10-1

10-3

200040006000800010000

0

200040006000800010000

0

200040006000800010000

Numberofevaluationdata

Numberofevaluationdata

Numberofevaluationdata

MSE

SquaredBias

101

100

100

100

10-2

10-2

10-1

10-4

10-4

200040006000800010000

Q

200040006000800010000

0

200040006000800010000

Number of evaluation data

Number of evaluation data

F.2.1 Results

For this experiment, the results are computed over 10 different sets of logged data replicated with different seeds, and in Figures 5 - 8 we use a total of m = 5000 training data.

Varying size of evaluation data n Figure 5 shows that MR outperforms the other baselines, in terms of MSE and squared bias, when the number of evaluation data n ≤ 1000 . Additionally, we observe that in this experiment, MR estimated using our original methods ('MR'), yields better results than the alternative method of estimating MR ('MR (alt)'). Moreover, while the variance of DM is lower than that of MR, the DM method has a high bias and consequently a high MSE. We note that while the difference between MSE and variance of MIPS and MR estimators decreases with increasing evaluation data size, MR still outperforms MIPS in terms of both MSE and variance.

(a)

d

= 100

,

n

a

= 100

,

n

= 100

(b)

d

= 100

,

n

a

= 250

,

n

= 100

(c)

d

= 1000

,

n

= 250

,

n

= 100

DM

DR

DRos

—IPW

MIPS

SwitchDR

MR (alt)

MR

MSE

SquaredBias

101

101

101

10-1

100

10%

10-3

10-1

10-1

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α

α

α

MSE

SquaredBias

100

10°

100

10-2

10-1

10-1

10-4

0.0

0.2

0.40.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α*

α

α*

MSE

SquaredBias

102

102

100

101

101

10-2

100

10°

10-1

10-4

10-1

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α

α

α*

a

Varying α ∗ Figure 6 shows the results with increasing policy shift. It can be seen that overall MR methods achieve the smallest MSE with increasing policy shift. Moreover, the difference between MSE and variance of MR and IPW/DR methods increases with increasing policy shift, showing that MRperforms especially better than these baselines when the difference between behaviour and target policies is large. Similarly, we observe in Figure 6 that as the shift between the behaviour and target policy increases with increasing α ∗ , so does the difference between the MSE and variance of MR and the MIPS estimators. This shows that generally MR outperforms MIPS estimator in terms of variance and MSE, and that MR performs especially better than MIPS as the difference between behaviour and target policies increases.

Varying d and n a Figures 7 and 8 show that MR outperforms the other baselines as the context dimensions and/or number of actions increase. In fact, these figures show that MR is significantly robust to increasing dimensions of action and context spaces, whereas baselines like IPW and DR perform poorly in large action spaces.

Varying m Figure 10 shows the results with increasing number of training data m . We again observe that the MR methods 'MR' and 'MR (alt)' outperforms the other baselines in terms of the MSE and squared bias even when the number of training data is low. Moreover, the variance of both the MR estimators continues to improve with increasing number of training data.

In this experiment, we observe that overall 'MR (alt)' performs worse than the original MR estimator ('MR' in the figures). However, as we observe in Appendix F.5, this does not happen consistently across all experiments, which suggests that the comparative performance of the two MR methods depends on the data generating mechanism.

(a)

n

a

= 20

,

n

= 200

,

α

∗

= 0

.

8

(b)

n

a

= 100

,

n

= 200

,

α

∗

= 0

.

8

(c)

n

= 250

,

n

= 200

,

α

∗

= 0

.

8

DM

DR

DRos

IPW

MIPS

SwitchDR

MR (alt)

MR

MSE

SquaredBias

104

103

103

102

101

101

10-1

100

10-3

10-1

200040006000800010000

0

200040006000800010000

Q

200040006000800010000

Context dimension d

Context dimensiond

Contextdimensiond

MSE

Squared Bias

10%

100

100

10-1

10-1

10-2

10-1

10-3

10-2

200040006000800010000

0

200040006000800010000

0

200040006000800010000

Contextdimensiond

Contextdimensiond

Contextdimensiond

MSE

SquaredBias

101

101

101

10-1

10%

100

10-1

10-1

10-3

10-2

10-2

0

200040006000800010000

0

200040006000800010000

0

200040006000800010000

Context dimensiond

Context dimensiond

Context dimension d

a

Table 3: Mean-squared error results with 2 standard errors for synthetic data setup considered in Section 5.1 with d = 5000 , n a = 50 , α ∗ = 0 . 8 . We use a fixed budget of datapoints (denoted by N ) for each baseline and in the case of MR we use m = 2000 of the available datapoints to estimate ˆ w ( y ) and the rest of data to evaluate the MR estimator (i.e. n = N -2000 for MR). In contrast, for IPW and MIPS since the importance ratios are already known, we use all of the N datapoints for evaluation of the off-policy value (i.e. n = N for IPW and MIPS).

F.2.2 Known policy ratios ρ ( a, x )

Our previous setting of unknown importance policy ratios ρ ( a, x ) captures a wide variety of realworld applications, ranging from health care to autonomous driving. In addition, to demonstrate the utility of MR in settings with known ρ ( a, x ) , p ( e | a, x ) and unknown w ( y ) (for our proposed method, MR), we have conducted additional experiments. Here, we use a fixed budget of datapoints (denoted by N ) for each baseline and for MR we allocate m = 2000 of the available datapoints to estimate ˆ w ( y ) and use the remaining for evaluating the MR estimator (i.e., n = N -2000 for MR). In contrast, for IPW and MIPS (since the importance ratios are already known), we use all of the N datapoints to evaluate the off-policy value (i.e. n = N for IPW and MIPS).

(a)

d

= 1000

,

n

= 100

,

α

∗

= 0

.

4

(b)

d

= 1000

,

n

= 100

,

α

∗

= 0

.

8

(c)

d

= 1000

,

n

= 100

,

α

∗

= 1

.

0

DM

DR

DRoS

IPW

MIPS

SwitchDR

MR (alt)

MR

MSE

Squared Bias

101

100

101

10°

10°

10-2

10-1

10-1

10-4

10-2

500

10001500

2000

0

50010001500

2000

0

500

10001500

2000

Number of Actions

Number of Actions

Number of Actions

MSE

Squared Bias

102

101

102

101

10-1

10%

100

10-2

10-1

10-3

500

10001500

2000

0

500

1000

1500

2000

0

500

1000

1500

2000

NumberofActions

NumberofActions

Number of Actions

MSE

SquaredBias

102

101

102

101

10

10-1

10%

100

10-3

10-1

10-1

10-2

500

1000

1500

2000

500.10001500

2000

0

500

1000

1500

2000

Number of Actions

Number of Actions

Number of Actions

The results included in Table 3 show that MR achieves the smallest MSE among the baselines for N ≤ 6400 . However, we observe that the MSE of IPW, DR and MIPS (with true importance weights) falls below that of MR (with estimated weights ˆ w ) when the data size N is large enough (i.e., N ≥ 10 , 000 ). This is to be expected since IPW, DR and MIPS are unbiased (i.e., use ground truth importance ratios ρ ( a, x ) ) whereas MR uses estimated weights ˆ w ( y ) (and hence may be biased). MRstill performs the best when N ≤ 6400 .

F.3 Experiments on classification datasets

Here, we conduct experiments on four classification datasets, OptDigits, PenDigits, SatImage and Letter datasets from the UCI repository [37], the Digits dataset from scikit-learn library, as well as the Mnist [38] and CIFAR-100 datasets [39].

Setup Following previous works [13, 22, 36, 5], the classification datasets are transformed to contextual bandit feedback data. The classification dataset comprises { x i , a gt i } n 0 i =1 , where x i ∈ X are feature vectors and a gt i ∈ A are the ground-truth labels. In the contextual bandits setup, the feature vectors x i are considered to be the contexts, whereas the actions correspond to the possible class of labels. We split the dataset into training and testing datasets of sizes m and n respectively. We present the results for a range of different values of m and n .

Reward function Let X be a context with ground truth label A gt , we define the reward for action A as:

Y := ✶ ( A = A gt ) . Behaviour and target policies Using the m training datapoints, we first train a classifier f : X → R |A| which takes as input the feature vectors x i and outputs a vector of softmax probabilities over

labels, i.e. the a -th component of the vector f ( x ) , denoted as ( f ( x )) a corresponds to the estimated probability P ( A gt = a | X = x ) .

Next, we use f to define the ground truth behaviour policy,

For the target policies, we use f to define a parametric class of target policies using a trained classifier f : X → R |A| .

✶ where α ∗ ∈ [0 , 1] . A value of α ∗ close to 1 leads to a near-deterministic and well-performing policy. As α ∗ decreases, the policy gets increasingly worse and 'noisy'. In this experiment, we consider target policies π ∗ = π α ∗ for α ∗ ∈ { 0 . 0 , 0 . 2 , 0 . 4 , . . . , 1 . 0 } .

Using the behaviour policy defined above, we generate the contextual bandits data described with training and evaluation datasets of sizes m and n respectively.

Estimation of behaviour policy ̂ π b and marginal ratio ˆ w ( y ) We do not assume that the behaviour policy π b is known, and therefore estimate it using training data. To estimate the behaviour policy ̂ π b , we train a random forest classifier using the training data. This estimate of behaviour policy is used for all the baselines in our experiment. Since the reward is binary, we can estimate the marginal ratios ˆ w ( y ) = E π b [ ˆ ρ ( A,X ) | Y = y ] by directly estimating the sample mean of ˆ ρ ( A,X ) for datapoints with Y = y . We re-use the m training datapoints to estimate this sample mean.

Baselines We compare our estimator with Direct Method (DM), IPW and DR estimators. In addition, we also consider Switch-DR [5] and DR with Optimistic Shrinkage (DRos) [17]. To estimate ˆ q ( x, a ) for DM and DR estimators, we use random forest classifiers (since reward Y is binary). Moreover, because of the binary nature of Y , the alternative method of estimating MR yields the same estimator as the original method, therefore we do not consider the two separately here. Additionally, in this experiment, we do not include MIPS (or G-MIPS) baseline, as there is no natural informative embedding E of the action A .

F.3.1 Results

For this experiment, we compute the results over 10 different sets of logged data replicated with different seeds. Figures 11 - 17 show the results corresponding to each baseline for the different datasets. It can be seen that across all datasets, the MR achieves the smallest MSE with increasing evaluation data size n . Moreover, across all datasets, MR attains the minimum MSE with relatively small number of evaluation data ( n ≤ 100 ).

Unlike the experiments in Section 5.1, we observe that the KL-divergence between target and behaviour policy decreases as α ∗ increases (see Figure 9). Therefore, as α ∗ increases the shift between target and behaviour policies decreases. Figures 11 - 16 show that as α ∗ increases, the difference between the MSE, squared bias and variance of MR and the other baselines decreases. This confirms our findings from earlier experiments that MR performs especially better than the other baselines when the difference between behaviour and target policies is large.

Moreover, the figures also include results with increasing number of training data m . It can be seen that MR out-performs the baselines even when the number of training data m is small ( m = 100 ). Moreover, the relative advantage of MR improves with increasing m .

F.4 Application to Average Treatment Effect (ATE) estimation

In this subsection, we provide additional details for our experiment applying MR to the problem of ATE estimation presented in the main text. We begin by describing the dataset being used in this experiment.

Twins dataset We use the Twins dataset as studied by [40], which comprises data from twin births in the USA between 1989-1991. The treatment a = 1 corresponds to being born the heavier twin and the outcome Y corresponds to the mortality of each of the twins in their first year of life. Since

16

1

12

*

二

三

Iq1l)7a

8

4

0

0.0

0.2

0.4

0.6

0.8

1.0

α

*

(a)

d

= 1000

,

n

= 10

,

α

∗

= 0

.

8

(b)

d

= 1000

,

n

= 200

,

α

∗

= 0

.

8

(c)

d

= 1000

,

n

= 800

,

α

∗

= 0

.

8

DM

DR

DRos

—IPW

MIPS

SwitchDR

MR (alt)

MR

MSE

SquaredBias

103

103

102

102

102

10

10%

101

100

100

10-2

10-1

10-1

200040006000800010000

200040006000800010000

200040006000800010000

Number of training data

Number of training data

Number of training data

MSE

Squared Bias

10%

100

100

10-1

10-1

10-2

10-1

10-3

10-2

10-4

200040006000800010000

0

200040006000800010000

0

200040006000800010000

Number of training data

MSE

SquaredBias

10-1

10-1

10-1

10-2

10-2

10-3

10-3

10-4

10-2

200040006000800010000

200040006000800010000

0

200040006000800010000

Number of training data

Number of training data

the data includes records for both twins, their outcomes would be considered as the two potential outcomes. Specifically, Y (1) corresponds to the mortality of the heavier twin (and likewise for Y (0) ). Closely following the methodology of [40], we only chose twins which are the same sex and weigh less than 2kgs. This provides us with a dataset of 11984 pairs of twins.

The mortality rate for the lighter twin is 18.9% and for the heavier twin is 16.4%, leading to the ATE value being θ ATE = -2 . 5% . For each twin-pair we obtained 46 covariates relating to the parents, the pregnancy and birth.

Treatment assignment To simulate an observational study, we selectively hide one of the two twins by defining the treatment variable A which depends on the feature GESTAT10 . This feature, which takes integer values from 0 to 9, is obtained by grouping the number of gestation weeks prior to birth into 10 groups. Then we sample actions A as follows,

(a) Results with varying

n

for

α

∗

= 0

.

2

and

m

= 1000

(b) Results with varying

α

∗

for

m

=

n

= 1000

DM

DR

DRoS

一

IPW

SwitchDR

MR

MSE

Squared Bias

101

101

101

100

10-1

10-1

10-1

10-3

10-3

10-2

10-5

10-5

10-3

1000

2000

3000

4000

0

1000

2000

3000

4000

0

10002000

3000

4000

Noofevaluationdata

Noofevaluationdata

Noofevaluationdata

MSE

SquaredBias

10-1

10-1

10-2

10-2

10-4

10-3

10-3

10-6

10-5

10-4

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α*

α*

MSE

SquaredBias

101

101

100

10-1

10-1

10-2

10-3

10-3

10-4

10-5

0

500

1000

1500

2000

0

500

1000

1500

2000

0

500

1000

1500

2000

No of training data

No of training data

No of training data

(c) Results with varying

m

for

n

= 1000

and

α

∗

= 0

where Z is GESTAT10 , and X are all the 46 features corresponding to a twin pair (including GESTAT10 ).

Using the treatment assignments defined above, we generate the observational data by selectively hiding one of the two twins from each pair. Next, we randomly split this dataset into training and evaluation datasets of sizes m and n respectively. In this experiment, we consider m = 5000 training datapoints.

Baselines Recall that ATE estimation can be formulated as the difference between off-policy values of deterministic policies π (1) := ✶ ( A = 1) and π (0) := ✶ ( A = 0) . Therefore, any OPE estimator can be applied to ATE estimation. In this experiment, we compare our estimator against the baselines considered in our OPE experiments in Section F.3. This includes the Direct Method (DM), IPW and DR estimators as well as Switch-DR [5] and DR with Optimistic Shrinkage (DRos) [17]. To estimate ˆ q ( x, a ) for DM and DR estimators, we use multi-layer perceptrons (MLP) trained on the m training datapoints. Additionally, we estimate the behaviour policy ̂ π b using random forest classifier trained on the full training dataset.

Since the outcome in this experiment is binary, we estimate the weights w ( y ) = E π b [ ˆ ρ ( A,X ) | Y = y ] directly by estimating the sample mean of ˆ ρ ( A,X ) for datapoints with Y = y . This means that the alternative method of estimating MR yields the same value as the default method. We therefore do not consider these estimators separately. Additionally, since there is no natural embedding R of the covariate-action space which satisfies the conditional dependence Assumption D.1, we do not consider the G-MIPS (or MIPS) estimator either.

Performance metric For our evaluation, we consider the absolute error in ATE estimation, ϵ ATE, defined as:

.

6

(a) Results with varying

n

for

α

∗

= 0

.

2

and

m

= 1000

(b) Results with varying

α

∗

for

m

=

n

= 1000

DM

DR

DRoS

一

IPW

SwitchDR

MR

MSE

Squared Bias

101

101

101

100

10-1

10-1

10-1

10-3

10-3

10-2

10-5

10-5

10-3

1000

2000

3000

4000

0

1000

2000

3000

4000

0

1000

2000

3000

4000

Noofevaluationdata

Noofevaluationdata

Noofevaluationdata

10°

MSE

100

Squared Bias

10-1

10-1

10-2

10-3

10-2

10-4

10-5

10-3

0.0

0.2

0.40.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.40.6

0.8

1.0

α*

α*

MSE

SquaredBias

101

100

100

100

10-1

10-2

10-2

10-2

10-4

10-4

10-3

0

500

1000

1500

2000

0

500

1000

1500

2000

0

500

1000

1500

2000

Noof trainingdata

No of training data

No of training data

(c) Results with varying m for α ∗ = 0 . 6 and n = 1000

Here, ˆ θ ( n ) ATE denotes the value of the ATE estimated using n evaluation datapoints. For example, for the IPW estimator, the ˆ θ ( n ) ATE can be written as:

All results for this experiment are provided in the main text.

F.5 Additional synthetic data experiments

In addition to the synthetic data experiments provided in Section 5.1, we also consider an additional synthetic data setup to obtain further empirical evidence in favour of the MR estimator, and also compare it against the generalised version of the MIPS estimator (described as G-MIPS in Appendix D). Here, we use a similar setup to [14] (albeit without action embeddings E ) where the d -dimensional context vectors x are sampled from a standard normal distribution. Likewise, the action space is finite and comprises of n a actions, i.e. A = { 0 , . . . , n a -1 } , with n a taking a range of different values. The reward function is defined as follows:

Reward function The expected reward q ( x, a ) := E [ Y | x, a ] for these experiments is defined as follows:

The reward Y is obtained by adding a normal noise random variable to q ( x, a )

where ϵ ∼ N (0 , 0 . 01) . Here, it can be seen that conditional on R = ( || X || 2 , A ) , the reward Y does not depend on ( X,A ) , i.e., the embedding R satisfies the conditional independence assumption Y ⊥ ⊥ ( X,A ) | R .

(a) Results with varying

n

for

α

∗

= 0

.

2

and

m

= 1000

(b) Results with varying

α

∗

for

n

= 1000

DM

DR

DRoS

IPW

SwitchDR

MR

MSE

SquaredBias

10

100

10%

10-1

10-1

10-3

10-2

10-2

10-5

10-4

10-3

0

1000

2000

3000

4000

0

1000

2000

03000

4000

0

10002000

3000

4000

Noofevaluationdata

No of evaluation data

Noofevaluationdata

MSE

Squared Bias

10-1

10-1

10-1

10-3

10-3

10-2

10-5

10-5

10-3

0.0

0.2

0.40.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.40.6

0.8

1.0

α*

α*

α

MSE

Squared Bias

100

10%

10-1

10-2

10-1

10-2

10-4

10-3

10-3

10-6

10-5

0

500

1000

1500

2000

0

500

1000

1500

2000

0

500

1000

1500

2000

No of training data

No of training data

No of training data

(c) Results with varying

m

for

α

∗

= 0

.

6

and

n

= 1000

Behaviour and target policies We first define a behaviour policy by applying softmax function to q ( x, a ) as

Just like in Section 5.1, to investigate the effect of increasing policy shift, we define a class of policies,

where α ∗ ∈ [0 , 1] allows us to control the shift between π b and π ∗ . Again, the shift between π b and π ∗ increases as α ∗ → 1 . Using the ground truth behaviour policy π b , we generate a dataset which is split into training and evaluation datasets of sizes m and n respectively.

In Figures 18 - 21, we present the results for this experimental setup for different choices of paramater configurations.

Estimation of behaviour policy ̂ π b and marginal ratio ˆ w ( y ) For the MR estimator, we estimate the behaviour policy using a random forest classifier trained on 50% of the training data and use the rest of the training data to estimate the marginal ratios ˆ w ( y ) using multi-layer perceptrons (MLP). Moreover, for a fair comparison we use a different behaviour policy estimate ̂ π b for all other baselines which is trained on the entire training data.

Additional Baselines In addition to the baselines considered in the main text (Section 5.1), we also consider Switch-DR [5] and DR with Optimistic Shrinkage (DRos) [17]. In addition, we also include the results for MR estimated using the alternative method ('MR (alt)') outlined in Section F.1.1. For

(a) Results with varying

n

for

α

∗

= 0

.

2

and

m

= 1000

(b) Results with varying

α

∗

for

m

=

n

= 1000

DM

DR

DRoS

IPW

SwitchDR

MR

MSE

Squared Bias

10

101

101

10-1

10-1

10-1

10-3

10-3

10-5

10-3

10-5

10-7

1000

2000

3000

4000

0

1000

2000

3000

4000

0

10002000

3000

4000

Noofevaluationdata

No of evaluation data

No of evaluation data

MSE

SquaredBias

101

101

100

10-1

10-1

10-3

10-2

10-5

10-4

10-3

10-7

10-6

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α*

α*

α*

MSE

Squared Bias

103

103

103

101

101

100

10-1

10-1

10-3

10-3

10-3

10-6

10-5

0

500

1000

1500

2000

0

500

1000

1500

2000

0

500

1000

1500

2000

No of training data

No of training data

No of training data

(c) Results with varying

m

for

α

∗

= 0

.

6

and

n

= 1000

the G-MIPS estimator (defined in Appendix D) considered here, we use R = ( a, || x || 2 ) 3 . To estimate ˆ q ( x, a ) for DM and DR estimators, we use multi-layer perceptrons (MLPs).

F.5.1 Results

For this experiment, the results are computed over 10 different sets of logged data replicated with different seeds, and in Figures 18 - 21 we use a total of m = 5000 training data.

Varying n Figure 18 shows that MR outperforms the other baselines, in terms of MSE and squared bias, when the number of evaluation data n ≤ 1000 . Additionally, we observe that in this experiment, MResitmated using alternative methods, MR (alt), yields better results than the original method of estimating MR. Moreover, while the variance of DM is lower than that of MR, the DM method has a high bias and consequently a high MSE.

Varying α ∗ Figure 19 shows the results with increasing policy shift. It can be seen that overall MR methods achieve the smallest MSE with increasing policy shift. Moreover, the difference between MSE and variance of MR and IPW/DR methods increases with increasing policy shift, showing that MRperforms especially better than these baselines when the difference between behaviour and target policies is large.

Varying d and n a Figures 20 and 21 show that MR outperforms the other baselines as the context dimensions and/or number of actions increase. In fact, Figure 21 shows that MR is significantly robust to increasing action space, whereas baselines like IPW and DR perform poorly in large action spaces.

(a) Results with varying

n

for

α

∗

= 0

.

2

and

m

= 1000

(b) Results with varying

α

∗

for

m

=

n

= 1000

DM

DR

DRoS

IPW

SwitchDR

MR

MSE

Squared Bias

10-1

10-1

10-2

10-3

10-2

10-3

10-4

10-5

10-3

10-5

10-6

10002000

3000

4000

0

1000

20003000

4000

0

100020003000

4000

Noofevaluationdata

Noofevaluationdata

Noofevaluationdata

MSE

SquaredBias

10-1

10-1

10-3

10-2

10-2

10-4

10-3

10-3

10-5

10-4

10-4

10-6

0.0

0.2

0.40.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α*

α*

MSE

SquaredBias

10°

10°

10-2

10-1

10-1

10-4

10-2

10-2

10-6

0

500

1000

1500

2000

0

500

1000

1500

2000

0

500

1000

1500

2000

No of training data

No of training data

No of training data

(c) Results with varying m for α ∗ = 0 . 6 and n = 1000

Varying m Figure 22 shows the results with increasing number of training data m . We again observe that the MR methods 'MR' and 'MR (alt)' outperforms the other baselines in terms of the MSE and squared bias even when the number of training data is low. Moreover, the variance of both the MR estimators continues to improve with increasing number of training data.

Unlike our experimental results in Section F.2, 'MR (alt)' performs better than the original MR estimator overall. This shows that one of these two methods is not better than the other consistently in all cases, and their relative performance depends on the dataset under consideration.

F.6 Self-normalised MR estimator

Self-normalization trick has been used in practice to reduce the variance in off-policy estimators [30]. This technique is also applicable to the MR estimator, and leads to the self-normalized MR estimator (denoted as θ SNMR) defined as follows:

We conducted experiments to investigate the effect of self-normalisation on the performance of the IPW, DR and MR estimators. Figure 23 shows results for three different choices of parameter configurations. Overall, we observe that in all settings, the MR and self-normalised MR (SNMR) estimator outperform all other baselines including the self-normalised IPW and DR estimators (denoted as SNIPW and SNDR respectively). Moreover, in some settings, where the importance ratios achieve very high values, self-normalisation can reduce the variance and MSE of the corresponding estimator (for example, Figure 23b). However, we also observe cases in which self-normalization does not significantly change the results (Figure 23a), or may even slightly worsen the MSE of the estimators (Figure 23c).

(a) Results with varying

n

for

α

∗

= 0

.

2

and

m

= 500

(b) Results with varying

α

∗

for

n

= 500

and

m

= 1000

(c) Results with varying

m

for

α

∗

= 0

.

6

and

n

= 500

DM

DRos

IPW

SwitchDR

MR

MSE

SquaredBias

10-1

10-1

10-1

10-2

10-3

10-2

10-2

10-4

10-5

10-3

10-3

200

400

600

800

1000

200

400

600

800

1000

200

600

800

1000

Noofevaluationdata

Noofevaluationdata

No of evaluation data

MSE

SquaredBias

10°

10-1

10-1

10-1

10-3

10-3

10-2

10-5

10-5

10-3

0.0

0.2

0.40.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.40.6

0.8

1.0

α*

α*

α

MSE

SquaredBias

10-3

10-1

10-1

10-4

10-2

10-2

10-5

10-3

10-3

10-6

200

400

600

800

1000

200

400

600

800

1000

200

400

600

800

1000

No of training data

No of training data

No of training data

(a) Results with varying

n

for

α

∗

= 0

.

4

and

m

= 2000

(b) Results with varying

α

∗

for

n

= 100

and

m

= 2000

DM

DR

DRos

IPW

SwitchDR

MR

MSE

SquaredBias

103

103

102

101

10-1

101

10-1

10-4

10-1

10-3

10-5

10-7

10-3

200

400

600

800

1000

200

400

600

800

1000

200

400

600

800

1000

No of evaluation data

Noofevaluationdata

Noofevaluationdata

MSE

Squared Bias

105

105

102

102

102

10-1

10-1

10-1

10-4.

10-4

10-4

10-7

0.0

0.2

0.40.6

0.8

1.0

0.0

0.2

0.40.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α*

α*

α*

MSE

SquaredBias

103

103

10-2

101

101

10-9

10-1

10-1

10-16

10-3

10-3

10-23

10-5

10-5

10-30

1000 1500 2000250030003500 4000

1000150020002500300035004000

1000150020002500300035004000

No of training data

Noof training data

Noof training data

(c) Results with varying

m

for

α

∗

= 0

.

4

and

n

= 100

(a)

d

= 1000

,

n

a

= 100

,

α

∗

= 0

.

4

.

(b)

d

= 10000

,

n

= 100

,

α

∗

= 0

.

4

.

DM

—DR

DRoS

G-MIPS

一

IPW

SwitchDR

MR (alt)

MR

MSE

SquaredBias

10-2

10-2

10-2

10-3

10-3

10-4

10-4

10-3

10-5

10-5

10-6

0

1000200030004000

5000

0

1000200030004000

5000

0

1000200030004000

5000

Noofevaluationdata

No of evaluation data

No ofevaluationdata

MSE

SquaredBias

100

10-1

10

10-1

10-3

10-1

10-2

10-5

10-2

10-3

10-7

10-3

10-4

0

1000200030004000

5000

0

1000

200030004000

5000

0

1000200030004000

5000

Noofevaluationdata

Noofevaluationdata

Noofevaluationdata

a

(a)

d

= 1000

,

n

a

= 100

,

n

= 100

.

DM

DR

DRoS

G-MIPS

IPW

SwitchDR

MR (alt)

MR

MSE

Squaredbias

10-1

10-1

10-1

10-2

10-3

10-2

10-3

10-3

10-5

10-4

10-5

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

Q*

α*

α*

MSE

Squaredbias

10-1

10-1

10-1

10-3

10-2

10-2

10-5

10-3

10-3

10-7

10-4

0.0

0.2

0.40.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α*

Q*

α*

(b)

d

= 10000

,

n

a

= 100

,

n

= 100

.

(a)

n

a

= 100

,

n

= 100

,

α

∗

= 0

.

4

.

(b)

n

= 500

,

n

= 100

,

α

∗

= 0

.

4

.

DM

DR

DRos

G-MIPS

IPW

SwitchDR

MR (alt)

MR

MSE

Squaredbias

10-1

10-2

10-2

10-2

10-3

10-3

10-4

10-4

10-3

10-5

10-5

0

200040006000800010000

0

200040006000800010000

0

200040006000800010000

Contextdimensions

Context dimensions

Contextdimensions

MSE

Squaredbias

100

10-1

100

10-1

10-3

10-2

10-2

10-5

10-7

10-4

10-3

0

200040006000800010000

0

200040006000800010000

0

200040006000800010000

Context dimensions

Contextdimensions

Context dimensions

a

(a)

d

= 100

,

n

= 100

,

α

∗

= 0

.

2

.

(b)

d

= 100

,

n

= 100

,

α

∗

= 0

.

4

.

DM

—DR

DRoS

G-MIPS

一

IPW

SwitchDR

MR (alt)

MR

MSE

SquaredBias

102

101

102

100

10-1

100

10-3

10-2

10-2

10-5

10-4

0

10002000300040005000

0

1000200030004000

5000

0

10002000300040005000

Number of Actions

Number of Actions

Number of Actions

MSE

Squared Bias

102

101

102

10-1

100

100

10-3

10-2

10-2

10-5

10-4

0

10002000300040005000

0

100020003000

40005000

0

10002000300040005000

NumberofActions

NumberofActions

NumberofActions

(a)

d

= 5000

,

n

= 100

,

n

a

= 10

,

α

∗

= 0

.

2

.

(b)

d

= 5000

,

n

= 100

,

n

a

= 10

,

α

∗

= 0

.

4

.

DM

DR

DRos

G-MIPS

IPW

SwitchDR

MR (alt)

MR

MSE

SquaredBias

10-2

10-3

10-3

10-5

10-3

10-4

10-7

200040006000800010000

0

200040006000800010000

0

200040006000800010000

Numberoftrainingdata

Numberoftrainingdata

Number oftraining data

MSE

SquaredBias

10-2

10-2

10-2

10-3

10-31

10-4

10-3

10-5

10-4

D

200040006000800010000

0

200040006000800010000

0

200040006000800010000

Numberoftrainingdata

(a)

d

= 10000

,

n

= 200

,

n

a

= 20

,

m

= 5000

.

(b)

d

= 5000

,

n

= 200

,

n

a

= 20

,

m

= 1000

.

(c)

d

= 10000

,

n

= 200

,

n

a

= 20

,

m

= 5000

.

IPW

DR

MR

SNDR

SNIPW

SNMR

MSE

Squaredbias

100

10%

10°

10-2

10-1

10-1

10-4

0:0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α*

α*

α*

MSE

Squaredbias

101

10

100

100

10-2

10°

10-4

10-1

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α*

α

α

MSE

Squaredbias

100

100

100

10-2

10-1

10-1

10-4

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

α*

α

α

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper addresses Off-Policy Evaluation (OPE) in contextual bandits, a significant problem in fields such as healthcare and personalized recommendation systems. OPE involves evaluating the performance of new policies using only existing data generated by a current policy, which can pose a challenge due to high variance in estimators, particularly in situations with large action or context spaces. The study proposes a new OPE estimator called the Marginal Ratio (MR) estimator, which mitigates this issue by considering the shift in the marginal distribution of the outcome resulting from the policy shift, rather than the policy shift itself. This approach makes the MR estimator more robust to increasing sizes of action and context spaces than existing methods like Inverse Probability Weighting (IPW) or Doubly Robust (DR).\n\nSTRENGTHS:\n- The paper tackles the practically relevant problem of off-policy evaluation\n\n\n- The paper is well-written and it was easy to follow the main arguments. The intuition statements right after each theorem were also useful \n\n\n- The paper proposes a new estimator called the MR estimator, which defines the weight in terms of the shift in the conditional reward distribution between the logging and target policies and is expected to reduce the variance compared to IPW, DR, and MIPS. In an ideal case, MR can also be unbiased.\n\n\n- Advantages of the proposed method over a range of conventional methods such as IPW, DR, and MIPS are demonstrated in a comprehensive way\n\nWEAKNESSES:\n- Eq.(3) may be unstable in cases where the target and behavior policies greatly differ, and there are many actions where the variance of $\\rho(x,a)$ becomes very large.\n\n\n- It is intuitive that MR reduces the variance from IPS and MIPS, but it needs to estimate the weight in terms of the marginal reward distributions, which are always unknown. If we can estimate the reward distributions well, then we could simply rely on DM. Therefore, it would be necessary to formalize the advantages of MR over DM in the case of an unknown $w(y)$.\n\n\n- The experiment design could be improved. As I understand it, in the experiments, both $\\rho(x,a)$, $p(e|x,a)$, and $w(y)$ are estimated from the logged data. While it's true that $w(y)$ is always unknown, in many industry applications where we can control $\\pi_b$, $\\rho(x,a)$ of IPW&DR and $p(e|x,a)$ of MIPS are known. Therefore, it would be necessary to compare MR with estimated $\\rho(x,a)$ and IPS, DR, and MIPS with their respective true weights.\n\n\n- This is not critical, but there are a few concurrent work that aims to further improve MIPS so would be great to discuss these papers in a revised version:\n\n    - Jie Peng, Hao Zou, Jiashuo Liu, Shaoming Li, Yibao Jiang, Jian Pei, Peng Cui. Offline Policy Evaluation in Large Action Spaces via Outcome-Oriented Action Grouping. WWW2023. https://dl.acm.org/doi/abs/10.1145/3543507.3583448 \n\n    - Yuta Saito, Qingyang Ren, Thorsten Joachims. Off-Policy Evaluation for Large Action Spaces via Conjunct Effect Modeling. https://arxiv.org/abs/2305.08062\n\nQUESTIONS:\n- Could you provide some additional experiment results comparing MR with an estimated weight $\\hat{w}(y)$ and IPS, DR, and MIPS with the true respective weights?\n\n\n- How does MR perform when $\\rho(x,a)$ takes some extreme values, making solving Eq.(3) hard? Specifically, I would love to see experiment results, for example with $n =5,000, n_a = 5000, \\alpha = 1.0$, which should produce the situation I am interested in. Figure 8 in the appendix is relevant, but $n$ is too small to observe large empirical $\\rho(x,a)$.\n\n\n- What would be the theoretical comparison between DM and MR? Why does MR perform much better than DM, even though both perform OPE by estimating some aspect of the reward distribution?\n\n\n- Can we extend MR to a doubly-robust version? How would it look, and how would its variance compare to that of DR with $\\rho(x,a)$?\n\nLIMITATIONS:\nThe limitations of the work are stated in the final section and they look reasonable.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-06-29"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a marginal OPE estimator that directly corrects the distribution shift wrt rewards instead of correcting the distribution shift wrt actions. The proposed estimator generalizes the idea of marginal IPS (MIPS) and achieves the minimum variance among them when the marginal importance weight is accurately estimated. Experiments on both synthetic and classification-to-bandit datasets demonstrate that the proposed estimator enables more accurate OPE than baseline estimators.\n\nSTRENGTHS:\n1. The idea of applying importance sampling on rewards rather than actions is reasonable from the context. The paper is easy to follow, and the contribution is clearly stated.\n\n2. The paper also provides a data-driven method to estimate the marginal importance weight, which is a simple and straightforward approach.\n\n3. The connection between MIPS, which estimate the expected outcome by applying marginal importance weight wrt action embeddings is discussed, and the theory suggests that the proposed MR achieve minimum variance among marginal estimators.\n\nWEAKNESSES:\n1. As author(s) discuss in the limitation, one potential concern lies in the accuracy of the marginal importance weight. In my understanding, the proposed method seems to work well when the reward is discrete, as an adequate amount of data is observed for each reward. However, when the reward is continuous, I guess sometimes only one importance weight is observed for each reward, which leads to the variance in the estimation of the marginal importance weight. This may lead to a similar difficulty as [Kallus&Zhou, 18]. I have several questions regarding this concern, which I list in the following “Questions” section.\n\nNathan Kallus and Angela Zhou. “Policy Evaluation and Optimization with Continuous Treatments” (AISTATS’18)\n\n2. The marginal importance weight on reward has not been discussed in the standard OPE in contextual bandits, but some similar ideas have been discussed in OPE of RL [Rowland et al., 20] and another OPE framework which estimates the cumulative distribution function of a policy [Xu et al., 22] [Wu et al., 23]. As discussions with these methods are important to clarify the novelty of this work, I suggest discussing connections between these papers in related work.\n\nMark Rowland, Anna Harutyunyan, Hado van Hasselt, Diana Borsa, Tom Schaul, Rémi Munos, and Will Dabney. “Conditional Importance Sampling for Off-Policy Learning” (ICML’20)\n\nYang Xu, Chengchun Shi, Shikai Luo, Lan Wang, and Rui Song. “Quantile Off-Policy Evaluation via Deep Conditional Generative Learning” (‘22)\n\nRunzhe Wu, Masatoshi Uehara, and Wen Sun. “Distributional Offline Policy Evaluation with Predictive Error Guarantee” (ICML’23)\n\nQUESTIONS:\nThe following questions are related to my concern discussed in Weakness 1.\n\n1. In which condition the marginal importance weight is accurately estimated?\n\n2. Could you provide an error analysis on the estimation of the marginal importance weight (especially when the reward is continuous)?\n\n3. How the marginal importance weight is parametrized and estimated? Are there any assumptions or regularization? How difficult the hyperparameter tuning is?\n\nLIMITATIONS:\nAs discussed in Weakness 1, it would be valuable to discuss the potential difficulty in estimating the marginal importance weight when the reward is continuous.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-02"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduced a new off-policy evaluation (OPE) method called Marginal Ratio (MR) to contextual bandits problems. Conventional methods such as Inverse Probability Weighting (IPW) and Doubly Robust (DR) rely on estimating policy ratios, which could incur large variances when there is low overlap between the target policy and the behavior policy. \n\nVariance and bias analyses of the MR estimator are provided. Specifically, the MR estimator achieves smaller variance compared to both IPW and DR when the important weights $\\rho$ and marginal ratio $\\omega$ are known. When both of them are unknown, the authors proposed a method that can approximate the weights and showed that with high probability the MR estimator is more favorable than the IPW counterpart. \n\nExtensive numerical experiments are provided, where the MR estimator outperformed baselines in terms of the mean square losses while maintained small variances.\n\nSTRENGTHS:\nThe paper is overall well-written and easy to follow. The theorems, propositions and comparisons are well-organized. The authors provided a good motivation to study the MR estimator, which addressed the high variance issues when using IPW and DR in practice. The idea is novel and interesting and the simulation results showed great potentials of the proposed estimator.\n\nWEAKNESSES:\nThe assumptions of proposition 3.3 and 3.4 are quite strong. Though the MR estimator achieves lower variances comparing to IPW and DR estimators, I think the assumption of knowing the ratio $\\omega$ is much stronger than knowing the importance weight $\\rho$. Thus, it is not a very fair comparison. \n\nWhen the behavior policy and the marginal ratio $\\omega$ are known, the authors showed that as the training data size $m$ increases, the biases of MR and IPW estimators are almost the same with high probability and the variance of MR estimator could be smaller than the IPW counterpart. I don't think this is a strong result as the MR estimator depends on the unknown importance ratio $\\rho$ and the order term $\\mathcal{O}(m^{-1/3})$ in the variance analysis could be very large in practice. \n\nOverall, I think the theoretical results the MR estimator are sound yet incremental compared to existing methods.\n\nQUESTIONS:\n1. Can the order in the term $\\mathcal{O}(m^{-1/3})$ be improved, e.g.,  $\\mathcal{O}(m^{-1/2})$? \n\n2. I am a bit confused by the connections to MIPS and the application to causal inference. As you mentioned, MIPS is trying to solve large action space problem while in causal inference the action space is usually binary. What is the benefits of using the MR estimator? Is it more applicable to large action space problems or small action space problems? Also, the connection and comparison to MIPS is not very straightforward to me as the final analyses do not explicitly depend on the action space size. Can you provide more explanations here?\n\nLIMITATIONS:\nN.A.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper looks at the problem of off-policy evaluation (OPE) in contextual bandits. \nThe problem consists of estimating the expected reward obtained from a policy different from the one that collected the data.\nThe authors first analyze classic OPE estimators used for this problem, such as Inverse Probability Weighting (IPW) and Doubly Robust (DR). The authors notice how such estimators have high variance (especially IPW), and this is due to their focus on policy shift. The authors propose a novel estimator, called Marginal Ratio (MR) estimator, which focuses on the shift of the marginal distribution of the rewards instead. The authors also theoretically show that, whenever the marginal ratio is known exactly, MR has lower or equal variance compared to IPW. The authors also derive a relationship between the variances of MR and DR. In this case, however, they show that it is not true that the variance of MR is always lower or equal to the one of DR. Furthermore, the authors show that MR has lower variance than Marginalized IPS (MIPS, a recently proposed estimator), under the same assumption used by MIPS.\n\nSTRENGTHS:\n- Simple and interesting idea with a novel point of view\n- Clear presentation\n- Careful experimental analysis (also considering the appendix) and strong empirical performance\n\nWEAKNESSES:\n- Since the problem with IPW and DR is high variance, a really simple way to reduce the variance for such estimators is the Self-Normalization trick [1]. I would have preferred to see the empirical comparison also against the Self-Normalized variant of IPW and DR.\n- There is no investigation on whether the Self-Normalization trick is applicable to the proposed MR. This could further improve the performance of the proposed estimator (if applicable)\n- The experimental setting seems to be such that IPW has high variance, which is fine since it is a known characteristic of IPW. However, there are also settings where IPW performs well (see [2] for an in-depth review of the performance of state-of-the-art OPE estimators). It could have been useful to see a comparison between the baseline estimators and MR in such settings, even only in the appendix.\n\n\n[1] A. Swaminathan and T. Joachims, The self-normalized estimator for counterfactual learning, NeurIPS 2015.\n\n[2] Saito et al., Evaluating the Robustness of Off-Policy Evaluation, RecSys 2021.\n\nQUESTIONS:\nTaken from the above section:\n\n- Do you think that the Self-Normalization trick is applicable to MR?\n\nLIMITATIONS:\nThe authors have addressed the limitations of their work.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-05"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper addresses the problem of off-policy evaluation (OPE) using a variant of the inverse propensity score (IPS) estimator on logged bandit data. The authors specifically aim to reduce the variance of IPS by focusing on the shift in the marginal distribution of rewards instead of the policies themselves, resulting in a new estimator called the Marginal Ratio (MR) estimator. The proposed estimator is extensively analyzed, including comparisons with other related works such as IPS, DR, and MIPS. Furthermore, the authors demonstrate the utility of the MR estimator in causal inference for estimating average treatment effects (ATE). The effectiveness of the MR estimator in OPE is evaluated through a standard experimental setup, involving both synthetic and semi-synthetic data.\n\n# POST-REBUTTAL:\nI have read the author’s rebuttal and the authors addressed all my concerns.\n\nSTRENGTHS:\nThe clarity and quality of writing in this paper are solid. The authors not only address the standard contextual bandit setting but also extend their work to causal inference for estimating average treatment effects (ATE). The overall idea of considering the shift in the marginal distribution of outcomes instead of the policies themselves is simple and very interesting. The theoretical concepts are effectively explained, and the proposed estimator is comprehensively compared to standard estimators such as IPS, DR, and MIPS. To the best of my knowledge, the derived guarantees are original contributions. The authors employ a standard experimental setup to validate their claims and showcase the favorable performance of their estimator through an extensive set of experiments.\n\nWEAKNESSES:\n**Computational Efficiency:**\n\nThe proposed MR estimator introduces an additional step of estimating $w(y)$, which may pose computational challenges compared to IPS, where the importance weights $\\pi/\\pi_0$ are readily accessible. While this might be manageable in the context of off-policy evaluation, where a policy $\\pi$ is given and the goal is to estimate its value using $\\hat{\\theta}$ through IPS, DR, MIPS, or MR, it may become problematic in off-policy learning. In off-policy learning, we optimize $\\hat{\\theta} = \\hat{\\theta}(\\pi)$ with respect to $\\pi$ to find the policy that maximizes the reward. Then, performing a regression to estimate $w(y)$ in each optimization step with respect to $\\pi$ can be computationally demanding. This presents a notable challenge.\n\n**Experiments:**\n\nThe experimental setup presented in the paper is solid. However, it would be beneficial to incorporate more complex computer vision datasets such as Fashion-MNIST and CIFAR-100, as seen in recent studies (e.g., [1, 2]). These datasets feature larger action sets and contexts when converted to contextual bandit instances.\n\n**Related Work:**\n\nWhile not a weakness, it would be valuable to include citations for two recent papers [1, 2] that propose new corrections for the importance weights to reduce variance. In [1], the authors suggest clipping only the propensity scores $\\pi_0$ (as $\\rm{max}(\\pi_0, 0)$) instead of the importance weight $\\pi/\\pi_0$. Additionally, [2] introduces a smooth regularization of the importance weights by incorporating $\\pi/\\pi_0^\\alpha$, where $\\alpha \\in [0, 1]$. While it is not necessary to directly compare the proposed approach with these papers, acknowledging their existence and contributions would be appropriate.\n\n[1] Ben London and Ted Sandler. Bayesian counterfactual risk minimization. In International Conference on Machine Learning, pp. 4125–4133. PMLR, 2019. Preprint version arXiv:1806.11500.\n\n[2] Imad Aouali, Victor-Emmanuel Brunel, David Rohde, and Anna Korba. Exponential Smoothing for Off-Policy Learning. arXiv preprint arXiv:2305.15877, 2023.\n\nQUESTIONS:\n- In terms of computational efficiency, how does the efficiency of the MR estimator compare to IPS?\n- Is there an efficient method to optimize the MR estimator with respect to the policy $\\pi$ (i.e., in the context of off-policy learning) considering that estimating $w(y)$ is required in each iteration during the optimization process?\n\nLIMITATIONS:\nThe authors adequately addressed limitations in Section 6.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 5, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-06"}