Exact Network Surgery: Functional Invariance and Gradient Plasticity in Reactive Computational Graphs

arXiv cs.AI Papers

Summary

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.

arXiv:2607.16568v1 Announce Type: new Abstract: Function-preserving network growth techniques such as Net2Net and progressive stacking expand a model's capacity without destroying its learned function, but existing formulations either tolerate numerical perturbations or require a full rebuild of the training program. We formalize Exact Network Surgery: the in-place insertion of a residual block into a live computational graph such that (i) the network function is preserved -- bit-exactly under explicit floating-point hypotheses -- and (ii) inserted parameters remain trainable immediately after insertion. We prove an identity-morphism theorem for gated residual blocks, a structural-locality theorem showing that a reactive invalidation engine recomputes exactly the downstream cone of the insertion point, leaving every other node's value and optimizer state untouched, and an escape-from-initialization proposition showing that the Gradient Shadowing gate alpha, initialized at zero over a randomly initialized branch, receives a generically non-zero gradient at insertion time. We identify a degenerate configuration -- zero-initialized output projections combined with a zero gate -- that is an exact saddle point gradient descent cannot escape. Every claim is validated on the reference implementation in NeuroDSL, a reactive graph engine in Julia: grafting is bit-exact on every logit tested (0 mismatches out of 1600); the gate escapes zero at the first optimizer step and unlocks branch gradients at the second, exactly as predicted; the degenerate configuration exhibits gradients identically zero for the entire 600-step run; surgery cost tracks downstream cone size with r = 0.9992 while graft-plus-invalidation bookkeeping is constant (about 0.75 ms) across insertion depths; and training resumes bit-identically across a real process restart. A flagged preliminary appendix reports first single-seed observations on post-insertion gate dynamics.
Original Article
View Cached Full Text

Cached at: 07/21/26, 06:38 AM

