Papers › Off-Policy Evaluation via Adaptive Weighting with Data from Contextual Bandits

Off-Policy Evaluation via Adaptive Weighting with Data from Contextual Bandits

3 Jun 2021arXiv:2106.02029archive 2025-07-28

Ruohan Zhan, Vitor Hadad, David A. Hirshberg, Susan Athey

It has become increasingly common for data to be collected adaptively, for example using contextual bandits. Historical data of this type can be used to evaluate other treatment assignment policies to guide future innovation or experiments. However, policy evaluation is challenging if the target policy differs from the one used to collect data, and popular estimators, including doubly robust (DR) estimators, can be plagued by bias, excessive variance, or both. In particular, when the pattern of treatment assignment in the collected data looks little like the pattern generated by the policy to be evaluated, the importance weights used in DR estimators explode, leading to excessive variance. In this paper, we improve the DR estimator by adaptively weighting observations to control its variance. We show that a t-statistic based on our improved estimator is asymptotically normal under certain conditions, allowing us to form confidence intervals and test hypotheses. Using synthetic data and public benchmarks, we provide empirical evidence for our estimator's improved accuracy and inferential properties relative to existing alternatives.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2106.02029")

Code

Syntology Ran 1 of 25 code samples harvested from 1 repository linked to this paper; 24 have no recorded run. Of those that ran: 1 ran · violated contract.

By repository: official repository: 25 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

gsbDBI/contextual_bandits_evaluation officialmentioned in paperMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

25 samples harvested; 1 ran; 0 honoured the contract we drafted; 24 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
24unverified

Licence: 0 of the 25 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from gsbDBI/contextual_bandits_evaluation. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

bayesian_update gsbDBI/contextual_bandits_evaluation/adaptive/region.py official repository ran · violated contract fingerprinted MIT (permissive) · 61cf2d533cff0590 · report
add_config gsbDBI/contextual_bandits_evaluation/experiments/plot_utils.py official repository unverified MIT (permissive) · 0319ca909f2f12f7 · report
aw_estimate gsbDBI/contextual_bandits_evaluation/adaptive/inference.py official repository unverified MIT (permissive) · 5e041a8094c1a9b3 · report
aw_scores gsbDBI/contextual_bandits_evaluation/adaptive/inference.py official repository unverified MIT (permissive) · 3bef47a51c280c57 · report
collect gsbDBI/contextual_bandits_evaluation/adaptive/compute.py official repository unverified MIT (permissive) · e168c0099c9d586c · report
collect3 gsbDBI/contextual_bandits_evaluation/adaptive/compute.py official repository unverified MIT (permissive) · 1f3bf92682eaa550 · report
compose_filename gsbDBI/contextual_bandits_evaluation/adaptive/saving.py official repository unverified MIT (permissive) · 0972fba26bfbba6e · report
draw_region gsbDBI/contextual_bandits_evaluation/adaptive/region.py official repository unverified MIT (permissive) · 32453c92cde96bcf · report
draw_thompson gsbDBI/contextual_bandits_evaluation/adaptive/thompson.py official repository unverified MIT (permissive) · 23d95e1efad34118 · report
expand gsbDBI/contextual_bandits_evaluation/adaptive/compute.py official repository unverified MIT (permissive) · f3208622d144c3e0 · report
fit_policylogit gsbDBI/contextual_bandits_evaluation/adaptive/policy.py official repository unverified MIT (permissive) · 9a6129d06abf86ab · report
generate_bandit_data gsbDBI/contextual_bandits_evaluation/adaptive/datagen.py official repository unverified MIT (permissive) · 5f39d54fcc2d1827 · report
get_sherlock_dir gsbDBI/contextual_bandits_evaluation/adaptive/saving.py official repository unverified MIT (permissive) · c3117fb112f8c8ec · report
read_files gsbDBI/contextual_bandits_evaluation/experiments/plot_utils.py official repository unverified MIT (permissive) · 836aa78e2dd20418 · report
ridge_init gsbDBI/contextual_bandits_evaluation/adaptive/ridge.py official repository unverified MIT (permissive) · 811fd2c220901c6a · report
ridge_muhat_DM gsbDBI/contextual_bandits_evaluation/adaptive/ridge.py official repository unverified MIT (permissive) · 79d9cf3e3813bf8b · report
ridge_update gsbDBI/contextual_bandits_evaluation/adaptive/ridge.py official repository unverified MIT (permissive) · e715a802e07a495d · report
run_experiment gsbDBI/contextual_bandits_evaluation/adaptive/experiment.py official repository unverified MIT (permissive) · 9ecb20e1fe43bf2b · report
run_mab_experiment gsbDBI/contextual_bandits_evaluation/adaptive/experiment.py official repository unverified MIT (permissive) · b4b00b3a088f2fbe · report
sample_mean gsbDBI/contextual_bandits_evaluation/adaptive/inference.py official repository unverified MIT (permissive) · 644dbee79cbb4277 · report
save_data_timepoints gsbDBI/contextual_bandits_evaluation/experiments/plot_utils.py official repository unverified MIT (permissive) · cbc2107c4ed435e0 · report
simple_tree_data gsbDBI/contextual_bandits_evaluation/adaptive/datagen.py official repository unverified MIT (permissive) · b07c56c691c23fe1 · report
stats_to_pandas gsbDBI/contextual_bandits_evaluation/adaptive/saving.py official repository unverified MIT (permissive) · 523344a7ed793028 · report
ts_mab_probs gsbDBI/contextual_bandits_evaluation/adaptive/experiment.py official repository unverified MIT (permissive) · 6efb7af65b214f06 · report
update_thompson gsbDBI/contextual_bandits_evaluation/adaptive/thompson.py official repository unverified MIT (permissive) · afb01149b6292d29 · report

Tasks

Multi-Armed BanditsOff-policy evaluation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections