Exact Network Surgery: Function-Preserving Growth for Neural Networks

Abdallah Khemais (ISITCOM, University of Sousse)· July 21, 2026 View original

Summary

This research introduces "Exact Network Surgery," a method for in-place insertion of residual blocks into live computational graphs that preserves the network's function bit-exactly. It ensures inserted parameters remain trainable immediately and avoids full retraining, offering a novel approach to expanding model capacity.

This paper formalizes "Exact Network Surgery," a novel technique for dynamically expanding the capacity of neural networks without altering their learned function. Unlike previous methods that might introduce numerical perturbations or require a complete rebuild of the training program, this approach allows for the bit-exact insertion of a residual block into an active computational graph. The method ensures that the network's function remains precisely the same after the insertion, even under specific floating-point assumptions. Crucially, the newly inserted parameters are immediately trainable, and the system is designed to only recompute the necessary downstream parts of the graph, leaving other nodes and optimizer states untouched. The research includes proofs for an identity-morphism theorem for gated residual blocks and a structural-locality theorem, demonstrating the efficiency of the reactive invalidation engine. Empirical validation using NeuroDSL confirms the bit-exactness of grafting, the immediate trainability of new parameters, and the minimal computational overhead, presenting a significant advancement in flexible neural network architecture design.

Why it matters

AI engineers and researchers can use this technique to incrementally grow and refine neural network models in production without disrupting their current performance or requiring extensive retraining, leading to more agile model development and deployment.

How to implement this in your domain

  1. 1Explore reactive computational graph engines that support dynamic graph modifications.
  2. 2Implement gated residual blocks designed for identity-morphism properties.
  3. 3Develop a mechanism for in-place insertion of these blocks into a live network.
  4. 4Ensure the reactive engine correctly identifies and recomputes only affected downstream nodes.
  5. 5Test the bit-exactness and immediate trainability of inserted parameters in a controlled environment.

Who benefits

AI/ML DevelopmentSoftware EngineeringCloud ComputingRoboticsScientific Computing

Key takeaways

  • Exact Network Surgery allows bit-exact, function-preserving expansion of neural networks.
  • It enables in-place insertion of residual blocks into live computational graphs.
  • New parameters are immediately trainable without requiring full model retraining.
  • The method minimizes computational overhead by only recomputing affected graph parts.

Original post by Abdallah Khemais (ISITCOM, University of Sousse)

"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…"

View on X

Originally posted by Abdallah Khemais (ISITCOM, University of Sousse) on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses