On Long-Horizon Problems, a Small Intervention Budget Can Replace a Much More Complex Model

22 minute read

Published:

A failure to start with

A value model that predicts well and decides badly

Train a value model on 200,000 logged agent trajectories to predict task success. On held-out trajectories it is good at it (\(R^2 = 0.66\)). Now ask it the only question the agent needs answered: should I verify before submitting?

100% vs 23%
tasks where it says "skip verification", vs tasks where skipping actually helps
0.72 → 0.73
effect error with 20k logs vs 2M logs: more data doesn't help
0.06
effect error from just 1,000 randomized branches

Two things went wrong, and both get worse as trajectories get longer.

ConfoundedThe agent skipped verification on tasks that felt easy, and easy tasks succeed anyway. In the logs, skipping looks like a cause of success.
NoisyThe effect of one check is tiny next to everything that happens over the rest of the trajectory. At 50 steps, the same model's \(R^2\) falls to 0.14, and the small difference between two predicted outcomes is mostly noise.

A bigger value model would not change the answer, because what it is missing is information, not capacity. The same thing happens wherever a small decision meets a late, noisy outcome: whom to show one more notification, which experiment to run next, which tool setting to use. This post is about learning the decision anyway.

Numbers from a toy simulation (hidden task difficulty drives both the logged choice and success).

Where the previous post left off. When a Predictive Feature Becomes a Policy showed that a reward model learns \(P(Y\mid H)\), while the policy acts as if it knew \(P(Y\mid do(H))\). Its fix was controlled counterfactual variation. This post asks what to do with that variation: what to model, how much of it is enough, and why a small amount can replace a much bigger model.
TL;DR.
  • The problem. A small decision has a small effect on an outcome that arrives late, is dominated by things you don't control, is confounded in the logs, and is expensive to measure.
  • The principle. Learn the effect \(\tau(x)\), not the outcome \(Y\). On the same data, a causal model beats a response model for five reasons, even when the data is perfectly randomized.
  • Case study. Budgeted personalization with delayed costs: choose whom to treat when the gain is immediate and the cost arrives months later. A small randomized budget plus doubly robust (DR) learning makes lightweight random forests both more accurate and cheaper than larger models.
  • Extensions. Self-improving agents and chip design have the same shape. For agents, record each action's probability as its propensity score, and the agent's own logs become an experiment.

1. The abstract problem

A unit has observed context \(X\) and hidden factors \(U\). We choose a small decision \(W\in\{0,1\}\), and the outcome arrives after a horizon \(T\):

$$Y = \underbrace{\mu_0(X,U)}_{\text{baseline: large, complex}} + \underbrace{\tau(X,U)\,W}_{\text{effect: small, simple}} + \underbrace{\varepsilon_T}_{\mathrm{Var}\,\propto\,T}$$

The decision only needs the effect, compared with the action's cost \(c\), or ranked under a budget:

$$w^*(x) = \mathbb{1}\{\tau(x) > c\}, \qquad \tau(x) = \mathbb{E}\big[Y(1)-Y(0)\mid X=x\big].$$
Xobserved context Uhidden factors Wsmall decision Youtcome at horizon T T steps ofuncontrolled variation τ (what we need) orange: U confounds W and Y

Figure 1. The shared structure. Randomizing \(W\), or recording the exact probability with which \(W\) was chosen, removes the orange edge \(U\to W\).

P1. The decision needs \(\tau\), not \(Y\)Nobody needs a user's value next quarter, a chip's absolute slack or a model's absolute score. Only the change caused by the decision matters.
P2. \(\mathrm{Var}(\mu_0) \gg \mathrm{Var}(\tau)\), and it grows with \(T\)The effect is a small difference between two large, noisy numbers: 1002 vs 1000.
P3. Logs are confounded and partly hiddenWhoever chose \(W\), whether a rule, an engineer or an agent, saw things (\(U\)) the learner doesn't.
P4. Experiments are expensiveEach costs revenue, compute or calendar time, so the budget is small and has to be spent well.

