Generate Features Only Inside the Markov Blanket, and Orient It Without Trusting Units

Automated feature engineering (AutoFE) tools build new columns such as $X_i \times X_j$, $X_i / X_j$ or $\log X_k$ from a table's raw columns, then keep the ones that improve a predictor. Even one level of pairwise operators over $m$ columns produces on the order of $m^2$ candidates, and the leading tools pay for this with clever pruning heuristics. Those heuristics are purely predictive. They also carry a quiet defect: which candidates exist, and which survive pruning, depends on the arbitrary units the raw columns were recorded in. We propose to replace the heuristic front end with a causal one. First, find the target's Markov blanket, meaning the smallest set of variables that makes the target independent of everything else. Second, generate features only from blanket members. At the population level this discards nothing, and it shrinks the candidate space from $O(m^2)$ to $O(k^2)$, where $k$ is the blanket size.

The second half of the idea is where scale-invariant causal discovery enters. The blanket mixes three kinds of variables: causes of the target (parents), effects of the target (children), and other causes of those effects (spouses). Features built from children predict well on the training data but break when the target's downstream mechanisms shift. Telling these roles apart requires orienting edges. Orientation is exactly the step that standard gradient-based causal learners get wrong when variables are rescaled. Our observation is that the two directions fix each other. Restricting attention to a small blanket makes slow, permutation-based scale-invariant orientation methods affordable. Those methods in turn make the reduced feature space trustworthy, because they do not depend on how anyone chose to measure the variables.

Core Claim

Let $T$ be the target, $\text{MB}(T)$ its Markov blanket, and $X_R$ all remaining columns. Any generated feature $g(X_{\text{MB}}, X_R)$ is, once $X_{\text{MB}}$ is fixed, a function of $X_R$ alone. It therefore inherits the blanket's defining independence:

$$T \perp\!\!\!\perp g(X_{\text{MB}}, X_R) \mid X_{\text{MB}} .$$

As a consequence, no candidate that touches a non-blanket column can lower the best achievable risk beyond what $X_{\text{MB}}$ already allows. Restricting generation to blanket members is lossless for the Bayes-optimal predictor, and in finite samples it removes candidates that can only add noise.

Blanket membership is defined by conditional independence, so as a population object it does not change when any column is multiplied by a positive constant. A good estimator should share this property. Its selected set should be identical under arbitrary per-column rescaling. Its orientation of parents, children and spouses should also be unchanged, and this is the harder requirement.

We claim three things. A rescaling-equivariant blanket screen followed by scale-invariant local orientation matches OpenFE's in-distribution accuracy while evaluating far fewer candidates. Generating features from oriented parents, rather than from the whole blanket or from predictive importance, gives predictors that hold up when mechanisms downstream of the target are intervened on. Finally, existing differentiable causal feature selection, concretely GCFS, fails the rescaling test that our method passes by construction.

Where This Sits

The closest work is Gradient-based Causal Feature Selection (GCFS). GCFS learns a target-centred graph with a graph autoencoder, a smooth acyclicity penalty and Gumbel-softmax subset search, and it reports a blanket F1 of about 0.59 at $d=1{,}500$. GCFS differs from our proposal in three ways. It trains on squared reconstruction error. It was evaluated only on raw Gaussian-process simulations. It never generates features.

The squared-error objective matters because of two lines of work. Beware of the Simulated DAG! shows that simulated benchmarks have "varsortability" above 0.94: marginal variance almost always grows along causal paths, so a learner can recover the graph by sorting variances. It also shows that NOTEARS's intervention distance jumps from near zero to over 1500 once the data are standardized. Learning Large DAGs is Harder than you Think proves that likelihood-type losses can be minimised by the wrong graph purely because of how variables are scaled, and reports that rescaling one Sachs variable by 10 distorts the predicted graph. The Robustness of Differentiable Causal Discovery in Misspecified Scenarios finds scale variation to be the one misspecification that breaks differentiable methods. These papers motivate our proposal: they predict that GCFS's reported accuracy is partly variance sorting. We test that prediction directly.

