Exact Network Surgery: Functional Invariance and Gradient Plasticity in Reactive Computational Graphs
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.
Create a lesson
Metadata
- Categories
- cs.AI, cs.LG, cs.PL
- Comments
- Companion paper: "Cost Accounting for Reactive Computational Graphs" (submitted concurrently)
Related papers
Knowledge-Base Gradient Descent: Self-Structuring Learning through Question Answering
Shared title terminologycs.AIMasahiro Kato
From Shared Patterns to Individual Evidence: Two-Stage Reasoning for Emerging Entities in Temporal Knowledge Graphs
Shared title terminologycs.AIJinchuan Zhang, Lei Gao, Hongyu Jiang et al.
EgoUseBench: Benchmarking Computer-Use Agents under Evolving First-Person Contexts
Shared title terminologycs.AIYurun Chen, Biao Yi, Qihang Yu et al.
Did the Model Forecast It, or Already Know It? Evaluating Large Language Models for Novel Drug-Target Prioritisation with a Temporal Knowledge-Graph Oracle
Shared title terminologycs.AIPui Chung Siu, Yuan Liang, Claudia Cabrera et al.
WhatIf: Counterfactual World Models over Action-Grounded Causal Graphs for Robotic Manipulation
Shared title terminologycs.AIXu Yang, Kailai Sun, Qianchuan Zhao
FIG-MAC: A Fine-grained Inspiration Graph Empowered Multi-Agent Collaboration for Automated Scientific Hypothesis Generation
Shared title terminologycs.AISiyuan Chen, Yuping Gao, Tai Huang et al.