This shape is common. It covers which users to treat when the gain is immediate and the cost is delayed (promotions, notifications, ad load), which tool to call or whether to verify in a long agent trajectory, which experiment to run next in an automated research loop, and which setting to use in a chip-design flow. §3 works through the first; §4 extends to the others.

2. Why a causal model uses the same data better

Take the same randomized dataset, so there is no confounding at all. A response model learns \(\hat Y(x,w)\) and subtracts: \(\hat\tau = \hat Y(x,1)-\hat Y(x,0)\) (T-learner, S-learner, value model). A causal model learns \(\tau(x)\) directly from effect-shaped labels (DR-learner, R-learner). Both see identical data, and the causal model still wins, for five reasons.

① Its error inherits the complexity of \(\tau\), not of \(\mu\)

$$\text{response: }\ \hat\tau-\tau = (\hat\mu_1-\mu_1) - (\hat\mu_0-\mu_0)$$

The response model has to learn two complicated functions well before their difference is right, and the simplicity of \(\tau\) doesn't help it. A DR-learner's error is roughly the error of regressing on the true effect labels, plus a product of the two nuisance errors (Kennedy, 2023). It learns at a rate set by how simple \(\tau\) is.

② Its loss is aimed at the decision

A response model minimizes \(\mathbb{E}(Y-\hat Y)^2\), and almost all of that loss is the baseline. In the simulation below, \(\mathrm{Var}(\mu_0)=12\) and \(\mathrm{Var}(\tau)=0.25\), so about 98% of the loss is about \(\mu_0\). Capacity and regularization go to the baseline. An S-learner shrinks the effect of \(W\) toward zero. A T-learner regularizes two models separately, and their different fitting errors show up as fake effects.

③ It removes the baseline instead of subtracting two big numbers

$$\hat\varphi = \underbrace{\frac{W-p}{p(1-p)}\big(Y-\hat\mu(X,W)\big)}_{\text{residual: baseline removed}} + \hat\mu(X,1)-\hat\mu(X,0)$$

The residual \(Y-\hat\mu\) works like a control variate. Whatever part of the baseline \(\hat\mu\) explains is gone before learning starts. A better \(\hat\mu\) means lower variance, and a wrong \(\hat\mu\) still gives an unbiased label, because \(p\) is known.

④ It uses the design information

The response model only sees \((X,W,Y)\). It doesn't know that \(W\) came from a coin with probability \(p\). The causal model puts \(p\) into the label itself. That is extra knowledge about how the data was generated, and observational data cannot supply it at any size.

⑤ Its model selection matches the decision

Tuning a response model by \(Y\)-MSE can pick a model with a better outcome fit and a worse effect estimate. A causal model can be selected on effect-relevant criteria, such as R-loss, uplift AUUC, or held-out randomized pairs. The decision needs only the sign of \(\tau-c\), or its ranking under a budget.

Measured: same randomized data, six estimators

\(Y=\mu_0(x)+\tau(x)W+\varepsilon\), where \(\mu_0(x) = 3\sin 2x_1 + 2x_2x_3 + 2|x_4| + x_5^2\) and \(\tau(x)=0.5x_1\), with \(x\in\mathbb{R}^5\), \(p=0.5\), 5 seeds. The table shows RMSE of \(\hat\tau\). Always predicting 0 scores 0.5.

EstimatorTypen = 2k10k50k
T-learner, two GBMsresponse0.9850.6520.374
S-learner, one GBM with \(W\) as a featureresponse0.4010.3310.273
DR, second stage = same GBMcausal1.0760.6090.350
T-learner, stump GBMsresponse0.5360.3410.226
DR, second stage = stump GBMcausal0.5430.2420.151
DR, second stage = linearcausal0.2400.1180.042

