AdapMTL: Adaptive Pruning Framework for Multitask Learning Model

Mingcan Xiang, Steven Jiaxun Tang, Qizheng Yang, Hui Guan, Tongping Liu · DOI

TL;DR

This paper introduces AdapMTL, a novel framework for efficiently compressing multitask learning (MTL) models. By adaptively learning pruning thresholds for different model components (shared backbone and task-specific heads) and dynamically adjusting task importance, AdapMTL achieves high sparsity while maintaining excellent accuracy across multiple tasks, outperforming existing methods.

What Problem Does This Paper Address?

Modern AI models, especially those handling diverse data like images and videos, often require immense computational resources. Multitask learning (MTL) offers a way to train a single model for multiple tasks simultaneously, improving efficiency and performance by sharing knowledge. However, compressing these complex MTL models presents a unique challenge: how to reduce their size (pruning) without sacrificing accuracy on any of the individual tasks. Existing pruning methods, often designed for single tasks, struggle to balance sparsity allocation across the shared backbone and the various task-specific heads, leading to suboptimal performance. This paper aims to bridge this gap by proposing a more intelligent and adaptive pruning strategy specifically for MTL.

Methods

AdapMTL tackles the MTL pruning problem with two core innovations:

  • Adaptive Component-wise Soft Thresholds: Instead of a single pruning threshold for the entire model, AdapMTL introduces learnable "soft thresholds" for each component: the shared backbone and each individual task-specific head. These thresholds are learned alongside the model weights during training. This allows the framework to automatically identify how sensitive each part of the model is to pruning and adjust sparsity accordingly. For instance, a highly sensitive component will retain more weights, while a robust one can be pruned more aggressively.
  • Adaptive Weighting Mechanism: To further refine pruning, AdapMTL dynamically adjusts the importance of each task's loss function during training. If a task's loss is stable, indicating robustness to pruning, its loss is weighted higher, allowing for more aggressive pruning of its corresponding head. Conversely, if a task's loss fluctuates significantly, its weight is reduced to prevent performance degradation. This mechanism helps balance the trade-off between sparsity and accuracy across all tasks.

The framework is trained from scratch, meaning it doesn't require pre-trained models or iterative pruning/fine-tuning cycles.

Datasets

The proposed AdapMTL framework was evaluated on two popular multitask datasets:

  • NYU-v2: This dataset contains RGB-D indoor scene images and is used for three tasks: semantic segmentation, depth estimation, and surface normal prediction.
  • Tiny-Taskonomy: This dataset includes a larger variety of tasks, specifically five: semantic segmentation, surface normal prediction, depth prediction, keypoint detection, and edge detection.

Key Insights and Ideas

  • Component Sensitivity Matters: The most significant insight is that different parts of an MTL model (shared backbone vs. task heads) have vastly different sensitivities to pruning. Treating them equally, as many prior methods do, is inefficient and can lead to performance drops.
  • Loss Stability as a Pruning Signal: The stability of a task's training loss is a strong indicator of its robustness to pruning. Stable losses suggest that a task can tolerate more aggressive pruning of its associated components.
  • Adaptive Pruning is Key for MTL: The success of AdapMTL highlights that a one-size-fits-all pruning approach is insufficient for MTL. Dynamic, component-specific, and task-aware pruning is crucial for achieving high sparsity without sacrificing accuracy.
  • Backbone Preservation is Often Crucial: Experiments suggest that while task heads can often be pruned aggressively, the shared backbone, which underpins all tasks, needs to be preserved more carefully to maintain overall performance.

Key Results

AdapMTL consistently outperformed state-of-the-art pruning methods (including SNIP, LTH, IMP, and DiSparse) on both the NYU-v2 and Tiny-Taskonomy datasets, across different backbone architectures (Deeplab-ResNet34 and MobileNetV2).

  • High Sparsity with Minimal Accuracy Loss: AdapMTL achieved significant overall sparsity (e.g., 90%) while maintaining or even improving the normalized performance across all tasks compared to dense models. For example, on NYU-v2 with ResNet34, AdapMTL achieved a 3.55% improvement in the overall normalized score (AT) at 90% sparsity, outperforming the dense baseline.
  • Effective Sparsity Allocation: The framework demonstrated its ability to allocate sparsity adaptively, often keeping the shared backbone relatively dense while aggressively pruning task-specific heads.
  • Model-Agnostic: The method showed effectiveness across different architectures, indicating its general applicability.
  • Computational Efficiency: The pruned models offered substantial reductions in parameters and FLOPs, making them more suitable for deployment on resource-constrained devices.

Limitations and Future Work

  • Exact Sparsity Target: The paper acknowledges that the final sparsity achieved by AdapMTL might not exactly match the requested target. This is attributed to the nature of soft thresholds, which guide sparsity rather than strictly enforcing it. The authors suggest future work could explore recovery mechanisms to regrow pruned parameters for more precise sparsity control.
  • Multimodal Extension: While the paper demonstrates AdapMTL's versatility on a video captioning task (using VideoBERT), further exploration and validation on larger multimodal and multimedia models (like LLMs) are suggested. The component-wise nature of AdapMTL makes it a natural fit for transformer architectures.

Summary updated

BibTeX
@inproceedings{xiang2024adapmtl,
  author = {Mingcan Xiang and Steven Jiaxun Tang and Qizheng Yang and Hui Guan and Tongping Liu},
  title = {{AdapMTL: Adaptive Pruning Framework for Multitask Learning Model}},
  booktitle = {ACM Multimedia},
  year = {2024},
  doi = {10.1145/3664647.3681426},
}
Figure