SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.09667 · ICML · 2022

Doubly Robust Distributionally Robust Off-Policy Evaluation and Learning

Zhengyuan Zhou, Nathan Kallus, Xiaojie Mao, Kaiwen Wang

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2202.09667.json · badge: /api/ran/2202.09667.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
causalml/doubly-robust-dropel canonical (classifier label)
classifier basis: classifier_2025
4 ran · 1 no recorded run
FunctionStatusWhere it lives
DataInput Ran
ran on a synthesized input · constructed an object; no result was computed
causalml/doubly-robust-dropel/drorl/dro.py
code served (permissive licence) · get_code("8440a2bb018f395b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DataInput: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax.numpy as jnp
import numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Define small tensors with distinct dimensions
batch_size = 2
state_dim = 4
action_dim = 3
num_actions = 5

# Create sample arrays
s = jnp.array(np.random.randn(batch_size, state_dim), dtype=jnp.float32)
a = jnp.array(np.random.randint(0, num_actions, batch_size), dtype=jnp.int32)
a_prob = jnp.array(np.random.rand(batch_size), dtype=jnp.float32)
r = jnp.array(np.random.randn(batch_size), dtype=jnp.float32)

# Optional fields with distinct shapes
probs_mat = jnp.array(np.random.rand(batch_size, num_actions), dtype=jnp.float32)
ips_weights = jnp.array(np.random.rand(batch_size), dtype=jnp.float32)
reward_mat = jnp.array(np.random.randn(batch_size, action_dim), dtype=jnp.float32)
f0_mat = jnp.array(np.random.randn(batch_size, 6), dtype=jnp.float32)
f1_mat = jnp.array(np.random.randn(batch_size, 7), dtype=jnp.float32)
cond_weights = jnp.array(np.random.rand(batch_size), dtype=jnp.float32)
r_for_rf = jnp.array(np.random.randn(batch_size), dtype=jnp.float32)
opt_a = jnp.array(np.random.randint(0, num_actions, batch_size), dtype=jnp.int32)

ARGS = {
    "s": s,
    "a": a,
    "a_prob": a_prob,
    "r": r,
    "probs_mat": probs_mat,
    "ips_weights": ips_weights,
    "reward_mat": reward_mat,
    "f0_mat": f0_mat,
    "f1_mat": f1_mat,
    "cond_weights": cond_weights,
    "r_for_rf": r_for_rf,
    "opt_a": opt_a,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataInput — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DataInput output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_get_DR_reward_terms Ran
ran, honoured the contract we drafted
causalml/doubly-robust-dropel/drorl/dro.py
code served (permissive licence) · get_code("2676439a06c71fac")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax.numpy as jnp
import jax

# Small scalar values for the function parameters
W_n = 2.5  # positive scalar for log argument
dW_n = 0.3  # derivative of W_n
d2W_n = 0.1  # second derivative of W_n
alpha = 1.5  # positive scalar parameter
delta = 0.2  # scalar parameter

ARGS = {
    "W_n": W_n,
    "dW_n": dW_n,
    "d2W_n": d2W_n,
    "alpha": alpha,
    "delta": delta,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_get_W_terms Ran
ran, violated the contract we drafted
causalml/doubly-robust-dropel/drorl/dro.py
code served (permissive licence) · get_code("bd9a1d35cf0da051")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax.numpy as jnp
import numpy as np
import jax

# Set seed for reproducibility
np.random.seed(0)

# Create small valid arguments
r = np.array([[1.0, 2.0, 3.0, 0.5],
              [0.8, 1.5, 2.5, 1.2]], dtype=np.float32)

alpha = 0.5

ipw = np.array([[0.9, 1.1, 0.95, 1.05],
                [1.0, 0.85, 1.15, 0.9]], dtype=np.float32)

ARGS = {
    "r": r,
    "alpha": alpha,
    "ipw": ipw
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ips Ran
ran; our contract draft was wrong, not the code
causalml/doubly-robust-dropel/drorl/dro.py
code served (permissive licence) · get_code("c7b056c2041e0dfb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax.numpy as jnp
import numpy as np
import jax
import chex
from typing import Optional

@chex.dataclass(frozen=True)
class DataInput:
    s: jnp.ndarray
    a: jnp.ndarray
    a_prob: jnp.ndarray
    r: jnp.ndarray
    probs_mat: Optional[jnp.ndarray] = None
    ips_weights: Optional[jnp.ndarray] = None
    reward_mat: Optional[jnp.ndarray] = None
    f0_mat: Optional[jnp.ndarray] = None
    f1_mat: Optional[jnp.ndarray] = None
    cond_weights: Optional[jnp.ndarray] = None
    r_for_rf: Optional[jnp.ndarray] = None
    opt_a: Optional[jnp.ndarray] = None

# Create small batch data (batch size 2)
batch_size = 2
state_dim = 4
action_dim = 3

s = jnp.ones((batch_size, state_dim))
a = jnp.ones((batch_size, action_dim))
a_prob = jnp.ones((batch_size,)) * 0.5
r = jnp.array([1.0, 2.0])
ips_weights = jnp.array([0.8, 0.9])

data = DataInput(
    s=s,
    a=a,
    a_prob=a_prob,
    r=r,
    ips_weights=ips_weights
)

alpha = 0.5
delta = 0.1

ARGS = {
    'alpha': alpha,
    'data': data,
    'delta': delta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ldml Not yet run
unverified (harvested, no recorded run)
causalml/doubly-robust-dropel/drorl/dro.py
code served (permissive licence) · get_code("f9b41df03c3c58c9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Off-policy evaluation and learning (OPE/L) use offline observational data to make better decisions, which is crucial in applications where online experimentation is limited. However, depending entirely on logged data, OPE/L is sensitive to environment distribution shifts -discrepancies between the data-generating environment and that where policies are deployed. Si et al. (2020a) proposed distributionally robust OPE/L (DROPE/L) to address this, but the proposal relies on inverse-propensity weighting, whose estimation error and regret will deteriorate if propensities are nonparametrically estimated and whose variance is suboptimal even if not. For standard, non-robust, OPE/L, this is solved by doubly robust (DR) methods, but they do not naturally extend to the more complex DROPE/L, which involves a worst-case expectation. In this paper, we propose the first DR algorithms for DROPE/L with KL-divergence uncertainty sets. For evaluation, we propose Localized Doubly Robust DROPE (LDR 2 OPE) and show that it achieves semiparametric efficiency under weak product rates conditions. Thanks to a localization technique, LDR 2 OPE only requires fitting a small number of regressions, just like DR methods for standard OPE. For learning, we propose Continuum Doubly Robust DROPL (CDR 2 OPL) and show that, under a product rate condition involving a continuum of regressions, it enjoys a fast regret rate of O(N -1/2 ) even when unknown propensities are nonparametrically estimated. We empirically validate our algorithms in simulations and further extend our results to general f -divergence uncertainty sets.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2202.09667")
get_code_for_paper("2202.09667")
have("2202.09667")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2202.09667.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2202.09667.svg)](https://syntology.ai/paper/2202.09667)

Connect an agent — have() is free.