$Δ$-Patching: A Framework for Rapid Adaptation of Pre-trained Convolutional Networks without Base Performance Loss

Chaitanya Devaguptapu, Samarth Sinha, K J Joseph, Vineeth N Balasubramanian, Animesh Garg · DOI

Abstract

Models pre-trained on large-scale datasets are often fine-tuned to support newer tasks and datasets that arrive over time. This process necessitates storing copies of the model over time for each task that the pre-trained model is fine-tuned to. Building on top of recent model patching work, we propose Δ-Patching for fine-tuning neural network models in an efficient manner, without the need to store model copies. We propose a simple and lightweight method called Δ-Networks to achieve this objective. Our comprehensive experiments across setting and architecture variants show that Δ-Networks outperform earlier model patching work while only requiring a fraction of parameters to be trained. We also show that this approach can be used for other problem settings such as transfer learning and zero-shot domain adaptation, as well as other tasks such as detection and segmentation.

The Challenge of Model Adaptation

In the fast-moving world of computer vision, a model trained yesterday might be obsolete today. Whether it’s a medical AI needing to recognize a new disease variant or an e-commerce tool adapting to seasonal fashion trends, we constantly need to "patch" our models. Traditionally, this meant fine-tuning, which often leads to catastrophic forgetting—where the model learns the new task but loses its ability to perform the original one.

When we adapt a pre-trained model (like one trained on ImageNet) to a specific task, we usually modify its internal weights. This creates two major headaches: performance degradation on the base task and massive storage bloat from keeping multiple model versions.

Comparison of Δ-Patching with traditional learning paradigms like Transfer Learning and Continual Learning.

The Δ-Patching Architecture

The authors propose Δ-Networks to solve these issues. The core philosophy is simple: Don't touch the base model. Instead, they treat the pre-trained model as a frozen backbone and "patch" it by adding a few extra paths for data to flow through.

Architecture of a Δ Network block (right) compared to a standard residual block (left), highlighting the input-conditioned Δ Module.

Key components include:

  • Frozen Backbone: The original weights are never modified, ensuring the "base" performance remains 100% intact.
  • Δ-Modules: These are tiny, two-layer "hypernetworks." For every image the model sees, the Δ-module looks at the input and decides how much weight to give to new, auxiliary skip connections.
  • Input-Conditioned Skip Connections: Unlike standard ResNets where skip connections are fixed, Δ-Networks use connections that adapt to the specific image being processed.
  • End-to-End Differentiability: Because the Δ-modules are just small neural networks, the entire patching process can be trained using standard gradient descent.

Experimental Results and Insights

The researchers evaluated their framework across a massive battery of benchmarks, including ImageNet, fine-grained classification (FGVC-Aircraft, Stanford Cars), and complex vision tasks like object detection (PASCAL-VOC).

Key Findings:

  • Zero Base Loss: By design, the performance on the original ImageNet task never drops by even 0.1%.
  • Superior Accuracy: In "Joint Patching" (adapting to multiple tasks at once), Δ-Networks significantly outperformed previous methods. For a ResNet-18, Δ-Patching achieved ~71% harmonic mean accuracy across multiple tasks, compared to ~22% for previous state-of-the-art methods like PAINT.
  • Efficiency: Δ-Networks achieved these results using only a fraction of the parameters. A patched ResNet-18 only requires training 0.4M parameters, compared to the 11.2M required for full fine-tuning.
  • Emergent Sparsity: The model naturally ignores many of the new connections in the early layers but relies heavily on them in the final layers. This suggests that low-level features (edges, textures) are universal, while high-level features need more "patching."

Conclusion

Δ-Patching allows developers to adapt large, pre-trained models to new tasks by adding lightweight, input-conditioned skip connections while keeping the original model weights frozen. This approach guarantees zero performance loss on the original task, requires significantly less storage than keeping multiple model copies, and sets new state-of-the-art results in transfer learning. While currently focused on CNNs, future work will likely explore integrating Δ-modules into attention-based architectures like Vision Transformers (ViTs).

Summary updated

BibTeX
@misc{devaguptapu2023patching,
  author = {Chaitanya Devaguptapu and Samarth Sinha and K J Joseph and Vineeth N Balasubramanian and Animesh Garg},
  title = {{$Δ$-Patching: A Framework for Rapid Adaptation of Pre-trained Convolutional Networks without Base Performance Loss}},
  year = {2023},
  eprint = {2303.14772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.14772},
}
Figure