[Paper Review] Piggyback: Adapting a Single Network to Multiple Tasks by Learning to Mask Weights
This paper proposes Piggyback, a method that adapts a single pre-trained deep neural network to multiple new tasks by learning binary masks to selectively activate or deactivate weights, without modifying the original network. The approach enables performance comparable to fine-tuned networks across diverse image classification tasks—including those with large domain shifts—while incurring only 1 bit of overhead per parameter per task and avoiding catastrophic forgetting.
This work presents a method for adapting a single, fixed deep neural network to multiple tasks without affecting performance on already learned tasks. By building upon ideas from network quantization and pruning, we learn binary masks that piggyback on an existing network, or are applied to unmodified weights of that network to provide good performance on a new task. These masks are learned in an end-to-end differentiable fashion, and incur a low overhead of 1 bit per network parameter, per task. Even though the underlying network is fixed, the ability to mask individual weights allows for the learning of a large number of filters. We show performance comparable to dedicated fine-tuned networks for a variety of classification tasks, including those with large domain shifts from the initial task (ImageNet), and a variety of network architectures. Unlike prior work, we do not suffer from catastrophic forgetting or competition between tasks, and our performance is agnostic to task ordering. Code available at https://github.com/arunmallya/piggyback.
Motivation & Objective
- Address the challenge of continual learning in deep networks, where adding new tasks leads to catastrophic forgetting in existing models.
- Overcome limitations of fine-tuning and regularization-based methods that degrade performance on prior tasks or require extensive parameter updates.
- Enable efficient adaptation of a single pre-trained network to multiple downstream tasks without retraining or modifying the original weights.
- Minimize additional parameter cost while maintaining high performance across diverse datasets and architectures, including those with large domain shifts.
- Provide a scalable solution for deploying new capabilities on edge devices without downloading new models or altering existing ones.
Proposed method
- Leverage a pre-trained backbone network with fixed, unmodified weights to serve as the base for all tasks.
- Introduce learnable real-valued mask weights per task, which are differentiable and passed through a differentiable thresholding function to produce binary masks.
- Apply the binary masks element-wise to the backbone weights, effectively creating a task-specific filter by activating or deactivating individual weights.
- Train the mask weights end-to-end using backpropagation with a task-specific loss, while keeping the backbone weights frozen.
- After training, discard the real-valued mask weights and retain only the thresholded binary masks, which are stored per task.
- Support multiple tasks by learning independent binary masks for each, enabling the same backbone to serve as a shared feature extractor across all tasks.
Experimental results
Research questions
- RQ1Can a fixed, pre-trained deep network be effectively adapted to new tasks without fine-tuning or weight updates?
- RQ2Can binary mask learning prevent catastrophic forgetting while maintaining performance on previously learned tasks?
- RQ3Does the method generalize across datasets with large domain shifts, such as ImageNet to WikiArt or sketches?
- RQ4How does the performance of the piggyback method compare to fine-tuning and other continual learning baselines in terms of accuracy and parameter efficiency?
- RQ5Can the method be extended to multi-layer architectures and tasks like semantic segmentation with mixed training schemes?
Key findings
- Piggyback achieves top-1 accuracy of 97.24% on the Visual Decathlon test set, competitive with state-of-the-art methods like DAN (97.24% vs. 96.77%) while using only 1.28× the parameter cost of the base network.
- The method achieves a mean IOU of 61.41 on the PASCAL 2011 + SBD semantic segmentation task, closely matching the 61.08 IOU of a full fine-tuned VGG-16, with only 17 MB overhead for masks and 7.5 MB for new layers.
- Performance is agnostic to task ordering and does not degrade on prior tasks, even after multiple tasks are added, due to the fixed backbone weights.
- The method generalizes across architectures, including VGG-16, ResNets, and DenseNets, and performs well on datasets with significant domain shifts such as WikiArt paintings and human sketches.
- The approach incurs only 1 bit of additional storage per parameter per task, resulting in a total parameter ratio of 1.28× when applied to 9 tasks, the lowest among all methods tested.
- The method maintains high performance even when only a single fully connected layer is added on top, and extends successfully to mixed training schemes involving both fine-tuned and masked layers.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.