Two scale-invariant estimators supply our method, and both are limited in ways that our blanket restriction removes. CoLiDE estimates per-variable noise scales alongside a linear graph, which makes its sparsity penalty insensitive to scale. It is linear and global over a $d \times d$ matrix. GENE orders variables by the unit-free $R^2$ score plus a residual-independence penalty, which handles nonlinear additive-noise models. Its greedy search over orderings limits it to modest $d$. On a blanket of $k \lesssim 20$ nodes, both become cheap.

On the AutoFE side, OpenFE scores candidates by how well a shallow tree fits the base model's residuals, then prunes with successive halving. DIFER searches a learned embedding of expression trees. Both are causally agnostic, and neither guarantees that its candidate pool is unit-independent. We reuse OpenFE's residual scorer unchanged inside the blanket, so any gain we report comes from what is fed to it, not from a better scorer.

Research Program

The pipeline has three stages, and each is built to be equivariant to per-column rescaling.

The first stage is screening. We estimate $\text{MB}(T)$ by nodewise regression of $T$ on all columns with a scale-pivotal sparse penalty. In the linear case this is the concomitant lasso of CoLiDE restricted to the single node $T$. In the nonlinear case it is a GBDT whose importances are computed on rank-transformed inputs. A symmetric "OR" step then adds spouses. For each selected child, we regress that child on everything else and add any variable that enters. Every one of these estimators returns the same set under rescaling, which we verify numerically as well as by argument.

The second stage is local orientation. On $\text{MB}(T) \cup \{T\}$ we run GENE's $R^2$-plus-residual-independence order search, and we run CoLiDE-NV as a linear check. Each blanket member is labelled parent, child or spouse. One theoretical risk is that an unobserved variable outside the blanket confounds two members, which could break local orientation even though global orientation would succeed. We quantify this on synthetic graphs by comparing local and global orientation accuracy.

The third stage is generation. Pairwise and unary operators are applied only to blanket members, in two modes: "iid mode" uses the whole blanket, and "invariant mode" uses parents only. The grammar is restricted to unit-consistent operators. Products, ratios, powers and logs are applied directly, since rescaling an input only rescales or shifts the output. Additive combinations are replaced by fitted linear combinations, whose coefficients absorb the units. Candidates are then scored and pruned by OpenFE's own residual scorer and successive halving.

The analysis component formalises the lossless restriction above and the candidate count, which falls from $O(m^2)$ to $O(k^2)$. It also gives a finite-sample statement. When the screen misses a true blanket member with probability $\delta$, the excess risk is bounded by $\delta$ times the risk gap from dropping that member.

Baselines

The naive reference points are a GBDT on raw columns with no generated features, and the same GBDT on z-scored columns. Every reported gain is measured against both.

The strongest AutoFE competitor is OpenFE run on all $m$ columns with its default operators. It is the strongest because its residual scorer and successive halving are what we reuse, and because the file reports that it significantly improves 40 of 49 OpenML-CC18 datasets and finishes medium-scale runs in under five minutes (OpenFE). Both systems use the same downstream LightGBM, the same tuning budget, and the same number of retained features. We beat OpenFE if we match its CC18 accuracy within noise, evaluate at least five times fewer candidates, and do strictly better under downstream shift and rescaling. DIFER is a secondary AutoFE baseline under the same budget.

The strongest causal-selection competitor is GCFS, run on raw, z-scored and adversarially rescaled versions of identical data. Its reported blanket F1 at $d=1{,}500$ is about 0.59 on raw simulations (GCFS), and that is the number to match on raw data. We beat GCFS if our blanket F1 matches it on raw data and stays unchanged under rescaling while GCFS's falls. For orientation on Sachs, the reference points are GENE's F1 of 0.65 (GENE), GCFS's blanket precision of 0.95 with F1 0.67, and CoLiDE-NV's SHD of 12 (CoLiDE). For variance-sorting exposure, we also run sortnregress.