Row 3 matters most. Give DR a second stage as big as the outcome model and it is no better than the T-learner, because the pseudo-outcome is unbiased but noisy. The gain appears when the second stage is sized to \(\tau\) (reasons ① and ②) and there is enough data to pay DR's variance cost: at 2k, the stump versions tie. On confounded logs the response model is also biased, which adds the previous post's failure on top of all five reasons.

3. Case study: budgeted personalization with delayed costs

Many platform decisions pay now and may cost later: more promotions, more notifications, more aggressive upsells, more ad load. The gain shows up immediately; the cost in engagement or retention shows up months later. The question is whom to treat under a budget on the delayed cost. The paper behind this post studies one instance, how much ad load to show each user, but nothing below depends on ads.

PaperW. Shi, C. Fu, Q. Xu, S. Chen, J. Zhang, Q. Zhu, Z. Hua, S. Yang. Ads Supply Personalization via Doubly Robust Learning. CIKM 2024 (DOI). Deployed on live traffic at what the paper calls one of the world's largest social media platforms. All numbers in §3.5–3.7 come from this paper.

3.1 The decision is a budgeted allocation over effects P1

$$\max_{z}\ \sum_{i} \tau^{\text{gain}}(x_i)\, z_i \quad \text{s.t.} \quad \sum_{i} \tau^{\text{cost}}(x_i)\, z_i \le B,\qquad z_i\in\{0,1\}$$

\(\tau^{\text{gain}}\) is the incremental short-term gain (revenue, conversions), \(\tau^{\text{cost}}\) the incremental long-term loss (engagement, retention), and \(B\) the total loss the platform accepts. It is a knapsack over effects, and it never asks for anyone's absolute value.

highlow engagementt₀: treatedt₀ + T insensitive user sensitive user look identical same short-term gain for both; very different long-term cost

Figure 2 (redrawn from the post). The job is to tell these users apart before treating them.

3.2 Absolute outcomes are the wrong target P2 ① ②

Y(0) = 1000 + large background variation
Y(1) = 1002 + large background variation

Long-term engagement depends on seasonality, product launches, content supply, other teams' changes and macro events. A T-learner, \(\hat\tau = \hat Y(x,1)-\hat Y(x,0)\), needs two excellent models of all that to recover a difference of 2. Sensitivity to the treatment depends on a few things: historical tolerance, activity level, engagement pattern, cohort and recent exposure.

3.3 A small randomized budget buys a known propensity P3 ④

Observational logs need
$$\{Y(0),Y(1)\}\perp\!\!\!\perp W\mid X$$
An assumption, which is the previous post's conditional exchangeability. Existing allocation rules depend on user type, so it rarely holds.
A randomized bucket gives
$$\{Y(0),Y(1)\}\perp\!\!\!\perp W,\quad e(x)=p$$
True by construction, with overlap everywhere.
DatasetSizeWhat it tells you
Observational100,000,000\(P(X,W,Y)\): what the world looks like
Randomized100,000also \(P(W\mid X)\), which you chose: what changes when you act

3.4 DR pseudo-outcomes with cross-fitting ③ ④

$$\begin{aligned}\hat\varphi(X) = &\frac{W-p}{p(1-p)}\big(Y-\hat Y(X,W)\big)\\ +\ &\hat Y(X,1)-\hat Y(X,0)\end{aligned}$$

Regress \(\hat\varphi\) on \(X\) to get the effect model. Cross-fitting makes sure a nuisance model never corrects residuals it was trained on.

randomizeddata half A half B nuisance Ŷtrained on A nuisance Ŷtrained on B φ̂ on B→ effect model 1 φ̂ on A→ effect model 2 averageat inference cross-fitting: a nuisance model never corrects residuals it was trained on

Figure 3 (redrawn from the post).

3.5 Robust when the outcome model is wrong ③ ④

The paper corrupts the outcome model's training labels with probability \(\beta\) on the public CRITEO-UPLIFT benchmark (an RCT dataset), then measures uplift ranking quality (AUUC).

