Causal Forest: Estimating Treatment Effects in Medical-Device CV Validation

How a causal forest estimates treatment effects, what honest estimation buys and costs, and which assumptions must hold when validating a medical-device…

Causal Forest: Estimating Treatment Effects in Medical-Device CV Validation
Written by TechnoLynx Published on 11 Jul 2026

A causal forest is a random forest rebuilt to estimate how a treatment effect varies across units, not to predict an outcome. Each split is chosen to make the estimated effect differ as much as possible between the two child nodes. Predictions come from weighting training examples by how often they share a leaf with the case in question. “Honest” estimation means one half of each tree’s subsample picks the splits and the other half fills the leaves that produce the estimates. That separation is what allows standard confidence intervals to be valid, and it costs data. Honesty does not rescue the estimate if unconfoundedness, overlap or the independence structure of the data fails. When you validate a medical-device computer vision model, those failures are the ones to check first.

How a Causal Forest Turns a Random Forest into an Effect Estimator

The main difference between a causal forest and a classic random forest is how a split’s quality is measured. A classic random forest grows trees on random subsamples and splits to predict the outcome. Generalised random forests, introduced by Athey, Tibshirani and Wager in the Annals of Statistics in 2019, generalise that machinery to any quantity defined by local moment equations, with heterogeneous treatment effects as the main use. (Readers who want the tree-level contrast with ordinary decision trees, and what hands-on work with causal trees involves, will find it covered separately; this page stays with the forest and its evidence.)

The grf guide describes the procedure in two phases. During building, a split is chosen to maximise nLnR(τ̂L − τ̂R)², the size-weighted squared difference between the treatment effects estimated in the two children. During prediction, the forest’s weights feed a locally weighted residual-on-residual regression of Y − m̂(X) on W − ê(X), which makes a causal forest a forest-localised version of Robinson’s 1988 estimator.

Before the causal forest is trained, grf fits separate regression forests for the propensity e(x) = E[W | X] and the marginal outcome m(x) = E[Y | X], then trains on the residuals; the grf reference calls this orthogonalising the forest. Robinson’s estimator stays root-n consistent even when those two nuisance functions are estimated more slowly, so small errors in them do not substantially bias the effect estimate. Without the step, a naive forest would have to spend splits modelling who got treated instead of how the effect varies.

One practical consequence follows from the weighting view. GRF behaves like an adaptive nearest-neighbour method, so asking for a single tree’s prediction, as you might with an ordinary ensemble, is not meaningful.

What Does “honest” Estimation Mean in a Causal Forest, and Why Does It Matter?

Honest estimation means one sample builds a tree’s partition and another sample estimates the effects inside it. Athey and Imbens proposed it in their 2016 PNAS paper on causal trees: one sample builds the partition, an independent sample estimates the effect in each leaf. In grf the forest randomly halves each tree’s subsample, uses the first half for splitting and pushes the second half down the tree to populate the leaves. Honesty is on by default, and honesty.fraction defaults to 0.5.

It matters because of the potential bias in leaf estimates from adaptive estimation. If you split where the observed difference happened to be large, the same data will overstate that difference. With honest estimation, standard confidence intervals for the leaf effects become valid without assumptions about model complexity, while for adaptive trees they generally are not. Athey and Imbens’ simulations of single causal trees show the gap: honest variants achieved close to nominal 90% coverage (0.89 to 0.92 across designs), while adaptive variants fell to between 0.74 and 0.89. The 2019 GRF paper ties its large-sample guarantees (consistency, asymptotic normality and valid intervals) to subsampling combined with this form of sample splitting.

The Price of Honesty, and When It Is Worth Paying

Honesty is a form of regularisation: more bias, less variance. The 2025 study “Honesty in Causal Forests: When It Helps and When It Hurts” describes the trade explicitly: honesty removes estimation bias but increases approximation bias, because the trees see less data when they look for heterogeneity. Across more than 7,000 benchmark datasets, the authors found that as the signal-to-noise ratio rises, honest forests need up to 27% more data to match adaptive ones on CATE accuracy, while in the lowest-signal decile they match with roughly 7% less.

Their recommendation is to treat honesty as a hyperparameter for individual-level CATE prediction, but they also say honesty remains preferable when the goal is confidence intervals or hypothesis tests, and that the two jobs can use two different forests. The grf reference adds a small-data warning: halving an already small subsample may leave too little information for good splits, and raising honesty.fraction (to 0.7, for example) shifts more data to splitting.

