Graph Surgery and the Do-Operator: A Precise Correspondence for Acyclic Structural Causal Models
Summary
This paper establishes a precise mathematical correspondence between graph surgery and the do-operator in acyclic structural causal models, proving their equivalence in terms of dependency graphs.
View Cached Full Text
Cached at: 08/19/26, 10:09 AM
# Graph Surgery and the Do-Operator
Source: [https://arxiv.org/html/2608.17634](https://arxiv.org/html/2608.17634)
A Precise Correspondence for Acyclic Structural Causal Models
###### Abstract
Thedo\\doexpr\-operator is described graphically by deleting arrows into its targets and functionally by replacing their mechanisms with constants\. To call these operations equivalent is not yet a mathematical statement: one returns a graph and remembers only the targets, whereas the other returns mechanisms and also remembers the imposed values\. We make a dependency\-level comparison precise for deterministic acyclic structural causal models with finitely many endogenous variables\. IfGraph\(F\)\\Graph\(F\)extracts the dependencies of a mechanism familyFF, our main theorem is
Graph\(Fι\)=Surg\(Graph\(F\),Tι\)\.\\Graph\(F^\{\\iota\}\)=\\Surg\\bigl\(\\Graph\(F\),T\_\{\\iota\}\\bigr\)\.Thus replacing target mechanisms removes exactly the dependencies removed by graph surgery\. For a modelM=\(G,F\)M=\(G,F\)whose graph may contain unused arrows, we characterize when the same equality holds withGGin place ofGraph\(F\)\\Graph\(F\); it holds for every intervention exactly whenGGrecords the dependencies ofFFexactly\. We then define the intervened model, characterize its run, show how sequential interventions combine, and prove that an outcome depends only on interventions at its actual dependency ancestors\.
###### Keywords:
Structural causal models Interventions Do\-operator Graph surgery Dependency graphs\.
## 1Introduction
Thedo\\doexpr\-operator is the standard notation for an intervention in a structural causal model\[[4](https://arxiv.org/html/2608.17634#bib.bib4)\]\. An expression such asdo\(A=a\)\\doexpr\(A=a\)says thatAAis no longer computed by its ordinary mechanism: it is supplied by the experimenter and held ataa\. A formal semantics should identify the resulting model and explain how it behaves\.
Zhang conjectured that deleting incoming arrows and replacing mechanisms by constants are equivalent views of intervention\[[6](https://arxiv.org/html/2608.17634#bib.bib6), Sec\. 6\.4\]\. The word “equivalent” needs to be made precise\. Graph surgery and mechanism replacement are not literally the same operation: they act on different objects and, more importantly, graph surgery cannot distinguishdo\(A=0\)\\doexpr\(A=0\)fromdo\(A=1\)\\doexpr\(A=1\)\. A natural comparison is between the dependencies that remain\. We formulate that comparison and prove it for deterministic acyclic structural causal models with finitely many endogenous variables\.
Our starting point is a causal modelM≔\(G,F\)M\\coloneqq\(G,F\)with two components\. The directed acyclic graphGGdescribes which variables may directly affect which others, and the mechanism familyFFsays how their values are computed\. Compatibility requires every dependency used byFFto occur as an arrow ofGG; it does not require every arrow to be used\. We call the model exact when the arrows ofGGare precisely the dependencies ofFF\. For an exogenous stateuu,Run\(M,u\)\\Run\(M,u\)is the unique world generated by the mechanisms\.
We represent a simultaneous intervention by a type\-respecting partial mapι\\iotaonVV, whose domainTιT\_\{\\iota\}is its target set\. On the graph,Surg\(G,Tι\)\\Surg\(G,T\_\{\\iota\}\)deletes the arrows entering the targets\. In the equations,FιF^\{\\iota\}replaces the corresponding mechanisms with the constants supplied byι\\iota\. Our central result says that the same dependency graph is reached in either order: update the mechanisms and then extract their dependencies, or first extract the dependencies and then perform graph surgery\. When the supplied graphGGis exact, this is also the graph obtained by performing surgery directly onGG\.
Our main results are:
1. 1\.an exact correspondence between graph surgery and constant mechanism replacement \(Theorem[3\.1](https://arxiv.org/html/2608.17634#S3.Thmtheorem1)\);
2. 2\.a characterization of when this correspondence agrees with the graph supplied as part of a causal model \(Corollary[1](https://arxiv.org/html/2608.17634#Thmcorollary1)\);
3. 3\.a law for combining sequential interventions, including the fact that a later assignment replaces an earlier one \(Theorem[4\.1](https://arxiv.org/html/2608.17634#S4.Thmtheorem1)\); and
4. 4\.an ancestor theorem: the value of a set of variables depends only on the part of the intervention applied to their actual dependency ancestors \(Theorem[5\.1](https://arxiv.org/html/2608.17634#S5.Thmtheorem1)\)\.
## 2Structural causal models
LetVVbe a finite set of endogenous variables\. Eachv∈Vv\\in Vhas a nonempty value set𝒳v\\mathcal\{X\}\_\{v\}\. Let
𝒳≔∏v∈V𝒳v\\mathcal\{X\}\\coloneqq\\prod\_\{v\\in V\}\\mathcal\{X\}\_\{v\}be the set of complete assignments, which we call*worlds*\. ForS⊆VS\\subseteq V, writexSx\_\{S\}for the restriction of a worldx∈𝒳x\\in\\mathcal\{X\}toSS\. Let𝒰\\mathcal\{U\}be a nonempty set of exogenous states\. An elementu∈𝒰u\\in\\mathcal\{U\}may collect local disturbances, shared background factors, or any other information fixed outside the endogenous equations\. No probability law is needed\.
A mechanism family onVVis a collection of functions
Fv:𝒰×𝒳⟶𝒳v\(v∈V\)\.F\_\{v\}:\\mathcal\{U\}\\times\\mathcal\{X\}\\longrightarrow\\mathcal\{X\}\_\{v\}\\qquad\(v\\in V\)\.
We give every mechanism the common domain𝒰×𝒳\\mathcal\{U\}\\times\\mathcal\{X\}deliberately\. This avoids building an a priori parent set into the type ofFvF\_\{v\}and lets the dependencies be recovered from the functions themselves: a coordinate thatFvF\_\{v\}ignores contributes no arrow\. Compatibility will require every coordinate that can affectFvF\_\{v\}to be permitted byGG, while acyclicity will make the resulting equations evaluable in topological order\.
###### Definition 1\(Dependency graph\)
A mechanismFvF\_\{v\}*depends on*w∈Vw\\in Vif changing onlywwcan change the value returned byFvF\_\{v\}\. That is, there areu∈𝒰u\\in\\mathcal\{U\}and worldsx,y∈𝒳x,y\\in\\mathcal\{X\}that agree at every variable except possiblyww, but for whichFv\(u,x\)≠Fv\(u,y\)F\_\{v\}\(u,x\)\\neq F\_\{v\}\(u,y\)\. The dependency graph ofFF, writtenGraph\(F\)\\Graph\(F\), has vertex setVVand an arroww→vw\\to vexactly whenFvF\_\{v\}depends onww\.
Thus the graph records actual rather than merely permitted dependencies\.
###### Definition 2\(Causal model\)
A deterministic acyclic structural causal model is a pairM≔\(G,F\)M\\coloneqq\(G,F\), whereGGis a directed acyclic graph andFFis a mechanism family compatible with it: every arrow ofGraph\(F\)\\Graph\(F\)is also an arrow ofGG\. A variablewwis a parent ofvvwhenGGhas an arroww→vw\\to v\. The model is*exact*whenG=Graph\(F\)G=\\Graph\(F\)\.
Compatibility gives the graph and mechanisms distinct roles\. The graph says which dependencies are permitted; the mechanisms determine which of them are used in a particular model\. For example,GGmay containw→vw\\to veven whenFvF\_\{v\}ignoresww; such a model is compatible but not exact\. AlthoughFvF\_\{v\}is written with a whole world as input, compatibility ensures that its value depends only on the parents ofvv\.
###### Lemma 1\(Only parents matter\)
IfM=\(G,F\)M=\(G,F\)is a causal model and two worldsx,y∈𝒳x,y\\in\\mathcal\{X\}agree on every parent ofvv, then
Fv\(u,x\)=Fv\(u,y\)F\_\{v\}\(u,x\)=F\_\{v\}\(u,y\)for everyu∈𝒰u\\in\\mathcal\{U\}\.
###### Proof
The setVVis finite\. Pass fromxxtoyyby changing one variable at a time\. Only nonparents need to be changed\. Ifwwis not a parent ofvv, compatibility implies thatw→vw\\to vis not an arrow ofGraph\(F\)\\Graph\(F\)\. By Definition[1](https://arxiv.org/html/2608.17634#Thmdefinition1), changingwwalone therefore leaves the value returned byFvF\_\{v\}unchanged\.
###### Lemma 2\(Unique evaluation\)
For every causal modelM=\(G,F\)M=\(G,F\)and exogenous stateu∈𝒰u\\in\\mathcal\{U\}, there is exactly one worldx∈𝒳x\\in\\mathcal\{X\}satisfying
xv=Fv\(u,x\)\(v∈V\)\.x\_\{v\}=F\_\{v\}\(u,x\)\\qquad\(v\\in V\)\.
###### Proof
Order the variables asv1,…,vnv\_\{1\},\\ldots,v\_\{n\}so that every parent comes before its children\. Construct a world in that order\. At stepkk, fill the unassigned coordinates arbitrarily and evaluateFvkF\_\{v\_\{k\}\}\. Its parents already have values, so Lemma[1](https://arxiv.org/html/2608.17634#Thmlemma1)makes the result independent of those temporary choices\. Use it asxvkx\_\{v\_\{k\}\}\. The completed world satisfies every equation\.
Ifxxandyyboth satisfy the equations, induction along the same order shows that they agree\. Indeed, they agree at the parents ofvkv\_\{k\}, so Lemma[1](https://arxiv.org/html/2608.17634#Thmlemma1)givesFvk\(u,x\)=Fvk\(u,y\)F\_\{v\_\{k\}\}\(u,x\)=F\_\{v\_\{k\}\}\(u,y\), and hencexvk=yvkx\_\{v\_\{k\}\}=y\_\{v\_\{k\}\}\.
###### Definition 3\(Run\)
For a modelM=\(G,F\)M=\(G,F\)and exogenous stateu∈𝒰u\\in\\mathcal\{U\}, defineRun\(M,u\)\\Run\(M,u\)to be the unique worldx∈𝒳x\\in\\mathcal\{X\}such that
xv=Fv\(u,x\)for everyv∈V\.x\_\{v\}=F\_\{v\}\(u,x\)\\qquad\\text\{for every \}v\\in V\.
## 3Thedo\\doexpr\-operator
An intervention supplies values at some variables and leaves all others unspecified\. We represent it by listing values only for the variables it targets\.
###### Definition 4\(Intervention\)
An interventionι\\iotais a type\-respecting partial map onVV\. Its domainTι≔dom\(ι\)⊆VT\_\{\\iota\}\\coloneqq\\operatorname\{dom\}\(\\iota\)\\subseteq Vis the target set, andι\(v\)∈𝒳v\\iota\(v\)\\in\\mathcal\{X\}\_\{v\}for everyv∈Tιv\\in T\_\{\\iota\}\. We writeιv≔ι\(v\)\\iota\_\{v\}\\coloneqq\\iota\(v\)\. The empty intervention is the empty map, written∅\\varnothing\. ForS⊆VS\\subseteq V,ι\|S\\iota\|\_\{S\}denotes the ordinary restriction ofι\\iotatoSS\. WhenTι=\{A\}T\_\{\\iota\}=\\\{A\\\}andιA=a\\iota\_\{A\}=a, we write the intervention asdo\(A=a\)\\doexpr\(A=a\)\.
###### Definition 5\(Graph surgery\)
For a directed graphGGonVVand a target setT⊆VT\\subseteq V,Surg\(G,T\)\\Surg\(G,T\)has the same vertices asGGand deletes exactly the arrows entering vertices inTT\.
Graph surgery depends only on the target set and does not record the values imposed there\. Those values enter through the following change to the mechanisms\.
###### Definition 6\(Mechanism replacement\)
For a mechanism familyFFonVVand interventionι\\iota, defineFιF^\{\\iota\}by
Fvι\(u,x\)≔\{ιv,v∈Tι,Fv\(u,x\),v∉Tι\.F^\{\\iota\}\_\{v\}\(u,x\)\\coloneqq\\begin\{cases\}\\iota\_\{v\},&v\\in T\_\{\\iota\},\\\\ F\_\{v\}\(u,x\),&v\\notin T\_\{\\iota\}\.\\end\{cases\}
###### Example 1\(A three\-variable intervention\)
LetV≔\{A,B,C\}V\\coloneqq\\\{A,B,C\\\}, let every endogenous value set beℝ\\mathbb\{R\}, and let𝒰≔ℝ2\\mathcal\{U\}\\coloneqq\\mathbb\{R\}^\{2\}\. Foru=\(uA,uB\)u=\(u\_\{A\},u\_\{B\}\), define
FA\(u,x\)≔uA,FB\(u,x\)≔xA\+uB,FC\(u,x\)≔2xB\.F\_\{A\}\(u,x\)\\coloneqq u\_\{A\},\\qquad F\_\{B\}\(u,x\)\\coloneqq x\_\{A\}\+u\_\{B\},\\qquad F\_\{C\}\(u,x\)\\coloneqq 2x\_\{B\}\.ThusGraph\(F\)\\Graph\(F\)is the chain
A⟶B⟶C\.A\\longrightarrow B\\longrightarrow C\.Ifι≔do\(B=7\)\\iota\\coloneqq\\doexpr\(B=7\), thenFBιF^\{\\iota\}\_\{B\}is the constant77, while the other two mechanisms are unchanged\. HenceGraph\(Fι\)\\Graph\(F^\{\\iota\}\)consists only ofB→CB\\to C, exactly the graph obtained by deleting the arrow enteringBB\. The updated equations have the unique solution
\(A,B,C\)=\(uA,7,14\)\.\(A,B,C\)=\(u\_\{A\},7,14\)\.
###### Theorem 3\.1\(Graph–mechanism correspondence\)
For every mechanism familyFFonVVand interventionι\\iota,
Graph\(Fι\)=Surg\(Graph\(F\),Tι\)\.\\Graph\(F^\{\\iota\}\)=\\Surg\\bigl\(\\Graph\(F\),T\_\{\\iota\}\\bigr\)\.
###### Proof
Fix two variablesw,v∈Vw,v\\in V\. Ifvvis a target, thenFvιF^\{\\iota\}\_\{v\}is constant, so no arrow entersvvinGraph\(Fι\)\\Graph\(F^\{\\iota\}\); graph surgery likewise deletes every arrow enteringvv\. Ifvvis not a target, thenFvι=FvF^\{\\iota\}\_\{v\}=F\_\{v\}, sow→vw\\to vis an arrow ofGraph\(Fι\)\\Graph\(F^\{\\iota\}\)exactly when it is an arrow ofGraph\(F\)\\Graph\(F\); graph surgery leaves all such arrows unchanged\. The two graphs therefore have the same arrows\.
The identity compares the graphical and functional descriptions at the level of dependencies\. A separate question is whether surgery on a graphGGsupplied with the model gives that same graph\.
###### Corollary 1\(Agreement with the supplied graph\)
LetM=\(G,F\)M=\(G,F\)be a causal model and letι\\iotabe an intervention\. ThenFιF^\{\\iota\}is compatible withSurg\(G,Tι\)\\Surg\(G,T\_\{\\iota\}\)\. Moreover,
Graph\(Fι\)=Surg\(G,Tι\)\\Graph\(F^\{\\iota\}\)=\\Surg\(G,T\_\{\\iota\}\)if and only if every arrow ofGGthat is absent fromGraph\(F\)\\Graph\(F\)enters an intervention target\. Consequently, the equality holds for every intervention if and only ifMMis exact\.
###### Proof
Compatibility says thatGraph\(F\)\\Graph\(F\)is a subgraph ofGG\. Applying the same surgery to both graphs preserves this relation, and Theorem[3\.1](https://arxiv.org/html/2608.17634#S3.Thmtheorem1)identifies the smaller graph withGraph\(Fι\)\\Graph\(F^\{\\iota\}\)\. This proves compatibility after intervention\.
The two surgically modified graphs are equal exactly when no extra arrow survives\. An arrow survives surgery exactly when it does not enter a target\. Thus equality holds exactly when every arrow ofGGabsent fromGraph\(F\)\\Graph\(F\)enters a target\. The uniform statement follows: exact models have no extra arrows, while equality for the empty intervention givesGraph\(F\)=G\\Graph\(F\)=G\.
###### Example 2\(Why the supplied graph may differ\)
LetV≔\{A,B\}V\\coloneqq\\\{A,B\\\}, let the only arrow ofGGbeA→BA\\to B, and suppose neither mechanism depends on an endogenous variable\. ThenGraph\(F\)\\Graph\(F\)has no arrows, so\(G,F\)\(G,F\)is compatible but not exact\. An intervention that does not targetBBleavesA→BA\\to BinSurg\(G,Tι\)\\Surg\(G,T\_\{\\iota\}\), whereasGraph\(Fι\)\\Graph\(F^\{\\iota\}\)has no arrows\. If the intervention targetsBB, both graphs have no arrows and therefore agree\. Thus exactness is sufficient for agreement under every intervention, but it is not necessary for agreement under a particular one\.
Having related the two separate edits, we now package their results as a complete intervened model\.
###### Definition 7\(Do\-operation\)
For a causal modelM=\(G,F\)M=\(G,F\)and interventionι\\iota, define
Do\(M,ι\)≔\(Surg\(G,Tι\),Fι\)\.\\Do\(M,\\iota\)\\coloneqq\\bigl\(\\Surg\(G,T\_\{\\iota\}\),F^\{\\iota\}\\bigr\)\.This pair is a causal model: deleting arrows preserves acyclicity, and Corollary[1](https://arxiv.org/html/2608.17634#Thmcorollary1)supplies compatibility\.
The do\-operation applies one edit to each component of the model\. An alternative construction first replaces the mechanisms and then equips them with their exact dependency graph, giving\(Graph\(Fι\),Fι\)\\bigl\(\\Graph\(F^\{\\iota\}\),F^\{\\iota\}\\bigr\)\.
###### Corollary 2\(Agreement of the two constructions\)
For every causal modelM=\(G,F\)M=\(G,F\)and interventionι\\iota, the pair\(Graph\(Fι\),Fι\)\\bigl\(\\Graph\(F^\{\\iota\}\),F^\{\\iota\}\\bigr\)is an exact causal model\. For every exogenous stateuu,
Run\(Do\(M,ι\),u\)=Run\(\(Graph\(Fι\),Fι\),u\)\.\\Run\(\\Do\(M,\\iota\),u\)=\\Run\\bigl\(\(\\Graph\(F^\{\\iota\}\),F^\{\\iota\}\),u\\bigr\)\.IfMMis exact, the stronger model equality also holds:
Do\(M,ι\)=\(Graph\(Fι\),Fι\)\.\\Do\(M,\\iota\)=\\bigl\(\\Graph\(F^\{\\iota\}\),F^\{\\iota\}\\bigr\)\.
###### Proof
Corollary[1](https://arxiv.org/html/2608.17634#Thmcorollary1)says thatGraph\(Fι\)\\Graph\(F^\{\\iota\}\)is a subgraph of the acyclic graphSurg\(G,Tι\)\\Surg\(G,T\_\{\\iota\}\), so it is acyclic\. The displayed pair is therefore a causal model, and it is exact by construction\. Both models use the mechanism familyFιF^\{\\iota\}, which determines their runs\. IfMMis exact, Corollary[1](https://arxiv.org/html/2608.17634#Thmcorollary1)also givesSurg\(G,Tι\)=Graph\(Fι\)\\Surg\(G,T\_\{\\iota\}\)=\\Graph\(F^\{\\iota\}\), so the graphs, and hence the models, are equal\.
FFFιF^\{\\iota\}Graph\(F\)\\Graph\(F\)Graph\(Fι\)\\Graph\(F^\{\\iota\}\)replace target mechanismsextract dependenciesextract dependenciessurgery atTιT\_\{\\iota\}Figure 1:The correspondence of Theorem[3\.1](https://arxiv.org/html/2608.17634#S3.Thmtheorem1)\. Replacing target mechanisms and extracting dependencies yields the same graph as extracting dependencies first and then performing surgery\.The intervened outcome is characterized directly by the following equations\.
###### Corollary 3\(Intervention equation\)
For every modelM=\(G,F\)M=\(G,F\), interventionι\\iota, exogenous stateu∈𝒰u\\in\\mathcal\{U\}, and worldx∈𝒳x\\in\\mathcal\{X\},
x=Run\(Do\(M,ι\),u\)⟺\{xv=ιv,v∈Tι,xv=Fv\(u,x\),v∉Tι\.x=\\Run\(\\Do\(M,\\iota\),u\)\\quad\\Longleftrightarrow\\quad\\begin\{cases\}x\_\{v\}=\\iota\_\{v\},&v\\in T\_\{\\iota\},\\\\ x\_\{v\}=F\_\{v\}\(u,x\),&v\\notin T\_\{\\iota\}\.\\end\{cases\}
###### Proof
By Definition[3](https://arxiv.org/html/2608.17634#Thmdefinition3),xxis the run exactly whenxv=Fvι\(u,x\)x\_\{v\}=F^\{\\iota\}\_\{v\}\(u,x\)for everyvv\. At a target, this saysxv=ιvx\_\{v\}=\\iota\_\{v\}; at every other variable, it saysxv=Fv\(u,x\)x\_\{v\}=F\_\{v\}\(u,x\)\. These are precisely the two displayed conditions\.
The corollary gives the complete test for an intervened outcome: each target has its assigned value, and every equation outside the target set remains unchanged\. BecauseGGis acyclic, these conditions determine exactly one world\.
## 4Sequential interventions
Supposeι\\iotais applied first andκ\\kappasecond\. If both assign a value to the same variable, the later value fromκ\\kappamust prevail\.
###### Theorem 4\.1\(Sequential interventions\)
For interventionsι\\iotaandκ\\kappa, defineλ\\lambdato be the partial map with domainTι∪TκT\_\{\\iota\}\\cup T\_\{\\kappa\}that agrees withκ\\kappawhereverκ\\kappais defined and otherwise withι\\iota\. Then, for every modelMM,
Do\(Do\(M,ι\),κ\)=Do\(M,λ\)\.\\Do\\bigl\(\\Do\(M,\\iota\),\\kappa\\bigr\)=\\Do\(M,\\lambda\)\.
###### Proof
On both sides, the graph is obtained fromGGby deleting the arrows entering every variable targeted by either intervention\. At a target ofκ\\kappa, the mechanism is the constantκv\\kappa\_\{v\}\. At a target ofι\\iotabut notκ\\kappa, the constantιv\\iota\_\{v\}remains\. Every other mechanism isFvF\_\{v\}\. Thus both the graphs and the mechanism families are equal\.
###### Corollary 4\(Basic intervention laws\)
For every modelMMand interventionsι,κ\\iota,\\kappa:
1. 1\.The empty intervention does nothing:Do\(M,∅\)=M\\Do\(M,\\varnothing\)=M\.
2. 2\.Repeating an intervention changes nothing:Do\(Do\(M,ι\),ι\)=Do\(M,ι\)\\Do\(\\Do\(M,\\iota\),\\iota\)=\\Do\(M,\\iota\)\.
3. 3\.Interventions with no common target may be applied in either order: Do\(Do\(M,ι\),κ\)=Do\(Do\(M,κ\),ι\)\.\\Do\(\\Do\(M,\\iota\),\\kappa\)=\\Do\(\\Do\(M,\\kappa\),\\iota\)\.
4. 4\.If both interventions targetvv, the later value wins: the mechanism atvvinDo\(Do\(M,ι\),κ\)\\Do\(\\Do\(M,\\iota\),\\kappa\)is the constantκv\\kappa\_\{v\}\.
###### Proof
The first statement follows directly from Definition[7](https://arxiv.org/html/2608.17634#Thmdefinition7), since surgery with an empty target set leavesGGunchanged andF∅=FF^\{\\varnothing\}=F\. The remaining statements follow from Theorem[4\.1](https://arxiv.org/html/2608.17634#S4.Thmtheorem1)by checking the value retained at each target\.
For three or more interventions, the placement of parentheses does not matter: applying any finite sequence gives the same model as one intervention that collects all targets and keeps the last value assigned to each one\. This is equality of the resulting models, not merely of their runs\.
## 5Dependence on ancestors
For an outcome setO⊆VO\\subseteq V, writeAnF\(O\)\\An\_\{F\}\(O\)for the variables inOOand every variable from which a directed path in the actual dependency graphGraph\(F\)\\Graph\(F\)reaches a variable inOO\. Ifv∈AnF\(O\)v\\in\\An\_\{F\}\(O\), then every parent ofvvinGraph\(F\)\\Graph\(F\)also lies inAnF\(O\)\\An\_\{F\}\(O\)\. Consequently, the equation for any variable in this set depends only on variables in the same set\.
PPBBAAYYDDWW×\\scriptstyle\\times×\\scriptstyle\\timesAnF\(\{Y\}\)\\An\_\{F\}\(\\\{Y\\\}\)do\(D=d\)\\doexpr\(D=d\)Figure 2:The outcome atYYis determined inside its ancestor set\. The dashed, crossed arrows are removed bydo\(D=d\)\\doexpr\(D=d\); intervening on the downstream variableDDcannot changeYY\.###### Theorem 5\.1\(Dependence on ancestors\)
LetM=\(G,F\)M=\(G,F\)be a causal model and letO⊆VO\\subseteq V\. If two interventionsι\\iotaandκ\\kappaagree onAnF\(O\)\\An\_\{F\}\(O\), so thatι\|AnF\(O\)=κ\|AnF\(O\)\\iota\|\_\{\\An\_\{F\}\(O\)\}=\\kappa\|\_\{\\An\_\{F\}\(O\)\}, then for everyu∈𝒰u\\in\\mathcal\{U\},
Run\(Do\(M,ι\),u\)O=Run\(Do\(M,κ\),u\)O\.\\Run\(\\Do\(M,\\iota\),u\)\_\{O\}=\\Run\(\\Do\(M,\\kappa\),u\)\_\{O\}\.
###### Proof
Order the variables topologically inGraph\(F\)\\Graph\(F\)\. We show by induction along this order that the two runs agree at everyv∈AnF\(O\)v\\in\\An\_\{F\}\(O\)\.
Ifvvis targeted by either intervention, then the assumption says it is targeted by both with the same value\. The two runs agree atvv\. Otherwise both runs use the original mechanismFvF\_\{v\}\. By the definition ofAnF\(O\)\\An\_\{F\}\(O\), every parent ofvvinGraph\(F\)\\Graph\(F\)lies inAnF\(O\)\\An\_\{F\}\(O\), and all such parents precedevv\. The induction hypothesis gives equal values at these parents\. Since\(Graph\(F\),F\)\(\\Graph\(F\),F\)is an exact causal model, Lemma[1](https://arxiv.org/html/2608.17634#Thmlemma1)applied to that model gives equal values atvv\. Thus the runs agree throughoutAnF\(O\)\\An\_\{F\}\(O\), and in particular onO⊆AnF\(O\)O\\subseteq\\An\_\{F\}\(O\)\.
###### Corollary 5\(Discarding targets outside the ancestors\)
For every modelM=\(G,F\)M=\(G,F\), outcome setO⊆VO\\subseteq V, interventionι\\iota, and exogenous stateu∈𝒰u\\in\\mathcal\{U\},
Run\(Do\(M,ι\),u\)O=Run\(Do\(M,ι\|AnF\(O\)\),u\)O\.\\Run\(\\Do\(M,\\iota\),u\)\_\{O\}=\\Run\\bigl\(\\Do\(M,\\iota\|\_\{\\An\_\{F\}\(O\)\}\),u\\bigr\)\_\{O\}\.In particular, ifι\\iotahas no target inAnF\(O\)\\An\_\{F\}\(O\), then
Run\(Do\(M,ι\),u\)O=Run\(M,u\)O\.\\Run\(\\Do\(M,\\iota\),u\)\_\{O\}=\\Run\(M,u\)\_\{O\}\.
###### Proof
The interventionsι\\iotaandι\|AnF\(O\)\\iota\|\_\{\\An\_\{F\}\(O\)\}agree onAnF\(O\)\\An\_\{F\}\(O\)\. Apply Theorem[5\.1](https://arxiv.org/html/2608.17634#S5.Thmtheorem1)\. Ifι\\iotahas no target inAnF\(O\)\\An\_\{F\}\(O\), thenι\|AnF\(O\)=∅\\iota\|\_\{\\An\_\{F\}\(O\)\}=\\varnothing, and the second equality follows from the first law in Corollary[4](https://arxiv.org/html/2608.17634#Thmcorollary4)\.
Thus, to determine the outcome onOO, one may discard all intervention targets outsideAnF\(O\)\\An\_\{F\}\(O\)\.
#### The condition is sufficient, not necessary\.
Cancellation can make interventions on an actual ancestor irrelevant to an outcome\. TakeV=\{A,B,Y\}V=\\\{A,B,Y\\\}and𝒰=𝒳A=𝒳B=𝒳Y=\{0,1\}\\mathcal\{U\}=\\mathcal\{X\}\_\{A\}=\\mathcal\{X\}\_\{B\}=\\mathcal\{X\}\_\{Y\}=\\\{0,1\\\}, and defineFA\(u,x\)=uF\_\{A\}\(u,x\)=u,FB\(u,x\)=xAF\_\{B\}\(u,x\)=x\_\{A\}, andFY\(u,x\)=xA⊕xBF\_\{Y\}\(u,x\)=x\_\{A\}\\mathbin\{\\oplus\}x\_\{B\}\. The model\(Graph\(F\),F\)\(\\Graph\(F\),F\)is exact andAAis an ancestor ofYY, but underdo\(A=a\)\\doexpr\(A=a\)we haveB=aB=aand henceY=a⊕a=0Y=a\\oplus a=0\. Thusdo\(A=0\)\\doexpr\(A=0\)anddo\(A=1\)\\doexpr\(A=1\)disagree on an ancestor while producing the same value ofYY\.
## 6Related work
Thedo\\doexpr\-operator is central to Pearl’s account of structural causal models\[[4](https://arxiv.org/html/2608.17634#bib.bib4)\]\. In the usual structural\-equation account, an intervention replaces selected equations by assigned values; deleting their incoming arrows is the corresponding graphical operation\. Peters, Janzing, and Schölkopf give a modern treatment of functional models, interventions, and causal graphs\[[5](https://arxiv.org/html/2608.17634#bib.bib5)\], while Halpern gives axioms for reasoning with interventions in recursive models\[[1](https://arxiv.org/html/2608.17634#bib.bib1)\]\.
String\-diagram accounts give explicit graphical languages for causal models\. Jacobs, Kissinger, and Zanasi make the syntax–semantics separation formal: string diagrams are interpreted as stochastic matrices, and intervention is an operation on the diagrammatic syntax\[[2](https://arxiv.org/html/2608.17634#bib.bib2)\]\. Lorenz and Tull develop the approach for a broader class of causal models\[[3](https://arxiv.org/html/2608.17634#bib.bib3)\]\. Our result addresses a different, narrower question for ordinary deterministic structural causal models: how extensional dependencies change under constant mechanism replacement, including when a graph supplied with the mechanisms contains unused arrows\.
Recent work uses mechanism functions to explaindd\-separation semantically\[[7](https://arxiv.org/html/2608.17634#bib.bib7)\]\. Zhang’s earlier thesis describes incoming\-edge deletion as the syntactic view of an intervention, constant replacement as its semantic view, and conjectures that the two are equivalent, with a formal proof in Coq proposed as the next step\[[6](https://arxiv.org/html/2608.17634#bib.bib6), Sec\. 6\.4\]\. Theorem[3\.1](https://arxiv.org/html/2608.17634#S3.Thmtheorem1)gives the conjecture a dependency\-level formulation suitable for mechanization\.
The same formulation distinguishes the dependency graph from a compatible supplied graph, which may contain unused arrows\. Corollary[1](https://arxiv.org/html/2608.17634#Thmcorollary1)characterizes exactly when surgery on the two graphs agrees\.
## 7Conclusion
Graph surgery and constant mechanism replacement agree after dependency extraction:
Graph\(Fι\)=Surg\(Graph\(F\),Tι\)\.\\Graph\(F^\{\\iota\}\)=\\Surg\\bigl\(\\Graph\(F\),T\_\{\\iota\}\\bigr\)\.For a graph supplied with the model, the analogous equality holds exactly when surgery removes all of its unused arrows; it therefore holds for every intervention if and only if the starting model is exact\. The construction based on the supplied graph and the one based on the exact dependency graph always have the same run; for an exact starting model, they are the same intervened model\.
The intervention equation characterizes the resulting outcome\. Sequential interventions combine by retaining the last value assigned to each target, and an outcome depends only on interventions at its actual dependency ancestors\. Together these results specify thedo\\doexpr\-operator directly while keeping its structural and functional components distinct\.
### Acknowledgements\.
This work was supported by the Anusandhan National Research Foundation \(ANRF\), Government of India, under the Prime Minister Early Career Research Grant ANRF/ECRG/2025/001136/ENS\. I am grateful to Aalok Thakkar for helpful discussions\.
## References
- \[1\]Halpern, J\.Y\.: Axiomatizing causal reasoning\. Journal of Artificial Intelligence Research12, 317–337 \(2000\)\. https://doi\.org/10\.1613/jair\.648
- \[2\]Jacobs, B\., Kissinger, A\., Zanasi, F\.: Causal inference via string diagram surgery: A diagrammatic approach to interventions and counterfactuals\. Mathematical Structures in Computer Science31\(5\), 553–574 \(2021\)\. https://doi\.org/10\.1017/S096012952100027X
- \[3\]Lorenz, R\., Tull, S\.: Causal models in string diagrams \(2023\)\. https://doi\.org/10\.48550/arXiv\.2304\.07638, arXiv:2304\.07638
- \[4\]Pearl, J\.: Causality: Models, Reasoning, and Inference\. Cambridge University Press, Cambridge, UK, 2 edn\. \(2009\)\. https://doi\.org/10\.1017/CBO9780511803161
- \[5\]Peters, J\., Janzing, D\., Schölkopf, B\.: Elements of Causal Inference: Foundations and Learning Algorithms\. MIT Press, Cambridge, MA \(2017\)
- \[6\]Zhang, A\.: Formalizing Causal Models Through the Semantics of Conditional Independence\. Master of engineering thesis, Massachusetts Institute of Technology, Cambridge, MA \(May 2025\),[https://adam\.chlipala\.net/theses/azhang03\.pdf](https://adam.chlipala.net/theses/azhang03.pdf)
- \[7\]Zhang, A\., Luo, Q\., Bielicke, L\., Jun, E\., Chlipala, A\.: Causality and semantic separation\. Proceedings of the ACM on Programming Languages10\(PLDI\) \(2026\)\. https://doi\.org/10\.1145/3808274, arXiv:2604\.22041Similar Articles
Beyond Directed Acyclic Graphs: Causal Zeros and Causal Differential Equations
This paper extends Pearl's structural causal model framework by introducing causal zeros and causal differential equations to handle symmetric constraints and feedback cycles, which are not allowed in directed acyclic graphs.
Exact Network Surgery: Functional Invariance and Gradient Plasticity in Reactive Computational Graphs
This paper formalizes Exact Network Surgery, a method for inserting residual blocks into live computational graphs while preserving the function exactly and allowing immediate training. The authors prove theoretical guarantees and validate empirically on a reactive graph engine in Julia.
Causal Reasoning with Bipartite Graphical Causal Models
The paper proposes bipartite graphical causal models (BGCMs) to resolve ambiguities in causal interventions for systems at equilibrium with cyclic dependencies, generalizing existing frameworks like causal Bayesian networks and structural causal models.
LLM Explainability with Counterfactual Chains and Causal Graphs
This paper proposes a four-phase method for constructing causal graphs that model LLM inference processes, using counterfactual augmentation to enable stable causal discovery and provide transparent, concept-level explainability.
Causal-Audit: Explicit and Auditable Graph-based Reasoning via Target-Aware Causal Chain Construction
Proposes Causal-Audit, a framework for explicit and auditable causal reasoning in LLMs using target-aware causal graph construction and path-level evidence aggregation, outperforming existing methods on benchmarks.