0.50.60.70.80.9 0%25%50%75%100% outcome-model bias β (probability a training label is modified) AUUC DR framework: 0.86 at β = 0% and at β = 100% T-learner 0.57

Figure 4. Endpoints from the paper's Table 1 (T-learner 0.85 → 0.57, DR 0.86 → 0.86); the β = 80% point (≈ 0.80) is read approximately from the post's figure.

3.6 The price: variance, so it needs scale

The correction contains \(Y-\hat Y\), whose spread grows with the long-horizon variance. The horizon helps the bias argument and hurts the variance argument. The cure is sample size: DR improves with data while the T-learner stays flat. A better nuisance model still lowers variance (paper Table 3, product data, AUCC):

Nuisance modelconstantrandom forestMLP
AUCC0.630.770.80

So the nuisance model "doesn't need to be correct", but it does still matter. The condition is long horizon at scale.

3.7 Result: more accurate and cheaper ① ③ ⑤

The usual trade-off is that a better model costs more. Here the causal framework moved both in the right direction at once.

More accurate
  • Product data: AUCC 0.77 vs 0.63 for the best baseline, which the paper reports as about a 20% improvement.
  • About 40% more revenue gain at most operating points of the revenue-vs-engagement-cost curve.
  • Robust to a corrupted outcome model: AUUC 0.86 → 0.86 while baselines fall as far as 0.57.
  • Online: +13.8% / +19.0% on two revenue-to-engagement-loss efficiency metrics in a one-month A/B test, and +12.4% / +20.2% in a hold-out at least four months after launch.
Cheaper
  • Random forests for both the nuisance and effect models. They beat the deep causal baselines (CEVAE, Dragonnet).
  • The paper says this "significantly saves" compute compared with DNN implementations, and was chosen over a direct ranking model that would need "non-trivial computing resources". It gives no latency or FLOPs numbers.
  • Data cost: a small randomized slice instead of a larger model trying to recover effects from biased logs. In the paper's words, DR learning turns the cost of the experiment into savings in model complexity.
MethodTypeProduct AUCCCRITEO AUUC, cleanCRITEO AUUC, β = 100%
S-learner (RF)response0.510.860.81
T-learner (RF)response0.620.850.57
X-learner (RF)response-based0.630.870.72
CEVAE (DNN)deep causal0.500.820.63
Dragonnet (DNN)deep causal0.620.850.65
DR framework (RF)causal0.770.860.86

Sources: paper Tables 1, 2 and 4, and §5.4–5.6. The online metrics are reported as relative changes on unnamed efficiency metrics, without confidence intervals. On clean data every method is about equally good; the gaps open on the harder product data and under a wrong outcome model. That is reasons ① and ③ at work: the effect model doesn't have to inherit the outcome model's errors. Because the problem is framed as learning \(\tau\), the model can be sized to \(\tau\) (reason ①), which is why forests are enough. The budget is spent where information is missing: poor overlap, uncertain or disputed effects, high decision value.

4. Extensions: self-improving agents and chip design

Case study: delayed-cost personalizationAgents and RSIChip design
Unita usera decision point in a trajectory or research loopa design block
Decision \(W\)treat or not (e.g. higher ad load)tool call, verify, retrieval depth, which experiment, data mixtool setting, flow choice, macro placement
Outcome \(Y\)engagement months latertask success; next model's capabilitypost-route PPA after signoff
Why \(Y\) is noisyseasonality, launchestask difficulty, later decisions, training noisetool "chaos": seeds and tiny changes swing results
Why logs are confoundedallocation rules depend on user typeactions chosen by how hard things lookaggressive settings used on hard designs
Source of known propensityrandomized bucketthe agent's own sampling probabilityrandomized autotuner
Scalebillions of usersmany rollouts; few training runsfew designs, many runs per design

4.1 Agents and RSI

The unit is a decision point \(s\). Its \(W\) is a meta-action: call a tool, verify, retrieve 3 vs 10, think longer, run experiment A or B, change the data mix. Agents have two properties the case study lacks, and both make the method cheaper.

