Abstract
Multi-Domain Learning (MDL) aims to adapt a single pre-trained model to multiple diverse tasks. However, existing methods often suffer from memory bloat and fixed computational complexity regardless of task difficulty. We present Budget-Aware Adapters ($BA^2$), a novel framework that introduces trainable binary switches to prune unnecessary feature channels for specific domains. By formulating adaptation as a constrained optimization problem, $BA^2$ allows models to strictly adhere to user-defined computational budgets. Our approach achieves state-of-the-art accuracy on major benchmarks while significantly reducing FLOPs and storage requirements compared to traditional adapters.
Introduction
In computer vision, the goal of Multi-Domain Learning (MDL) is to enable a single backbone model to perform well across various domains, such as natural images, sketches, and medical scans. The standard paradigm involves adding domain-specific "adapters" to a large pre-trained model like ResNet. While effective, this approach faces two significant challenges:
- Memory Overhead: Storing separate adapter parameters for dozens of domains leads to substantial memory bloat.
- Inflexible Complexity: Traditional adapters do not modify the underlying backbone's execution. Consequently, a model performs the same amount of computation for a simple task (e.g., digit recognition) as it does for a complex one (e.g., fine-grained bird classification).
Ideally, an MDL system should offer a flexible trade-off between accuracy and efficiency, allowing deployment on diverse hardware ranging from high-end servers to resource-constrained mobile devices.
Methodology: Budget-Aware Adapters ($BA^2$)
The core of our method is the Budget-Aware Adapter ($BA^2$), which serves as a "gatekeeper" for the pre-trained model's features. Unlike standard adapters that add new layers, $BA^2$ selectively activates or deactivates existing feature channels.
Channel Switching Mechanism
For each convolutional layer in the pre-trained network, we introduce a binary switch vector $s_c$. Each element in this vector corresponds to a feature channel. If a switch is active (1), the channel is processed; if inactive (0), it is skipped. This mechanism allows the model to dynamically "slim" itself for specific tasks.
Constrained Optimization
To ensure the model respects a target computational budget $\beta$ (e.g., 50% of original FLOPs), we treat training as a constrained optimization problem. We employ Lagrange multipliers to penalize the model if the number of active channels exceeds the budget. During training, the backbone weights remain frozen to prevent catastrophic forgetting, while only the binary switches and a minimal set of batch-normalization parameters are optimized for each new domain.
Experimental Evaluation
We evaluated $BA^2$ on three challenging benchmarks: the Visual Decathlon Challenge, the ImageNet-to-Sketch benchmark, and single-domain ablations on CIFAR datasets.
Performance and Efficiency Trade-offs
A key insight from our experiments is that $BA^2$ automatically discovers task-specific complexity. Simpler datasets like SVHN (digits) maintain high accuracy even under tight budgets, whereas more complex datasets like DTD (textures) require more active channels.
As shown in the results, $BA^2$ can reduce computational costs by over 50% with negligible loss in accuracy. On the Visual Decathlon, our method achieved a FLOPs ratio as low as 0.325 while remaining competitive with methods using 100% of the original computation. Furthermore, because the switches are binary (1-bit), the storage overhead for new domains is significantly lower than that of 32-bit floating-point adapters.
Conclusion and Future Directions
Budget-Aware Adapters provide a robust framework for efficient Multi-Domain Learning by decoupling model performance from the fixed complexity of the pre-trained backbone. While $BA^2$ currently requires training for discrete budget targets, future work will explore continuous budget control to allow runtime adjustments. Additionally, optimizing hardware-level execution for sparse channel selection will further realize the theoretical speedups demonstrated in this work.
Summary updated