Logged Counterfactual Exposures
- LCE is a framework for offline counterfactual inference that uses logged exposures—including contexts, outputs, and propensities—to evaluate or learn new policies.
- It leverages estimators such as IPS, DPM, and doubly robust methods to handle issues like deterministic logging, variance explosion, and support mismatch.
- Extensions of LCE address sequential recommendation, continuous actions, and causal effect estimation, enhancing its robustness against reward sparsity and estimation bias.
Logged Counterfactual Exposures (LCE) denotes a family of offline learning settings in which a target policy is learned, evaluated, or analyzed from exposures produced by a logging policy, using recorded contexts, exposed outputs or items, propensity information or probability ratios, and observed or inferred outcomes. In machine translation, LCE is the setting where a new policy is learned and evaluated purely from a log of past interactions without active exploration (Lawrence et al., 2017). In semi-supervised batch learning from logged data, exposures may have known feedback or missing feedback while retaining logged propensity scores (Aminian et al., 2022). In sequential recommendation, LCE is instantiated as the joint use of logged system exposure trajectories and counterfactually augmented exposure trajectories (Zhao et al., 18 Apr 2025). In causal estimation from stochastic algorithms, the logged record additionally contains an unexposed alternative and the ratio of its probability to the exposed item’s probability (Athey et al., 7 Jul 2026).
1. Core representations of logged exposures
Across the cited literature, LCE is organized around the system’s realized exposure mechanism rather than around fully supervised labels. The exposed object may be a translation, a semantic parse, a discrete action, a sequence of recommendations, a continuous action, or a realized item paired with a logged alternative. What remains invariant is that the log preserves enough of the historical decision process to support counterfactual inference.
| Setting | LCE unit | Logged fields |
|---|---|---|
| Machine translation | source sentence, displayed translation, reward, propensity | |
| Neural semantic parsing | question, logged parse, human bandit feedback, propensity | |
| Semi-supervised batch learning | known-feedback and missing-feedback exposures | |
| Sequential recommendation | exposure sequence and feedback alphabet | |
| Pairwise causal logging | plus features | exposed item, unexposed item, logged ratio, outcome |
In machine translation, the ingredients align directly with structured prediction: input is a source sentence, logged exposure is the translation displayed by the logging policy , user feedback is an observed reward signal, and logging propensity is 0. In deployed web MT, logging is often exploration-free and deterministic: for each 1, the logger displays a single top-1 translation 2, with 3 for the displayed 4 and 5 for all other translations for that 6 (Lawrence et al., 2017).
In semantic parsing, the logging policy outputs exactly one machine-readable parse per question, and the target sequence-to-sequence model is trained from human bandit feedback on that logged output. In semi-supervised CRM, the exposure is any logged action shown by the logging policy together with its propensity, regardless of whether feedback is observed. In sequential recommendation, the basic object is not a single exposure but a trajectory of exposures and feedback events. In the pairwise causal formulation, the log is enriched with one specific unexposed item and a logged relative-probability ratio, enabling within-pair causal contrasts (Lawrence et al., 2018).
2. Estimands and counterfactual estimators
Two closely related objective conventions appear in the literature. Reward-based formulations seek to maximize future expected reward, while cost-based CRM formulations minimize expected cost. In MT, the target expected reward is
7
In semi-supervised batch learning, the target policy 8 minimizes the true risk
9
with 0 (Lawrence et al., 2017, Aminian et al., 2022).
The canonical off-policy estimator is inverse propensity scoring:
1
Under correct propensities, positivity, and ignorability, IPS is unbiased. To control variance, self-normalized IPS defines 2 and uses
3
which reduces variance but introduces a small ratios-of-means bias (Lawrence et al., 2017).
When logging is deterministic, MT and semantic parsing adopt deterministic propensity matching. In MT,
4
Its self-normalized form is
5
A practical doubly controlled estimator augments importance weighting with a learned reward model 6:
7
and a variance-minimizing scalar 8 yields the 9-DC variant (Lawrence et al., 2017).
Semi-supervised CRM introduces truncation at level 0:
1
The same work also uses SNIPS in deep-model experiments:
2
Because the regularizer is feedback-independent, it can be evaluated on both observed-feedback and missing-feedback exposures (Aminian et al., 2022).
Structured MT experiments parameterize the target policy as a Gibbs policy over a featureized structured space,
3
with
4
This links counterfactual objectives directly to stochastic-gradient policy updates in structured prediction (Lawrence et al., 2017).
3. Deterministic logging, support failure, and estimator degeneracy
A recurring theme in LCE is that deterministic exposure logging breaks positivity. In web MT, the logger displays only one translation per source sentence, so support outside the logger’s choices is effectively zero in the enormous structured output space 5. The MT analysis proves that IPS and DPM can be maximized by setting 6 for all logged tuples with positive reward, regardless of their actual quality ordering. Under such spiky assignments,
7
are maximal, even though low-reward items are indiscriminately boosted (Lawrence et al., 2017).
Self-normalization does not remove the pathology completely. If 8 is the set of logged tuples with maximum reward 9, then assigning positive probability to just one tuple in 0 and zero probability to all other tuples maximizes the reweighted objective. The resulting failure mode is “spiky-at-the-top”: the model collapses onto a single best-logged exposure while ignoring other good options. The same analysis highlights importance-weight explosion when 1 is small or when the target policy concentrates on a few logged items, reducing effective sample size and destabilizing learning (Lawrence et al., 2017).
Semantic parsing exhibits a related deterministic-log regime. The historical system outputs exactly one parse per question, so classical IPS correction is not available. The paper therefore uses DPM and reweighting control variates. Reweighted DPM,
2
reduces variance and avoids degeneracy with bias 3. For stochastic optimization, the denominator is evaluated under previous parameters 4, producing the one-step-late objective DPM+OSL. At token granularity, the objective becomes
5
and DPM+T+OSL combines token-level rewards with log-wide normalization (Lawrence et al., 2018).
The semantic parsing results show why granularity matters. Sequence-level binary rewards assign zero to any partially incorrect parse; token-level feedback provides positive signal for partially correct queries, yielding finer blame assignment. The paper states that minibatch-only normalization loses the control variate’s favorable properties, so normalization must be computed over the entire log, with periodic refresh of the denominator under previous parameters (Lawrence et al., 2018).
4. Semi-supervised, Bayesian, and regularized CRM
A second major line of LCE research treats the exposure log itself as a source of regularization, even when reward feedback is sparse or partially missing. Semi-supervised batch learning from logged data derives an upper bound on the variance of importance-weighted costs in terms of
6
and a high-probability bound for truncated IPS exposes the same KL and reverse-KL terms as complexity controls. This motivates the objective
7
where the IPS term uses only known-feedback exposures and the regularizer is computed on all exposures, including missing-feedback LCE (Aminian et al., 2022).
Two feedback-independent regularizers are proposed:
8
The reverse-KL estimator reduces to weighted cross entropy,
9
The paper reports that reverse KL, instantiated as WCE-S2BL, is particularly robust when feedback is sparse and logging is weak. As the ratio of missing-feedback exposures to known-feedback exposures grows, accuracy improves, consistent with the stated estimation-error analysis (Aminian et al., 2022).
Bayesian CRM arrives at a different but closely related regularization principle. For a posterior 0 over hypotheses and prior 1, the PAC-Bayesian bound for truncated IPS involves 2. In the mixed-logit model class, this yields an upper bound
3
which motivates logging-policy regularization,
4
Here 5 can encode the logging policy’s softmax parameters when they are known. The convex WNLL-LPR objective is a weighted negative log-likelihood with a logging-policy-centered penalty, and the paper reports that LPR methods are simpler and more computationally efficient than POEM, with POEM about 6 slower per epoch than IPS-LPR (London et al., 2018).
Regularized control of variance also appears in MT. The cited remedies include self-normalization, clipping 7, entropy regularization
8
and doubly controlled estimators that shrink learning toward a reward model over the output space. The MT paper states that DC variants “smooth out” deterministic components and avoid degenerate solutions while improving MT performance (Lawrence et al., 2017).
5. Sequential recommendation and counterfactual exposure augmentation
In sequential recommendation, LCE is defined over exposure trajectories rather than isolated actions. For user 9, the logged exposure sequence is
0
where 1 is the 2-th exposed item and 3 is the feedback, typically binary with 4. The problem is formulated as an offline RL MDP 5, with state
6
action 7, and reward
8
Non-clicked exposures receive a nonzero reward, while clicks receive a higher reward (Zhao et al., 18 Apr 2025).
CaseRec uses a Decision Transformer formulation. The trajectory is
9
with return-to-go
0
The state encoder adds item and behavior embeddings, 1, passes them through a GRU, and feeds the resulting trajectory tokens into a unidirectional transformer with MHA and FFN. Unlike vanilla DT, the recommender predicts the next high-reward action, defined as the next interacted item after time 2, through a cross-entropy objective over the item vocabulary (Zhao et al., 18 Apr 2025).
The distinctive LCE contribution is counterfactual augmentation of system exposure. A logged sequence prefix is modified by replacing an exposed item 3 with a counterfactual 4, predicting counterfactual feedback 5 with a transformer-based user simulator 6, and rolling out further counterfactual exposures for 7 steps. Two strategies are used. Random augmentation samples counterfactual items uniformly from 8, simulating exposures under a random policy. Self-Improving augmentation perturbs the item embedding by Gaussian noise, selects the cosine-similarity nearest neighbor, and autoregressively rolls out later items using the current recommender. The former broadens exploration; the latter keeps counterfactuals near the logged trajectory manifold (Zhao et al., 18 Apr 2025).
The training loop pre-trains the recommender on the original logged dataset 9, iteratively builds an augmented set 0 until an augmentation ratio 1 is reached, and then trains on 2. The simulator is trained with BCE on logged trajectories:
3
The recommender uses 4 on both logged and augmented trajectories (Zhao et al., 18 Apr 2025).
Empirically, CaseRec-R and CaseRec-S outperform baselines on ZhihuRec, Tenrec, and KuaiRand-15 policies. On KuaiRand-Random, where models are trained on KuaiRand-15policies but evaluated under unbiased random exposure, only CaseRec variants achieve substantial gains: Recall@20 rises from the best baseline 5 to 6 for CaseRec-R and 7 for CaseRec-S, while NDCG@20 rises from 8 to 9 and 0, respectively. Coverage@K is consistently highest for CaseRec-R, and moderate augmentation ratios improve performance before very large 1 values degrade it due to noise (Zhao et al., 18 Apr 2025).
6. Extensions beyond discrete single-action logs
One extension treats the action as continuous and the propensity as a density. In this formulation, each logged exposure is
2
with overlap and positivity requiring 3 on the support of the target policy. The continuous-action IPS estimator is
4
and SNIPS uses the same density ratio inside a self-normalized average. Because direct-method integration over 5 is non-trivial offline for continuous stochastic policies, the cited work concentrates on IPS variants rather than a fully DR estimator (Zenati et al., 2020).
The paper’s modeling contribution is a joint kernel embedding on 6,
7
with Nyström approximation over action anchors and a contextual mean action defined by a soft-argmin:
8
Optimization uses logarithmic soft-clipping
9
and a proximal point algorithm. Offline evaluation relies on SNIPS and the effective sample size diagnostic
00
with the stated rule of thumb to reject estimates when 01. The released CoCoA dataset contains about 02k logged exposures from a real-world continuous-action system (Zenati et al., 2020).
A different extension uses LCE for causal feature-effect estimation rather than policy value estimation. Here the log contains the exposed item 03, an unexposed alternative 04, outcome 05, and the logged ratio
06
The pairwise probabilities are recovered by
07
Given an antisymmetric treatment-characterizing function 08, the paper defines a pseudo treatment 09 and identifies conditional treatment-averaged causal effects through transformed outcomes of the form 10. In the unequal-probability case,
11
The resulting estimator uses only the realized outcome, the specific unexposed alternative, and the pairwise probability ratio, and the paper states that identification holds even with unobserved confounders that affect both user preferences and the identity of the considered pair, provided the within-pair exposure algorithm is stochastic (Athey et al., 7 Jul 2026).
7. Assumptions, diagnostics, and reported empirical behavior
LCE methods rely on a common set of assumptions, but different papers emphasize different failure modes. Positivity or support requires that actions later chosen by the target policy have nonzero probability under the logger; deterministic logging violates this for all but the displayed output in MT and semantic parsing. Unconfoundedness or ignorability is assumed in standard off-policy formulations, and SUTVA rules out interference between units. Propensity correctness is essential in semi-supervised CRM, Bayesian CRM, and continuous-action IPS, while the pairwise causal formulation additionally requires correct logging of the exposed–unexposed pair and of the ratio 12 (Lawrence et al., 2017, Aminian et al., 2022, Athey et al., 7 Jul 2026).
Variance diagnostics are central. The MT guidance recommends tracking effective sample size,
13
inspecting the distribution of importance weights, clipping extreme weights, and using bootstrap confidence intervals for SNIPS; the same section also notes Delta-method approximations for ratio-of-means confidence intervals. Continuous-action evaluation likewise relies on ESS and bootstrap CIs, and the sequential recommendation paper recommends monitoring simulator drift on held-out data (Lawrence et al., 2017, Zenati et al., 2020, Zhao et al., 18 Apr 2025).
The required logging granularity depends on the domain. MT and semantic parsing require the exact output 14, the context 15, and the logged or implied propensity. Sequential recommendation requires impression-level histories with sufficiently long exposure sequences; the cited implementation keeps the last 16 exposed items and last 17 clicked items, pads to fixed length, and trains a transformer with 18 layers, 19 heads, embedding dimension 20, maximum trajectory interaction steps 21, maximum state interaction steps 22, augmentation length 23, and augmentation ratio 24 varied from 25 to 26 (Zhao et al., 18 Apr 2025).
Reported empirical behavior is consistently aligned with the underlying variance and support analysis. In semantic parsing with human feedback on 27 valid logged question–query pairs, DPM+T+OSL achieves 28 F1 against a supervised baseline of 29; with simulated feedback on 30 logged exposures, DPM+T+OSL reaches 31, and updating the OSL denominator once per validation, four times per epoch, is markedly better than computing it only once at the beginning (Lawrence et al., 2018). In semi-supervised batch learning, with sparse feedback 32 and weak logging 33, WCE-S2BL achieves 34 accuracy on CIFAR-10 versus BanditNet 35 and logging policy 36, and the same work reports that increasing the number of missing-feedback exposures improves accuracy (Aminian et al., 2022). In MT, the stated practical conclusion is that DC or 37-DC should be preferred for learning under deterministic logging, with SNIPS and clipping as evaluation defaults and entropy regularization used to prevent probability collapse (Lawrence et al., 2017).
Taken together, these results suggest that LCE is not a single estimator or a single data schema, but a design space for offline inference from historical exposures. Its recurring technical problems are support mismatch, variance blow-up, deterministic-logging degeneracy, and reward sparsity. Its recurring technical responses are reweighting, truncation or clipping, entropy or KL control, reward modeling, log-wide normalization, exposure augmentation, and richer logging of alternatives or missing-feedback exposures.