DR-TMLE with fold-wise reduced regressions#
This study measures the cross-fitted DRTMLE with reduced_crossfit="foldwise", the shipped
default. Under this setting, fold k’s reduced regressions train on slab k. A slab holds the
production arrays at fold-k rows and leave-two-out arrays at the rows of each other fold.
Reduced-regression cross-fitting
defines the two settings and gives the argument for the foldwise construction.
The registered DR-TMLE studies with an R comparator fit reduced_crossfit="pooled". That is the
cvFolds construction of R drtmle. In it, fold k’s data reach fold k’s reduced
regressions through the designs of the other folds. This study gives the default its own
evidence. It also measures that fold leak against the foldwise construction on the same draws.
No canonical implementation is compared. R drtmle has no foldwise construction, so the study
declares no reference and runs no R. A zero-row equivalence artifact records the absence. The
study uses the gated policy. The study modules are tests/studies/drtmle_foldwise.py and
tests/studies/drtmle_foldwise_properties.py.
What was fitted#
setting |
value |
|---|---|
law |
the binary complete-data law of Benkeser et al. (2017), Section 5.1, as |
nuisance regimes |
|
learners |
the |
construction |
|
folds |
the unstratified ten-fold vector of |
draws |
the seed and scenario order of |
intervals |
pointwise 95% Wald from the influence curve |
primary budget |
6,000 replications at n = 3,000 for each regime |
failure bound |
0.01 of the replications of a cell. A fit that raises, a non-finite score audit and an active propensity bound each count as a failure |
The design test, tests/unit/test_drtmle_foldwise_study_design.py, pins the shared draws, the
cells and the budgets.
The property cells#
Each cell fits the ATE. Each cell except ate__pooled uses the foldwise construction. Each
treatment_correct variant changes one setting of the primary fit.
cell |
role |
n |
R |
what the cell changes |
|---|---|---|---|---|
|
positive |
1,000 |
4,400 |
|
|
control |
1,000 |
4,400 |
the same draws, with |
|
positive |
3,000 |
1,600 |
|
|
positive |
3,000 |
4,000 |
|
|
positive |
3,000 |
1,600 |
|
|
positive |
3,000 |
2,000 |
|
|
positive |
3,000 |
1,200 |
cubic B-spline |
|
control |
3,000 |
400 |
both nuisances misspecified |
|
positive |
2,000 |
3,600 |
the three-arm law of |
|
positive |
2,000 |
3,200 |
the stratified paper law under |
The arm-pooled joint predictive rule of the property module sized each budget from the X83 pilots. The spline cell changes the reduced learner, so it does not share the bias of its regime, and its budget comes from its own 800-draw pilot. At the declared budgets the rule predicts a family-wise pass of about 0.944.
How to read the leak control#
The fold_locality family fits each draw twice at n = 1,000, once foldwise and once pooled. The
family has three clauses.
clause |
what must hold |
|---|---|
foldwise |
the 99% bias interval of |
pooled |
the 99% bias interval of |
displacement |
the paired displacement, \(\lvert \bar{\psi}_{\text{pooled}} - \bar{\psi}_{\text{foldwise}} \rvert / \operatorname{sd}(\psi_{\text{foldwise}})\), reaches |
A foldwise path that ran the pooled construction would give a displacement of exactly zero. So
the displacement clause fails it. The control does not separate the two channels of the leak:
the tilts and the leave-two-out designs. The unit tests in tests/unit/test_drtmle_crossfit.py
pin each channel.
The leak is a second-order term. It falls like 1/n in the estimate, and the error SD falls
like n^(-1/2). So the standardized leak grows as n falls. The pilots read the pooled row at
+0.317 SD at n = 1,500, too close to the margin to size. At n = 1,000 they read +0.396 SD.
The property module records both pilots.
The red-row reading, declared before the run#
The policy is gated. A red positive row is a defect suspect. The route is diagnosis, then a fix
and a re-run under a fresh declaration. A failing control is a design failure. No replication is
added after a verdict.
Accuracy against known truth#
law |
estimand |
what was tested |
implementation |
bias (99% interval) |
coverage |
SE ratio |
result |
|---|---|---|---|---|---|---|---|
paper binary law, both nuisances correct |
|
average treatment effect |
|
-0.000337 to 0.000924 |
0.9428 |
0.9755 |
pass |
paper binary law, both nuisances correct |
|
counterfactual mean under no treatment |
|
-0.000779 to 0.000138 |
0.9485 |
0.9925 |
pass |
paper binary law, both nuisances correct |
|
counterfactual mean under treatment |
|
-0.000500 to 0.000446 |
0.9427 |
0.9802 |
pass |
paper binary law, outcome regression correct |
|
average treatment effect |
|
0.000063 to 0.0013 |
0.9468 |
0.9879 |
pass |
paper binary law, outcome regression correct |
|
counterfactual mean under no treatment |
|
-0.000739 to 0.000175 |
0.9468 |
0.9897 |
pass |
paper binary law, outcome regression correct |
|
counterfactual mean under treatment |
|
-0.000065 to 0.000870 |
0.9473 |
0.9913 |
pass |
paper binary law, treatment mechanism correct |
|
average treatment effect |
|
0.000749 to 0.0020 |
0.9477 |
1.0003 |
pass |
paper binary law, treatment mechanism correct |
|
counterfactual mean under no treatment |
|
-0.0014 to -0.000455 |
0.9477 |
0.9955 |
pass |
paper binary law, treatment mechanism correct |
|
counterfactual mean under treatment |
|
-0.000025 to 0.000940 |
0.9452 |
0.9915 |
pass |
The accuracy table reads the three primary regimes at n = 3,000.
Theory properties#
property |
cell |
role |
what was tested |
what must hold |
measured |
result |
|---|---|---|---|---|---|---|
|
|
positive |
average treatment effect: only the treatment mechanism is correct, n = 3,000, the published six-step round order |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.000351 to 0.0021, margin 0.0047, SE ratio 1.0206 |
pass |
|
|
positive |
average treatment effect: only the treatment mechanism is correct, n = 3,000, the single bivariate reduced mechanism |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias 0.0016 to 0.0031, margin 0.0047, SE ratio 1.0000 |
pass |
|
|
positive |
average treatment effect: only the outcome regression is correct, n = 3,000, the single bivariate reduced mechanism |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0013 to 0.0011, margin 0.0046, SE ratio 1.0095 |
pass |
|
|
control |
average treatment effect: both nuisances are misspecified, n = 3,000, ten folds |
bias interval must fall entirely outside the margin, with the reported standard error on the scale of the empirical spread |
bias 0.2209 to 0.2279, margin 0.0068, SE ratio 0.6504 |
pass |
|
|
positive |
average treatment effect: only the treatment mechanism is correct, n = 3,000, five folds |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias 0.000172 to 0.0023, margin 0.0047, SE ratio 1.0150 |
pass |
|
|
positive |
average treatment effect: only the treatment mechanism is correct, n = 3,000, a cubic-spline reduced outcome regression Q_r with the canonical GLMs for g_r1 and g_r2; piecewise-constant reduced learners (capped boosting, k-NN) reached max_outer = 100 under both constructions on the pilot, so the study covers smooth reduced learners only |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0014 to 0.0015, margin 0.0048, SE ratio 0.9747 |
pass |
|
|
positive |
average treatment effect over every stratum, from the stratified fit: the stratified paper law; only the outcome regression is correct, n = 2,000, ten folds |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias 0.000356 to 0.0025, margin 0.0059, SE ratio 1.0613 |
pass |
|
|
positive |
medium-versus-high ATE of the three-arm law: only the treatment mechanism is correct, n = 2,000, five folds, on the draws of the registered multi-arm cell |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias 0.000456 to 0.0028, margin 0.0067, SE ratio 1.0068 |
pass |
|
|
positive |
average treatment effect in stratum V = 0: the stratified paper law; only the outcome regression is correct, n = 2,000, ten folds |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias 0.000239 to 0.0033, margin 0.0084, SE ratio 1.0104 |
pass |
|
|
positive |
average treatment effect in stratum V = 1: the stratified paper law; only the outcome regression is correct, n = 2,000, ten folds |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.000682 to 0.0032, margin 0.0106, SE ratio 1.0063 |
pass |
|
|
positive |
average treatment effect in stratum V = 2: the stratified paper law; only the outcome regression is correct, n = 2,000, ten folds |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0015 to 0.0034, margin 0.0136, SE ratio 1.2093 |
pass |
|
|
positive |
average treatment effect: only the treatment mechanism is correct, n = 1,000, ten folds; each fold’s reduced regressions train on leave-two-out designs |
bias interval inside the equivalence margin |
bias 0.0040 to 0.0067, margin 0.0086 |
pass |
|
|
control |
average treatment effect: the same draw with pooled reduced regressions, R drtmle’s cvFolds construction, which lets each fold’s data reach its own reduced regressions |
bias interval must fall entirely outside the margin |
bias 0.0131 to 0.0159, margin 0.0091 |
pass |
Result#
All 9 primary rows pass. All 13 property rows pass. The table gives the endpoints that each claim reads.
claim |
measured |
verdict |
|---|---|---|
the default construction recovers the truth in all three regimes |
largest absolute standardized bias 0.0723 ( |
9/9 pass |
the foldwise fit removes most of the fold leak |
at n = 1,000: foldwise +0.156 SD, pooled +0.400 SD, displacement 0.266 |
pass |
a pooled fit leaks |
the pooled bias interval lies entirely outside the margin, with coverage 0.912 |
pass |
one-wrong robustness holds across the variants |
the benkeser order, both bivariate cells, five folds, the multi-arm law and the four stratified cells pass |
pass |
the both-wrong control fails |
bias +8.22 SD |
pass |
a spline |
+0.001 SD; the 99% interval, -0.0014 to 0.0015, lies inside the margin of 0.0048 |
pass |
The measured-values table below checks each of these numbers against the committed rows.
The fold leak on the registered draws#
Replication r < 800 of each primary regime uses the same rows and folds as canonical-drtmle.
That study fits the pooled construction. The two row files therefore pair on (scenario, replicate). The initial estimates of the pairs agree to 3e-16. The table gives the ATE bias and
the paired difference in units of the foldwise SD. It reads replicates.parquet of both studies,
and no test gates these numbers.
regime |
pooled ( |
foldwise |
pooled − foldwise, 99% interval |
|---|---|---|---|
|
+0.066 |
+0.063 |
−0.011 to +0.016 |
|
+0.097 |
+0.021 |
+0.059 to +0.093 |
|
+0.156 |
+0.010 |
+0.111 to +0.199 |
The leak is zero within resolution when both nuisances are correct. It is positive in each
one-correct regime, and it is largest under treatment_correct.
The spline cell, and the red cell it replaced#
The first declared run, at commit 67021895, fitted a cell double_robustness/ate__spline_reduced
with cubic B-spline learners on both Q_r and g_{r,2}. That cell was red on its bias clause:
+0.239 SD, with the 99% interval 0.0036 to 0.0055 against a margin of 0.0048. Every other row of
that run passed.
A diagnosis read the cell after the run. It is recorded in the X83 plans record
(cleverly-beta-plans, reviews/x83/spline-diagnosis.md), not in this repository. It fitted
every arm on each of 59 fresh draws at n = 3,000 under treatment_correct. The table gives the
paired shift of each arm, in SD of the GLM foldwise fit.
arm |
shift |
|---|---|
spline on |
+0.215 ± 0.056 |
spline on |
+0.423 ± 0.058 |
12-knot spline on |
+0.185 ± 0.052 |
spline on |
+0.004 ± 0.042 |
spline on |
+0.319 ± 0.057 |
The shift comes from the g_{r,2} regression, and it appears under the pooled construction too,
so it is not a defect of the foldwise construction. Under treatment_correct the main-effects
outcome GLM gives a near-constant Q̄_n(a, W). The design of g_{r,2} is then near degenerate,
and a flexible learner fits noise to a target near 0. The cell had measured the wrong thing:
before the fix, g_{r,2} was fitted by the reduced outcome learner, so a spline meant for Q_r
also reached g_{r,2}.
DRTMLE now gives the g_{r,2} regression its own learner, reduced_mechanism_residual_learner.
It defaults to the outcome learner, as g_{r,2} is fitted in R drtmle. The primary rows and
every unchanged cell of the second declared run are byte-identical to the first run, which shows
that the default fits did not move.
The cell ate__spline_qr replaces the red cell under a fresh
declaration. It fits the spline on Q_r only and keeps the canonical GLMs for g_{r,1} and
g_{r,2}. It passes: +0.001 SD, coverage 0.946, SE ratio 0.975. No replication was added to
either run.
“0 failed fits” does not mean that every fit exited on tolerance. A fit that reaches max_outer
and whose closing pass meets the tolerance reports converged=True and no failure. The spline
arms of the diagnosis reached the cap on 7% to 10% of its draws.
Measured values#
Names beginning margin: are thresholds declared before the run. Everything else is measured
from the committed results and checked at the precision printed.
quantity |
value |
source |
|---|---|---|
|
6000 |
primary replications per regime |
|
3000 |
observations per primary replication |
|
9 |
primary tests against truth |
|
9 |
of those, passing |
|
0 |
external comparisons declared |
|
0 |
external comparisons passing |
|
13 |
repeated-sampling property cells |
|
13 |
cells whose own and family verdicts pass |
|
0 |
primary fits that failed |
|
0.0723 |
largest absolute primary bias in empirical standard deviations |
|
0.9427 |
lowest primary coverage |
|
0.0723 |
primary |
|
0.0367 |
primary |
|
0.0155 |
primary |
|
0.1555 |
foldwise leak-pair bias in SD, n = 1,000 |
|
0.4000 |
pooled leak-pair bias in SD, n = 1,000 |
|
0.9118 |
pooled leak-pair coverage |
|
0.2664 |
paired displacement of the leak pair |
|
8.2191 |
both-wrong control bias in SD |
|
0.0014 |
spline |
|
-0.0014 |
its 99% lower endpoint |
|
0.0015 |
its 99% upper endpoint |
|
0.0048 |
its margin, 0.25 empirical SD |
|
0.9458 |
its coverage |
|
0.9747 |
its SE ratio |
|
0 |
its failed fits |
|
0.9900 |
confidence level of every Monte Carlo interval |
|
0.0500 |
nominal size of the reported intervals |
|
0.9500 |
nominal coverage those intervals claim |
|
10000 |
resamples behind every bootstrap interval |
|
0.2500 |
bias equivalence margin, in empirical standard deviations |
|
0.9000 |
validity floor the coverage lower endpoint must clear |
|
0.9900 |
above this, coverage is conservative rather than invalid |
|
0.8000 |
primary SE-ratio screen, lower limit |
|
1.2000 |
primary SE-ratio screen, upper limit |
|
0.1000 |
property-cell SE-ratio band, lower limit |
|
10 |
property-cell SE-ratio band, upper limit |
|
0.1000 |
least paired displacement of the leak pair, in foldwise SD |
|
0.9300 |
calibration-cell SE-ratio band, lower limit. No cell of this study reads it |
|
1.0700 |
calibration-cell SE-ratio band, upper limit. No cell of this study reads it |
|
0.9200 |
calibration-cell coverage band, lower limit. No cell of this study reads it |
|
0.9800 |
calibration-cell coverage band, upper limit. No cell of this study reads it |
|
0.1000 |
largest supported type-I rate. No cell of this study reads it |
|
0.8000 |
rejection lower bound a power cell must clear. No cell of this study reads it |
|
0.1500 |
paired similarity margin, in pooled empirical standard deviations. This study has no comparator |
|
1.1000 |
largest external-comparison RMSE ratio bound. This study has no comparator |
|
-0.0250 |
smallest external-comparison coverage difference bound. This study has no comparator |
|
0.0500 |
largest external-comparison calibration excess bound. This study has no comparator |
|
-0.5000 |
contraction rate root-n asymptotics predict. No cell of this study reads it |
|
-0.6250 |
accepted root-n slope band, lower limit. No cell of this study reads it |
|
-0.3750 |
accepted root-n slope band, upper limit. No cell of this study reads it |
|
-0.2500 |
slower rate a root-n interval must exclude. No cell of this study reads it |
|
0.0100 |
declared share of replications a cell may lose to a recordable fitting failure |
|
60 |
the same bound, in primary replications |
Limitations#
limit |
what it means for use |
|---|---|
a flexible |
the first run’s cell with a spline on |
a fit at the outer cap can count as converged |
a fit that reaches |
smooth reduced learners only |
piecewise-constant reduced learners (capped histogram boosting, a 100-neighbour k-NN) reached |
one binary law with GLM nuisance learners |
the paper law, plus the three-arm and the stratified laws in single property cells. Other outcome types, covariate laws and flexible primary learners have no witness here |
the stratified |
the sizing pilot read foldwise +0.29 SD (marginal) and +0.30 SD (stratum 1) on 200 draws at n = 2,000, outside the margin. Support row |
the leak control does not separate its two channels |
the control measures the tilts and the leave-two-out designs together. The unit tests in |
complete, unweighted, independent data at 5 and 10 folds |
the study measures no missing data, weights, clusters, fold repeats or bands |
no comparator |
no maintained implementation fits the foldwise construction |
Reproduction#
The manifest
records the seeds, the margins, the estimator configuration, the source hashes and the result
hashes. Run python -m tests.canonical.drtmle_foldwise.regenerate --output <scratch> to
regenerate the artifacts under the declared run form. The
run log
records the declared run. The
property results
carry every published property row.