Neural Network Surgery with Sets

Jonathan Raiman, Susan Zhang, Christy Dennison · OpenReview

Introduction

Training state-of-the-art neural networks, particularly in complex reinforcement learning environments, is an immense computational undertaking. Traditionally, any modification to a model's architecture or input schema—such as adding a new feature or reordering an input vector—required researchers to either restart training from scratch or perform "manual surgery." This manual process is tedious, error-prone, and often results in a significant loss of learned knowledge.

"Neural Network Surgery with Sets" introduces an automated framework to "salvage" trained weights ($\Theta_{old}$) and map them to a new model configuration ($\Theta_{new}$). This methodology ensures that the months of compute invested in a model's "knowledge" are preserved through architectural evolution.

Methodology: Boolean Logic Mapping

The core challenge of automated surgery is identifying which parameters are semantically linked to specific input features. The authors propose a "Boolean Logic Mapping" approach, which they demonstrate to be superior to traditional gradient-based mapping.

In this framework, the standard computational graph is mirrored by a parallel graph that propagates sets of feature identifiers rather than floating-point values. Using efficient bitfields, each operation in the network tracks which features influence its output.

Tracking feature-parameter interactions using Boolean sets.

As shown in the diagram, when a parameter (like a bias or weight) interacts with a set of features through an operation (addition or multiplication), it "inherits" those feature tags. This creates a formal schema where parameters have semantic "addresses." Unlike gradient mapping, which can be hindered by weight initialization or activation saturation, Boolean set propagation is agnostic to the specific weight values and relies solely on the graph's connectivity.

Case Study: OpenAI Five

The primary validation for this methodology was the development of OpenAI Five, the reinforcement learning agent that achieved world-champion status in Dota 2. Over a 10-month training period, the model underwent 20 major "surgeries" to accommodate game updates, new hero additions, and architectural refinements.

TrueSkill progression of OpenAI Five across 20 major surgeries.

The use of automated surgery allowed the team to maintain a continuous learning curve. Without this capability, retraining the model from scratch for every major change would have required an estimated 40 months of compute time. By salvaging weights, the team achieved the same results in just 10 months—a 4x improvement in research velocity.

Key Results and Efficiency

The automated mapping system demonstrated remarkable precision and efficiency:

  • Precision: The system detected 100% of feature-parameter interactions and successfully transferred 98.68% of the parameters.
  • Speed: The Boolean logic mapping was approximately 24 times faster than gradient-based methods, generating the interaction map in under 40 seconds compared to over 15 minutes for gradients.
  • Robustness: The method proved highly effective for "first-touch" layers and models with isolated processing streams, though the authors note that "mixing" in deep fully connected layers remains a boundary for the technique.

Conclusion

Neural Network Surgery with Sets provides a rigorous foundation for long-term model evolution. By treating parameters as semantically addressed entities rather than anonymous tensors, researchers can iterate on complex architectures without the prohibitive cost of retraining. While challenges remain in stabilizing models immediately post-surgery, this framework represents a significant step toward more sustainable and iterative deep learning research.

Summary updated

BibTeX
@misc{raiman2019neural,
  author = {Jonathan Raiman and Susan Zhang and Christy Dennison},
  title = {{Neural Network Surgery with Sets}},
  year = {2019},
  eprint = {1912.06719},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.06719},
}
Figure