For device validation, that points to keeping honesty on. A validation file is an inference document: its claims are intervals and tests, not a targeting score, and that is the use case where honesty’s guarantees apply.

Which Causal Assumptions Must Hold Before the Estimates Can Be Relied On?

Three identifying assumptions must hold before the estimates can be relied on. A 2026 roadmap for observational causal machine learning in health names them as overlap, no unobserved confounders, and the stable unit treatment value assumption (SUTVA), which covers consistency (no hidden variants of the treatment) and no interference between individuals. A 2026 causal-inference framework for evaluating AI-enabled medical devices states the first two as exchangeability, Y(a) independent of A given the covariates and device result, and positivity, every treatment having non-zero probability at every covariate value.

No unobserved confounding is an assumption you cannot verify from observational data. The same roadmap says no unobserved confounding is unverifiable in observational data, and that a causal reading may be untenable if missing confounders (social determinants of health, patient preferences) could flip the conclusion. The grf documentation states the identity τ(X) = E[Y(1) − Y(0) | X = x] for a treatment that is binary and unconfounded. Every confounder must be in the data, while leaving out a non-confounding effect modifier does not bias the analysis.

Overlap, unlike unconfoundedness, can be checked. Propensity scores must be bounded away from 0 and 1, and the grf reference recommends regressing W on X and inspecting the out-of-bag propensity predictions. The same reference names an incorrect modelling decision, such as a covariate that deterministically indicates treatment, as a cause of violation. The damage is serious: in the meta-learner simulations of Künzel and colleagues, intervals on a subgroup without overlap came out tighter, not wider, with much lower coverage. In that simulation, the violated overlap condition led to invalid inferences rather than visible uncertainty.

The 2026 device framework notes that diagnostic, imaging and risk tools, including computer-aided diagnosis software, generally do not act on health outcomes directly: their value runs through whether their output changes treatment decisions. We would define W as something like device-assisted versus unassisted assessment and write down, before fitting, what could drive both that assignment and the outcome: site, referral pathway, reader seniority, scanner generation. Building that list with clinical input is the step the health roadmap describes as drawing the causal graph with domain experts.

Cluster by Site and Scanner, or the Forest Will Invent Heterogeneity

In the 2019 causal-forest application to the National Study of Learning Mindsets, dropping school-level clustering halved the confidence interval for the average effect, made heterogeneity “unambiguously detectable”, and multiplied the variance of the CATE estimates by 5.82. The authors attribute this to excess optimism from ignoring school-specific effects, not to a gain in power. When they re-ran the evaluation with cluster-aligned folds, the heterogeneity signal largely disappeared (a t-statistic of 0.058). In that dataset clustering mattered more than orthogonalisation.

grf supports clustered data through a clusters argument, which the grf guide uses for schools. For a device, the clustering level should be the one a new deployment would differ at, such as site, because the question is whether findings transfer to hospitals not in the training data.

How Can a Causal Forest Show Which Patient or Image Subgroups the Effect Varies Across?

A causal forest’s per-unit estimates need tests and summaries on top before they show subgroup variation. The 2019 Learning Mindsets analysis is blunt on the first point: CATE estimates that visibly vary do not by themselves show that they beat the plain average effect. Four tools do the real work.

  • An omnibus heterogeneity test. A best linear prediction test on out-of-fold CATEs, run with cluster-aligned folds in the school data, found at best tenuous evidence of heterogeneity. The rank-average treatment effect (area under the TOC) gives a second check, which the grf guide says should be read as suggestive evidence when the same data both builds and evaluates the ranking.
  • Best linear projection. best_linear_projection fits a doubly robust linear model τ(X) ~ β0 + Aβ on covariates you choose, which turns a forest into coefficients a reviewer can read: does the effect shift with age group, lesion size, scanner vendor?
  • Variable importance. A paper on variable importance for causal forests shows grf’s built-in importance, in a simulation, rating correlated variables not involved in heterogeneity above a real effect modifier; the authors’ retraining measure has a direct reading as the share of treatment-effect variance lost when a variable is removed.
  • Held-out subgroup estimates. Grouping units by quantile of their out-of-bag CATE can produce the counterintuitive result of a small effect in the “high” group, an artefact the grf reference says a train/test split avoids. The grf guide’s own example fits the CATE forest on one sample and evaluates heterogeneity on a held-out one.

In the school study, one covariate showed credible effect modification, but the signal was too weak for even a linear heterogeneity model to fit well. When heterogeneity is weak, the validation report should say so rather than present a fine-grained subgroup map. Turning subgroup findings into submission evidence, and reading them as population-shift warnings, are separate questions from the method described here.

