Network Transplanting

Quanshi Zhang, Yu Yang, Ying Nian Wu, Song-Chun ZhuarXiv 2018

Abstract

Standard deep learning models are typically monolithic, requiring simultaneous training on all categories and suffering from catastrophic forgetting when updated. We propose a modular framework that allows for "plug and play" neural network components. Using a novel back-distillation algorithm, we demonstrate how to merge specific category modules into generic task modules with minimal data. This method effectively addresses the "forgotten space" problem—where fixed layers ignore features irrelevant to their original training—enabling efficient model expansion and zero-shot learning.

Introduction

Deep learning has traditionally relied on end-to-end, "black-box" training. This approach presents significant bottlenecks: high start-up costs due to massive data requirements, catastrophic forgetting when adding new tasks, and the logistical burden of moving large datasets. Furthermore, simply attaching new components to a pre-trained model often fails because the fixed layers have learned to "filter out" features not present in the original training set—a phenomenon termed the "forgotten space" problem.

Modular Architecture and Transplanting

To address these issues, we introduce a modular architecture consisting of three primary components:

  1. Category Modules: Specialized feature extractors for specific objects.
  2. Task Modules: High-level heads for tasks like classification or segmentation.
  3. Adapters: Small, trainable layers that bridge the gap between category and task modules.
The functional modular structure and the transplanting process across different operations.

As shown in the figure above, this structure allows for two main operations: transplanting an existing category to a new task (Op. 1) or learning a new adapter to connect an existing task module to a new category (Op. 2). This modularity allows humans to manually activate or deactivate specific linkages to customize model behavior without full retraining.

The Back-Distillation Algorithm

The primary challenge in transplanting is that fixed task modules block useful gradients for new features. Standard backpropagation cannot effectively train an adapter if the subsequent layers project the new features into a "forgotten space" where they are ignored by the task module.

Our solution, back-distillation, forces a "student" network's internal gradients (Jacobians) to match those of a "teacher" network that already understands the target category. This process effectively "re-aligns" the adapter's output to fall within the functional manifold of the task module.

Overview of the back-distillation process and the visualization of the "forgotten space" problem.

To ensure stability during this optimization, we employ pseudo-gradients, such as replacing max-pooling with average pooling and using "dummy ReLU" derivatives to maintain gradient flow through inactive neurons. This ensures the adapter does not produce "garbage" features that the task module cannot interpret.

Experimental Results

We evaluated the framework on PASCAL VOC datasets for classification and segmentation. Key findings include:

  • Efficiency: In binary classification, back-distillation with zero training samples achieved a 1.75% error rate, significantly outperforming a direct-learning baseline that used 100 samples (9.79% error).
  • Segmentation: For complex tasks, the method provided a 10–12% accuracy boost over traditional transfer learning in low-data scenarios (10–100 samples).
  • Robustness: The modular nature inherently prevents catastrophic forgetting, as existing modules are never modified—only the new adapter is trained.

Conclusion

Network transplanting offers a flexible, data-efficient alternative to monolithic training. While deeper adapters remain challenging to optimize and performance varies with category similarity, the ability to "plug and play" modules opens new avenues for scalable and interpretable AI systems. Future research will focus on automated donor selection to identify the best pre-trained modules for specific transplant tasks.

Summary updated

BibTeX
@misc{zhang2018network,
  author = {Quanshi Zhang and Yu Yang and Ying Nian Wu and Song-Chun Zhu},
  title = {{Network Transplanting}},
  year = {2018},
  eprint = {1804.10272},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1804.10272},
}
Figure