CDCR-SFT: Causal-DAG Construction & Reasoning
- Causal-DAG construction and reasoning (CDCR-SFT) is a framework that trains LLMs to build variable-level DAGs and perform structured causal inference.
- It couples explicit graph modeling with a unified supervision regime that integrates DAG construction, stepwise reasoning traces, and answer generation.
- Empirical evaluations on benchmarks like CLADDER, WIQA, and HaluEval show improved accuracy, reduced hallucinations, and surpassing human performance in certain tasks.
Causal-DAG construction and reasoning (CDCR-SFT) is a supervised fine-tuning framework for LLMs in which the model is trained to explicitly construct a variable-level directed acyclic graph (DAG) and then perform reasoning over that graph. The framework is introduced as a response to logically inconsistent hallucinations that appear coherent yet violate reasoning principles, and it is motivated by the claim that existing approaches such as Chain-of-Thought (CoT) and graph-based variants operate at the linguistic token level rather than modeling the underlying causal relationships between variables, thereby lacking the ability to represent conditional independencies or satisfy causal identification assumptions (Li et al., 17 Aug 2025).
1. Conceptual basis and scope
CDCR-SFT assumes a standard structural causal model over a set of random variables , with causal relations encoded by a DAG , where is the set of variables, is the set of directed edges, and contains no directed cycles. The framework adopts the structural assumptions listed in the source paper: the Causal Markov assumption, under which the joint distribution factorizes as
Faithfulness, and Positivity and Consistency when making interventional or counterfactual queries (Li et al., 17 Aug 2025).
Within this formulation, the distinctive feature of CDCR-SFT is that the LLM does not merely produce a final answer. It is trained to output a full structured inference sequence
where is the textual encoding of the DAG, is a stepwise graph-based reasoning trace referencing , and 0 is the final answer. The framework therefore couples causal graph construction with explicit reasoning over that graph, rather than treating graph generation as an auxiliary annotation or post-processing artifact (Li et al., 17 Aug 2025).
A common misconception is that graph-based prompting and CDCR-SFT are interchangeable. The distinction drawn in the source is narrower and more technical: graph-based prompting may still operate at the token level, whereas CDCR-SFT is defined by explicit supervision on variable-level DAGs, graph-grounded reasoning traces, and validated answers. This suggests that the framework is best understood as a structured supervision regime rather than as a prompting template alone.
2. Formal training objective
The overall training objective is the negative log-likelihood over the output token sequence 1 conditioned on the input question 2:
3
In practice, the framework writes out 4 as plain text and optimizes this single token-level objective (Li et al., 17 Aug 2025).
The paper also gives a decomposition into three intended sub-losses. The DAG construction loss is a cross-entropy over adjacency decisions,
5
where 6 is the ground-truth adjacency and 7 is the predicted probability of the edge 8. The reasoning-trace loss is a token-level cross-entropy over the sub-sequence 9,
0
and the final-answer loss is
1
The total loss is written as
2
The decomposition is presented as a clarification of the intended supervision rather than as a separate implementation path, because the reported implementation optimizes the single NLL over all output tokens (Li et al., 17 Aug 2025).
This objective design places DAG construction, graph-conditioned reasoning, and answer derivation inside one supervised sequence model. A plausible implication is that errors in structure and errors in reasoning are not treated as independent failure modes; they are jointly penalized through the same output sequence.
3. Variable-level DAG generation and graph-grounded reasoning
CDCR-SFT produces the DAG in three phases. First, from the question 3, the model extracts the set of causal variables 4. Each variable is described as a natural-language node with an ID, name, and short description. Second, for each ordered pair 5, the model emits an edge decision and optionally the direction, implemented as a binary classification token for each pair in a linearized DAG template. Third, acyclicity is handled implicitly by training: because the ground-truth DAGs are always acyclic, no extra constraint is needed at inference time, although the paper notes that systems requiring hard guarantees can post-hoc check the adjacency and reject any cycle-forming edge (Li et al., 17 Aug 2025).
The textual DAG format is serialized directly into the output. The example format given in the source is: 2 This serialization makes the graph accessible to the later reasoning trace, which explicitly cites nodes and edges from 6 rather than reasoning over an implicit latent representation (Li et al., 17 Aug 2025).
Once the DAG is constructed, CDCR-SFT performs structured causal inference through the trace 7. The reported reasoning stages are query formulation, trace steps, and final answer derivation. In the trace, the model can formulate a query such as computing the average direct effect of 8 on 9 excluding mediation by another variable, cite graph operations such as blocking a back-door path by conditioning, and, for interventional queries, simulate do-calculus or counterfactual definitions such as 0 (Li et al., 17 Aug 2025).
For the natural direct effect example, the paper gives the formula
1
The model concludes “Yes” if the resulting scalar is positive, and “No” otherwise. The trace is represented in natural-language paragraphs or bullet-steps, but each step is expected to remain explicitly grounded in the constructed graph (Li et al., 17 Aug 2025).
A second misconception is that acyclicity in CDCR-SFT is enforced by a separate symbolic solver. In the reported system, acyclicity is primarily a property of the supervision distribution; hard rejection is only described as an optional post-hoc safeguard.
4. Supervision data and fine-tuning procedure
The supervised dataset for the framework is CausalDR, a 25,368-sample supervised fine-tuning dataset constructed from CLADDER. The base data are described as CLADDER with approximately 6,357 training samples and 1,906 test samples, each with scenario, formal DAG, algebraic derivation, and answer. The generation pipeline prompts DeepSeek-R1 with the CLADDER symbolic structure and asks for JSON containing Nodes, Edges, Reasoning, and Answer; validates that the model’s answer matches the ground truth; retries up to 15 times or discards the sample if needed; and converts the JSON into a natural-language 2 training example (Li et al., 17 Aug 2025).
CausalDR is then expanded through DAG augmentation by randomly permuting node and edge order four times per sample, producing the reported expansion from 6,357 to 25,368 examples. The dataset split is constrained so that there is no graph_id or story_id overlap between train and test. The paper also states that there are 12 canonical DAG types, including Chain, Fork, Collider, Diamond, and Bow-tie, to ensure structural diversity (Li et al., 17 Aug 2025).
Each training example is given as 3 In addition, 10,000 Alpaca instructions are mixed in to preserve general language ability. This indicates that the framework is not trained on causal examples alone, but on a mixture intended to maintain broader instruction-following performance (Li et al., 17 Aug 2025).
The fine-tuning algorithm uses LoRA adapters, freezes the main parameters 3, and trains only the adapters on 4. At inference time, the high-level flow is to generate a textual DAG 5 from the question, parse 6 into variables and edges, generate a reasoning trace 7 conditioned on 8, and then generate the final answer 9. This staged inference procedure mirrors the supervision format rather than collapsing graph construction and reasoning into a single opaque generation pass (Li et al., 17 Aug 2025).
5. Reported empirical performance
The evaluation suites listed for CDCR-SFT are CLADDER, WIQA, and HaluEval. CLADDER is divided into Rung 1 association, Rung 2 intervention, and Rung 3 counterfactual tasks. WIQA includes INPARA and EXOGENOUS perturbations. HaluEval includes Dialogue, QA, and Summarization for hallucination detection. The reported metrics are final-answer accuracy and causal-DAG quality scores, with Node, Edge, and Structural quality judged by GPT-4o-mini on a 0–10 scale (Li et al., 17 Aug 2025).
The main Llama-3.1-8B example reports the following aggregate outcomes:
| Benchmark | CDCR-SFT result | Note |
|---|---|---|
| CLADDER | 95.33% overall | surpasses human 94.8% |
| WIQA | 55.66% overall | +3.3 pp absolute |
| HaluEval | 54.93% overall | 10% improvement |
On CLADDER, the reported rung-wise accuracies for CDCR-SFT are 98.30% on Rung 1, 93.93% on Rung 2, and 93.06% on Rung 3. The paper states that the overall 95.33% accuracy surpasses human performance of 94.8% for the first time, and that counterfactual reasoning on Rung 3 improves by approximately 27.8 percentage points over the best baseline. The listed baselines include CoT, CoT-SC, ToT, GoT, and CausalCoT, all of which perform substantially worse on CLADDER in the reported table (Li et al., 17 Aug 2025).
The same source reports a 10% overall hallucination reduction on HaluEval for Llama-3.1-8B, with similar effects on other LLMs. In addition, the Node, Edge, and Structural causal-DAG quality averages all increase by 1–2 points out of 10 across models once they are fine-tuned with CDCR-SFT. The reported experiment set covers four LLMs across eight tasks, and the abstract attributes the gains to explicit causal structure modeling (Li et al., 17 Aug 2025).
These results are framed around final-answer accuracy and judged DAG quality rather than around exact graph-recovery metrics such as SHD or SID. This suggests that the framework is evaluated primarily as an LLM reasoning system with explicit structure, not as a standalone causal-discovery algorithm in the classical statistical sense.
6. Relation to broader DAG-construction research
CDCR-SFT belongs to a wider landscape of DAG construction, refinement, and reasoning methods, but its supervision regime is distinctive. In search-space reduction for structure learning, “Causal Homotopy” maps DAGs to finite Alexandroff spaces, learns a 0 poset and its order topology, extracts the unique core by beat-point removal, and enumerates one representative per homotopy-equivalent class before scoring candidate structures. The source states that this can reduce the candidate-DAG space by 3–6 orders of magnitude, and it explicitly presents the method as a module that can be inserted before DAG enumeration in a generic CDCR-SFT-style pipeline (Mahadevan, 2021).
Other lines of work address DAG construction through different optimization objects. “Supervised Whole DAG Causal Discovery” formulates full adjacency prediction as supervised learning from observational samples using permutation-equivariant models (Li et al., 2020). CASPER revises differentiable score-based DAG learning by integrating graph structure into the score function through a dynamic causal space (Liu et al., 2023). CausalSAGE starts from a partial ancestral graph, expands discrete variables into state-level representations, constrains the search space with structural knowledge and soft priors, and optimizes a unified differentiable objective to obtain a final DAG (Huang et al., 1 Mar 2026). This situates CDCR-SFT among methods that construct DAGs under supervised, score-based, and refinement-based paradigms rather than under a single canonical workflow.
There are also settings in which a full variable-level DAG is not specified. Cluster DAGs permit relationships to be specified between clusters of variables while leaving within-cluster relations unspecified, and the cited work proves soundness and completeness for d-separation, do-calculus, ID, and counterfactual reasoning at the cluster level (Anand et al., 2022). By contrast, CDCR-SFT is explicitly trained to generate variable-level DAGs. A plausible implication is that cluster-level abstractions could serve as an intermediate representation when variable-level elicitation is unavailable, but that extension is not part of the reported CDCR-SFT framework.
Finally, model selection and validation without ground truth appear in parallel literature. The Markov Checker and Cross-Algorithm Frugality Search test whether candidate DAGs satisfy the Markov condition and prefer minimal-edge models among those that pass, without requiring access to the true causal graph (Ramsey et al., 2024). That line addresses the acceptance or rejection of candidate DAGs from data, whereas CDCR-SFT addresses the supervised generation of 1 sequences. Together, these works indicate that “construction” in causal-DAG research spans at least three distinct tasks: statistical recovery from data, refinement or pruning of graph candidates, and graph-grounded reasoning in LLMs.