# Exact Network Surgery: Functional Invariance and Gradient Plasticity in Reactive Computational Graphs
Source: [https://arxiv.org/html/2607.16568](https://arxiv.org/html/2607.16568)
\(July 2026\)

###### Abstract

Function\-preserving network growth techniques such as Net2Net\[[1](https://arxiv.org/html/2607.16568#bib.bib1)\]and progressive stacking\[[5](https://arxiv.org/html/2607.16568#bib.bib5)\]expand a model’s capacity without destroying its learned function, but existing formulations either tolerate small numerical perturbations or require a full rebuild of the training program, discarding compiled artifacts and complicating optimizer\-state management\. We formalize*Exact Network Surgery*: the in\-place insertion of a residual block into a live computational graph such that \(i\) the network function is preserved — bit\-exactly under explicitly stated floating\-point hypotheses — and \(ii\) the inserted parameters remain trainable immediately after insertion\. We prove an identity\-morphism theorem for gated residual blocks, a structural\-locality theorem showing that a reactive invalidation engine recomputes exactly the downstream cone of the insertion point — leaving every other node’s value*and*optimizer state untouched — and an escape\-from\-initialization proposition showing that the*Gradient Shadowing*gateα\\alpha, initialized at zero over a randomly initialized residual branch, receives a generically non\-zero gradient at insertion time\. We identify and analyze a degenerate configuration — zero\-initialized output projections combined with a zero gate — which constitutes an exact saddle point from which gradient descent cannot escape, and explain why our construction avoids it\. Every claim above is validated empirically on the reference implementation in*NeuroDSL*\[[13](https://arxiv.org/html/2607.16568#bib.bib13)\], a reactive define\-and\-run graph engine in Julia: grafting is bit\-exact on every logit tested \(0 mismatches out of 1600, preconditions verified rather than assumed\); the gate escapes zero at the first optimizer step and unlocks the branch gradients at the second, exactly as predicted; the degenerate configuration exhibits gradients that are identically zero — not merely small — for the entire 600\-step run; surgery cost tracks the downstream cone size withr=0\.9992r=0\.9992while the graft\-plus\-invalidation bookkeeping itself is constant \(∼\\sim0\.75 ms\) across insertion depths; and training resumes bit\-identically across a real process restart\. A clearly\-flagged preliminary appendix reports first single\-seed observations on what happens to a grafted gate over the training that follows insertion\.

## 1Introduction

Growing a neural network during training — inserting new layers into a model that has already learned — is attractive whenever training a large model from scratch is wasteful: curriculum\-style capacity scheduling\[[5](https://arxiv.org/html/2607.16568#bib.bib5),[6](https://arxiv.org/html/2607.16568#bib.bib6)\], continual learning, and architecture search all benefit from it\. The central difficulty is not conceptual but operational: the insertion must not destroy the learned function, and the surrounding training machinery \(optimizer state, compiled kernels, cached activations\) must survive the mutation\.

Eager frameworks such as PyTorch\[[11](https://arxiv.org/html/2607.16568#bib.bib11)\]are define\-by\-run and therefore support topological mutation natively: one can assign a new module to an attribute and the next forward pass will use it\. The cost of surgery in such frameworks is not the mutation itself but its*consequences*: \(i\) under compilation \(torch\.compile,jax\.jit\[[12](https://arxiv.org/html/2607.16568#bib.bib12)\]\), any change to the traced program triggers re\-tracing and recompilation of the whole graph; \(ii\) optimizer state must be re\-associated with a mutated parameter set by hand, a common source of silent bugs; and \(iii\) there is no notion of*partial validity*— the framework cannot distinguish the subgraph whose cached values are still correct from the subgraph invalidated by the mutation\.

*NeuroDSL*\[[13](https://arxiv.org/html/2607.16568#bib.bib13)\]takes a different approach: the computational graph is a persistent, reactive DAG\. Nodes own their values and their optimizer state; edges carry explicit dependency information; and a mutation triggers anO​\(\|affected\|\)O\(\|\\text\{affected\}\|\)invalidation wave rather than a global rebuild\. This paper shows that, on top of such an engine, network surgery can be made*exact*— the mutated network is functionally indistinguishable from the original, under hypotheses we make precise — while remaining*plastic*: the new parameters start learning at the very first post\-surgery optimization step\.

#### Contributions\.

1. 1\.A formal definition of grafting on computational graphs and of functional exactness \(Section[3](https://arxiv.org/html/2607.16568#S3)\)\.
2. 2\.An identity\-morphism theorem for gated residual blocks, together with a qualified bit\-exactness proposition that states its IEEE\-754 hypotheses explicitly \(Section[4](https://arxiv.org/html/2607.16568#S4)\)\.
3. 3\.A structural\-locality theorem: reactive invalidation recomputes exactly the downstream cone of the insertion point, proved by double inclusion over an explicit algorithm, so that parameters outside the cone keep their values and their optimizer state \(Section[5](https://arxiv.org/html/2607.16568#S5)\)\. The same theorem makes a*structural*undo of a graft cheap and exact atO​\(\|𝒱s\+\|\)O\(\|\\mathcal\{V\}\_\{s\}^\{\+\}\|\)log size, regardless of how far training has since moved the grafted function \(Section[6\.1](https://arxiv.org/html/2607.16568#S6.SS1)\)\.
4. 4\.*Gradient Shadowing*, a gating scheme in the ReZero family\[[2](https://arxiv.org/html/2607.16568#bib.bib2)\], with a proof that the gate escapes its zero initialization in one step, and an analysis of the degenerate double\-zero configuration that must be avoided \(Section[6](https://arxiv.org/html/2607.16568#S6)\)\.
5. 5\.An empirical validation of every claim above \(Section[7](https://arxiv.org/html/2607.16568#S7)\): bit\-exactness with verified preconditions \(E1\), the three\-arm plasticity experiment confirming both the escape and the saddle point \(E2\), cost\-versus\-depth measurements confirming locality \(E3\), bit\-identical training continuation across a real process restart \(F3\), and a pre\-registered utility study at equal compute\. A clearly\-flagged preliminary appendix \(Appendix[A](https://arxiv.org/html/2607.16568#A1)\) reports single\-seed observations on post\-insertion gate dynamics: an exact functional undo\-distance identity, a controlled early\-vs\-late timing comparison \(E6\), and a warm\-start counterfactual tracing most of the apparent timing effect to an optimizer\-moment artifact \(E8\)\.

## 2Related Work

#### Function\-preserving growth\.

Net2Net\[[1](https://arxiv.org/html/2607.16568#bib.bib1)\]introduced function\-preserving transformations \(*Net2WiderNet*,*Net2DeeperNet*\) based on identity\-initialized layers; exactness holds for ReLU networks but is perturbed by normalization layers and requires care with weight symmetry \(broken in practice by added noise\)\. Progressive stacking\[[5](https://arxiv.org/html/2607.16568#bib.bib5)\]and bert2BERT\[[6](https://arxiv.org/html/2607.16568#bib.bib6)\]grow Transformers by duplicating layers, accepting a functional perturbation that is repaired by continued training\. LEMON\[[7](https://arxiv.org/html/2607.16568#bib.bib7)\]restores lossless expansion for LayerNorm\-based Transformers\. GradMax\[[8](https://arxiv.org/html/2607.16568#bib.bib8)\]grows networks by maximizing the gradient norm of the new weights, which is the dual of our concern: we guarantee the new weights have a*usable*gradient path, GradMax optimizes its magnitude\.

#### Zero\-gated residuals\.

Initializing a residual branch so that it initially contributes nothing is a well\-studied stabilization device: Fixup\[[3](https://arxiv.org/html/2607.16568#bib.bib3)\]zero\-initializes the last layer of each residual branch; ReZero\[[2](https://arxiv.org/html/2607.16568#bib.bib2)\]multiplies each branch by a learned scalarα\\alphainitialized at0over*randomly initialized*weights; LayerScale\[[4](https://arxiv.org/html/2607.16568#bib.bib4)\]uses a learned diagonal gate initialized near zero\. Our Gradient Shadowing gate is a ReZero\-style scalar; our contribution is not the gate itself but \(i\) its role in making*surgery*exact rather than training stable, \(ii\) the explicit saddle\-point analysis of the zero\-weights\-plus\-zero\-gate configuration, and \(iii\) its integration with a reactive invalidation engine that makes the surgery local\.

#### Dynamic graph engines\.

PyTorch\[[11](https://arxiv.org/html/2607.16568#bib.bib11)\]is define\-by\-run; JAX\[[12](https://arxiv.org/html/2607.16568#bib.bib12)\]traces pure functions\. Neither maintains a persistent reactive graph across steps: validity of cached computation is not a first\-class notion\. NeuroDSL’s design is closer to incremental computation systems, applied to differentiable programs\.

## 3Preliminaries

###### Definition 1\(Computational graph\)\.

A computational graph is a tuple𝒢=\(𝒱,ℰ,op,θ\)\\mathcal\{G\}=\(\\mathcal\{V\},\\mathcal\{E\},\\mathrm\{op\},\\theta\)where\(𝒱,ℰ\)\(\\mathcal\{V\},\\mathcal\{E\}\)is a finite DAG,op​\(v\)\\mathrm\{op\}\(v\)assigns to each non\-input node an operator, andθ​\(v\)\\theta\(v\)its \(possibly empty\) parameter set\. Distinguished subsets𝒱in⊂𝒱\\mathcal\{V\}\_\{\\mathrm\{in\}\}\\subset\\mathcal\{V\}\(sources\) and a nodevoutv\_\{\\mathrm\{out\}\}\(output\) induce, by composition along the topological order, a functionF𝒢:𝒳→𝒴F\_\{\\mathcal\{G\}\}:\\mathcal\{X\}\\to\\mathcal\{Y\}\.

###### Definition 2\(Grafting\)\.

Lete=\(u,w\)∈ℰe=\(u,w\)\\in\\mathcal\{E\}be an edge of𝒢\\mathcal\{G\}andℋ\\mathcal\{H\}a computational graph with a single input and a single output, realizing a functionFℋF\_\{\\mathcal\{H\}\}\. The grafting𝒮​\(𝒢,e,ℋ\)\\mathcal\{S\}\(\\mathcal\{G\},e,\\mathcal\{H\}\)produces𝒢′\\mathcal\{G\}^\{\\prime\}by removingeeand adding edges\(u,in​\(ℋ\)\)\(u,\\mathrm\{in\}\(\\mathcal\{H\}\)\)and\(out​\(ℋ\),w\)\(\\mathrm\{out\}\(\\mathcal\{H\}\),w\), i\.e\., the value flowing alongeenow passes throughℋ\\mathcal\{H\}\.

Defining insertion on an*edge*\(rather than "at a node"\) removes any ambiguity about which consumers ofuuare rerouted: exactly those alongee\.

###### Definition 3\(Functional exactness\)\.

𝒮​\(𝒢,e,ℋ\)\\mathcal\{S\}\(\\mathcal\{G\},e,\\mathcal\{H\}\)is*functionally exact*iffF𝒢′​\(x\)=F𝒢​\(x\)F\_\{\\mathcal\{G\}^\{\\prime\}\}\(x\)=F\_\{\\mathcal\{G\}\}\(x\)for allx∈𝒳x\\in\\mathcal\{X\}\. It is*bit\-exact*on a setX0⊆𝒳X\_\{0\}\\subseteq\\mathcal\{X\}of floating\-point inputs iff the equality holds at the level of binary representations for allx∈X0x\\in X\_\{0\}under a fixed evaluation order\.

Note that functional exactness over the reals does not imply bit\-exactness in floating\-point arithmetic, nor conversely; Section[4](https://arxiv.org/html/2607.16568#S4)treats the two separately\.

## 4Exact Grafting of Residual Blocks

We instantiateℋ\\mathcal\{H\}as a pre\-normalization Transformer block in the Llama family\[[9](https://arxiv.org/html/2607.16568#bib.bib9)\]\. Its exact sequential structure — which we state faithfully, since the theorem depends on it — is:

h\\displaystyle h=x\+Attn​\(RMSNorm​\(x\);θattn\),\\displaystyle=x\+\\mathrm\{Attn\}\\big\(\\mathrm\{RMSNorm\}\(x\);\\,\\theta\_\{\\mathrm\{attn\}\}\\big\),\(1\)H​\(x\)\\displaystyle H\(x\)=h\+MLP​\(RMSNorm​\(h\);θmlp\),\\displaystyle=h\+\\mathrm\{MLP\}\\big\(\\mathrm\{RMSNorm\}\(h\);\\,\\theta\_\{\\mathrm\{mlp\}\}\\big\),\(2\)whereRMSNorm\\mathrm\{RMSNorm\}is root\-mean\-square normalization\[[10](https://arxiv.org/html/2607.16568#bib.bib10)\],Attn\\mathrm\{Attn\}ends with an output projectionWOW\_\{O\}, andMLP\\mathrm\{MLP\}ends with a down projectionWdownW\_\{\\mathrm\{down\}\}\.

###### Assumption 1\(No output bias\)\.

The projectionsWOW\_\{O\}andWdownW\_\{\\mathrm\{down\}\}carry no bias term\. \(This holds for the Llama architecture\[[9](https://arxiv.org/html/2607.16568#bib.bib9)\]; if biases were present, they would additionally have to be initialized to zero\.\)

###### Theorem 1\(Identity morphism\)\.

Under Assumption[1](https://arxiv.org/html/2607.16568#Thmassumption1), if at insertion timetinst\_\{\\mathrm\{ins\}\}the parameters satisfyWO=0W\_\{O\}=0andWdown=0W\_\{\\mathrm\{down\}\}=0\(all other parameters arbitrary\), thenH=IdH=\\mathrm\{Id\}over the reals, and consequently𝒮​\(𝒢,e,ℋ\)\\mathcal\{S\}\(\\mathcal\{G\},e,\\mathcal\{H\}\)is functionally exact\.

###### Proof\.

SinceAttn\\mathrm\{Attn\}terminates in the linear mapWOW\_\{O\}with no bias,WO=0W\_\{O\}=0impliesAttn​\(⋅\)≡0\\mathrm\{Attn\}\(\\cdot\)\\equiv 0regardless of the attention scores; by \([1](https://arxiv.org/html/2607.16568#S4.E1)\),h=xh=x\. LikewiseWdown=0W\_\{\\mathrm\{down\}\}=0impliesMLP​\(⋅\)≡0\\mathrm\{MLP\}\(\\cdot\)\\equiv 0, henceH​\(x\)=h=xH\(x\)=h=xby \([2](https://arxiv.org/html/2607.16568#S4.E2)\)\. Grafting one=\(u,w\)e=\(u,w\)replaces the valuexex\_\{e\}flowing alongeebyH​\(xe\)=xeH\(x\_\{e\}\)=x\_\{e\}; every node of𝒢′\\mathcal\{G\}^\{\\prime\}therefore computes the same real value as in𝒢\\mathcal\{G\}, andF𝒢′=F𝒢F\_\{\\mathcal\{G\}^\{\\prime\}\}=F\_\{\\mathcal\{G\}\}\. ∎

Exactness over the reals is not yet bit\-exactness: the graft introduces*new floating\-point operations*\(x\+0x\+0, and the internal computation of the block\)\. The following proposition states precisely when they are harmless\.

###### Proposition 1\(Qualified bit\-exactness\)\.

Work in IEEE\-754 arithmetic with round\-to\-nearest\. Under the hypotheses of Theorem[1](https://arxiv.org/html/2607.16568#Thmtheorem1), suppose additionally that on inputxx:

1. 1\.all activations internal toℋ\\mathcal\{H\}upstream ofWOW\_\{O\}andWdownW\_\{\\mathrm\{down\}\}are finite \(no±∞\\pm\\infty, noNaN\\mathrm\{NaN\}\); and
2. 2\.no component of the residual stream equals−0\.0\-0\.0\.

Then the graft is bit\-exact: every downstream node of𝒢′\\mathcal\{G\}^\{\\prime\}holds the same binary representation as in𝒢\\mathcal\{G\}\.

###### Proof\.

By hypothesis \(1\), each product inside the zero projections is of the form0×a0\\times awithaafinite, which is an exact±0\.0\\pm 0\.0, and their sum is±0\.0\\pm 0\.0; hence the branch outputs an exact zero vector\. \(Hypothesis \(1\) is necessary:0×∞=NaN0\\times\\infty=\\mathrm\{NaN\}, which would propagate\.\) The only remaining new operations are the residual additionsxi\+0\.0x\_\{i\}\+0\.0\. In round\-to\-nearest,xi\+0\.0=xix\_\{i\}\+0\.0=x\_\{i\}bit\-for\-bit for every finitexi≠−0\.0x\_\{i\}\\neq\-0\.0; the single exception is−0\.0\+0\.0=\+0\.0\-0\.0\+0\.0=\+0\.0, excluded by hypothesis \(2\)\. All downstream nodes then receive bit\-identical inputs and, computed by the same kernels in the same order, produce bit\-identical outputs\. ∎

## 5Topological Stability and Locality

Surgery must leave the cached state of unaffected nodes intact\. We formalize the invalidation procedure as Algorithm[1](https://arxiv.org/html/2607.16568#alg1)and prove that it invalidates*exactly*the downstream cone; the NeuroDSL routine\_invalidate\_downstream\!implements this algorithm \(implementation conformance is an engineering claim, verified by the test suite, not part of the proof\)\.

Algorithm 1Invalidate\(𝒢,s\)\(\\mathcal\{G\},s\)— reactive invalidation from a seed nodess1:

Q←\[s\]Q\\leftarrow\[s\];

seen←\{s\}\\mathrm\{seen\}\\leftarrow\\\{s\\\}
2:while

QQnot emptydo

3:

v←pop​\(Q\)v\\leftarrow\\mathrm\{pop\}\(Q\)
4:foreach

wwwith

\(v,w\)∈ℰ\(v,w\)\\in\\mathcal\{E\}do

5:if

w∉seenw\\notin\\mathrm\{seen\}then

6:

valid​\(w\)←𝐟𝐚𝐥𝐬𝐞\\mathrm\{valid\}\(w\)\\leftarrow\\mathbf\{false\};

seen←seen∪\{w\}\\mathrm\{seen\}\\leftarrow\\mathrm\{seen\}\\cup\\\{w\\\};

push​\(Q,w\)\\mathrm\{push\}\(Q,w\)
7:endif

8:endfor

9:endwhile

###### Definition 4\(Downstream cone\)\.

Fors∈𝒱s\\in\\mathcal\{V\}, let

𝒱s\+=\{v∈𝒱∣there is a path of length≥1​from​s​to​v\}\.\\mathcal\{V\}\_\{s\}^\{\+\}=\\\{\\,v\\in\\mathcal\{V\}\\mid\\text\{there is a path of length\}\\geq 1\\text\{ from \}s\\text\{ to \}v\\,\\\}\.By conventions∉𝒱s\+s\\notin\\mathcal\{V\}\_\{s\}^\{\+\}unlesssslies on a cycle, which the DAG property excludes; in our settings=out​\(ℋ\)s=\\mathrm\{out\}\(\\mathcal\{H\}\)is the freshly created node, which is born unvalued and needs no invalidation\.

###### Theorem 2\(Structural locality\)\.

On a DAG, Algorithm[1](https://arxiv.org/html/2607.16568#alg1)terminates and the set of nodes it marks invalid is exactly𝒱s\+\\mathcal\{V\}\_\{s\}^\{\+\}\. Its complexity isO​\(\|𝒱s\+\|\+\|ℰs\+\|\)O\(\|\\mathcal\{V\}\_\{s\}^\{\+\}\|\+\|\\mathcal\{E\}\_\{s\}^\{\+\}\|\), whereℰs\+\\mathcal\{E\}\_\{s\}^\{\+\}is the set of edges internal to the cone\.

###### Proof\.

*Termination\.*Each node entersseen\\mathrm\{seen\}at most once and is pushed at most once;𝒱\\mathcal\{V\}is finite\.

*Soundness*\(marked⇒\\Rightarrowin cone\)\. We show by induction on the order of marking that every node marked invalid lies in𝒱s\+\\mathcal\{V\}\_\{s\}^\{\+\}\. The first nodes marked are the immediate successors ofss, which are in𝒱s\+\\mathcal\{V\}\_\{s\}^\{\+\}via paths of length11\. Inductively, a nodewwis marked only when popped from the queue along an edge\(v,w\)\(v,w\)withvvpreviously marked orv=sv=s; by the induction hypothesis there is a paths↝vs\\rightsquigarrow v\(possibly empty ifv=sv=s\), which extended by\(v,w\)\(v,w\)gives a path of length≥1\\geq 1fromsstoww\. Hencew∈𝒱s\+w\\in\\mathcal\{V\}\_\{s\}^\{\+\}\.

*Completeness*\(in cone⇒\\Rightarrowmarked\)\. Letw∈𝒱s\+w\\in\\mathcal\{V\}\_\{s\}^\{\+\}and lets=v0→v1→…→vk=ws=v\_\{0\}\\to v\_\{1\}\\to\\dots\\to v\_\{k\}=w,k≥1k\\geq 1, be a witnessing path\. By induction onii:v0=s∈seenv\_\{0\}=s\\in\\mathrm\{seen\}and is processed; ifviv\_\{i\}is processed, then when it is popped, its successorvi\+1v\_\{i\+1\}is either already inseen\\mathrm\{seen\}\(hence was marked and pushed earlier\) or is marked and pushed now\. Either wayvi\+1v\_\{i\+1\}is marked and eventually processed\. Thusvk=wv\_\{k\}=wis marked\.

*Preservation\.*A nodev∉𝒱s\+v\\notin\\mathcal\{V\}\_\{s\}^\{\+\}is never marked by soundness, sovalid​\(v\)\\mathrm\{valid\}\(v\)is untouched: its cached value, and crucially its optimizer state, survive the surgery\.

*Complexity\.*Each node in the cone is popped once and each internal edge scanned once\. ∎

Theorem[2](https://arxiv.org/html/2607.16568#Thmtheorem2)is the single\-mutation statement this paper needs\. The cost of entire*workloads*of such mutations — exhaustive site\-by\-site sweeps, sequences of persistent grafts, and the backward\-pass mirror of the theorem — is a separate accounting question with its own asymptotics, developed in a companion cost\-accounting study on the same engine\.

## 6Gradient Shadowing: Exactness with Plasticity

Theorem[1](https://arxiv.org/html/2607.16568#Thmtheorem1)buys exactness at a price: withWO=Wdown=0W\_\{O\}=W\_\{\\mathrm\{down\}\}=0, all parameters*upstream*of the zero projections receive a zero gradient \(the chain rule factors through the zero matrices\), so the block trains slowly at first — only the zero projections themselves have non\-zero gradients\. Worse, a natural\-looking "belt and braces" combination is fatal:

###### Proposition 2\(Degenerate double\-zero configuration\)\.

Consider the gated blockFℋ​\(x;α\)=x\+α​R​\(x;θ\)F\_\{\\mathcal\{H\}\}\(x;\\alpha\)=x\+\\alpha R\(x;\\theta\)with*both*α=0\\alpha=0and the output projections ofRRzero\-initialized \(soR​\(x\)≡0R\(x\)\\equiv 0\)\. Then attinst\_\{\\mathrm\{ins\}\}:

∂ℒ∂α=⟨∂ℒ∂Fℋ,R​\(x\)⟩=0and∇θℒ=α⋅∂ℒ∂Fℋ⋅∂R∂θ=0\.\\frac\{\\partial\\mathcal\{L\}\}\{\\partial\\alpha\}=\\Big\\langle\\frac\{\\partial\\mathcal\{L\}\}\{\\partial F\_\{\\mathcal\{H\}\}\},\\,R\(x\)\\Big\\rangle=0\\qquad\\text\{and\}\\qquad\\nabla\_\{\\theta\}\\mathcal\{L\}=\\alpha\\cdot\\frac\{\\partial\\mathcal\{L\}\}\{\\partial F\_\{\\mathcal\{H\}\}\}\\cdot\\frac\{\\partial R\}\{\\partial\\theta\}=0\.Moreover this configuration is a fixed point of gradient descent: both gradients remain identically zero at every subsequent step, so the block never trains\.

###### Proof\.

Attinst\_\{\\mathrm\{ins\}\},R​\(x\)=0R\(x\)=0annihilates∂ℒ/∂α\\partial\\mathcal\{L\}/\\partial\\alphaandα=0\\alpha=0annihilates∇θℒ\\nabla\_\{\\theta\}\\mathcal\{L\}\. Gradient descent therefore leaves\(α,θout\)\(\\alpha,\\theta\_\{\\mathrm\{out\}\}\)unchanged, so the same two annihilations hold at the next step; by induction, forever\. \(Momentum\-based optimizers without weight decay share the fixed point, since all moment estimates remain zero\.\) ∎

The two exactness mechanisms — zero projections and zero gate — are thus*mutually exclusive*: one must choose exactly one\. Gradient Shadowing chooses the gate, following ReZero\[[2](https://arxiv.org/html/2607.16568#bib.bib2)\]:

###### Definition 5\(Gradient Shadowing\)\.

The grafted block isFℋ​\(x;α\)=x\+α​R​\(x;θ\)F\_\{\\mathcal\{H\}\}\(x;\\alpha\)=x\+\\alpha R\(x;\\theta\), whereRRis a residual branch \(any composition of smooth primitives ending in linear projections\) withθ\\thetadrawn from a standard random initialization \(soR​\(⋅;θ\)≢0R\(\\cdot;\\theta\)\\not\\equiv 0almost surely\), andα∈ℝ\\alpha\\in\\mathbb\{R\}is a learned scalar withα​\(tins\)=0\\alpha\(t\_\{\\mathrm\{ins\}\}\)=0\.

Exactness attinst\_\{\\mathrm\{ins\}\}is immediate:α=0\\alpha=0givesFℋ=IdF\_\{\\mathcal\{H\}\}=\\mathrm\{Id\}, and Proposition[1](https://arxiv.org/html/2607.16568#Thmproposition1)applies verbatim with "zero branch output" now produced by the multiplicationα⋅R​\(x\)=0×R​\(x\)\\alpha\\cdot R\(x\)=0\\times R\(x\), requiring the same finiteness hypothesis onR​\(x\)R\(x\)\. Plasticity is the content of the next proposition\.

###### Proposition 3\(Escape from initialization\)\.

Letg=∂ℒ/∂Fℋg=\\partial\\mathcal\{L\}/\\partial F\_\{\\mathcal\{H\}\}be the incoming gradient at the graft site on the first post\-surgery batch\. Then attinst\_\{\\mathrm\{ins\}\}:

∂ℒ∂α=⟨g,R​\(x;θ\)⟩,\\frac\{\\partial\\mathcal\{L\}\}\{\\partial\\alpha\}=\\langle g,\\,R\(x;\\theta\)\\rangle,which is non\-zero for almost every random draw ofθ\\theta\(with respect to any initialization distribution absolutely continuous w\.r\.t\. Lebesgue measure\), providedg≠0g\\neq 0\. After one SGD step with learning rateη\\eta,α1=−η​⟨g,R​\(x;θ\)⟩≠0\\alpha\_\{1\}=\-\\eta\\langle g,R\(x;\\theta\)\\rangle\\neq 0, and from the second step onward∇θℒ=α1​g​∂R/∂θ\\nabla\_\{\\theta\}\\mathcal\{L\}=\\alpha\_\{1\}\\,g\\,\\partial R/\\partial\\thetais generically non\-zero: the entire branch trains\.

###### Proof\.

The expression for∂ℒ/∂α\\partial\\mathcal\{L\}/\\partial\\alphais the chain rule applied toFℋ=x\+α​RF\_\{\\mathcal\{H\}\}=x\+\\alpha R\. Fix the incoming gradientg≠0g\\neq 0delivered by the first post\-surgery batch; the almost\-sure quantification is overθ\\thetaat this fixedgg, not overgg\. The mapθ↦⟨g,R​\(x;θ\)⟩\\theta\\mapsto\\langle g,R\(x;\\theta\)\\rangleis real\-analytic inθ\\theta\(composition of matrix products, softmax, RMSNorm and smooth activations\)\. It is not identically zero inθ\\theta: under standard architectures the achievable set\{R​\(x;θ\):θ\}\\\{R\(x;\\theta\):\\theta\\\}spans the output space \(e\.g\., scaling the final output projection scalesRRlinearly, so the achievable set contains a spanning family of rays\), and the given non\-zeroggcannot be orthogonal to a spanning set — someθ⋆\\theta^\{\\star\}therefore gives⟨g,R​\(x;θ⋆\)⟩≠0\\langle g,R\(x;\\theta^\{\\star\}\)\\rangle\\neq 0\. A non\-trivial real\-analytic function vanishes on a Lebesgue\-null set; hence, for this fixedgg, the gradient is non\-zero for almost every draw ofθ\\theta\. The one\-step update and the subsequent non\-vanishing of∇θℒ\\nabla\_\{\\theta\}\\mathcal\{L\}follow by substitution\. ∎

### 6\.1Undoing a Graft: the Structural Notion

A mutable graph raises a question a static one cannot even pose: what does it mean to*undo*a graft, and what does it cost?

## 7Experimental Results

Every theorem and proposition in this paper is validated by a dedicated experiment on the reference implementation \(NeuroDSL, Julia, Float32, CPU\)\. All protocols fix a master seed*before*any run and apply no post\-hoc filtering; per\-arm and per\-depth seeds are derived deterministically from it\. One protocol parameter was recalibrated once: the initial budget \(vocabulary 256, 200 steps\) produced too weak a learning signal to discriminate the arms of E2; it was changed to vocabulary 50 and 600 steps in a single decision, before analysis, and not revisited afterwards\.

### 7\.1E1: Bit\-Exactness \(Theorem[1](https://arxiv.org/html/2607.16568#Thmtheorem1), Proposition[1](https://arxiv.org/html/2607.16568#Thmproposition1)\)

A 4\-block Llama\-style model \(d=128d=128, 4 heads\) is evaluated on a held\-out batch; a Gradient\-Shadowing block is grafted between blocks 2 and 3; the logits are recomputed with no parameter update and compared at the binary level \(reinterpret\(UInt32,⋅\\cdot\)\)\. Crucially, the preconditions of Proposition[1](https://arxiv.org/html/2607.16568#Thmproposition1)are*checked*, not assumed: a scan of the residual stream at the graft site found0/40960/4096components equal to−0\.0\-0\.0, and0/40960/4096non\-finite values inR​\(x\)R\(x\)\. Under these verified preconditions, all16001600logits are bit\-identical \(0mismatches,max⁡\|Δ\|=0\.0\\max\|\\Delta\|=0\.0\) — strict binary equality, a stronger statement than the approximate function preservation reported by Net2Net or bert2BERT\.

### 7\.2E2: Plasticity and the Saddle Point \(Propositions[2](https://arxiv.org/html/2607.16568#Thmproposition2),[3](https://arxiv.org/html/2607.16568#Thmproposition3)\)

Three arms share the same initial model, data stream, and random draw ofθ\\theta; they differ*only*in\(α0,zero\-init of​Wout\)\(\\alpha\_\{0\},\\text\{zero\-init of \}W\_\{\\mathrm\{out\}\}\), made possible by the parallel branch of Remark[3](https://arxiv.org/html/2607.16568#Thmremark3)\. Training runs 600 SGD steps; Table[1](https://arxiv.org/html/2607.16568#S7.T1)reports the grafted block’s gradient signals\.

Table 1:E2 — three\-arm plasticity experiment \(600 steps, shared master seed\)\. "First step" columns give the first optimizer step at which the quantity becomes non\-zero; "never" means it remained*exactly*zero \(=0=0, no tolerance\) for the entire run\.Three predictions are confirmed at the resolution of a single optimizer step\.*Arm \(a\)*:∂ℒ/∂α=1\.64×10−2≠0\\partial\\mathcal\{L\}/\\partial\\alpha=1\.64\\times 10^\{\-2\}\\neq 0at the very first backward \(Proposition[3](https://arxiv.org/html/2607.16568#Thmproposition3)\);α\\alphamoves at step 1;∇θ\\nabla\_\{\\theta\}becomes non\-zero at step 2, onceα≠0\\alpha\\neq 0reopens the chain rule — the exact two\-step escape the proposition derives\.*Arm \(b\)*is the mirror image predicted by the Net2Net remark:∂ℒ/∂α=0\\partial\\mathcal\{L\}/\\partial\\alpha=0at step 1 \(sinceR​\(x\)≡0R\(x\)\\equiv 0\) while∇θ≠0\\nabla\_\{\\theta\}\\neq 0immediately \(the zero projections themselves receive gradient\), unlocking the upstream weights one step later\.*Arm \(c\)*: over all 600 steps,∂ℒ/∂α\\partial\\mathcal\{L\}/\\partial\\alpha,‖∇θ‖\\\|\\nabla\_\{\\theta\}\\\|, and\|α\|\|\\alpha\|remain*identically*zero — an empirical confirmation of an impossibility result \(Proposition[2](https://arxiv.org/html/2607.16568#Thmproposition2)\), at exact\-zero resolution rather than within a tolerance\. The host network’s own loss still decreases in arm \(c\) \(its pre\-existing parameters keep training\); the frozen quantity is the grafted block, not the model — precisely the failure mode Proposition[2](https://arxiv.org/html/2607.16568#Thmproposition2)warns is silent\.

Figure[1](https://arxiv.org/html/2607.16568#S7.F1)plots the full 600\-step trajectories behind Table[1](https://arxiv.org/html/2607.16568#S7.T1)\. The loss panel makes the silence of the failure mode visible: the three arms are nearly indistinguishable in loss, yet the gate and gradient panels show arm \(c\) exactly flat at zero throughout, while arms \(a\) and \(b\) each escape at the step the corresponding proposition predicts\.

![Refer to caption](https://arxiv.org/html/2607.16568v1/x1.png)Figure 1:E2 dynamics for the three arms over 600 steps: loss \(left\), gate magnitude\|α\|\|\\alpha\|\(center\), and branch gradient norm‖∇θ‖\\\|\\nabla\_\{\\theta\}\\\|on a log scale \(right\)\. Arm \(c\) is exactly zero throughout in both the gate and gradient panels and is annotated rather than plotted, since an exact zero has no representation on a logarithmic axis\.An honest magnitude caveat: in arm \(a\),\|α\|\|\\alpha\|remains small throughout the run \(∼10−3\\sim 10^\{\-3\}, final2\.7×10−42\.7\\times 10^\{\-4\}\), so while the escape is mathematically confirmed, the block’s*contribution*to the function stays modest at this scale and duration — the concern anticipated in Section[8](https://arxiv.org/html/2607.16568#S8)about the unbounded\-below magnitude of∂ℒ/∂α\\partial\\mathcal\{L\}/\\partial\\alpha, now observed\. Since E2 uses one run per arm \(by design: the arms are a controlled comparison, not a distribution estimate\), we make no claim about the ordering of final losses across arms\.

### 7\.3E3: Surgery Cost vs\. Insertion Depth \(Theorem[2](https://arxiv.org/html/2607.16568#Thmtheorem2)\)

On an 8\-block model \(412 graph nodes\), a graft is performed after blockkkfork=1,…,7k=1,\\dots,7; each sample uses a fresh, fully\-evaluated model, and the cost is split into*graft*\(block construction \+ rewiring \+ invalidation, no evaluation\) and*recompute*\(the first demand\-driven forward, which re\-executes exactly the invalidated cone\)\. Timings are trimmed medians over 15 repetitions; depths are measured in shuffled order within each repetition — a fixed order was found to inflate the first\-measured depth’s graft time by∼2\.6×\\sim 2\.6\\times\(a position artifact, removed by the shuffle, not a property of the engine\)\.

Table 2:E3 — surgery cost vs\. insertion depthkk\(8\-block model, 412 nodes, trimmed median over 15 shuffled repetitions\)\.Three observations\. First, recomputation cost tracks cone size withr=0\.9992r=0\.9992and decreases strictly monotonically — the direct validation of Theorem[2](https://arxiv.org/html/2607.16568#Thmtheorem2): cost is governed by\|𝒱k\+\|\|\\mathcal\{V\}\_\{k\}^\{\+\}\|, not by the total graph size\. Second, the graft\-plus\-invalidation bookkeeping is*constant*\(0\.7410\.741–0\.7540\.754ms\) across all depths, independent of cone size — the signature of anO​\(1\)O\(1\)\-per\-edge consumers index rather than a per\-node rule scan; the surgery itself costs less than one fifth of even the smallest recomputation\. Third, a linear fit givesrecompute≈0\.042​ms/node×\|𝒱k\+\|\+2\.24​ms\\text\{recompute\}\\approx 0\.042\\,\\text\{ms/node\}\\times\|\\mathcal\{V\}\_\{k\}^\{\+\}\|\+2\.24\\,\\text\{ms\}: the non\-zero intercept is theO​\(\|𝒱\|\)O\(\|\\mathcal\{V\}\|\)walk of the cached topological order inside the demand\-driven evaluator, paid even when only 43 nodes need recomputation\. This residual interpreter overhead is exactly what a graph\-compilation layer \(flat precomputed execution order withO​\(1\)O\(1\)dirty marking\) is designed to eliminate, and we leave its removal to that companion line of work\.

Figure[2](https://arxiv.org/html/2607.16568#S7.F2)plots recompute and graft cost against cone size directly: the linear trend and the flat bookkeeping line are both visible at a glance, and the fitted intercept is the2\.242\.24ms evaluator overhead discussed above\.

![Refer to caption](https://arxiv.org/html/2607.16568v1/x2.png)Figure 2:Surgery cost vs\. downstream cone size\|𝒱k\+\|\|\\mathcal\{V\}\_\{k\}^\{\+\}\|on the 8\-block model of Table[2](https://arxiv.org/html/2607.16568#S7.T2)\(k=1,…,7k=1,\\dots,7\)\. Recompute time \(circles\) grows linearly with cone size \(r=0\.9992r=0\.9992\); graft\-plus\-invalidation bookkeeping \(diamonds\) is flat at∼\\sim0\.75 ms regardless of cone size\.
### 7\.4F3: Continuity Across a Real Process Restart

Surgery is only useful if the mutated model, including its optimizer state, survives the full lifecycle of real training — interruption included\. Three independent Julia*processes*are compared: a control run of 500 steps with a graft at step 300; a run A executing the first 400 steps \(graft included\) then serializing graph and AdamW state and terminating; and a fresh process B that reloads everything from disk \(never re\-invoking the model constructor\) and runs the remaining 100 steps\. The concatenated A\+B loss sequence is*bit\-identical*to the control on all 500 steps\. Falsifiability check: deliberately discarding the loaded AdamW moments in B makes the run diverge from the control at exactly step 402 — the first step at which corrupted optimizer state can affect a weight update — confirming the comparison is sensitive to precisely the state whose preservation is claimed\. Figure[3](https://arxiv.org/html/2607.16568#S7.F3)shows all three loss curves: the control and the correctly\-resumed run overlap exactly, while the broken\-resume run visibly departs right after the restart marker\.

![Refer to caption](https://arxiv.org/html/2607.16568v1/x3.png)Figure 3:Training loss through a graft \(step 300\) and a real process restart \(step 400\)\. The control run and the correctly\-resumed A\+B run are bit\-identical for all 500 steps; a run that discards the loaded AdamW moments diverges from both at exactly step 402\.
### 7\.5Beyond Correctness: Utility at Equal Compute

E1–E3 and F3 establish that surgery is exact, local, plastic, and durable; they say nothing about whether growing a model*helps*\. A pre\-registered companion study on the induction task \(commitment to report the outcome recorded before results were seen\) found what an honest reading of the growth literature would predict: at equal*step*count, the grafted model slightly trails training\-from\-scratch \(mechanically — it spends fewer steps at the final architecture\); at equal*compute*\(the axis Net2Net and its successors actually claim, with the 3\-vs\-4\-block per\-step cost ratio measured at0\.760\.76rather than assumed\), a paired 20\-seed comparison shows one statistically significant window: an early advantage for grafting at16\.7%16\.7\\%of the budget \(95% CI on the paired loss difference\[\+0\.16,\+0\.56\]\[\+0\.16,\+0\.56\], excluding zero\), which fades to statistical indistinguishability from33%33\\%of the budget onward as both regimes saturate the task\. We report this asymmetry as\-is: the load\-bearing claims of this paper are exactness and locality, not a training\-efficiency advantage, and the task’s early saturation limits what any utility comparison can resolve at this scale\. Figure[4](https://arxiv.org/html/2607.16568#S7.F4)shows the full paired\-difference curve: the confidence interval clears zero only in the leftmost window\.

![Refer to caption](https://arxiv.org/html/2607.16568v1/x4.png)Figure 4:Paired loss difference \(loss from scratch−\-loss grafted\) at equal compute, mean±\\pm95% CI over 20 seeds \(normal approximation\)\. Positive values favor grafting\. The interval excludes zero only at16\.7%16\.7\\%of the budget\.

## 8Limitations

Bit\-exactness is guaranteed only under the stated IEEE\-754 hypotheses and a fixed kernel and evaluation order; frameworks with non\-deterministic reductions \(e\.g\., atomics in some CUDA kernels\) preserve functional but not bit\-level equality, and our measurements are CPU/Float32 — re\-verifying E1 on GPU and in bf16 is mechanical but remains to be done\. The almost\-sure statement of Proposition[3](https://arxiv.org/html/2607.16568#Thmproposition3)does not bound the*magnitude*of∂ℒ/∂α\\partial\\mathcal\{L\}/\\partial\\alpha, and E2 makes this concrete: the escape occurs at step 1 as proved, but\|α\|\|\\alpha\|stays near10−310^\{\-3\}over 600 steps on this task, so the grafted block’s functional contribution ramps up slowly — GradMax\-style\[[8](https://arxiv.org/html/2607.16568#bib.bib8)\]initialization ofθ\\thetacould be combined with our gate to control this magnitude\. E2 uses a single controlled run per arm; its claims are about gradient signals \(exact zeros and first\-nonzero steps\), not about loss distributions\. The utility study is confined to a toy task that saturates early\. The appendix’s timing\-dependence observation \(Section[A\.3](https://arxiv.org/html/2607.16568#A1.SS3)\) is a single controlled comparison at one graft site on one task — a falsifiable first data point, not a rate law — and the exponential\-relaxation ansatz of Definition[6](https://arxiv.org/html/2607.16568#Thmdefinition6)is a fitted description, not a derived consequence of the paper’s theorems; likewise E8 \(Section[A\.4](https://arxiv.org/html/2607.16568#A1.SS4)\) isolates one mechanism on one seed, one site, and one task, and the reversed ordering it finds under warm\-start is itself a single\-run observation\. Finally, our locality result concerns validity propagation; memory locality \(buffer reuse across the surgery\) is engine\-specific and out of scope, and the measured∼\\sim2\.2 ms evaluator intercept in E3 bounds how far locality alone can reduce small\-cone surgery cost without a compilation layer\.

## 9Conclusion

Network surgery becomes exact when the graft is an identity morphism, and remains plastic when exactness is carried by a single zero\-initialized gate over a randomly initialized branch — never by both mechanisms at once, on pain of an inescapable saddle point\. A reactive graph engine makes the operation local: exactly the downstream cone is recomputed, and all other nodes keep their values and optimizer state\. Every one of these statements now has a measurement attached to its proof: bit\-exact grafting with verified preconditions \(0/1600 mismatches\), a two\-step escape confirmed at the resolution of individual optimizer steps, a saddle point whose gradients stay at exact zero for 600 steps, locality withr=0\.9992r=0\.9992against cone size over constant∼\\sim0\.75 ms bookkeeping, and training that resumes bit\-identically across a real process restart\. Together, these results turn "growing a network mid\-training" from a fragile engineering trick into an operation with a specification, a proof, and a passing test suite\.

## Appendix AAppendix: Preliminary Observations on Post\-Insertion Gate Dynamics

*Status of this appendix\.*Everything in this appendix is exploratory: one seed, one graft site, one task, and a fitted \(not derived\) dynamical ansatz\. These observations are reported at a deliberately lower evidentiary standard than the theorems and experiments of the main text — as first, falsifiable data points on what happens to a grafted gate over the training that*follows*insertion, not as established results\.

### A\.1Functional Undo Distance

The following proposition quantifies the*functional*counterpart of the structural undo of Section[6\.1](https://arxiv.org/html/2607.16568#S6.SS1): how far the grafted function has drifted from the identity map that a structural undo would restore\.

###### Proposition 4\(Functional undo distance\)\.

For the Gradient Shadowing constructionFℋ​\(x;α\)=x\+α​R​\(x;θ\)F\_\{\\mathcal\{H\}\}\(x;\\alpha\)=x\+\\alpha R\(x;\\theta\), the functional distance between the currently grafted function and the identity map that a*structural*undo \(removing the block, restoring the edge\) would realize is, exactly and without approximation,

d​\(t\):=𝔼x​‖Fℋ​\(x;αt\)−x‖=\|αt\|⋅𝔼x​‖R​\(x;θt\)‖\.d\(t\)\\;:=\\;\\mathbb\{E\}\_\{x\}\\big\\\|F\_\{\\mathcal\{H\}\}\(x;\\alpha\_\{t\}\)\-x\\big\\\|\\;=\\;\|\\alpha\_\{t\}\|\\cdot\\mathbb\{E\}\_\{x\}\\big\\\|R\(x;\\theta\_\{t\}\)\\big\\\|\.

###### Proof\.

Immediate from the definition ofFℋF\_\{\\mathcal\{H\}\}:Fℋ​\(x;αt\)−x=αt​R​\(x;θt\)F\_\{\\mathcal\{H\}\}\(x;\\alpha\_\{t\}\)\-x=\\alpha\_\{t\}R\(x;\\theta\_\{t\}\), and‖αt​R​\(x;θt\)‖=\|αt\|⋅‖R​\(x;θt\)‖\\\|\\alpha\_\{t\}R\(x;\\theta\_\{t\}\)\\\|=\|\\alpha\_\{t\}\|\\cdot\\\|R\(x;\\theta\_\{t\}\)\\\|sinceαt∈ℝ\\alpha\_\{t\}\\in\\mathbb\{R\}\. ∎

The already\-reported E2 trajectory \(Table[1](https://arxiv.org/html/2607.16568#S7.T1), arm \(a\),§\\S[7](https://arxiv.org/html/2607.16568#S7)\) is direct evidence on this question, read through a lens the main text had not yet applied to it: since\|αt\|\|\\alpha\_\{t\}\|is logged at every step, it isd​\(t\)d\(t\)up to the \(unlogged, but plausibly slowly varying over600600steps on this task\) factor𝔼x​‖R​\(x;θt\)‖\\mathbb\{E\}\_\{x\}\\\|R\(x;\\theta\_\{t\}\)\\\|\. Read this way,\|αt\|\|\\alpha\_\{t\}\|rises from0to order10−210^\{\-2\}by step11\(the escape\), oscillates at order10−310^\{\-3\}thereafter, and ends at2\.7×10−42\.7\\times 10^\{\-4\}– so on this run, the graft remains close to undoable throughout: it has escaped the identity manifold in the strict sense of Proposition[4](https://arxiv.org/html/2607.16568#Thmproposition4), butd​\(t\)d\(t\)never grows large, consistent with the magnitude caveat already noted in§\\S[7](https://arxiv.org/html/2607.16568#S7)\.

### A\.2Absorption and Rejection Dynamics of a Grafted Gate

Propositions[2](https://arxiv.org/html/2607.16568#Thmproposition2)and[3](https://arxiv.org/html/2607.16568#Thmproposition3)settle whether the gate moves away from its initial value; they say nothing about*how*, over the training that follows\. Unlike the rest of this paper, that question has no closed form:α​\(t\)\\alpha\(t\)fort\>tinst\>t\_\{\\mathrm\{ins\}\}is the output of a non\-convex stochastic optimization, not a quantity a proof can pin down exactly\. What can be done honestly is to name the question precisely and test it empirically, in the same spirit as the phenomenological \(fitted, not derived\) learning\-curve model used in the companion growth\-schedule line of work\.

###### Definition 6\(Gate relaxation rate\)\.

Letα​\(t\)\\alpha\(t\)be the trajectory of the gate fort≥tinst\\geq t\_\{\\mathrm\{ins\}\}under either construction of Section[6](https://arxiv.org/html/2607.16568#S6)\. Its*relaxation rate*λ\\lambdais the coefficient of the exponential ansatz

α​\(t\)≈α∞\+\(α0−α∞\)​e−λ​\(t−tins\),\\alpha\(t\)\\;\\approx\\;\\alpha\_\{\\infty\}\+\(\\alpha\_\{0\}\-\\alpha\_\{\\infty\}\)\\,e^\{\-\\lambda\(t\-t\_\{\\mathrm\{ins\}\}\)\},fit by ordinary least squares onlog⁡\|α​\(t\)−α∞\|\\log\|\\alpha\(t\)\-\\alpha\_\{\\infty\}\|\(or, whenα∞\\alpha\_\{\\infty\}is not independently known, onlog⁡\|α​\(t\)\|\\log\|\\alpha\(t\)\|directly, as below\)\. We callλ\>0\\lambda\>0*rejection*\(the gate relaxes back toward a smaller magnitude thanα0\\alpha\_\{0\}\) andλ<0\\lambda<0*absorption*\(the gate grows in magnitude\)\. The*absorption time*τabs\\tau\_\{\\mathrm\{abs\}\}is1/\|λ\|1/\|\\lambda\|, the trajectory’s characteristic timescale\.

This raises a natural training\-time locality question — the temporal analogue of the structural locality of Theorem[2](https://arxiv.org/html/2607.16568#Thmtheorem2): doesλ\\lambdadepend on*when*the graft is inserted? Two graphs identical in every respect excepttinst\_\{\\mathrm\{ins\}\}isolate exactly this dependence, holding architecture, task, seed, and gate construction fixed\. We call this the*timing\-dependence hypothesis*and test it directly in E6 below\.

### A\.3E6: Timing\-Dependent Gate Dynamics of the Net2Net\-Style Construction \(Definition[6](https://arxiv.org/html/2607.16568#Thmdefinition6)\)

This experiment studies the*Net2Net\-style*construction of Remark[4](https://arxiv.org/html/2607.16568#Thmremark4)— arm \(b\) of Table[1](https://arxiv.org/html/2607.16568#S7.T1),α0=1\\alpha\_\{0\}=1with zero output projections —*not*the eponymous zero\-initialized Gradient Shadowing gate of arm \(a\): the gate here starts at full strength, and the question is whether the training that follows keeps it there\. A small character\-level language model \(TinyShakespeare, block size6464,d=64d=64,22heads, hidden128128,33Llama blocks\) is trained from a fixed seed\. A gated parallel block \(Remark[3](https://arxiv.org/html/2607.16568#Thmremark3)\) is grafted after the model’s output at one of two insertion times,tins∈\{500,2500\}t\_\{\\mathrm\{ins\}\}\\in\\\{500,2500\\\}\(“early” / “late”\), withα0=1\\alpha\_\{0\}=1andWO=Wdown=0W\_\{O\}=W\_\{\\mathrm\{down\}\}=0, so that the branch starts at full gate strength but zero output, givingα​\(t\)\\alpha\(t\)room to move in either direction as the zero projections unlock\. Both runs share architecture, task, corpus, and random seed, and differ*only*intinst\_\{\\mathrm\{ins\}\}– the controlled comparison Section[A\.2](https://arxiv.org/html/2607.16568#A1.SS2)asks for\. Training continues for12001200steps past the graft in both cases; every100100steps we logα​\(t\)\\alpha\(t\)directly and measureA​\(t\)=ℒ​\(α:=0\)−ℒ​\(αt\)A\(t\)=\\mathcal\{L\}\(\\alpha\{:=\}0\)\-\\mathcal\{L\}\(\\alpha\_\{t\}\)on a fixed held\-out validation window via the same cheap\-ablation methodology as the companion patching line of work: patchα\\alphato0, evaluate, restoreαt\\alpha\_\{t\}, evaluate again – no retraining, one forward pass per side\.

Table 3:E6 — gate trajectory summary, early vs\. late graft \(single seed, single site\)\.![Refer to caption](https://arxiv.org/html/2607.16568v1/x5.png)Figure 5:E6 — gate magnitudeα​\(t\)\\alpha\(t\)\(top\) and ablation gapA​\(t\)A\(t\)\(bottom\) for12001200steps after an early \(tins=500t\_\{\\mathrm\{ins\}\}\{=\}500\) and a late \(tins=2500t\_\{\\mathrm\{ins\}\}\{=\}2500\) graft\. Both gates decay monotonically \(rejection, not absorption\); the late graft decays faster and itsA​\(t\)A\(t\)never crosses zero, while the early graft’sA​\(t\)A\(t\)turns positive fromt≈650t\{\\approx\}650onward\.Both trajectories are well described by the exponential ansatz of Definition[6](https://arxiv.org/html/2607.16568#Thmdefinition6)\(R2≥0\.96R^\{2\}\\geq 0\.96\), and both giveλ^\>0\\hat\{\\lambda\}\>0: neither graft is*absorbed*in the sense of the gate growing to accommodate the new capacity; both are*rejected*, the optimizer shrinkingα\\alphaback from its full\-strength initialization as the randomly initialized branch proves, on net, more disruptive than useful at this scale and duration – the opposite of the naive expectation that a freshly unlocked branch would be absorbed\. The timing\-dependence hypothesis is confirmed, in this controlled single\-seed comparison, in a specific direction: the late graft is rejected≈35%\\approx 35\\%faster \(λ^late/λ^early≈1\.35\\hat\{\\lambda\}\_\{\\mathrm\{late\}\}/\\hat\{\\lambda\}\_\{\\mathrm\{early\}\}\\approx 1\.35\) and its ablation gapA​\(t\)A\(t\)stays negative for the full12001200\-step window, while the early graft’s rejection decelerates and its contribution turns net\-positive \(A​\(t\)\>0A\(t\)\>0\) from roughlyt≈650t\\approx 650onward – the branch that had more of the host network’s own training left to interact with is the one that is eventually kept, not the one that is discarded fastest\.

We report this as a single controlled comparison, not a distributional claim: one seed, one graft site, one task, exactly the caveat already attached to E2’s arms \(Table[1](https://arxiv.org/html/2607.16568#S7.T1)\), which this experiment reuses without modification\. The direction and the≈35%\\approx 35\\%effect size should be read as a first, falsifiable data point for the site/timing\-dependence question, not as an established rate law; a multi\-seed, multi\-site replication is the natural next step and is left to future work\. E8 \(Section[A\.4](https://arxiv.org/html/2607.16568#A1.SS4)\) tests Remark[9](https://arxiv.org/html/2607.16568#Thmremark9)’s candidate mechanism for this timing effect directly and finds it substantially, though not necessarily completely, explains the ordering observed here – read this section’s≈35%\\approx 35\\%figure alongside that result, not in isolation\.

### A\.4E8: Isolating the Mechanism – an Optimizer\-Moment Warm\-Start Counterfactual

Remark[9](https://arxiv.org/html/2607.16568#Thmremark9)proposes a mechanism for E6’s rejection dynamic: the branch’s AdamW second momentvvstarts at zero while its sole downstream consumer’s \(𝚕𝚖​\_​𝚑𝚎𝚊𝚍​\_​𝚆\\mathtt\{lm\\\_head\\\_W\}, the only parameterized node reading the graft’s output\) already carries a mature, non\-zerovvfrom the host’s prior training\. A first check of this mechanism, instrumenting E6’s exact protocol to logvvfor the branch and for𝚕𝚖​\_​𝚑𝚎𝚊𝚍​\_​𝚆\\mathtt\{lm\\\_head\\\_W\}separately, confirmed real desynchronization attinst\_\{\\mathrm\{ins\}\}\(the branch’s largest per\-parametervvis100100–200×200\\timessmaller than𝚕𝚖​\_​𝚑𝚎𝚊𝚍​\_​𝚆\\mathtt\{lm\\\_head\\\_W\}’s throughout the run\) – but the raw*ratio*of this gap was, if anything,*smaller*for the late graft at matched steps\-since\-insertion, the opposite of what would naively explain a*faster*late\-graft rejection; correlation alone was inconclusive; a mean computed naively over all branch parameters was itself misleading here, reading as numerically zero because∼90,000\\sim\\\!90\{,\}000mostly\-quiescent branch weights dilute the handful that carry real signal – resolved by reporting the per\-parameter maximum instead, the quantity actually governing AdamW’s per\-parameter step size\.

The direct test: E6’s protocol is rerun for both arms with one change – immediately after the graft, every branch parameter’svvis set not to zero but tomean​\(v𝚕𝚖​\_​𝚑𝚎𝚊𝚍​\_​𝚆\)\\mathrm\{mean\}\(v\_\{\\mathtt\{lm\\\_head\\\_W\}\}\)at that instant \(the host’s own current moment estimate;m1m\_\{1\}is left at zero, the standard choice, since onlyvventers the effective\-step\-size mechanism of Remark[9](https://arxiv.org/html/2607.16568#Thmremark9)\)\.

Table 4:E8 — gate relaxation rateλ^\\hat\{\\lambda\}\(Definition[6](https://arxiv.org/html/2607.16568#Thmdefinition6)\), cold\- vs\. warm\-start second moment\.![Refer to caption](https://arxiv.org/html/2607.16568v1/x6.png)Figure 6:E8 — gate magnitudeα​\(t\)\\alpha\(t\), cold\-start \(E6, dashed\) vs\. warm\-start \(solid\), both arms\. Warm\-starting the branch’s second moment to match its downstream consumer’s collapses the rejection rate by nearly an order of magnitude in both arms and reverses which arm rejects faster\.Two findings, both direct consequences of the intervention rather than of anything asserted in advance\. First, warm\-starting slows rejection sharply in*both*arms \(6\.9×6\.9\\timesand11\.6×11\.6\\times\): the candidate mechanism is not merely present but load\-bearing – most of E6’s rejection magnitude is attributable to the cold\-start effective\-step\-size mismatch, not to some other property of a freshly random branch\. Second, and unanticipated:*the early/late ordering reverses*\. Under warm\-start,λ^late<λ^early\\hat\{\\lambda\}\_\{\\mathrm\{late\}\}<\\hat\{\\lambda\}\_\{\\mathrm\{early\}\}\(4\.50×10−54\.50\\times 10^\{\-5\}vs\.5\.62×10−55\.62\\times 10^\{\-5\}, late20%20\\%*slower*, not faster\), whereas cold\-start gave the opposite ordering by35%35\\%\(Section[A\.3](https://arxiv.org/html/2607.16568#A1.SS3)\)\. The most parsimonious reading:𝚕𝚖​\_​𝚑𝚎𝚊𝚍​\_​𝚆\\mathtt\{lm\\\_head\\\_W\}’svvis itself larger attins=2500t\_\{\\mathrm\{ins\}\}=2500than attins=500t\_\{\\mathrm\{ins\}\}=500\(more prior training\), so the cold\-start mismatch – and hence the spurious component of the timing effect – is mechanically*larger*for the late graft; once that mismatch is equalized by warm\-starting, a smaller, opposite\-signed timing effect is revealed underneath it\. We do not claim to have isolated every contributor to this residual effect, only that the dominant one in E6’s cold\-start reading was the optimizer\-moment artifact, not a deeper property of*when*in training a graft occurs\.

## References

- \[1\]Chen, T\., Goodfellow, I\., Shlens, J\. \(2016\)\. Net2Net: Accelerating Learning via Knowledge Transfer\.*ICLR*\.
- \[2\]Bachlechner, T\., Majumder, B\.P\., Mao, H\., Cottrell, G\., McAuley, J\. \(2021\)\. ReZero is All You Need: Fast Convergence at Large Depth\.*UAI*\.
- \[3\]Zhang, H\., Dauphin, Y\.N\., Ma, T\. \(2019\)\. Fixup Initialization: Residual Learning Without Normalization\.*ICLR*\.
- \[4\]Touvron, H\., Cord, M\., Sablayrolles, A\., Synnaeve, G\., Jégou, H\. \(2021\)\. Going Deeper with Image Transformers\.*ICCV*\.
- \[5\]Gong, L\., He, D\., Li, Z\., Qin, T\., Wang, L\., Liu, T\.\-Y\. \(2019\)\. Efficient Training of BERT by Progressively Stacking\.*ICML*\.
- \[6\]Chen, C\., Yin, Y\., Shang, L\., Jiang, X\., Qin, Y\., Wang, F\., Wang, Z\., Chen, X\., Liu, Z\., Liu, Q\. \(2022\)\. bert2BERT: Towards Reusable Pretrained Language Models\.*ACL*\.
- \[7\]Wang, Y\., et al\. \(2024\)\. LEMON: Lossless Model Expansion\.*ICLR*\.
- \[8\]Evci, U\., van Merriënboer, B\., Unterthiner, T\., Vladymyrov, M\., Pedregosa, F\. \(2022\)\. GradMax: Growing Neural Networks using Gradient Information\.*ICLR*\.
- \[9\]Touvron, H\., et al\. \(2023\)\. LLaMA: Open and Efficient Foundation Language Models\.*arXiv:2302\.13971*\.
- \[10\]Zhang, B\., Sennrich, R\. \(2019\)\. Root Mean Square Layer Normalization\.*NeurIPS*\.
- \[11\]Paszke, A\., et al\. \(2019\)\. PyTorch: An Imperative Style, High\-Performance Deep Learning Library\.*NeurIPS*\.
- \[12\]Bradbury, J\., et al\. \(2018\)\. JAX: Composable Transformations of Python\+NumPy Programs\.[http://github\.com/google/jax](http://github.com/google/jax)\.
- \[13\]Khemais, A\. \(2026\)\. NeuroDSL: A Reactive Computational Graph Framework for Deep Learning in Julia\.*Preprint*\.

Similar Articles

On the Stability of Growth in Structural Plasticity

arXiv cs.LG

This academic paper investigates the asymmetry between pruning and growth in structural plasticity for neural networks, showing that newborn units suffer from weaker gradient signals than incumbent units, and proposes interventions to improve integration.

Schreier-Coset Graph Rewiring

arXiv cs.LG

Introduces Schreier-Coset Graph Rewiring, a group-theoretic method to rewire graphs for GNNs, mitigating over-squashing by improving spectral gap and effective resistance. Empirical results show significant reduction in effective resistance across learning tasks.

A Generative Model of Complex Networks Using Graphons and Neural Inverse Operators

arXiv cs.LG

This USC paper proposes a generative model for complex networks that combines mechanistic interpretability with amortized inference: a multifractal step graphon parameterizes networks, while a neural inverse operator recovers parameters on unseen graph sizes. The method outperforms a graph foundation model on zero-shot generation benchmarks and detects brain-state changes in multi-subject EEG more sensitively than traditional network statistics.