How Accurate Can a Causal Forest Be for an Individual Patient?

A causal forest estimates the conditional average treatment effect (CATE) for people with given covariates. A 2025 paper on individual treatment effect prediction intervals states that the individual treatment effect is generally not identifiable, even with the individual’s own outcome and a large randomised experiment. Künzel and colleagues make the point concretely: two data-generating processes can produce identically distributed observed data, one with every individual effect zero and the other with every effect ±2, so no estimator can be consistent for individual effects while the CATE is zero in both.

Unlike confidence intervals for the average effect, individual-level prediction intervals generally do not shrink to zero width as the sample grows. The same paper shows that wide individual intervals can make a uniform policy more reliable than a personalised rule, even when the average effect is clearly non-zero. Conditioning on covariates that make outcomes nearly certain within a subgroup can tighten those bounds.

For a device team, the practical conclusion is to report CATE for defined subgroups with intervals and to avoid any per-patient “benefit score” claim the method cannot support. GRF’s own intervals have a further limit: their validity relies on undersmoothing, and the GRF authors list principled bias correction as an open problem.

Checks Before a Causal Forest Result Goes into a Validation File

Each check below is written as something to confirm in the analysis record.

Check What to confirm Why
Overlap Out-of-bag propensities from W ~ X stay away from 0 and 1; no covariate encodes treatment Identification needs bounded propensities, and a violation narrows intervals falsely
Nuisance models Y.hat and W.hat are estimated (or W.hat set to the known randomisation probability, such as 0.5, in a trial) Given good estimates of Y.hat and W.hat, orthogonalisation eliminates confounding effects
Clustering clusters set at site or scanner level; tests run on cluster-aligned folds Ignoring clusters manufactured heterogeneity in the school study
Honesty On (default, fraction 0.5); fraction raised for small samples, with the reason recorded Honest estimation makes standard intervals valid
Tree count Well above what predictions need; excess.error negligible against variance.estimates Intervals need more trees than predictions; default is 2000
Heterogeneity evidence Calibration test or AUTOC reported, with subgroup effects estimated on held-out data Varying estimates alone do not demonstrate heterogeneity
Robustness Sign and size of the key effects stable across alternative estimators; a synthetic-null check run Gold-standard validation is generally infeasible in observational data

The grf reference also suggests growing small forests and combining them with merge_forests until the intervals are tight enough, which is easier than guessing the tree count in advance.

Explanatory Versus Pragmatic Effectiveness: What a Device Result Actually Claims

Finding that a CV model’s output explains treatment-effect heterogeneity does not by itself establish clinical utility. The 2026 device-evaluation framework separates the two: explanatory effectiveness asks whether the device signal explains heterogeneity beyond baseline covariates, measured by a variance-based treatment-effect importance, while pragmatic effectiveness asks whether treatment rules that use the signal produce better expected outcomes than rules without it. Effect modification alone does not establish clinical utility, because a signal that predicts benefit adds little if it does not change decisions. In the framework’s KRAS biomarker application, explanatory effectiveness was substantial while pragmatic effectiveness was more modest.

We place a causal forest on the explanatory side of that line. Its CATEs and importance measures show where effects differ; the framework estimates the decision-value contrast with TMLE and cross-validated TMLE. Even then, the health roadmap’s advice applies: causal results from observational data are hypotheses, not definitive findings.

TechnoLynx builds approval-grade evidence for medical-device validation as engineering, not as policy advice or certification. For the wider submission, see the clinical imaging validation pack and FDA medical device regulation for imaging AI. For why a deployed model fails under uncontrolled conditions, see causality trees for diagnosing CV failure; TechnoLynx’s Computer Vision R&D builds and deploys the models themselves.

The question a causal forest cannot settle for you is whether your covariate list contains every confounder. The forest only quantifies what follows once that list is accepted, which is why a defensible device file spends as much effort on that list as on the model.

FAQ

What Is an Example of a Causal Assumption?

Overlap is one: every kind of patient in the analysis must have had a real chance of receiving either treatment, meaning propensity scores bounded away from 0 and 1. No unobserved confounding is another, and it cannot be verified from observational data.

Is a Random Forest Considered AI?

A random forest is a machine learning method, an ensemble of decision trees grown on random subsamples, and machine learning is generally treated as a branch of AI. A causal forest is a variant built to estimate treatment effects rather than to predict outcomes.