The logging policy is known exactlyThe agent chose \(W\) by sampling from its own distribution \(\pi(\cdot\mid s)\), and \(s\) is fully logged. Record that probability, and the logs are a randomized experiment.
The state can be snapshottedRestoring a checkpoint and changing only \(W\) is an exact intervention, and running both branches observes \(Y(1)\) and \(Y(0)\) for the same state.

Record action probabilities as propensity scores ④

$$e(s) = \pi_b(W{=}1\mid s) = \sum_{\text{outputs } o \,\mapsto\, W=1} \tilde\pi(o\mid s)$$

Here \(\tilde\pi\) is the distribution after temperature, top-p and top-k truncation. Because \(W\) depends only on the logged context \(s\) plus sampling noise, \(Y(w)\perp\!\!\!\perp W\mid s\) holds by construction. The orange edge in Figure 1 disappears without any extra experiment. A pseudo-outcome built with \(e(s)\) can then be regressed on compressed features \(x=f(s)\), since \(\mathbb{E}[\hat\varphi\mid s]=\tau(s)\).

log = {
  "state_id":   snapshot_id,       # restorable
  "features":   f(s),              # for the τ model
  "action":     W,
  "propensity": p_tilde(W=1 | s),  # after temp/top-p
  "policy_ver": version, "sampler": config,
  "outcome":    Y,                 # filled in later
}

Things that break it: probabilities logged from a different sampler than the one used; greedy decoding (\(e\in\{0,1\}\), no overlap); data from humans or other systems without propensities; and multiplying weights across a whole trajectory. Reweight one decision at a time to estimate its effect under the current downstream policy. In the same toy simulation, trajectory-level effective sample size collapsed from 17,646 to 0 over 20 decisions.

Randomize where overlap is poor P3

Agents are often near-deterministic on meta-decisions (\(e(s)\approx 0.99\)), so the weights \(1/e\) explode. At chosen decision points, mix in a known exploration rate. This is the case study's randomized bucket, applied per decision point instead of per user:

$$\pi_{\text{explore}}(W\mid s) = (1-\epsilon)\,\pi(W\mid s) + \epsilon\cdot\tfrac{1}{2}, \qquad e(s)\in\big[\tfrac{\epsilon}{2},\,1-\tfrac{\epsilon}{2}\big].$$

Branch from snapshots, with paired arms and shared seeds ③

snapshot sₜcoin: W ~ Bern(p) W = 1 W = 0 T steps, shared seedsT steps, shared seeds Y(1) Y(0) shared prefix

Figure 5. Everything decided before the branch cancels in \(Y(1)-Y(0)\). Shared seeds and cached tool responses after the branch remove part of the remaining noise.

$$\mathrm{Var}\big(Y(1)-Y(0)\big) = \mathrm{Var}\,Y(1) + \mathrm{Var}\,Y(0) - 2\,\mathrm{Cov}\big(Y(1),Y(0)\big)$$

Learn \(\tau\) with a small DR model, using logs as the nuisance ① ② ③

mu = fit_outcome_model(all_logs)       # crude is fine
for row in randomized_or_logged_with_propensity:
    e   = row.propensity
    res = row.Y - mu(row.s, row.W)
    phi = (row.W - e) / (e * (1 - e)) * res \
          + mu(row.s, 1) - mu(row.s, 0)
    data.append((row.features, phi))
tau = fit_small_model(data)            # sized to τ
act = tau(features(s)) > cost(s)

Size the second stage to the decision, not to the world. Whether verification helps may depend on a handful of features: task type, edit size, test coverage of the touched code, the agent's stated uncertainty, remaining budget. Predicting success itself would need a model that understands the whole repository.

