ML.CausalApplication
This roll-up is the causal-application layer for Causalean.ML, kept separate from the causal-free core.
RegressionBridge 3 core · 1 supporting This file is part of the causal-application layer of Causalean.ML: files under Causalean/ML/CausalApplication/ may import causal and estimation modules, while the Causalean/ML/ core remains causal-free. ★ isL2Projection_of_condExp★ condExp_of_isL2Projection
Conditional expectations as squared-loss population targets
This file is part of the causal-application layer of Causalean.ML: files under
Causalean/ML/CausalApplication/ may import causal and estimation modules, while the
Causalean/ML/ core remains causal-free.
The ML population-target keystone
(square_loss_population_target_of_isL2Projection) is stated for a function whose
residual is orthogonal to every function of the covariate (IsL2Projection).
Here we connect that to Mathlib's condExp: the conditional mean E[Y ∣ X] is
exactly such a projection. This lets a known causal nuisance (defined via
condExp, as in Estimation.ATE.BackdoorEstimationSystem.μ_compat) be recognized
as the ML squared-loss population minimizer, and vice versa.
The covariate sigma-algebra records exactly the information carried by the covariate in a joint covariate-response observation.
Definition (Lean source)
On a finite joint covariate–response law P, if the candidate function m is measurable, the response coordinate is integrable, and m agrees P-almost everywhere with the conditional expectation of the response given the covariate σ-algebra, then m is an L² projection of the response onto functions of the covariate: its residual is uncorrelated with every measurable, integrable function of the covariate.
Formal statement
Proof (Lean source)
On a finite joint covariate–response law P, if the candidate function m is measurable, the response coordinate is integrable, the composed function z ↦ m(z.1) is integrable, and m is an L² projection of the response onto functions of the covariate — its residual is uncorrelated with every measurable, integrable function of the covariate, then m agrees P-almost everywhere with the conditional expectation of the response given the covariate σ-algebra.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
covarSigma_lelemma — The covariate sigma-algebra is a sub-sigma-algebra of the full joint observation sigma-algebra.conclusioncovarSigma (X := X) ≤ (inferInstance : MeasurableSpace (X × ℝ))Proof (Lean source)
lemma covarSigma_le : covarSigma (X := X) ≤ (inferInstance : MeasurableSpace (X × ℝ)) := by exact measurable_fst.comap_le
Nuisance 3 core · 0 supporting Using the conditional-expectation bridge (RegressionBridge), the population targets of the Causalean.ML learners are exactly the causal nuisance functions that the AIPW / DML machinery consumes: the squared-loss target o ★ mlOutcomeRegression_ae_eq★ mlPropensity_ae_eq★ mlNuisanceVec
ML learners as causal nuisance estimators
Using the conditional-expectation bridge (RegressionBridge), the population
targets of the Causalean.ML learners are exactly the causal nuisance functions
that the AIPW / DML machinery consumes: the squared-loss target on a treatment arm
is the outcome regression μ(d, x) = E[Y ∣ X, D=d], and the squared-loss target
on the treatment indicator is the propensity e(x) = P(D=1 ∣ X).
mlNuisanceVec packages two such targets into the Estimation.ATE.NuisanceVec
the AIPW moment expects.
Outcome-regression recovery. On a finite covariate–outcome law Pd, if the candidate regression function m is measurable, the outcome coordinate is integrable, the composed function z ↦ m(z.1) is integrable, and m is the squared-loss population target — its residual Y − m(X) is uncorrelated with every measurable, integrable function of the covariate, then m agrees Pd-almost everywhere with the conditional expectation of the outcome given the covariate σ-algebra, i.e. m is the outcome regression μ(d, x) = E[Y ∣ X = x, D = d].
Formal statement
Proof (Lean source)
Propensity recovery. On a finite covariate–treatment-indicator law Pe, if the candidate propensity function e is measurable, the treatment indicator is integrable, the composed function z ↦ e(z.1) is integrable, and e is the squared-loss population target — its residual is uncorrelated with every measurable, integrable function of the covariate, then e agrees Pe-almost everywhere with the conditional expectation of the treatment indicator given the covariate σ-algebra, i.e. e is the propensity P(D = 1 ∣ X).
Formal statement
Proof (Lean source)
Package ML-learned outcome arms μ_fn and propensity e_fn into the AIPW nuisance vector consumed by Estimation.ATE.
Definition (Lean source)
AIPWExample 1 core · 0 supporting The payoff of the causal bridge. ★ aipw_mlNuisance_meanZero_of_wellSpecified
End-to-end: ML nuisances → AIPW → the ATE
The payoff of the causal bridge. When the Causalean.ML learners recover the true
nuisances, their packaged NuisanceVec makes the AIPW estimating equation
mean-zero at the average treatment effect. The squared-loss recovery statements
live in ML/CausalApplication/Nuisance; logistic or other learners can enter this theorem
after their own population-target results show equality with the same true
outcome-regression or propensity functions. This composes the ML side with the
existing Estimation.ATE AIPW identification (aipw_mean_zero).
End-to-end identification with ML nuisances. In a backdoor estimation system S, suppose the propensity is bounded away from 0 and 1 by ε (strict overlap), the backdoor identification assumptions hold, the squared factual outcome is integrable, and the squared potential outcome under each treatment arm is integrable. If the ML-learned outcome-regression functions and propensity function are measurable and agree pointwise with the true outcome regression and true propensity, respectively (correct specification), then the AIPW moment functional built from the ML-learned nuisance vector integrates to zero at the true average treatment effect S.θ₀ — the doubly-robust estimating equation identifies the ATE with machine-learned nuisances.
Formal statement
Proof (Lean source)
RateAssembly 1 core · 1 supporting The mechanism that consumes per-method L²-estimation rates (proven in the method folders, expressed via ML/Core/Rate) and discharges the three nuisance-rate hypotheses of Estimation.ATE.dml_ATE_tendstoNormal. ★ dml_rate_conditions_of_quarter_rates
Assembly: per-method rates ⇒ DML nuisance-rate conditions
The mechanism that consumes per-method L²-estimation rates (proven in the method
folders, expressed via ML/Core/Rate) and discharges the three nuisance-rate
hypotheses of Estimation.ATE.dml_ATE_tendstoNormal.
It is method-agnostic: ridge, OLS, logistic — once each proves an o_p(n^{-1/4})
L²-rate toward its population target (which the Step-1/2 bridge identifies with the
causal nuisance) — plug their error sequences in as μErr / eErr. Instantiating
μErr a n ω := (eLpNorm (fun x => μ̂ n ω a x − μ_val a x) 2 P_X).toReal (and eErr
analogously) makes the three outputs literally DML's h_mu_rate / h_e_rate /
h_product_rate.
Assembly. If, for every treatment arm, the outcome-regression estimation error is o_p(n^{-1/4}), and the propensity estimation error is o_p(n^{-1/4}), then each error is separately o_p(1), and for every arm the pointwise product of the outcome and propensity errors is o_p(n^{-1/2}) — together these are DML's three nuisance-rate conditions.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
rpow_quarter_le_onetheorem — The n^{-1/4} rate is bounded by 1 (so it weakens to the o_p(1) rate).hypothesesn :ℕconclusion(n : ℝ) ^ (-(1 / 4 : ℝ)) ≤ 1Proof (Lean source)
theorem rpow_quarter_le_one (n : ℕ) : (n : ℝ) ^ (-(1 / 4 : ℝ)) ≤ 1 := by rcases Nat.eq_zero_or_pos n with hn | hn · subst hn simp · have h1 : (1 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn exact Real.rpow_le_one_of_one_le_of_nonpos h1 (by norm_num)