Three ablations isolate the key ingredients. The first replaces our screen with OpenFE's own importance ranking truncated to $k$ columns, which tests whether causal screening matters at all. The second keeps the whole blanket instead of parents only, which tests orientation. The third replaces the $R^2$ score with squared error in the local orientation step, which tests scale invariance.

Why not just…?

Why not just z-score everything and run GCFS or OpenFE? Standardizing removes unit dependence for set selection. It does not fix orientation. On standardized data, squared-error learners lose the variance cue they were relying on, as shown by the jump to over 1500 SID in Beware of the Simulated DAG!, and the true graph need not minimise the loss at all (Seng et al.). For iid accuracy with OpenFE, z-scoring may well suffice, and we expect it to. That is why our accuracy claim against OpenFE is parity at lower cost, and our distinctive claims concern shift and orientation. The z-scored GCFS and z-scored OpenFE runs settle this.

Why not just screen with predictive importance and skip causality? This is a real threat. Under faithfulness, the blanket is exactly the minimal sufficient predictor set, so a well-tuned sparse regression of $T$ on everything is already a blanket estimator. Indeed, our first stage is essentially that, chosen to be rescaling-equivariant. We therefore do not claim the screen as a causal novelty. Its value is the lossless guarantee, and the first ablation will show whether OpenFE's truncated ranking already achieves it. The causal contribution that predictive screening cannot supply is the parent/child split in the second stage. Without it, predictive screening keeps children, which are among the most predictive variables iid and fail when the downstream mechanism shifts.

Why not run CoLiDE or GENE globally and read off the blanket? On small graphs, this is the right control and may orient slightly better, because nothing is marginalised away. We run it wherever it finishes. At $d$ in the thousands, GENE's ordering search is out of reach. CoLiDE's global matrix also grows quadratically before any generated features are added, and the file contains no reported CoLiDE result beyond 200 nodes (SHD 390.7). Our comparison reports both accuracy and wall-clock time against global runs at $d \in \{50, 200, 1500\}$.

Why not constraint-based blanket learners, whose independence tests are scale-free? They are scale-free. In the GCFS benchmarks, however, they collapse to F1 between 0.24 and 0.33 at $d=1{,}500$, and MMMB did not finish. We include their best variant as a screen alternative.

Proposed Experiments

The synthetic study uses Erdős–Rényi and scale-free graphs with $d \in \{50, 200, 1500\}$. The target has planted parents, children and spouses. Target mechanisms include multiplicative and ratio terms, so that generated features genuinely help. We report varsortability for every configuration, and we evaluate under three data conditions: raw, z-scored, and rescaled in the inverted-order direction used by Seng et al.

At test time, we intervene on children's mechanisms and on spouse-to-child mechanisms to create downstream shift. Metrics are blanket F1, within-blanket orientation F1, the number of candidates evaluated, wall-clock time, and downstream RMSE both iid and under shift. We also measure a unit-invariance score: the Jaccard overlap of the final generated feature set across 20 random per-column rescalings with log-uniform factors between $10^{-3}$ and $10^{3}$.

On Sachs we compare orientation against the reported GENE, GCFS and CoLiDE numbers, and we repeat Seng et al.'s one-variable ×10 rescaling. Our method should be unaffected, while GCFS should not be. On OpenML-CC18 we test iid parity with OpenFE and cost reduction. True ground truth is unavailable there, so we report only accuracy, candidate counts, runtime and unit invariance.

Three outcomes would be decisive. The first is GCFS's blanket F1 at $d=1{,}500$ falling well below 0.59 under rescaling while ours stays flat. If it does not fall, the scale argument against GCFS is wrong, and we say so. The second is parents-only generation beating whole-blanket generation and OpenFE under child shift, while losing little iid. The third is the predictive-truncation ablation failing to match our screen on shift RMSE. If it matches on every metric, the screen is not causal, and the contribution reduces to the orientation stage.