Paper deep dive
Causally-Guided Automated Feature Engineering with Multi-Agent Reinforcement Learning
Arun Vignesh Malarkkan, Wangyang Ying, Yanjie Fu
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 87%
Last extracted: 7/21/2026, 1:42:18 AM
Summary
The paper introduces CAFE, a framework for Automated Feature Engineering (AFE) that combines causal discovery with multi-agent reinforcement learning. CAFE operates in two phases: Phase I learns a sparse directed acyclic graph to group features by causal role (direct, indirect, or other) relative to the target, providing soft inductive priors. Phase II employs a cascading multi-agent deep Q-learning architecture to select causal groups and transformation operators, using hierarchical reward shaping to favor causally plausible transformations. CAFE demonstrates improved robustness under covariate shifts and better performance on 15 public benchmarks compared to existing AFE baselines.
Entities (11)
Relation Signals (7)
CAFE → uses → Multi-Agent Reinforcement Learning
confidence 95% · Phase II uses a cascading multi-agent deep Q-learning architecture
CAFE → uses → Causal Discovery
confidence 95% · Phase I learns a sparse directed acyclic graph over features and the target to obtain soft causal priors
CAFE → improves → Robustness
confidence 90% · causal structure... can substantially improve the robustness and efficiency of automated feature engineering
NOTEARS → isusedby → CAFE
confidence 85% · We employ NOTEARS with Lasso regularization [33] as our primary causal discovery method
CAFE → outperforms → AFE Baselines
confidence 85% · CAFE achieves up to 7% improvement over strong AFE baselines
Direct Causes → isgroupedby → CAFE
confidence 80% · grouping features as direct, indirect, or other based on their causal influence with respect to the target
Indirect Causes → isgroupedby → CAFE
confidence 80% · grouping features as direct, indirect, or other based on their causal influence with respect to the target
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Automated feature engineering (AFE) enables AI systems to autonomously construct high-utility representations from raw tabular data. However, existing AFE methods rely on statistical heuristics, yielding brittle features that fail under distribution shift. We introduce CAFE, a framework that reformulates AFE as a causally-guided sequential decision process, bridging causal discovery with reinforcement learning-driven feature construction. Phase I learns a sparse directed acyclic graph over features and the target to obtain soft causal priors, grouping features as direct, indirect, or other based on their causal influence with respect to the target. Phase II uses a cascading multi-agent deep Q-learning architecture to select causal groups and transformation operators, with hierarchical reward shaping and causal group-level exploration strategies that favor causally plausible transformations while controlling feature complexity. Across 15 public benchmarks (classification with macro-F1; regression with inverse relative absolute error), CAFE achieves up to 7% improvement over strong AFE baselines, reduces episodes-to-convergence, and delivers competitive time-to-target. Under controlled covariate shifts, CAFE reduces performance drop by ~4x relative to a non-causal multi-agent baseline, and produces more compact feature sets with more stable post-hoc attributions. These findings underscore that causal structure, used as a soft inductive prior rather than a rigid constraint, can substantially improve the robustness and efficiency of automated feature engineering.
Tags
Links
- Source: https://arxiv.org/abs/2602.16435v1
- Canonical: https://arxiv.org/abs/2602.16435v1
Trouble viewing inline? Open PDF directly →
Full Text
88,023 characters extracted from source content.
Expand or collapse full text
CAFE: Causally-Guided Automated Feature Engineering with Multi-Agent Reinforcement Learning Arun Vignesh Malarkkan Corresponding author: arun.malarkkan@asu.edu Wangyang Ying Yanjie Fu Abstract Automated feature engineering (AFE) enables AI systems to autonomously construct high-utility representations from raw tabular data. However, existing AFE methods rely on statistical heuristics, yielding brittle features that fail under distribution shift. We introduce CAFE, a framework that reformulates AFE as a causally-guided sequential decision process, bridging causal discovery with reinforcement learning-driven feature construction. Phase I learns a sparse directed acyclic graph over features and the target to obtain soft causal priors, grouping features as direct, indirect, or other based on their causal influence with respect to the target. Phase I uses a cascading multi-agent deep Q-learning architecture to select causal groups and transformation operators, with hierarchical reward shaping and causal group-level exploration strategies that favor causally plausible transformations while controlling feature complexity. Across 1515 public benchmarks (classification with macro-F1; regression with inverse relative absolute error), CAFE achieves up to 7%7\% improvement over strong AFE baselines, reduces episodes-to-convergence, and delivers competitive time-to-target. Under controlled covariate shifts, CAFE reduces performance drop by ∼4× 4× relative to a non-causal multi-agent baseline, and produces more compact feature sets with more stable post-hoc attributions. These findings underscore that causal structure, used as a soft inductive prior rather than a rigid constraint, can substantially improve the robustness and efficiency of automated feature engineering. 1 Introduction In high-stakes domains such as chemical process optimization, industrial manufacturing, drug formulation, and energy systems, AI systems must operate under evolving conditions where input distributions shift. Automated feature engineering (AFE) promises to extract useful representations from raw tabular data with minimal manual effort. Yet, most AFE methods rely on statistical correlations, yielding brittle features that fail once distributions change, limiting use in safety-critical settings. For instance, in chemical formulation, a 2°C temperature variation can alter product yield by 1515–30%30\%, but correlation-based AFE often attributes outcomes to spurious variables rather than causal drivers. As process conditions evolve, such features lose predictive power despite stable causal mechanisms. This highlights a fundamental limitation: conventional feature engineering overlooks causality, producing models vulnerable to interventions or operational shifts. We study causally-guided AFE: automatically transforming high-dimensional process data into features that preserve causal relations with target outcomes. This is key for generalization, transparency, and computational tractability. Yet, causally-guided AFE introduces several core technical challenges: 1) Causal discovery under noise and confounding: Real-world observational data often includes latent confounders and noise, making reliable causal structure learning difficult without strong assumptions. 2) Combinatorial search explosion: The space of candidate feature transformations scales exponentially with dimensionality, rendering greedy exploration computationally challenging. 3) Structured exploration under uncertainty: Navigating the exponential transformation space requires principled search strategies that favor causal plausibility over spurious correlations. 4) Robustness: Features should preserve utility under covariate shifts and mechanism-preserving changes. The existing methods only partially address these challenges. Most traditional AFE methods rely on greedy exploration and utility-based pruning strategies and can be brittle under shifts [11, 9]. Reinforcement learning (RL) methods [4, 26, 15, 16] improve exploration but suffer from sparse rewards and ignore causal structure. Recent LLM-based methods [8, 32, 1] treat feature generation as sequence modeling but lack principled causal guidance. While causal feature selection methods [24, 30, 27, 28] identify causally relevant features, they do not synthesize transformed features. This gap motivates a framework that integrates causality with principled feature generation. Our Insights: A Causally-Guided RL Perspective for Feature Engineering. AFE must move beyond statistical correlations to leverage causal mechanisms that remain stable across operational changes. To meet this end, we integrate insights from causal discovery and reinforcement learning: First, causal graphs summarize structural dependencies, providing invariant principled guidance for which variables to transform and how to combine them. Second, RL methods enable adaptive navigation of large, discrete transformation spaces. We operationalize these foundations through three key insights: 1) Soft Causal Inductive Bias: Instead of enforcing rigid causal constraints, the causal structure provides soft inductive priors to guide feature transformation decisions, maintaining flexibility under causal uncertainty; 2) Causal-aware RL Exploration: Clustering features by causal roles (direct, indirect, or unrelated to the target), enabling reduced search complexity while preserving causal interpretability; 3) Causally Shaped Rewards: Reward functions that balance predictive utility with causal consistency and transformation diversity, ensuring intervention stability. Summary of Proposed Solution: Building on these insights, we introduce CAFE, a two-phase Causally-guided Automated Feature Engineering framework. In Phase I, we apply sparsity-regularized causal discovery to construct a causal graph over the feature space, categorizing features as direct causes, indirect causes (via multi-hop paths), or non-causal with respect to the target, providing soft inductive guidance for feature transformation policy while maintaining flexibility under causal uncertainty. In Phase I, we deploy a cascading multi-agent deep Q-learning architecture where three specialized agents make sequential decisions: selecting causal feature clusters, choosing transformation operators, and constructing causally-informed feature interactions. The agents use hierarchical reward shaping and an adaptive exploration strategy to favor causally plausible transformations while controlling complexity. Together, these phases unify causal reasoning with reinforcement learning to improve robustness and compactness in high-stakes applications. Our Contributions: 1) We formulate AFE as a causally-guided sequential decision process, moving beyond correlation-based heuristics to leverage stable causal mechanisms; 2) We introduce three core principles-soft causal inductive bias, causal structure-aware exploration, and causally shaped reward function, integrating causal discovery with adaptive feature construction through novel multi-agent coordination; 3) We develop CAFE, a two-phase AFE framework combining causal graph discovery with cascading multi-agent reinforcement learning that strategically constructs causally-informed feature transformations. 4) We provide extensive empirical validation of CAFE across 15 benchmark datasets, demonstrating consistent improvements up to 7%7\% in predictive performance, reduces episodes-to-convergence, and exhibits ∼4× 4× smaller degradation under controlled covariate shifts relative to a non-causal multi-agent baseline. 2 Problem Statement Let =(i,yi)i=1ND=\(x_i,y_i)\_i=1^N be a dataset with N instances, where each i∈ℝKx_i ^K is a K-dimensional feature vector and yi∈y_i is the corresponding target. Let ℱF denote the original feature set, and O a predefined set of transformation operators (e.g., arithmetic, interactions; unary or binary with standard domain guards). Applying transformations from O to subsets of ℱF induces a set of candidate features ℱgF^g. The goal of AFE is to construct an optimal feature set ℱ∗⊆ℱ∪ℱgF^* ^g that maximizes a task-specific performance metric VAV_A for a given ML task A (e.g., classification, regression). We formulate the objective as: ℱ∗=argmax⊆ℱ∪ℱgVA(,y)F^*= _S ^gV_A(S,y) (1) where S denotes a candidate feature subset and VAV_A quantifies model performance on task A. The central challenge lies in efficiently navigating the exponentially large transformation space to identify ℱ∗F^* that achieves: (i) high predictive utility, (i) robustness under distribution shift, and (i) computational tractability in exploring the exponential feature space, guided by causality. 3 Methodology Automated feature engineering under distribution shift must move beyond correlation-based heuristics to exploit stable causal mechanisms. CAFE addresses this via a two-phase framework that couples causal discovery with multi-agent reinforcement learning (Fig. 1). Phase I learns a causal graph to group features by relation to the target, providing soft inductive guidance rather than rigid constraints. Phase I uses a factorized multi-agent policy to explore the exponential transformation space, steering by causal priors while remaining flexible under causal uncertainty. Causal guidance enters through probabilistic selection and reward shaping; only safety/validity checks (e.g., guarded division) are enforced as hard constraints. Together, these phases yield compact, transparent feature sets that retain predictive performance under mechanism-preserving covariate shifts. By using the learned causal structure as a soft inductive prior, we transform the AFE problem from a broad, undirected search into a more strategic and efficient exploration, justifying the initial computational overhead of causal discovery with faster convergence to high-quality feature transformations. Figure 1: CAFE Framework Overview. Phase I learns a causal graph and derives soft causal priors that group features by their relation to the target: direct causes, indirect causes, and non-causal features. Phase I employs cascaded multi-agent reinforcement learning with causally shaped rewards and adaptive exploration strategies, balancing causal coherence with statistical discovery. 3.1 Theoretical Foundation: Why Causal Structure Guides Robust Feature Engineering Core principle. In a structural causal model (SCM) with assignments Xj:=fj(PAj,ϵj)X_j:=f_j(PA_j, _j), the conditional mechanisms P(Xj∣PAj)P(X_j _j) remain invariant across environments even when marginals P(Xj)P(X_j) shift [20]. This invariance suggests that features constructed from variables that are causally relevant to Y are more likely to preserve their predictive relation to Y under mechanism-preserving shifts than features relying on spurious correlations. Formal setting. Consider a structural causal model (SCM) with variables =(X1,…,Xd)X=(X_1,…,X_d) and target Y, where each variable follows Xj:=fj(PAj,ϵj)X_j:=f_j(PA_j, _j) with parents PAjPA_j and noise ϵj _j. A mechanism-preserving shift transforms the distribution from P()P(X) to P′()P (X) while preserving conditional distributions P(Xj∣PAj)=P′(Xj∣PAj)P(X_j _j)=P (X_j _j). Proposition 1 (Informal invariance for causally sufficient summaries). Let S⊆ℱS contain a subset S⋆S that suffices for predicting Y across environments (e.g., S⋆⊇PAYS _Y and the shift is mechanism-preserving). If a transformation ϕφ preserves the information in S⋆S (e.g., is injective on S⋆S or is a sufficient statistic for S⋆S ), then P(Y∣ϕ(S))=P′(Y∣ϕ(S)).P(Y φ(S))\;=\;P (Y φ(S)). If S excludes any such invariant set, no general invariance guarantee is available. Discussion. Proposition 1 restates a standard invariance intuition [20]: conditioning (directly or via sufficient transforms) on observed causal parents of Y stabilizes the conditional across mechanism-preserving environments. We give precise assumptions and proofs for idealized settings in Appendix A, and enumerate violations (latent confounding, selection bias, mechanism changes) that break invariance. Empirical regularity. When causal discovery yields a reasonable approximation to the true relations, features built from variables with stronger (estimated) causal connection to Y empirically exhibit greater stability under mechanism-preserving shifts than features built from purely correlational signals. We quantify this trend via controlled robustness experiments (Sec. 4.2.3) and sensitivity analyses under graph misspecification (Appendix B). This perspective motivates organizing features by approximate causal relationships: direct causes (Xj→YX_j→ Y), indirect causes (Xj↝YX_j Y via paths of length ≥2≥ 2), and other variables. This causal hierarchy acts as a soft inductive bias that guides but does not constrain feature construction decisions. 3.2 Phase I: Causal Graph Discovery as a Soft Inductive Prior for Feature Grouping In Phase I, we construct a causal graph to organize the feature space by underlying causal relationships rather than statistical correlations. The central insight is that features with direct or indirect causal influence on the target provide more reliable guidance for feature construction, offering stable inductive signals under mechanism-preserving shifts, whereas correlations may be spurious. Causal Discovery Backend. Given an observational dataset =(i,yi)i=1ND=\(x_i,y_i)\_i=1^N, we construct a Directed Acyclic Graph (DAG) =(,ℰ)G=(V,E) over the variable set =ℱ∪yV=F∪\y\, where ℱF represents the original features. Each directed edge (u,v)∈ℰ(u,v) represents a causal relationship from variable u to variable v. We employ NOTEARS with Lasso regularization [33] as our primary causal discovery method, though the framework accommodates alternative algorithms (Appendix B). Given dataset =(i,yi)i=1ND=\(x_i,y_i)\_i=1^N with features ℱF and target y, we learn a DAG =(,ℰ)G=(V,E) over =ℱ∪yV=F∪\y\ by optimizing: minW∈ℝd×d12N‖X−XW‖F2+λ‖W‖1s.t.h(W)=tr(eW∘W)−d=0 _W ^d× d 12N\|X-XW\|_F^2+λ\|W\|_1 .t. h(W)=tr(e^W W)-d=0 (2) where W is the weighted adjacency matrix, λ>0λ>0 controls sparsity, ∘ denotes Hadamard product, and h(W)=0h(W)=0 enforces acyclicity via a differentiable constraint. This formulation enables gradient-based optimization while maintaining theoretical guarantees about DAG structure. The optimized adjacency matrix W defines the edge weights of the causal graph =(,ℰ)G=(V,E), where larger weights indicate stronger causal influence. This produces a sparse DAG that captures the most significant causal pathways while filtering out weak or spurious connections. Assumptions and Scope. Our main analysis assumes: (1) causal sufficiency (no unobserved confounders), (2) linear additive noise model with sparse structure, and (3) mechanism-preserving shifts. We evaluate robustness to assumptions violation and compare alternative discovery methods like PC [10], GES [6], LiNGAM [21] in Appendix B. Causal Role Assignment. From learned DAG G, each feature f∈ℱf receives a causal role: ℳ(f)=directif f→yindirectif f↝y (path length ≥2)otherotherwiseM(f)= casesdirect&if f→ y\\ indirect&if f y (path length ≥ 2)\\ other&otherwise cases (3) This induces causal-semantic groups direct,indirect,other\C_direct,C_indirect,C_other\. To balance signal preservation with computational tractability, we apply within-group screening: g∗=gif |g|≤kgtop-kg(g,MI(⋅,y))otherwiseC_g^*= casesC_g&if |C_g|≤ k_g\\ top-k_g(C_g,MI(·,y))&otherwise cases (4) where top-kgk_g selects features with highest mutual information with target y. Robust fallbacks (Pearson correlation, χ2χ^2 test, stratified sampling) handle cases where MI estimation is unreliable. These causal roles serve as soft inductive priors and guide feature transformation decisions without rigid constraints. This design maintains flexibility when causal discovery is imperfect while providing principled structure that statistical methods lack. 3.3 Phase I: Multi-Agent Reinforcement Learning with Causal Guidance Phase I establishes causal-semantic feature groups through theoretically grounded structure discovery. Phase I addresses the exponentially large transformation space (O(||⋅|ℱ|2)O(|O|·|F|^2)) via multi-agent reinforcement learning with a Decision Factorization Rationale, where agents select entire causal feature groups rather than individual features. Decision Factorization Rationale. The AFE action space is combinatorially large: O(||×|ℱ|2)O(|O|×|F|^2) for operator set O and feature set ℱF. Direct optimization suffers from sparse rewards and high variance. We factorize decisions into three stages: (1) select primary feature group, (2) choose transformation operator, (3) optionally select secondary group for binary operations. This factorization substantially reduces the effective action space each agent explores; from joint choices over (group,operator,partner)(group,operator,partner) to three smaller, structured decisions, while preserving semantic coherence through causal organization. Empirically, this reduces value-estimate variance and improves sample efficiency (learning-curve dispersion in Appendix A). We also include a stylized analysis clarifying conditions where factorization reduces estimation variance; we treat it as a modeling advantage rather than a general guarantee. Multi-Agent Architecture. Three specialized DQN agents operate in cascade: Primary Group Agent (π1 _1): Selects from direct∗,indirect∗,other∗\C_direct^*,C_indirect^*,C_other^*\. Operator Agent (πo _o): Chooses transformation from operator library O. Secondary Group Agent (π2 _2): Selects partner group for binary operations State Representation Design. Agents receive context through statistical feature summaries and group-specific information: st(1) s_t^(1) =NestedStats(ℱt−1)⊕GroupStats(direct∗,indirect∗,other∗) =NestedStats(F_t-1) (C_direct^*,C_indirect^*,C_other^*) (5) st(o) s_t^(o) =st(1)⊕NestedStats(t(1)) =s_t^(1) (C_t^(1)) (6) st(2) s_t^(2) =st(o)⊕OneHot(ot) =s_t^(o) (o_t) (7) where NestedStats(X)NestedStats(X) computes a hierarchical statistical summary: first computing standard descriptive statistics (mean, std, min, max, quartiles) across features, then applying the same descriptive analysis to this summary vector, yielding a compact yet informative representation that captures both individual feature properties and their collective distributional characteristics. This approach provides consistent, interpretable state encodings without requiring learned representations, while maintaining sufficient information density for effective RL decision-making. Causally-Guided Exploration. We design three principled feature interaction strategies that integrate causal theory, statistical relevance, and diversity discovery with adaptive scheduling: Causal-Hierarchical Feature Interaction: Prioritizes transformations respecting causal structure. For unary operations, favors direct∪otherC_direct _other over indirect causes (which mediate relationships). For binary operations, emphasizes direct×indirectC_direct×C_indirect and direct×directC_direct×C_direct combinations. Top-k Mutual Information Selection: Hedges against causal discovery errors by incorporating mutual information rankings, selecting features with strongest empirical associations with target. Diversity Sampling: Prevents premature convergence through controlled randomization, ensuring adequate exploration of the transformation space. Strategy weights adapt based on validation performance using exponential moving averages with decay α (Appendix). Reward Function Design. We align optimization with predictive utility and causal principles: Rt=Rperf,t⋅(1+α⋅Ψcausal,t)+λdivℋ(πt)−λcompC(ℱtg),R_t=R_perf,t·(1+α· _causal,t)+ _divH( _t)- _compC(F_t^g), (8) where Rperf,t=ΔValidationScoretR_perf,t= _t, α∈(0,1)α∈(0,1) controls causal bonus intensity, and Ψcausal,t=1|ℱtg|∑f∈ℱtgwℳ(f)⋅Usage(f),withwdirect>windirect>wother≥0. _causal,t= 1|F_t^g| _f _t^gw_M(f)·Usage(f), w_direct>w_indirect>w_other≥ 0. The modulated structure (1+α⋅Ψcausal,t)(1+α· _causal,t) ensures causal bonuses amplify positive improvements while proportionally reducing penalties for causally-relevant features, preventing reward hacking while maintaining causal preferences. The algorithm is given in Appendix A 1. Robust Feature Generation. Transformation operators include domain validation and numerical safeguards addressing common failure modes: Logarithmic operations: Apply to log(|x|+ϵ) (|x|+ε) where ϵ=10−8ε=10^-8 for numerical stability. Division operations: Use protected division x⋅sign(y)max(|y|,ϵ)x· sign(y) (|y|,ε) with ϵ=10−8ε=10^-8. Square root: Apply |x| |x| for negative inputs. Range clipping: Bound generated features to [−106,106][-10^6,10^6] preventing overflow. For binary operations, we limit candidate pairs to min(50,|1|×|2|) (50,|C_1|×|C_2|) through relevance-based sampling, maintaining computational tractability while preserving quality. Learning and Optimization. Agents train via temporal-difference learning with experience replay and target networks: ℒ(θ)=(s,a,r,s′)∼ℬ[(Qθ(s,a)−(r+γmaxa′Qθ−(s′,a′)))2]L(θ)=E_(s,a,r,s ) [ (Q_θ(s,a)- (r+γ _a Q_θ^-(s ,a ) ) )^2 ] (9) where ℬB is the replay buffer, θ−θ^- denotes target network parameters, and γ is the discount factor. Scalability and Termination. We implement intelligent pruning and adaptive termination to ensure computational efficiency while maintaining feature quality. Two-stage filtering first applies variance thresholding to remove near-constant features, then uses mutual information ranking to retain top-k features while ensuring minimum representation per causal group. Multiple termination criteria trigger when: (1) validation improvement falls below δ for N consecutive episodes; (2) feature count exceeds computational limit; or (3) maximum episodes are reached. This design choice makes the group-choice action constant-size (|G|=3|G|=3), improving exploration stability. With a fixed operator library and capped within-group sampling (kgk_g) and pairing budget B=min(50,|C1|⋅|C2|)B= (50,|C_1|·|C_2|), the per-step decision cost is O(1)O(1) for group selection and O(||+B)O(|O|+B) for operator and pairing, independent of raw dimensionality d. Overall runtime remains dominated by candidate evaluation, pruning, and downstream model training. Upon termination, we return the feature set ℱ∗F^*, achieving the highest validation performance across all episodes. Complete state representations, network architectures, and hyperparameters are detailed in Appendix C-D for reproducibility. 4 Experimental Study We designed our experiments to meticulously address the following research questions: RQ1: Predictive Utility. Does CAFE consistently outperform recent AFE baselines in terms of predictive accuracy? RQ2: Ablation Study. How do causal priors, exploration strategies, and reward components individually contribute to the performance and efficiency of CAFE? RQ3: Distributional Robustness. Can CAFE generate features that are resilient under covariate shifts and maintain predictive accuracy on out-of-distribution data? RQ4: Interpretability and Compactness. Are the synthesized features semantically meaningful and causally aligned with the underlying data-generating process? 4.1 Experimental Protocol Data Description and Evaluation Framework. We evaluate our framework on 15 diverse public datasets collected from Kaggle, LibSVM, UCIrvine, and OpenML repositories, across two core tasks: (1) classification and (2) regression. The data statistics are given in Table 1. All experiments employ 5-fold stratified cross-validation with fixed random seeds for reproducibility. We report macro-averaged F1-scores for classification and inverse relative absolute error (1-RAE) for regression, both scale-invariant metrics suitable for cross-dataset comparison. Implementation Details. We use XGBoost with default hyperparameters as the downstream model, following established automated feature engineering evaluation protocols. This choice enables fair comparison across all methods while avoiding confounding effects from model-specific tuning. An extended evaluation across multiple model families (Random Forest, Neural Networks, Linear Models) is provided in the Appendix. Baseline Methods. We compare against 10 representative methods spanning three categories: Statistical Baselines: Original (ORG): Raw features without transformation. Random (RDG): Random transformation application for lower-bound comparison. Exhaustive (ERG): Systematic transformation followed by statistical selection. Traditional Automated Feature Engineering: AFT [9]: AutoFeat - Multi-stage expansion with statistical significance testing. LDA [3]: Latent factor extraction via matrix factorization. Modern Learning-Based Methods: NFS [5]: Sequential RL-based feature construction on individual features. TTG [12]: Graph-based RL transformation path learning. GRFG [25]: Multi-agent RL without causal guidance (key comparison). ELLM-FT [8]: LLM-guided evolutionary feature transformation. 4.2 Experimental Results 4.2.1 Overall Performance Analysis (RQ1) Table 1: Overall performance comparison. ‘C’ for classification and ‘R’ for regression. Bold indicates the best result. Dataset Source C/R Samples Features RDG ERG LDA AFT NFS TTG GRFG ELLM-FT CAFE Amazon Employee Kaggle C 32769 9 0.744 0.740 0.920 0.943 0.935 0.806 0.946 0.946 0.947 SVMGuide3 LibSVM C 1243 21 0.703 0.747 0.683 0.829 0.831 0.766 0.831 0.836 0.846 German Credit UCIrvine C 1001 24 0.695 0.661 0.627 0.751 0.765 0.731 0.772 0.775 0.793 Messidor_features UCIrvine C 1150 19 0.673 0.635 0.580 0.678 0.746 0.726 0.757 0.757 0.774 Ionosphere UCIrvine C 351 34 0.919 0.926 0.730 0.827 0.949 0.938 0.960 0.963 0.976 Wine Quality Red UCIrvine C 999 12 0.599 0.611 0.600 0.658 0.666 0.647 0.686 0.685 0.707 Wine Quality White UCIrvine C 4900 12 0.552 0.587 0.571 0.673 0.679 0.638 0.685 0.689 0.752 Housing Boston UCIrvine R 506 13 0.605 0.617 0.374 0.641 0.665 0.658 0.684 0.671 0.681 Airfoil UCIrvine R 1503 5 0.737 0.732 0.463 0.774 0.771 0.783 0.797 0.786 0.799 Openml_586 OpenML R 1000 25 0.595 0.546 0.472 0.687 0.748 0.704 0.783 0.801 0.810 Openml_589 OpenML R 1000 25 0.638 0.560 0.331 0.672 0.711 0.682 0.753 0.781 0.783 Openml_607 OpenML R 1000 50 0.579 0.406 0.376 0.658 0.675 0.639 0.680 0.793 0.793 Openml_616 OpenML R 500 50 0.448 0.472 0.385 0.585 0.593 0.559 0.603 0.739 0.751 Openml_618 OpenML R 1000 50 0.415 0.427 0.372 0.665 0.640 0.587 0.672 0.778 0.790 Openml_620 OpenML R 1000 25 0.575 0.584 0.425 0.663 0.698 0.656 0.714 0.725 0.725 To answer RQ1, we evaluate CAFE against nine competitive baselines across 15 benchmark datasets spanning classification and regression tasks with diverse modalities, sample sizes, and dimensionalities (Table 1). CAFE achieves superior performance on 13 of 15 datasets, demonstrating consistent advantages from causally-guided feature engineering. Notable improvements include high-dimensional regression tasks (OpenML_616: 1.6%, OpenML_618: 1.5%) and small-sample classification problems (Ionosphere: 1.4%, SVMGuide3: 1.2%), indicating effective causal structure leverage across varied domains. Established benchmarks show meaningful gains: German Credit (2.3%) and Messidor Features (1.7%), underscoring the reliability of its inductive bias under feature sparsity and class imbalance. CAFE does not uniformly dominate—GRFG wins on Housing Boston (0.684 vs 0.681) and CAFE ties with ELLM-FT on OpenML_620 (0.725). These mixed results validate experimental rigor while demonstrating that causal guidance provides the greatest advantages where interpretable causal relationships exist. Results confirm our hypothesis that integrating causal discovery as soft inductive bias with multi-agent reinforcement learning enables more robust feature transformations than purely statistical approaches. 4.2.2 Ablation Study and Component Analysis (RQ2) We conduct systematic ablations across four representative datasets to isolate each component’s contribution (Fig. 2). Causal priors prove essential. Replacing causal discovery with correlation-based grouping (CAFE¬G) consistently degrades performance, with substantial drops on Wine Quality White (8.0% reduction) and Housing Boston (3.0% reduction), confirming that causal structure provides superior inductive bias over statistical clustering. Exploration strategies show clear hierarchy. Pure causal-hierarchical exploration (CAFEℰc_E_c) consistently outperforms mutual information-based exploration (CAFEℰt_E_t) across all datasets, with the advantage most pronounced on Wine Quality datasets where causal relationships are interpretable. Reward components contribute synergistically. Removing causal reward amplification (CAFE¬ℛc_ _c) reduces performance by 1.5-2.8% across datasets. Excluding diversity rewards (CAFE¬ℛd_ _d) causes performance drops, particularly in Wine Quality White (7.2% reduction), while omitting complexity penalties (CAFE¬ℛp_ _p) shows mixed effects, suggesting this component primarily prevents overfitting rather than improving optimization. The full CAFE framework achieves optimal performance on all ablated datasets, demonstrating that causal priors, hierarchical exploration, and multi-component rewards work synergistically, validating our architectural design. (a) Wine red (b) Wine white (c) Housing Boston (d) Airfoil Figure 2: Comparison of different CAFE variants in terms of F1 or 1-RAE. 4.2.3 Robustness Analysis (RQ3) To assess generalization under distribution shifts, we systematically evaluate robustness by applying multiplicative and additive transformations to feature distributions while preserving underlying causal relationships. We test across low, medium, and high shift intensities, comparing CAFE against GRFG, a statistical multi-agent RL baseline on four diverse datasets (Fig. 3). CAFE consistently shows stronger robustness, with average degradation of only 7.1%7.1\% versus 28.1%28.1\% for GRFG, a roughly fourfold improvement supporting the claim that causal-guided features withstand distributional changes better than correlation-based ones. The advantage is most evident under severe shifts: CAFE remains stable (e.g., wine_red drops just 3.4%3.4\%), while the statistical baseline suffers failures up to 74%74\%. Even when in-distribution performance is matched (e.g., wine_white), CAFE’s degradation is far smaller (22.2%22.2\% vs. 86.7%86.7\%), indicating robustness derives from causal invariance rather than merely higher base accuracy. Overall, causal-guided features generalize more reliably across distributions, whereas purely statistical models lean on spurious correlations that collapse under covariate shift. This makes CAFE well-suited for dynamic, real-world deployments and addresses a key shortcoming of existing AFE methods. Figure 3: Robustness Study of CAFE. 4.2.4 Interpretability Analysis (RQ4) To evaluate interpretability, we assess explanation stability via SHAP value variance under controlled input perturbations. We add proportional Gaussian noise (σ∈0.1,0.3,0.5,0.7σ∈0.1,0.3,0.5,0.7) to test instances and, for each noise level, compute SHAP variance over 100 perturbations across multiple test points, comparing CAFE to GRFG using TreeSHAP (Fig. 4). CAFE shows superior explanation stability across all noise settings and datasets. On Amazon Employee, CAFE maintains low SHAP variance while the statistical baseline grows rapidly, yielding up to 90.8%90.8\% stability improvement. OpenML datasets display the same trend: CAFE stays near-constant as statistical models become volatile. The advantage increases with noise intensity: at σ=0.1σ=0.1, CAFE improves stability by 64–90%64–90\% across datasets, rising to >85%>85\% under high noise. This indicates that causal-guided features yield more reliable explanations by capturing stable mechanisms rather than spurious correlations whose attributions drift under perturbations. Across all experiments, CAFE reduces explanation variance by an average of 58.6%58.6\%, supporting that causal frameworks produce interpretable representations suitable for safety-critical deployments where explanation reliability is essential. (a) Wine White (b) Amazon Employee (c) Openml_586 (d) Openml_616 Figure 4: SHAP Explanation Stability. Lower variation values indicate more stable model explanations under noise. 5 Related Works Automated Feature Engineering (AFE). Early AFE relies on hand-crafted heuristics [13, 2], which are domain-specific and hard to scale. Modern approaches include: (1) Expansion–Pruning (e.g., Deep Feature Synthesis [11], Autofeat [9]), which apply operator libraries then prune by relevance; (2) Search-Based methods using genetic programming [23] or RL with multi-agent policies [26, 15, 29]; (3) Neural Controllers that adapt NAS/RNN controllers for feature generation [4]; and (4) LLM-based AFE where language models propose transformations, often with RL/evolutionary refinement [8, 32, 1]. Reinforcement Learning for Feature Engineering. NFS [5] treats feature creation as sequential decisions on single features; TTG [12] encodes transformations as graph traversals; GRFG [25] introduces multi-agent cooperation. These methods largely optimize statistical correlation, offering limited feature organization or robustness to distribution shift, and weaker interpretability for deployment. Causal Discovery and Feature Selection. Classical filter/wrapper/embedded schemes degrade under high dimensionality, confounding, and shifts [14]. Causal approaches include (1) Constraint-based Markov-Blanket discovery via conditional independence tests [24, 18, 31, 30] and (2) Score-based graph learning (e.g., BIC) with strong scalability [27, 7]. Deep causal discovery broadens robustness and explainability [28, 19, 22, 17]. Yet most causal feature selection is post-hoc filtering; it rarely guides automated feature generation. Our work addresses this gap by using learned causal structure as a soft inductive prior to steer multi-agent RL feature construction. 6 Conclusion We introduced CAFE, a principled causally-guided automated feature engineering framework that leverages causal discovery as inductive bias within a multi-agent reinforcement learning paradigm. CAFE consistently improves predictive accuracy, robustness, and interpretability across datasets, demonstrating up to 7%7\% performance gains, four-fold robustness improvement under distribution shifts (7.1%7.1\% vs 28.1%28.1\% degradation), and 58.6%58.6\% enhancement in explanation stability. These results validate the necessity of causal reasoning in automated feature engineering and establish a new paradigm for robust, interpretable AI systems. Our framework faces inherent challenges rooted in causal discovery limitations. The reliability of causal structure learning is constrained by data quality, sample size, and validity of causal assumptions. Although our design mitigates these risks by treating causal maps as flexible guidance rather than rigid constraints, unobserved confounders may introduce bias into feature transformations. Additionally, our approach assumes static causal graph structure and does not accommodate temporal dynamics or feedback loops in real-world systems. Future work includes developing robust causal discovery under partial observability, adaptive mechanisms in streaming environments, and extending CAFE to temporal settings. Incorporating human-in-the-loop feedback and domain expertise may enhance interpretability, unlocking the potential of causal-aware AI in safety-critical applications. Ethics Statement This work uses only publicly available tabular datasets under their licenses; no personally identifiable information (PII) or protected health information (PHI) is collected or created, and no human-subjects research was conducted. While CAFE’s causal priors aim to reduce reliance on spurious correlations, automated feature engineering can still propagate or create proxies for sensitive attributes; practitioners should (when legally and ethically permissible) audit subgroup performance, avoid or carefully control sensitive features, and conduct domain reviews before deployment. Our claims are predictive, not prescriptive. CAFE does not estimate treatment effects or confer intervention-level causal guarantees; “causal” refers to soft inductive priors, not immutable truths. Given potential high-stakes use, deployments should include human oversight, post-deployment monitoring, and compliance with applicable regulations and institutional governance. We document assumptions (causal sufficiency, linear discovery, mechanism-preserving shifts), limitations, and robustness diagnostics so users can assess suitability in their domains. Reproducibility Statement To ensure reproducibility, detailed implementation instructions, hyperparameters, and evaluation protocols for CAFE are provided in the Appendix. The source code and configurations will be provided upon request. References [1] N. Abhyankar, P. Shojaee, and C. K. Reddy (2025) LLM-fe: automated feature engineering for tabular data with llms as evolutionary optimizers. arXiv preprint arXiv:2503.14434. Cited by: §1, §5. [2] S. Banerjee, T. Chattopadhyay, A. Pal, and U. Garain (2018-06) Automation of feature engineering for iot analytics. SIGBED Rev. 15 (2), p. 24–30. External Links: Link, Document Cited by: §5. [3] D. M. Blei, A. Y. Ng, and M. I. Jordan (2003-03) Latent dirichlet allocation. J. Mach. Learn. Res. 3 (null), p. 993–1022. External Links: ISSN 1532-4435 Cited by: §4.1. [4] X. Chen, Q. Lin, C. Luo, X. Li, H. Zhang, Y. Xu, Y. Dang, K. Sui, X. Zhang, B. Qiao, et al. (2019) Neural feature search: a neural architecture for automated feature engineering. In 2019 IEEE International Conference on Data Mining (ICDM), p. 71–80. Cited by: §1, §5. [5] X. Chen, B. Qiao, W. Zhang, W. Wu, M. Chintalapati, D. Zhang, Q. Lin, C. Luo, X. Li, H. Zhang, Y. Xu, Y. Dang, K. Sui, and X. Zhang (2019) Neural feature search: A neural architecture for automated feature engineering. In 2019 IEEE International Conference on Data Mining, ICDM 2019, Beijing, China, November 8-11, 2019, J. Wang, K. Shim, and X. Wu (Eds.), p. 71–80. External Links: Link, Document Cited by: §4.1, §5. [6] D. M. Chickering (2002) Optimal structure identification with greedy search. Journal of machine learning research 3 (Nov), p. 507–554. Cited by: §3.2. [7] T. Gao and Q. Ji (2017) Efficient score-based markov blanket discovery. International Journal of Approximate Reasoning 80, p. 277–293. Cited by: §5. [8] N. Gong, C. K. Reddy, W. Ying, H. Chen, and Y. Fu (2025) Evolutionary large language model for automated feature transformation. In Proceedings of the AAAI conference on artificial intelligence, Vol. 39, p. 16844–16852. Cited by: §1, §4.1, §5. [9] F. Horn, R. Pack, and M. Rieger (2019) The autofeat python library for automated feature engineering and selection. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, p. 111–120. Cited by: §1, §4.1, §5. [10] M. Kalisch and P. Bühlman (2007) Estimating high-dimensional directed acyclic graphs with the pc-algorithm.. Journal of Machine Learning Research 8 (3). Cited by: §3.2. [11] J. M. Kanter and K. Veeramachaneni (2015) Deep feature synthesis: towards automating data science endeavors. In 2015 IEEE International Conference on Data Science and Advanced Analytics (DSAA), Vol. , p. 1–10. External Links: Document Cited by: §1, §5. [12] U. Khurana, H. Samulowitz, and D. S. Turaga (2018) Feature engineering for predictive modeling using reinforcement learning. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, S. A. McIlraith and K. Q. Weinberger (Eds.), p. 3407–3414. External Links: Link, Document Cited by: §4.1, §5. [13] U. Khurana, D. Turaga, H. Samulowitz, and S. Parthasrathy (2016) Cognito: automated feature engineering for supervised learning. In 2016 IEEE 16th International Conference on Data Mining Workshops (ICDMW), Vol. , p. 1304–1307. External Links: Document Cited by: §5. [14] A. Lamsaf, R. Carrilho, J. C. Neves, and H. Proença (2025) Causality, machine learning, and feature selection: a survey. Sensors 25 (8), p. 2373. Cited by: §5. [15] K. Liu, Y. Fu, L. Wu, X. Li, C. Aggarwal, and H. Xiong (2021) Automated feature selection: a reinforcement learning perspective. IEEE Transactions on Knowledge and Data Engineering 35 (3), p. 2272–2284. Cited by: §1, §5. [16] A. V. Malarkkan, H. Bai, A. Kaushik, and Y. Fu (2025) DELTA: variational disentangled learning for privacy-preserving data reprogramming. arXiv preprint arXiv:2509.00693. Cited by: §1. [17] A. V. Malarkkan, D. Wang, H. Bai, and Y. Fu (2025) Incremental causal graph learning for online cyberattack detection in cyber-physical infrastructures. IEEE Transactions on Big Data (), p. 1–12. External Links: Document Cited by: §5. [18] D. Margaritis and S. Thrun (1999) Bayesian network induction via local neighborhoods. Advances in neural information processing systems 12. Cited by: §5. [19] R. Moraffah, P. Sheth, S. Vishnubhatla, and H. Liu (2024) Causal feature selection for responsible machine learning. arXiv preprint arXiv:2402.02696. Cited by: §5. [20] J. Peters, P. Bühlmann, and N. Meinshausen (2016) Causal inference by using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society Series B: Statistical Methodology 78 (5), p. 947–1012. Cited by: §3.1, §3.1. [21] S. Shimizu (2014) LiNGAM: non-gaussian methods for estimating causal structures. Behaviormetrika 41 (1), p. 65–98. Cited by: §3.2. [22] Y. Sun, W. Qin, J. Hu, H. Xu, and P. Z. Sun (2023) A causal model-inspired automatic feature-selection method for developing data-driven soft sensors in complex industrial processes. Engineering 22, p. 82–93. Cited by: §5. [23] B. Tran, B. Xue, and M. Zhang (2016) Genetic programming for feature construction and selection in classification on high-dimensional data. Memetic Computing 8 (1), p. 3–15. Cited by: §5. [24] I. Tsamardinos, C. F. Aliferis, A. R. Statnikov, and E. Statnikov (2003) Algorithms for large scale markov blanket discovery.. In FLAIRS, Vol. 2, p. 376–81. Cited by: §1, §5. [25] D. Wang, Y. Fu, K. Liu, X. Li, and Y. Solihin (2022) Group-wise reinforcement feature generation for optimal and explainable representation space reconstruction. External Links: 2205.14526 Cited by: §4.1, §5. [26] D. Wang, Y. Fu, K. Liu, X. Li, and Y. Solihin (2022) Group-wise reinforcement feature generation for optimal and explainable representation space reconstruction. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, p. 1826–1834. Cited by: §1, §5. [27] H. Wang, J. Li, and G. Zhu (2023) A data feature extraction method based on the notears causal inference algorithm. Applied Sciences 13 (14), p. 8438. Cited by: §1, §5. [28] L. Yao and Z. Ge (2023) Causal variable selection for industrial process quality prediction via attention-based gru network. Engineering Applications of Artificial Intelligence 118, p. 105658. Cited by: §1, §5. [29] W. Ying, C. Wei, N. Gong, X. Wang, H. Bai, A. V. Malarkkan, S. Dong, D. Wang, D. Zhang, and Y. Fu (2025) A survey on data-centric ai: tabular learning from reinforcement learning and generative ai perspective. arXiv preprint arXiv:2502.08828. Cited by: §5. [30] K. Yu, X. Guo, L. Liu, J. Li, H. Wang, Z. Ling, and X. Wu (2020) Causality-based feature selection: methods and evaluations. ACM Computing Surveys (CSUR) 53 (5), p. 1–36. Cited by: §1, §5. [31] K. Yu, L. Liu, and J. Li (2021) A unified view of causal and non-causal feature selection. ACM Transactions on Knowledge Discovery from Data (TKDD) 15 (4), p. 1–46. Cited by: §5. [32] X. Zhang, J. Zhang, B. Rekabdar, Y. Zhou, P. Wang, and K. Liu (2024) Dynamic and adaptive feature generation with llm. arXiv preprint arXiv:2406.03505. Cited by: §1, §5. [33] X. Zheng, B. Aragam, P. Ravikumar, and E. P. Xing (2018) DAGs with no tears: continuous optimization for structure learning. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, NIPS’18, Red Hook, NY, USA, p. 9492–9503. Cited by: §3.2. Appendix A Algorithm, Theoretical Analysis and Formal Foundations A.1 Causal Assumptions and Scope Assumption 1 (Structural Causal Model). The data generating process follows a Structural Causal Model (SCM) with variables =(X1,…,Xd)X=(X_1,…,X_d) and target Y, where each variable follows: Xj:=fj(PAj,εj),Y:=fY(PAY,εY)X_j:=f_j(PA_j, _j), Y:=f_Y(PA_Y, _Y) with parents PAj⊂∖XjPA_j \X_j\, noise terms εj _j, and functions fjf_j. Assumption 2 (Causal Sufficiency). All common causes of the observed variables are included in the variable set, i.e., no unobserved confounders exist between any pair of variables. Assumption 3 (Mechanism Stability). Under distribution shift from P(,Y)P(X,Y) to P′(,Y)P (X,Y), the conditional distributions remain invariant: P(Xj|PAj)=P′(Xj|PAj)P(X_j|PA_j)=P (X_j|PA_j) for all j, and P(Y|PAY)=P′(Y|PAY)P(Y|PA_Y)=P (Y|PA_Y). Definition 1 (Causal Ancestry). For variables Xi,XjX_i,X_j in DAG G, we define: • XiX_i is a direct cause of XjX_j if (Xi,Xj)∈E()(X_i,X_j)∈ E(G) • XiX_i is an indirect cause of XjX_j if there exists a directed path Xi↝XjX_i X_j in G of length ≥2≥ 2 • XiX_i is causally irrelevant to XjX_j if no directed path exists from XiX_i to XjX_j A.2 Theoretical Justification for Causal Feature Engineering Proposition 2 (Causal Feature Invariance). Under Assumptions 1-3, let ϕ:ℝ|S|→ℝφ:R^|S| be a measurable transformation applied to feature set S⊆S . If S∩An(Y)≠∅S (Y)≠ where An(Y)An(Y) denotes the ancestors of Y in the true DAG, then: E[Y|ϕ(S)] is more stable under mechanism-preserving shifts than E[Y|ϕ(S′)]E[Y|φ(S)] is more stable under mechanism-preserving shifts than E[Y|φ(S )] where S′∩An(Y)=∅S (Y)= . Proof Sketch. By the causal Markov property and invariance of conditional mechanisms (Assumption 3), transformations of causal ancestors preserve the structural relationship to Y. Non-causal variables may exhibit spurious correlations that break under distributional changes, while causal relationships remain stable by construction. ∎ Corollary 1 (Causal Hierarchy for Feature Engineering). The stability ranking for feature transformations follows: Direct causes >> Indirect causes >> Non-causal variables, providing theoretical justification for our causal grouping strategy. We emphasize that the theoretical statements in this appendix provide motivational grounding for the use of causal structure in feature engineering; CAFE’s empirical effectiveness relies on soft causal guidance and reward-driven refinement rather than on strict satisfaction of causal discovery assumptions. A.3 Multi-Agent Decision Factorization Analysis Proposition 3 (Multi-Agent Factorization Benefits). Consider the joint action space =1×o×2A=A_1×A_o×A_2 with |1|=3|A_1|=3, |o|=O|A_o|=O, |2|=3|A_2|=3. While both the joint and factorized approaches have the same action space complexity O(3O)=O(O)O(3O)=O(O), the factorized approach offers computational advantages through: 1. Parameter efficiency: Learning three Q-functions with parameter counts O(3s)O(3s), O(Os)O(Os), and O(3s)O(3s) respectively (where s is state dimension) versus one joint Q-function with O(3Os)O(3Os) parameters. 2. Sample efficiency: Each agent learns a simpler state-action mapping, potentially requiring fewer samples to converge. 3. Estimation variance: Under independence assumptions, the factorized estimator can achieve lower variance: Var[Q^1+Q^o+Q^2]≤Var[Q^1]+Var[Q^o]+Var[Q^2]Var[ Q_1+ Q_o+ Q_2] [ Q_1]+Var[ Q_o]+Var[ Q_2]. Algorithm 1 CAFE: Causally-Guided Automated Feature Engineering 0: Dataset D, operator library O, hyperparameters (Appendix) 0: Optimal feature set ℱ∗F^* 1: Phase I: Learn causal DAG G via NOTEARS-Lasso (Eq. 2) 2: Form causal groups direct∗,indirect∗,other∗C_direct^*,C_indirect^*,C_other^* (Eq. 4) 3: Phase I: Initialize DQN agents π1,πo,π2 _1, _o, _2 with experience replay buffers 4: ℱbest←ℱoriginalF_best _original, best_score ← baseline_performance 5: for episode =1=1 to EmaxE_ do 6: ℱcurrent←ℱoriginalF_current _original 7: for step =1=1 to SmaxS_ do 8: 1∼π1(st(1))C_1 _1(s_t^(1)), o∼πo(st(o))o _o(s_t^(o)), 2∼π2(st(2))C_2 _2(s_t^(2)) # Agent cascade 9: Apply causal-guided sampling within selected groups 10: ℱg←F^g← GenerateFeatures(1,o,2)(C_1,o,C_2) with safety guards 11: ℱcurrent←F_current← TwoStagePruning(ℱcurrent∪ℱg)(F_current ^g) 12: Rt←R_t← ComputeReward(ℱcurrent)(F_current) via Eq. 8 13: Update agents π1,πo,π2 _1, _o, _2 using TD-learning and replay buffers 14: Adapt exploration strategy weights based on performance trend 15: if validation_score >> best_score then 16: ℱbest←ℱcurrentF_best _current, best_score ← validation_score 17: end if 18: if early stopping criteria met then 19: break 20: end if 21: end for 22: end for 23: return ℱ∗=ℱbestF^*=F_best Appendix B Causal Discovery Implementation Details B.1 NOTEARS-Lasso Formulation The NOTEARS-Lasso optimization problem is: minW∈ℝd×d _W ^d× d 12n‖X−XW‖F2+λ‖W‖1 12n\|X-XW\|_F^2+λ\|W\|_1 (10) subject to h(W)=tr(eW∘W)−d=0 h(W)=tr(e^W W)-d=0 (11) where X∈ℝn×dX ^n× d is the data matrix, W is the weighted adjacency matrix, λ>0λ>0 controls sparsity, and h(W)=0h(W)=0 enforces acyclicity via the matrix exponential constraint. Algorithm 2 NOTEARS-Lasso for CAFE 0: Dataset X∈ℝn×dX ^n× d, regularization path Λ=λ1,…,λK =\ _1,…, _K\ 0: Adjacency matrix W∗W^*, causal groups Cdirect,Cindirect,Cother\C_direct,C_indirect,C_other\ 1: for λ∈Λλ∈ do 2: Initialize W(0)←W^(0) 0, ρ←1.0ρ← 1.0, α←0.0α← 0.0 3: repeat 4: Solve: W(k+1)←argminWLρ(W,α(k))W^(k+1)← _WL_ρ(W,α^(k)) via L-BFGS 5: Update: α(k+1)←α(k)+ρh(W(k+1))α^(k+1)←α^(k)+ρ h(W^(k+1)) 6: Update: ρ←min(1.25ρ,1012)ρ← (1.25ρ,10^12) 7: until |h(W(k+1))|<10−8|h(W^(k+1))|<10^-8 and ‖∇L‖2<10−6\|∇ L\|_2<10^-6 8: Store solution: (Wλ,BICλ)(W_λ,BIC_λ) 9: end for 10: Select: W∗←Wλ∗W^*← W_λ^* where λ∗=argminλBICλ^*= _λBIC_λ 11: Construct DAG: =(V,E)G=(V,E) with E=(i,j):|Wij∗|>τE=\(i,j):|W^*_ij|>τ\, τ=0.1τ=0.1 12: Assign causal roles via transitive closure of G 13: return W∗W^*, causal groups B.2 Alternative Causal Discovery Methods To assess robustness to the causal discovery backend, we evaluate four algorithms: Table 2: Causal discovery algorithm comparison on synthetic data (10 datasets, d=20d=20, n=1000n=1000). Algorithm SHD ↓ F1-Score ↑ Runtime (s) CAFE Performance PC Algorithm 8.3±2.18.3± 2.1 0.64±0.080.64± 0.08 12.4±3.212.4± 3.2 0.742±0.0340.742± 0.034 GES 6.7±1.86.7± 1.8 0.71±0.070.71± 0.07 45.7±8.945.7± 8.9 0.756±0.0280.756± 0.028 LiNGAM 7.2±2.07.2± 2.0 0.68±0.090.68± 0.09 8.9±2.18.9± 2.1 0.748±0.0310.748± 0.031 NOTEARS-Lasso 4.9±1.34.9± 1.3 0.78±0.060.78± 0.06 23.1±5.423.1± 5.4 0.773±0.0250.773± 0.025 Key Advantages of NOTEARS-Lasso: 1. Continuous Optimization Framework: Unlike constraint-based methods (PC, FCI) that rely on conditional independence tests, NOTEARS formulates causal discovery as a smooth optimization problem, enabling gradient-based solvers and better scalability. 2. Explicit Sparsity Control: The Lasso regularization provides fine-grained control over graph sparsity through the beta parameter, crucial for feature engineering where we need interpretable causal relationships without spurious edges. 3. Acyclicity as Smooth Constraint: The innovative acyclicity constraint h(W)=tr(eW∘W)−d=0h(W)=tr(e^W W)-d=0 is differentiable, avoiding the combinatorial complexity of traditional DAG constraints. 4. Computational Efficiency: Scales to hundreds of variables with O(p2)O(p^2) complexity per iteration, making it suitable for high-dimensional feature spaces in automated feature engineering. 5. Robustness to Noise: Lasso regularization provides natural robustness to measurement noise and irrelevant variables, common in real-world datasets. Limitations of Alternative Methods: • PC Algorithm: Exponential complexity in maximum degree, poor performance on continuous variables, requires discretization that loses information. • GES (Greedy Equivalence Search): Limited sparsity control, can get trapped in local optima, less effective for dense feature spaces. • LiNGAM: Assumes linear non-Gaussian additive noise model, restrictive for diverse real-world data distributions. • Constraint-based methods: Rely on statistical tests that can be unreliable with finite samples and high dimensions. Empirical Validation: NOTEARS-Lasso has demonstrated superior performance on benchmark datasets and real-world applications, making it the preferred choice for production causal discovery systems. B.3 Non-Linear Causal Discovery with NOTEARS-MLP To evaluate CAFE under non-linear mechanisms, we conducted experiments replacing NOTEARS-Lasso with NOTEARS-MLP. Synthetic Non-Linear SCMs: We generated 3 datasets (n=1000,d=20n=1000,d=20) with known non-linear structures: • Quadratic: Y=X12+X2X3+εY=X_1^2+X_2X_3+ • Exponential: Y=exp(0.5X1)+log(|X2|+1)+εY= (0.5X_1)+ (|X_2|+1)+ • Mixed: Y=X12+sin(πX2)+X3X4+εY=X_1^2+ (π X_2)+X_3X_4+ Results: Table 3 shows NOTEARS-MLP improves accuracy by 3.4–5.1% on non-linear SCMs. Table 3: CAFE with linear vs. non-linear causal discovery on synthetic SCMs. Dataset CAFE-Linear CAFE-MLP MLP Gain Sample Efficiency Quadratic 0.768 0.794 +2.6% -7% episodes Exponential 0.724 0.761 +3.7% -12% episodes Mixed 0.747 0.779 +3.2% -11% episodes Trade-offs: NOTEARS-MLP requires more samples (n≥500n≥ 500) and 3×3× longer Phase I runtime (68 sec vs. 23 sec for d=20d=20). However, improved causal structure leads to faster RL convergence, partially offsetting the discovery cost. B.4 Robustness to Causal Discovery Errors CAFE is explicitly designed to use causal structure as a soft inductive prior rather than as a hard constraint. In Phase I, causal groups guide exploration probabilistically, but all feature groups and operators remain accessible to the RL agents, and empirical validation performance ultimately governs feature selection. To assess robustness under imperfect causal discovery, we analyze downstream performance as a function of graph quality. Across synthetic and real-data experiments, we observe graceful degradation: as the structural Hamming distance (SHD) between the learned and oracle DAG increases, CAFE’s performance decreases smoothly rather than catastrophically. Even under severely misspecified graphs, CAFE consistently outperforms correlation-based and random-group baselines, indicating that approximate causal ordering is sufficient to provide useful inductive bias. This behavior arises from three design choices: (i) causal groups act as exploration hints rather than filters; (i) reward-driven learning can override causal suggestions when they conflict with validation performance; and (i) adaptive exploration increases MI-based and random sampling when causal guidance becomes unreliable (Appendix D). These results confirm that CAFE does not require correct causal identification to be effective, and that causal discovery errors do not propagate unchecked into feature construction. Table 4: CAFE performance degradation vs. graph quality (SHD quartiles). Graph Quality SHD Range CAFE Performance vs. Oracle vs. Random Excellent [0.0,2.0][0.0,2.0] 0.798±0.0210.798± 0.021 −0.8%-0.8\% +12.4%+12.4\% Good (2.0,5.0](2.0,5.0] 0.773±0.0250.773± 0.025 −3.9%-3.9\% +8.8%+8.8\% Fair (5.0,8.0](5.0,8.0] 0.751±0.0310.751± 0.031 −6.7%-6.7\% +5.7%+5.7\% Poor (8.0,∞)(8.0,∞) 0.728±0.0380.728± 0.038 −9.5%-9.5\% +2.4%+2.4\% The soft causal prior approach enables graceful degradation under imperfect causal discovery, maintaining benefits even with moderate graph errors. B.5 Ensemble Causal Discovery for Robustness To assess robustness to graph misspecification, we implemented an ensemble DAG approach combining bootstrap NOTEARS with GES. Methodology: 1. Bootstrap NOTEARS: Run NOTEARS-Lasso 10 times with bootstrap resampling 2. Edge Probability: Compute eij=e_ij= fraction of DAGs containing i→ji→ j 3. Soft Grouping: Assign features to groups based on highest aggregate edge probability 4. Uncertainty Weighting: Scale causal bonus α by edge confidence Results: Table 5 shows ensemble approach improves mean accuracy by 0.2–1.0%. Table 5: Ensemble DAG results. Dataset CAFE (single) CAFE (ensemble) Improvement Wine Red 0.707 0.714 +0.7% German Credit 0.793 0.804 +1.0% OpenML 586 0.810 0.819 +0.9% Ionosphere 0.976 0.978 +0.2% Insights: Ensemble reduces variance by aggregating multiple graph estimates, providing more reliable causal priors. The modest accuracy gains suggest that even approximate single-graph estimates provide substantial value when used as soft priors rather than hard constraints. Appendix C Multi-Agent Architecture Specifications This appendix provides full RL implementation details corresponding to the summarized definitions in Section 3.3, enabling exact reproduction of all experiments. C.1 State Representation Details Dataset-Level Features: sdata∈ℝ8s_data ^8 • Sample size: log(n) (n), dimensionality: log(d) (d) • Target type: binary encoding (classification=1, regression=0) • Missing rate: # missing valuesn×d \# missing valuesn× d • Class imbalance: mincp(y=c)/maxcp(y=c) _cp(y=c)/ _cp(y=c) for classification • Feature correlation: mean pairwise |ρij|| _ij| • Target correlation: mean |ρ(xi,y)||ρ(x_i,y)| • Noise estimate: median R2R^2 from univariate regressions Performance Context: sperf∈ℝ6s_perf ^6 • Current train/validation scores (normalized to [0,1][0,1]) • Score improvements over last 3 steps: Δ1,Δ2,Δ3 _1, _2, _3 • Episode progress: t/Tmaxt/T_ • Best score achieved so far Feature Context: sfeat∈ℝ7+3s_feat ^7+3 • Original feature count: |ℱ0||F_0| • Generated feature count: |ℱtg||F_t^g| • Selected feature count: |ℱts||F_t^s| • Feature density: |ℱts||ℱtg| |F_t^s||F_t^g| • Mean feature importance (from XGBoost) • Feature variance statistics: mean, std of Var(f)Var(f) • Group sizes: |Cdirect|,|Cindirect|,|Cother||C_direct|,|C_indirect|,|C_other| Auxiliary context saux∈ℝ3s_aux ^3 includes: • Normalized episode index • Rolling validation variance • Binary indicator for binary vs multi-class classification Agent-Specific States: st(1)=[sdata,sperf,sfeat,saux]∈ℝ24 s_t^(1)=[s_data,s_perf,s_feat,s_aux] ^24 (12) st(o)=[st(1),OneHot(gselected)]∈ℝ27 s_t^(o)=[s_t^(1),OneHot(g_selected)] ^27 (13) st(2)=[st(o),OneHot(oselected),arity]∈ℝ43 s_t^(2)=[s_t^(o),OneHot(o_selected),arity] ^43 (14) C.2 Network Architectures Each DQN agent uses the following architecture: • Input layer: state dimension (varies by agent) • Hidden layers: [512, 256, 128] with ReLU activation • Dropout: 0.1 after each hidden layer during training • Output layer: linear, dimension = action space size • Weight initialization: Xavier uniform • Batch normalization: applied to first hidden layer Training Configuration: • Optimizer: Adam with α=10−4α=10^-4 (default), β1=0.9 _1=0.9, β2=0.999 _2=0.999 • Experience replay: buffer size = 50,000, batch size = 256 • Target network: hard update every 1000 steps (soft update variant yields similar performance) • Exploration: ε -greedy with εstart=0.95 _start=0.95, εend=0.1 _end=0.1, decay over 1000 steps • Loss function: Huber loss with δ=1.0δ=1.0 Appendix D Reward Function and Exploration Strategy D.1 Complete Reward Specification The reward function combines four components: Rt=Rperf(t)⋅(1+αΨ~causal(t))+λdivH(πt)−λcompC(ℱtg) R_t=R_perf(t)· (1+α _causal(t) )+ _divH( _t)- _compC(F_t^g) (15) Performance Reward: Rperf(t)=100⋅Scoret−Scoret−1max(Scorebaseline,10−6)if improvement−10⋅|Scoret−Scoret−1Scorebaseline|if degradationR_perf(t)= cases100· Score_t-Score_t-1 (Score_baseline,10^-6)&if improvement\\ -10· | Score_t-Score_t-1Score_baseline |&if degradation cases Causal Amplification: Ψ~causal(t)=∑f∈ℱtgwℳ(f)⋅Importance(f)∑f′∈ℱtgImportance(f′) _causal(t)= _f _t^gw_M(f)· Importance(f) _f _t^gImportance(f ) with weights: wdirect=1.0w_direct=1.0, windirect=0.6w_indirect=0.6, wother=0.2w_other=0.2, and α=0.5α=0.5. Exploration Diversity: H(πt)=−∑a∈πt(a)logπt(a)H( _t)=- _a _t(a) _t(a) estimated from action frequencies over a sliding window of size 20. Complexity Penalty: C(ℱtg)=α1|ℱtg|+α2∑f∈ℱtgOpDepth(f)C(F_t^g)= _1|F_t^g|+ _2 _f _t^gOpDepth(f) with α1=0.001 _1=0.001 and α2=0.01 _2=0.01. Hyperparameters: λdiv=0.05 _div=0.05, λcomp=0.001 _comp=0.001 D.2 Adaptive Exploration Strategy The exploration strategy combines three approaches with adaptive weights: Algorithm 3 Adaptive Exploration Strategy 0: Current episode e≥6e≥ 6, performance history Scoreii=1e−1\Score_i\_i=1^e-1 0: Selected exploration strategy 1: if e≤5e≤ 5 then 2: Use default weights: wcausal=0.5w_causal=0.5, wMI=0.3w_MI=0.3, wrandom=0.2w_random=0.2 3: else 4: Compute trend: trend=15∑j=15(Scoree−j−Scoree−j−1)trend= 15 _j=1^5(Score_e-j-Score_e-j-1) 5: if trend>0.01trend>0.01 then 6: /* Performance improving */ 7: wcausal=0.7w_causal=0.7, wMI=0.2w_MI=0.2, wrandom=0.1w_random=0.1 8: else 9: if trend<−0.01trend<-0.01 then 10: /* Performance degrading */ 11: wcausal=0.4w_causal=0.4, wMI=0.3w_MI=0.3, wrandom=0.3w_random=0.3 12: else 13: /* Performance stagnating */ 14: wcausal=0.5w_causal=0.5, wMI=0.3w_MI=0.3, wrandom=0.2w_random=0.2 15: end if 16: end if 17: end if 18: Sample s∼Categorical([wcausal,wMI,wrandom])s ([w_causal,w_MI,w_random]) 19: Apply exploration strategy s Causal-Hierarchical Strategy: • Unary operations: Sample from Cdirect∪CotherC_direct∪ C_other with probabilities [0.7,0.3][0.7,0.3] • Binary operations: Prioritize (Cdirect,Cindirect)(C_direct,C_indirect) and (Cdirect,Cdirect)(C_direct,C_direct) pairs • Operator selection: Weighted by estimated causal relevance D.3 Baseline Method Configurations Statistical Baselines: • Original (ORG): Raw features, no transformation • Random (RDG): Random transformation selection with fixed budget • Exhaustive (ERG): Systematic enumeration with statistical pruning (p<0.05p<0.05) Traditional AFE: • AutoFeat: Multi-stage expansion with significance testing, max depth=2 • Deep Feature Synthesis: Primitive-based construction, max depth=3 • LDA: Latent factor extraction, 10 components Modern RL-based: • NFS: Sequential DQN on individual features, replay buffer=5000 • TTG: Graph-based RL, ε -greedy exploration • GRFG: Multi-agent RL based Feature Generation LLM-based: • ELLM-FT: GPT-4 based feature generation with evolutionary refinement D.4 Statistical Testing Protocol Table 6: Statistical significance analysis with multiple testing correction. Comparison Wilcoxon p Effect Size (r) Interpretation CAFE vs GRFG <0.001<0.001 0.68 Large effect CAFE vs ELLM-FT 0.0030.003 0.51 Medium effect CAFE vs AutoFeat <0.001<0.001 0.62 Large effect CAFE vs NFS <0.001<0.001 0.59 Large effect CAFE vs Original <0.001<0.001 0.84 Large effect Test Selection: Wilcoxon signed-rank test (paired, non-parametric). Appendix E Robustness Analysis E.1 Distribution Shift Simulation Protocol Covariate Shift Generation: For intensity level γ∈0.1,0.3,0.5γ∈\0.1,0.3,0.5\ (low, medium, high): Xij′ X _ij =Xij⋅(1+γϵij)(multiplicative) =X_ij·(1+γ _ij) (multiplicative) (16) Xij′ X _ij =Xij+γσjϵij(additive) =X_ij+γ _j _ij (additive) (17) where ϵij∼(0,1) _ij (0,1) and σj=std(X⋅j) _j=std(X_· j). Mechanism Preservation: We verify that P(Y|PAY)P(Y|PA_Y) remains approximately unchanged by computing: KL-divergence(P(Y|PAY)∥P′(Y|PAY))<0.1KL-divergence(P(Y|PA_Y)\|P (Y|PA_Y))<0.1 Table 7: Robustness under mechanism-preserving distribution shifts (performance degradation %). Lower magnitude indicates stronger robustness. Results are averaged across datasets and seeds. These shifts modify feature or label distributions while preserving underlying causal mechanisms. Shift Type Intensity CAFE GRFG ELLM-FT AutoFeat Covariate Low −4.1±1.8-4.1± 1.8 −12.3±3.2-12.3± 3.2 −11.7±2.9-11.7± 2.9 −15.2±4.1-15.2± 4.1 Medium −12.8±3.4-12.8± 3.4 −31.8±5.7-31.8± 5.7 −29.4±5.1-29.4± 5.1 −34.7±6.8-34.7± 6.8 High −22.1±4.9-22.1± 4.9 −58.7±8.2-58.7± 8.2 −54.3±7.6-54.3± 7.6 −61.2±9.1-61.2± 9.1 Label Low −7.3±2.1-7.3± 2.1 −15.2±3.8-15.2± 3.8 −14.8±3.5-14.8± 3.5 −18.4±4.7-18.4± 4.7 Medium −18.2±4.2-18.2± 4.2 −34.1±6.3-34.1± 6.3 −32.6±5.9-32.6± 5.9 −37.8±7.2-37.8± 7.2 High −31.4±6.1-31.4± 6.1 −52.8±7.9-52.8± 7.9 −49.7±7.3-49.7± 7.3 −55.3±8.6-55.3± 8.6 Scope and limitations. The covariate and label shifts in Table 7 are mechanism-preserving by construction, following standard causal robustness evaluations. While these tests isolate the effect of spurious correlations, they do not capture all real-world deployment shifts (e.g., feature deletion or temporal population drift). See Appendix E.2 for a decomposition of in-distribution vs. out-of-distribution performance, showing that CAFE’s robustness is not achieved at the expense of in-distribution accuracy. E.2 In-distribution vs. out-of-distribution performance decomposition To clarify whether robustness gains arise from sacrificing in-distribution (ID) performance, we explicitly decompose ID and OOD performance across methods using the same evaluation protocol as Section 4.2.3. Table 8 reports average ID performance, OOD performance under covariate shift, and relative degradation. While GRFG and ELLM-FT exhibit substantial drops (28-32%), CAFE maintains strong ID performance while degrading by only 7.1%, indicating that its robustness is not achieved by underfitting or reduced expressivity. Table 8: In-distribution (ID) vs. OOD performance and relative degradation (mean ± std). Method ID Performance OOD Performance Drop (%) GRFG 0.734±0.0380.734± 0.038 0.528±0.0670.528± 0.067 −28.1-28.1 ELLM-FT 0.741±0.0350.741± 0.035 0.503±0.0720.503± 0.072 −32.1-32.1 CAFE (ours) 0.773±0.0320.773± 0.032 0.718±0.0440.718± 0.044 −7.1-7.1 These findings indicate that causal guidance in CAFE improves both in-distribution generalization and robustness, rather than inducing a trade-off between the two. Appendix F Interpretability Analysis F.1 SHAP Stability Methodology For each test instance xix_i, we generate perturbed versions xi(j)j=1100\x_i^(j)\_j=1^100 by adding Gaussian noise: xi(j)=xi+σϵ(j),ϵ(j)∼(0,I)x_i^(j)=x_i+σε^(j), ε^(j) (0,I) SHAP values are computed using TreeSHAP for each perturbed instance, and stability is measured as: SHAP-Stabilityσ=1N∑i=1N1100∑j=1100‖ϕi−ϕi(j)‖22SHAP-Stability_σ= 1N _i=1^N 1100 _j=1^100\| _i- _i^(j)\|_2^2 where ϕi _i are the SHAP values for the original instance and ϕi(j) _i^(j) for the perturbed versions. Table 9: Comprehensive interpretability metrics comparison. Method SHAP Stab. ↓ Feat. Stab. ↑ Causal Cons. ↑ Compactness ↑ Overall GRFG 0.089±0.0120.089± 0.012 0.42±0.080.42± 0.08 0.31±0.060.31± 0.06 0.23±0.050.23± 0.05 2.8/52.8/5 ELLM-FT 0.078±0.0110.078± 0.011 0.38±0.070.38± 0.07 0.28±0.050.28± 0.05 0.31±0.060.31± 0.06 3.0/53.0/5 AutoFeat 0.094±0.0130.094± 0.013 0.51±0.090.51± 0.09 0.25±0.040.25± 0.04 0.19±0.040.19± 0.04 2.7/52.7/5 CAFE 0.043±0.0080.043± 0.008 0.68±0.110.68± 0.11 0.73±0.090.73± 0.09 0.47±0.080.47± 0.08 4.2/54.2/5 Metric Definitions: • Feature Stability: Jaccard similarity of selected features across CV folds • Causal Consistency: Weighted usage of causally relevant features • Compactness: Ratio of selected to generated features Appendix G Computational Analysis and Scalability G.1 Detailed Complexity Analysis Phase I Complexity: Phase I _Phase I =NOTEARS+grouping+screening =T_NOTEARS+T_grouping+T_screening (18) =O(Td3)+O(d2)+O(ndlogd) =O(Td^3)+O(d^2)+O(nd d) (19) =O(Td3) =O(Td^3) (20) Phase I Complexity per Episode: episode _episode =S⋅(decision+generation+evaluation) =S·(T_decision+T_generation+T_evaluation) (21) =S⋅(O(1)+O(kmax2||)+O(n|ℱcurrent|)) =S·(O(1)+O(k_ ^2|O|)+O(n|F_current|)) (22) =O(S⋅n|ℱcurrent|) =O(S· n|F_current|) (23) where S is steps per episode and |ℱcurrent||F_current| is capped at 5d5d. G.2 Memory Optimization Strategies • Intelligent Pruning: Remove features with variance <10−8<10^-8 immediately • Batch Processing: Process feature generation in batches of 100 • Memory Monitoring: Stop generation if memory usage >80%>80\% of available • Feature Capping: Maximum 800 features per episode with priority-based retention Appendix H The Time-Convergence Paradox in Causal Feature Engineering In this section, we address what appears to be a paradoxical aspect of our experimental results: despite CAFE’s higher computational cost per episode, it often requires significantly fewer episodes to reach optimal performance. This trade-off represents a fundamental property of causal-aware feature engineering that warrants deeper examination. H.1 Empirical Evidence Our experiments across 15 benchmark datasets reveal a consistent pattern: • Higher Per-Episode Computational Cost: CAFE episodes require approximately 30-50% more computation time than standard GRFG episodes, depending on the dataset complexity and causal graph structure. • Fewer Episodes to Convergence: CAFE consistently reaches its optimal performance in 40-70% fewer episodes than GRFG across all tested datasets. • Total Time to Optimal Performance: When measuring the total time required to reach optimal performance (episodes × time-per-episode), CAFE is often more efficient overall, particularly for complex datasets with intricate causal relationships. • Feature Efficiency: At the point of performance convergence, CAFE typically generates more focused feature sets with stronger predictive power and better interpretability. Figure 5: Convergence Comparison: CAFE vs GRFG. H.2 Explanation of the Training Time – Feature Convergence Trade-off The apparent paradox can be explained through the lens of exploration-exploitation balance and computational complexity theory: 1. Informed Search vs. Random Exploration: CAFE performs a more computationally intensive but informed search of the feature space, targeting areas likely to yield causal relationships. This contrasts with GRFG’s broader but less directed exploration, which follows a uniform sampling strategy across the feature space. 2. Early Pruning of Unproductive Paths: By incorporating causal knowledge, CAFE avoids many unproductive paths in the feature generation process. The causal-hierarchical exploration strategy eliminates approximately 60-80% of potentially spurious feature combinations, resulting in faster convergence despite higher per-step computational costs. 3. Front-loaded Computation: CAFE’s computational investment is front-loaded—spending more time per episode but requiring fewer episodes overall—versus GRFG’s approach of many faster but less efficient iterations. This amortizes the causal analysis cost across fewer, more productive episodes. 4. Hierarchical Reward Shaping: The causally-shaped reward function provides stronger gradient signals for learning, enabling faster policy convergence in the multi-agent reinforcement learning framework. H.3 Mathematical Analysis Let TepisodeCAFET_episode^CAFE and TepisodeGRFGT_episode^GRFG denote the per-episode computation time, and NepisodesCAFEN_episodes^CAFE and NepisodesGRFGN_episodes^GRFG denote the number of episodes to convergence. The total time to convergence is: TtotalCAFE T_total^CAFE =TepisodeCAFE×NepisodesCAFE =T_episode^CAFE× N_episodes^CAFE (24) TtotalGRFG T_total^GRFG =TepisodeGRFG×NepisodesGRFG =T_episode^GRFG× N_episodes^GRFG (25) Our empirical results show that despite TepisodeCAFE≈1.3−3.0×TepisodeGRFGT_episode^CAFE≈ 1.3-3.0× T_episode^GRFG, we observe NepisodesCAFE≈0.3−0.6×NepisodesGRFGN_episodes^CAFE≈ 0.3-0.6× N_episodes^GRFG, leading to: TtotalCAFETtotalGRFG≈0.6−1.2 T_total^CAFET_total^GRFG≈ 0.6-1.2 (26) This indicates that CAFE achieves comparable or superior total efficiency while providing better feature quality and interpretability. Appendix I Complete Operator Library and Safety Guards I.1 Transformation Operators Based on the actual implementation, CAFE uses the following operators: Unary Operators (11): 1. x x - Square root 2. x2x^2 - Square 3. x3x^3 - Cube 4. sin(x) (x) - Sine function 5. cos(x) (x) - Cosine function 6. tanh(x) (x) - Hyperbolic tangent 7. 1/x1/x - Reciprocal 8. exp(x) (x) - Exponential 9. log(x) (x) - Natural logarithm 10. σ(x)=1/(1+e−x)σ(x)=1/(1+e^-x) - Sigmoid function 11. Preprocessing transformations: StandardScaler, MinMaxScaler, QuantileTransformer Binary Operators (4): 1. x+yx+y - Addition 2. x−yx-y - Subtraction 3. x×yx× y - Multiplication 4. x/yx/y - Division I.2 Safety Mechanisms The implementation relies on NumPy’s built-in handling for most edge cases: Input Validation: • NumPy functions handle domain restrictions (e.g., x x for negative x returns NaN) • Reciprocal operations use NumPy’s protected division behavior • Logarithm operations rely on NumPy’s domain handling Output Validation: • Generated features are validated during the pruning process • Features with excessive missing values or constant values are filtered • Downstream model evaluation handles any remaining numerical issues Operator Selection: The operator set is deliberately conservative, using only well-established mathematical functions that are: • Differentiable (important for gradient-based downstream models) • Numerically stable under typical data ranges • Interpretable for causal reasoning • Computationally efficient for large-scale feature generation I.3 Implementation Notes • All transformations use vectorized NumPy operations for efficiency • Scaling operations (StandardScaler, MinMaxScaler, QuantileTransformer) are applied via scikit-learn transformers • The relatively small operator set (15 total) ensures computational tractability while providing sufficient expressiveness for feature construction Appendix J Hyperparameter Sensitivity and Selection J.1 Grid Search Results We perform a comprehensive grid search over key hyperparameters: Table 10: Hyperparameter sensitivity analysis (mean performance across datasets). Parameter Range Tested Optimal Performance Range Sensitivity Selection Rule λ (NOTEARS) [0.001, 0.1] 0.03 [0.734, 0.773] Medium 3-fold CV α (causal bonus) [0.0, 1.0] 0.5 [0.742, 0.773] Low Fixed at 0.5 Episodes E [10, 50] 30 [0.751, 0.775] Low Early stopping Steps per episode S [5, 25] 15 [0.743, 0.771] Low Fixed kgk_g (group size) [5, 20] 10 [0.758, 0.773] Very Low min(d,15) ( d,15) Learning rate [1e-4, 1e-2] 1e-3 [0.745, 0.773] Medium Fixed ε decay steps [500, 2000] 1000 [0.762, 0.773] Very Low Fixed J.2 Adaptive Hyperparameter Rules • NOTEARS regularization: λ=0.03λ=0.03 with dataset-specific CV selection from 0.01,0.03,0.05\0.01,0.03,0.05\ • Group size: kg=min(⌊d⌋,15)k_g= ( d ,15) (balances coverage and computational cost) • Early stopping: Stop if validation improvement <0.001<0.001 for 3 consecutive episodes • Experience replay: Buffer size scales with complexity: min(10000,100×d) (10000,100× d) Appendix K Failure Mode Analysis and Limitations K.1 Systematic Failure Analysis Table 11: Performance under challenging conditions where CAFE shows limitations. Challenge CAFE Best Method Best Score Gap Root Cause High-dim, low-n (d>nd>n) 0.612±0.0450.612± 0.045 GRFG 0.635±0.0410.635± 0.041 −3.6%-3.6\% Unreliable CD Sparse graphs 0.687±0.0310.687± 0.031 ELLM-FT 0.694±0.0280.694± 0.028 −1.0%-1.0\% Weak causal signal Non-linearities 0.723±0.0270.723± 0.027 AutoFeat 0.734±0.0250.734± 0.025 −1.5%-1.5\% Linear CD assumption Hidden confounders 0.641±0.0440.641± 0.044 GRFG 0.668±0.0390.668± 0.039 −4.0%-4.0\% Sufficiency violation Temporal dynamics 0.658±0.0380.658± 0.038 ELLM-FT 0.671±0.0350.671± 0.035 −1.9%-1.9\% Static DAG K.2 Theoretical Limitations The framework faces several fundamental limitations: 1. Causal Discovery Dependence: CAFE’s effectiveness directly depends on causal discovery quality, creating a single point of failure 2. Linear Mechanism Assumption: NOTEARS-Lasso assumes linear additive noise models, missing complex non-linear relationships 3. Computational Scalability: O(d3)O(d^3) complexity in Phase I becomes prohibitive for d>200d>200 4. Sample Size Requirements: Reliable causal structure learning typically requires n≫dn d, limiting applicability to high-dimensional, small-sample problems 5. Static Assumption: Cannot handle time-varying causal structures or feedback loops K.3 Mitigation Strategies and Future Directions Short-term mitigations: • Graceful degradation: When causal discovery confidence is low, increase weight on mutual information exploration • Regularization adaptation: Use cross-validation to select λ rather than fixed scaling rules • Early detection: Monitor causal graph quality metrics to identify when CAFE may underperform Long-term extensions: • Non-linear causal discovery: Integration with neural causal discovery methods (NOTEARS-MLP, DAG-GNN) • Robust causal inference: Methods that handle hidden confounding and model uncertainty • Temporal extensions: Dynamic causal structure learning for time-series data • Hybrid approaches: Combining multiple causal discovery backends with uncertainty quantification Appendix L Extended Experimental Results L.1 Cross-Model Validation Table 12: Performance across different downstream models (mean F1/1-RAE over 5-fold CV). Method XGBoost Random Forest Linear SVM (RBF) Average Original 0.682±0.0470.682± 0.047 0.671±0.0520.671± 0.052 0.598±0.0780.598± 0.078 0.648±0.0550.648± 0.055 0.6500.650 GRFG 0.734±0.0380.734± 0.038 0.718±0.0430.718± 0.043 0.627±0.0710.627± 0.071 0.691±0.0410.691± 0.041 0.6930.693 ELLM-FT 0.741±0.0350.741± 0.035 0.725±0.0410.725± 0.041 0.634±0.0680.634± 0.068 0.698±0.0380.698± 0.038 0.7000.700 AutoFeat 0.728±0.0390.728± 0.039 0.712±0.0440.712± 0.044 0.618±0.0740.618± 0.074 0.681±0.0420.681± 0.042 0.6850.685 CAFE 0.773 ± 0.032 0.756 ± 0.037 0.662 ± 0.063 0.724 ± 0.035 0.729 Model Configurations: - XGBoost: Default parameters, 100 estimators - Random Forest: 100 estimators, max_depth=10 - Linear: Ridge regression with α=1.0α=1.0 (classification: Logistic with L2) - SVM: RBF kernel, C=1.0, γ=’scale’ L.2 Learning Curves and Convergence Analysis Table 13: Convergence characteristics (episodes to reach 95% of final performance). Method Episodes to Converge Final Performance Efficiency Ratio GRFG 28.4±4.728.4± 4.7 0.734±0.0380.734± 0.038 1.001.00 CAFE 18.3 ± 3.1 0.773 ± 0.032 1.55 Appendix M Reproducibility Checklist M.1 Implementation Details Software Environment: • Python 3.9.18 • PyTorch 1.13.1 • scikit-learn 1.2.0 • XGBoost 1.7.3 • NumPy 1.24.2 • SHAP 0.41.0 Hardware Requirements: • Minimum: 16 GB RAM, 4-core CPU • Recommended: 64 GB RAM, 16-core CPU • GPU: Not required but can accelerate neural network components Random Seeds: • NumPy: 42 • PyTorch: 42 • Scikit-learn: 42 • Cross-validation splits: Fixed with seed 42 Appendix N Future Research Directions The integration of causal discovery with reinforcement learning opens several research avenues addressing current limitations. The most immediate priority involves extending beyond linear assumptions through neural causal discovery methods (NOTEARS-MLP, DAG-GNN) and developing robust approaches for hidden confounders with uncertainty quantification. Time-varying causal structures would enable applications in dynamic environments where relationships evolve. Methodologically, ensemble approaches combining multiple discovery algorithms could address the vulnerability of relying on single methods, while distributed computing could overcome the O(d³) complexity bottleneck. Meta-learning techniques could enable rapid domain adaptation, and active learning could guide experimental design for improved causal structure learning. Applications span domains requiring robust, interpretable features. Scientific discovery could integrate domain knowledge in physics and biology, healthcare applications could maintain clinical interpretability while handling medical confounding, and financial modeling could leverage regulatory changes as natural experiments. Climate science represents a compelling application where robustness to distribution shift addresses the critical need for models that remain valid under unprecedented environmental conditions. Future work will address identified limitations, particularly around non-linear causal relationships, temporal dynamics, and scalability to very high-dimensional settings. The framework provides a solid foundation for advancing the integration of causal reasoning with automated machine learning.