Timeline-Weighted Contextual Bandits for Real-Time E-Commerce Intervention: Representation, Benchmarks, and an Honest Off-Policy Study

Contextual bandits are widely used for online personalization, yet many production systems compress a live shopping session into static or weakly temporal features, discarding the order, recency, and repetition structure of user behavior. We present TVCB (Timeline-Weighted Contextual Bandit), which represents each session as a compact, exponentially decayed, versioned timeline state, maintained at two timescales, that is updated in O(1) per event and consumed by low-latency bandit policies for next-best-action selection (e.g., discount, free shipping, social proof, or deliberate non-intervention). On top of this state we study a spectrum of policies: an interpretable fixed-score TVCB, learned LinUCB and posterior-covariance Thompson-sampling policies over timeline features, a discounted variant for non-stationary rewards, and a representation corral meta-bandit that learns online whether the timeline representation or a simpler cluster representation pays in a given deployment, rather than assuming either. Because no public, propensity-logged benchmark exists for session-level intervention (as opposed to item recommendation), we also release TIB (Timeline Intervention Benchmark), a versioned, byte-reproducible suite spanning (i) a hard synthetic tier whose rewards depend on decayed event sequence patterns, (ii) a digital-twin tier emitting randomized intervention logs with a production-style schema, exact propensities, and full counterfactual outcomes, and (iii) a semi-real tier built on RetailRocket browsing timelines, with a datasheet, machine-readable metadata, a normative evaluation protocol, and a baseline leaderboard. We evaluate with direct, inverse-propensity, and doubly robust estimators under multi-seed confidence intervals, and additionally validate the pipeline on two real datasets: the Open Bandit Dataset and the Hillstrom randomized e-mail experiment, where fixed-arm sanity identities reproduce the published treatment rates and calibrate the pipeline. Our findings are deliberately two-sided: timeline-aware learned policies dominate when intervention response depends on behavioral sequence and hesitation dynamics (e.g., +3.9% direct reward and non-overlapping confidence intervals on the hard synthetic benchmark), but cluster-level and static-context baselines remain competitive, and sometimes better, when response is driven by coarse intent alone. The corral meta-policy resolves this tension empirically: it routes the vast majority of decisions to the better representation in both regimes and lands near the per-regime best expert without prior knowledge of which regime holds. We characterize these regimes with a nine-scenario stress ablation, report an in-process decision latency of p99 ≈ 0.02 ms, and discuss what evidence would be required to claim production incrementality. All results are reproducible from committed scripts and seeds. The TIB benchmark suite is archived at https://doi.org/10.5281/zenodo.20651686.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-06-12
DOI
https://doi.org/10.5281/zenodo.20652076
Primary Topic
Advanced Bandit Algorithms Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Timeline-Weighted Contextual Bandits for Real-Time E-Commerce Intervention: Representation, Benchmarks, and an Honest Off-Policy Study

Mohammad Tanzil Idrisi
Zenodo (CERN European Organization for Nuclear Research)
Advanced Bandit Algorithms Research
preprint

Timeline-Weighted Contextual Bandits for Real-Time E-Commerce Intervention: Representation, Benchmarks, and an Honest Off-Policy Study

Mohammad Tanzil Idrisi
preprint en

Abstract

Contextual bandits are widely used for online personalization, yet many production systems compress a live shopping session into static or weakly temporal features, discarding the order, recency, and repetition structure of user behavior. We present TVCB (Timeline-Weighted Contextual Bandit), which represents each session as a compact, exponentially decayed, versioned timeline state, maintained at two timescales, that is updated in O(1) per event and consumed by low-latency bandit policies for next-best-action selection (e.g., discount, free shipping, social proof, or deliberate non-intervention). On top of this state we study a spectrum of policies: an interpretable fixed-score TVCB, learned LinUCB and posterior-covariance Thompson-sampling policies over timeline features, a discounted variant for non-stationary rewards, and a representation corral meta-bandit that learns online whether the timeline representation or a simpler cluster representation pays in a given deployment, rather than assuming either. Because no public, propensity-logged benchmark exists for session-level intervention (as opposed to item recommendation), we also release TIB (Timeline Intervention Benchmark), a versioned, byte-reproducible suite spanning (i) a hard synthetic tier whose rewards depend on decayed event sequence patterns, (ii) a digital-twin tier emitting randomized intervention logs with a production-style schema, exact propensities, and full counterfactual outcomes, and (iii) a semi-real tier built on RetailRocket browsing timelines, with a datasheet, machine-readable metadata, a normative evaluation protocol, and a baseline leaderboard. We evaluate with direct, inverse-propensity, and doubly robust estimators under multi-seed confidence intervals, and additionally validate the pipeline on two real datasets: the Open Bandit Dataset and the Hillstrom randomized e-mail experiment, where fixed-arm sanity identities reproduce the published treatment rates and calibrate the pipeline. Our findings are deliberately two-sided: timeline-aware learned policies dominate when intervention response depends on behavioral sequence and hesitation dynamics (e.g., +3.9% direct reward and non-overlapping confidence intervals on the hard synthetic benchmark), but cluster-level and static-context baselines remain competitive, and sometimes better, when response is driven by coarse intent alone. The corral meta-policy resolves this tension empirically: it routes the vast majority of decisions to the better representation in both regimes and lands near the per-regime best expert without prior knowledge of which regime holds. We characterize these regimes with a nine-scenario stress ablation, report an in-process decision latency of p99 ≈ 0.02 ms, and discuss what evidence would be required to claim production incrementality. All results are reproducible from committed scripts and seeds. The TIB benchmark suite is archived at https://doi.org/10.5281/zenodo.20651686.

Zenodo (CERN European Organization for Nuclear Research)
American School of Doha (QA)
Advanced Bandit Algorithms Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.