Select, audit and spend on effect-shaped criteria ⑤ P4

  • Choose \(\tau\) models by R-loss or by agreement with held-out paired branches, never by outcome MSE.
  • Compare the reward or value model with the interventional \(\hat\tau\). Where they disagree in sign, the reward model is extrapolating or confounded. That is the previous post's diagnostic question, run as a test.
  • Spend rollouts by value of information. A fixed-precision estimate costs roughly \(T^2\) (longer rollouts and more variance), so prioritize poor overlap, states the RL policy is moving into, disagreement, and high stakes. Use surrogates such as intermediate test pass rates or small-scale runs, and validate them against occasional full runs.
$$\text{intervene on decision type } k \iff P(\text{sign wrong})\cdot|\tau_k - c_k|\cdot\text{frequency}\cdot\text{stakes} > \text{rollout cost}$$

What changes in RSI specifically

The evaluator is optimized tooEach generation trains on what the previous judge preferred, so a confounded feature compounds across generations. Keep a held-out, randomized, externally verified check that the improving system never sees.
Overlap thins across generationsEvery new model leaves the support of the data its evaluators were trained on. Re-estimate \(\tau\) with fresh interventions each round instead of reusing old reward models.

Toy check for a "skip verification" decision: a value model trained on 200k confounded logs has \(\tau\)-RMSE 0.72 at every horizon, while DR on 1k randomized branches gets 0.06 at \(T=1\) and 0.28 at \(T=200\).

4.2 Chip design: long horizon without scale

A physical-design flow runs synthesis, placement, clock-tree synthesis, routing and signoff. Early decisions show their effect only at signoff, hours or days later. All three properties hit hard. Logs are confounded, because engineers use aggressive settings on designs that are already hard to close. The environment is partly observed: final timing is unknown until signoff, so the flow optimizes proxies such as wirelength and congestion estimates. And it is noisy: EDA tools are notoriously sensitive, and a different seed or a tiny change can swing the result.

Checkpoints are exact interventionsSave the database after placement and branch with one setting changed. Same netlist, same floorplan. This is cleaner than any agent snapshot.
Randomize the autotunerBayesian optimization is deterministic given its history, so its propensities are 0 or 1 and DR can't use them. Use Thompson sampling or a reserved random slice, and log the probabilities.
Shared seeds across armsRun both arms on the same seed set so tool chaos affects them alike. Average over several seeds, because a single paired run measures the effect plus one butterfly.
Validate the proxyPost-placement timing is a cheap surrogate for signoff, but proxies can be gamed. The debate over RL macro placement (Mirhoseini et al., 2021; Cheng et al., 2023) turned on how well proxy cost tracks post-route results. Keep some runs going to signoff.

The missing piece is scale. The case study had billions of users. A company tapes out tens to hundreds of blocks, with many runs per block but few independent units. DR's variance cost (§3.6) bites hard, so the remedy is to pool and to inject knowledge:

  • Hierarchical models that pool effects across design families and process nodes.
  • Domain priors as structure for the \(\tau\) model, for example "this option helps at high utilization".
  • Fractional factorial designs for interacting tool parameters, instead of one setting at a time.
  • Re-estimation when tool versions or process nodes change, since old effects may not transfer.

Takeaway

Many long-horizon decisions share one shape: a small decision, a small effect, a late and noisy outcome, confounded logs and expensive experiments. For that shape, learn the effect, not the outcome. A causal model inherits the simplicity of \(\tau\), aims its loss at the decision, removes the baseline before learning, uses the known assignment mechanism, and is selected on what the decision needs. A small randomized budget makes this work for platform personalization at scale. Agents make it cheap: record the probability of every action, randomize where overlap is poor, and branch from snapshots. Chip design shows its limit: without scale, pool across designs and lean on domain knowledge.

The lesson is not that experimental data beats observational data. Observational data gives coverage and a nuisance model; a small intervention set gives what changes when you act. Previous post: When a Predictive Feature Becomes a Policy. References: Kennedy (2023) on the DR-learner; Nie & Wager (2021) on the R-learner; Künzel et al. (2019) on meta-learners; Athey et al. (2019) on surrogate indices.