Parameter Sharing in Budget-Aware Adapters for Multi-Domain Learning

Samuel Felipe dos Santos, Rodrigo Ferreira Berriel, Thiago Oliveira-Santos, Nicu Sebe, Jurandy Almeida · OpenReview

Abstract

Deep learning has achieved state-of-the-art performance on several computer vision tasks and domains. Nevertheless, it still has a high computational cost and demands a significant amount of parameters. Such requirements hinder the use in resource-limited environments and demand both software and hardware optimization. Another limitation is that deep models are usually specialized into a single domain or task, requiring them to learn and store new parameters for each new one. Multi-Domain Learning (MDL) attempts to solve this problem by learning a single model that is capable of performing well in multiple domains. Nevertheless, the models are usually larger than the baseline for a single domain. This work tackles both of these problems: our objective is to prune models capable of handling multiple domains according to a user defined budget, making them more computationally affordable while keeping a similar classification performance. We achieve this by encouraging all domains to use a similar subset of filters from the baseline model, up to the amount defined by the user's budget. Then, filters that are not used by any domain are pruned from the network. The proposed approach innovates by better adapting to resource-limited devices while, to our knowledge, being the only work that is capable of handling multiple domains at test time with fewer parameters and lower computational complexity than the baseline model for a single domain.

Introduction

Standard deep learning models are typically specialized for a single task. To handle multiple domains, such as recognizing aircraft, textures, and flowers simultaneously, Multi-Domain Learning (MDL) traditionally employs a shared "backbone" network (e.g., ResNet) augmented with task-specific "adapters."

Conceptual comparison between standard adapters, budget-aware adapters, and the proposed budget-aware pruning method.

However, a significant efficiency gap remains: even with state-of-the-art adapters like Budget-Aware Adapters ($BA^2$), the model must retain the entire backbone because different tasks often rely on non-overlapping sets of filters. If Task A requires one set of filters and Task B requires another, the full network must be stored. This research introduces Budget-Aware Pruning (BAP), a method that encourages different tasks to share the same convolutional filters, allowing unused portions of the network to be pruned entirely for deployment on resource-constrained devices.

Methodology

The proposed method builds upon the $BA^2$ framework, which utilizes binary masks or "switches" to enable specific convolutional channels based on a user-defined budget ($\beta$). The core innovation is the Parameter-Sharing Loss ($L_{PS}$).

The mechanism of the Parameter-Sharing Loss, showing how masks for different domains are intersected to encourage filter reuse.

Parameter-Sharing Loss

Unlike previous methods that train tasks sequentially, this approach employs simultaneous training across all domains in a round-robin fashion. The $L_{PS}$ calculates the intersection of the binary masks across all domains. By penalizing models when the overlap between task requirements is too small, the loss forces different domains to utilize a similar subset of filters. Consequently, filters that remain unused by all domains can be permanently pruned, resulting in a sub-backbone that is more efficient than the original pre-trained model.

Experimental Setup

The approach was evaluated on two major benchmarks:

  • Visual Decathlon Challenge: A diverse 10-dataset benchmark including ImageNet, CIFAR-100, Aircraft, and DTD.
  • ImageNet-to-Sketch: A setting involving six heterogeneous domains, ranging from standard photography to sketches and paintings.

Results and Discussion

The experimental results demonstrate that sharing is not a natural tendency for deep models; without the explicit $L_{PS}$ loss, domains prefer distinct filter sets. By enforcing sharing, the model achieves significant efficiency gains:

  • Parameter Reduction: On the Visual Decathlon with a budget of $\beta=0.25$, the method reduced total parameters by 49.9% compared to the original backbone. In contrast, standard $BA^2$ actually increased parameter count by 3% due to adapter overhead.
  • Computational Efficiency: Pruned models showed drastically lower FLOPs. At a 25% budget, the model required only 23.8% of the original backbone's computations.
  • Performance Trade-offs: While simultaneous training on diverse datasets can lead to slight accuracy drops in smaller datasets (like Aircraft) due to interference, the "Score per Parameter" ($S_P$) is significantly higher, proving the model's superior efficiency for edge deployment.

Conclusion

Budget-Aware Pruning represents a significant step forward in MDL by producing models that are smaller and faster than single-domain baselines. By setting a hard budget, users can tailor the model to specific hardware constraints without sacrificing the ability to handle multiple complex domains. Future work will focus on mitigating interference during simultaneous training and extending the method to more diverse architectures.

Summary updated

BibTeX
@inproceedings{santos2023parameter,
  author = {Samuel Felipe dos Santos and Rodrigo Ferreira Berriel and Thiago Oliveira-Santos and Nicu Sebe and Jurandy Almeida},
  title = {{Parameter Sharing in Budget-Aware Adapters for Multi-Domain Learning}},
  booktitle = {ICIAP},
  year = {2023},
  doi = {10.1007/978-3-031-43153-1\_40},
}
Figure