<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>AdapMTL: Adaptive Pruning Framework for Multitask LearningModel</title></titleStmt>
			<publicationStmt>
				<publisher>2024 ACM Multimedia</publisher>
				<date>10/28/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10534684</idno>
					<idno type="doi"></idno>
					
					<author>Mingcan Xiang</author><author>Jiaxun Tang</author><author>Qizheng Yang</author><author>Hui Guan</author><author>Tongping Liu</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[In the domain of multimedia and multimodal processing, the efficient handling of diverse data streams such as images, video, and sensor data is paramount. Model compression and multitask learning (MTL) are crucial in this field, offering the potential to address the resource-intensive demands of processing and interpreting multiple forms of media simultaneously. However, effectively compressing a multitask model presents significant challenges due to the complexities of balancing sparsity allocation and accuracy performance across multiple tasks. To tackle the challenges, we propose AdapMTL, an adaptive pruning framework for MTL models. AdapMTL leverages multiple learnable soft thresholds independently assigned to the shared backbone and the task-specific heads to capture the nuances in different components' sensitivity to pruning. During training, it co-optimizes the soft thresholds and MTL model weights to automatically determine the suitable sparsity level at each component to achieve both high task accuracy and high overall sparsity. It further incorporates an adaptive weighting mechanism that dynamically adjusts the importance of task-specific losses based on each task's robustness to pruning. We demonstrate the effectiveness of AdapMTL through comprehensive experiments on popular multitask datasets, namely NYU-v2 and Tiny-Taskonomy, with different architectures, showcasing superior performance compared to state-of-the-art pruning methods.
CCS Concepts• Computing methodologies → Multi-task learning.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>In the landscape of multimedia and multimodal processing <ref type="bibr">[2,</ref><ref type="bibr">40]</ref>, Deep Neural Networks (DNNs) <ref type="bibr">[46]</ref> have emerged as a pivotal technology, powering advancements across a spectrum of applications from image and video analysis to natural language understanding and beyond. Their profound ability to learn and abstract complex features from a range of media forms underpins their utility in diverse domains, including content categorization, recommendation systems, and interactive interfaces. However, as the complexity of tasks grows, so does the demand for larger and more powerful models, which in turn require substantial computational resources, memory usage, and longer training times. This trade-off between performance and model complexity has led to a continuous pursuit of more efficient and compact CNN <ref type="bibr">[24]</ref> architectures, as well as innovations in pruning techniques that can maintain high performance without compromising the benefits of the model's scale.</p><p>Pruning techniques <ref type="bibr">[13, 19, 23, 25-27, 36, 48]</ref> have emerged as a promising approach to compress large models without significant loss of performance. These techniques aim to reduce the size of a model by eliminating redundant or less important parameters, such as neurons, connections, or even entire layers, depending on the method employed <ref type="bibr">[9,</ref><ref type="bibr">28,</ref><ref type="bibr">61]</ref>. Parameter-efficient pruned models can provide significant inference time speedups by exploiting the sparsity pattern <ref type="bibr">[14,</ref><ref type="bibr">31,</ref><ref type="bibr">56,</ref><ref type="bibr">60]</ref>. These models are designed to have fewer parameters, which translates into reduced memory footprint and lower computational complexity (FLOPs) <ref type="bibr">[31]</ref>. By leveraging specialized hardware and software solutions that can efficiently handle sparse matrix operations, such as sparse matrixvector multiplication (SpMV), these models can achieve faster inference times <ref type="bibr">[14,</ref><ref type="bibr">39,</ref><ref type="bibr">55]</ref>. Additionally, sparse models can benefit from better cache utilization, as they require less memory bandwidth, thereby reducing the overall latency of the computation <ref type="bibr">[41,</ref><ref type="bibr">60]</ref>.</p><p>Although many techniques have been proposed in the past for pruning a single-task model, there is much less work in pruning a multitask model. Multitask models, which are designed to simultaneously handle multiple tasks, have become increasingly popular due to their ability to share representations and learn more effectively from diverse data sources <ref type="bibr">[16,</ref><ref type="bibr">64,</ref><ref type="bibr">67]</ref>. These models have found wide-ranging applications where tasks are often related and can benefit from shared knowledge <ref type="bibr">[65]</ref>. A compact multitask model, which is shown in Figure <ref type="figure">1</ref>, has the potential to deliver high performance across various tasks while minimizing resource requirements, making it well-suited for deployment on resourceconstrained devices or in real-time scenarios. Traditional pruning techniques, which are primarily focused on single-task models, may not be directly applicable or sufficient for multitasking settings. Recent work has started to explore the intersection of multitask learning and pruning. Disparse <ref type="bibr">[51]</ref> considered each task independently by disentangling the importance measurement and taking the unanimous decisions among all tasks when performing parameter pruning and selection. A parameter is removed if and only if it's shown to be not critical for any task. However, as the number of tasks increases, it becomes challenging to achieve unanimous selection agreement among all tasks, which could negatively affect the average performance across tasks. Thus, there is a need for novel compression approaches that cater to the complexities of multitask models, taking into account the interdependencies between tasks, the sharing of representations, and the different sensitivity of task heads.</p><p>To tackle the challenges, we conduct extensive experiments that reveal two valuable insights on designing an effective multitask model pruning strategy. First, the shared backbone and the taskspecific heads have different sensitivity to pruning and thus should be treated differently. However, current state-of-the-art approaches do not adequately recognize this aspect, leading to equal treatment of each component during pruning, rather than accounting for their varying sensitivities. Second, the change in training loss could serve as a useful guide for allocating sparsity among different components. If the training loss of a specific task tends to be stable, we can prune more aggressively on that component, as the task head is robust to pruning. On the contrary, if the loss of a specific task fluctuates significantly, we should consider pruning less on that component since the training is less likely to converge at higher sparsity levels.</p><p>Motivated by these observations, we propose AdapMTL, an adaptive pruning framework for MTL models. AdapMTL dynamically adjusts sparsity across different components, such as the shared backbone and task-specific heads based on their sensitivity to pruning, while preserving accuracy for each task. This is achieved through a set of learnable soft thresholds <ref type="bibr">[10,</ref><ref type="bibr">23]</ref> that are independently assigned to different components and co-optimized with model weights to automatically determine the suitable sparsity level for each component during training. Specifically, we maintain a set of soft thresholds &#120572; = {&#120572; &#119861; , &#120572; 1 , &#120572; 2 , ..., &#120572; &#119879; } in each component, where &#120572; &#119861; represents the threshold for the shared backbone and &#120572; &#119905; represents the threshold for the &#119905;-th task-specific head. In the forward pass, only the weights larger than the threshold &#120572; will be counted in the model, while others are set to zero. In the backward pass, we automatically update all the component-wise thresholds &#120572;, which will smoothly introduce sparsity. Additionally, AdapMTL employs an adaptive weighting mechanism that dynamically adjusts the importance of task-specific losses based on each task's robustness to pruning. AdapMTL does not require any pre-training or pre-pruned models and can be trained from scratch.</p><p>We conduct extensive experiments on two popular multitask datasets: NYU-v2 <ref type="bibr">[47]</ref> and Tiny-Taskonomy <ref type="bibr">[62]</ref>, using different architectures such as Deeplab-ResNet34 and MobileNetV2. When compared with state-of-the-art pruning and MTL pruning methods, AdapMTL demonstrates superior performance in both the training and testing phases. It achieves lower training loss and better normalized evaluation metrics on the test set across different sparsity levels. The contributions of this paper are summarized as follows: (1) We conduct extensive experiments that reveal valuable insights in designing effective MTL model pruning strategies. These findings motivate the development of novel pruning strategies specifically tailored for multitasking scenarios. (2) We propose AdapMTL, an adaptive pruning framework for MTL models that dynamically adjusts sparsity levels across different components to achieve high sparsity and task accuracy. AdapMTL features component-wise learnable soft thresholds that automatically determine the suitable sparsity for each component during training and an adaptive weighting mechanism that dynamically adjusts task importance based on their sensitivity to pruning. (3) We demonstrate the effectiveness of AdapMTL through extensive experiments on multitask datasets with different architectures, showcasing superior performance compared to SOTA pruning and MTL pruning methods. Our method does not require any pre-training or pre-pruned models.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Related Work</head><p>Multitask Learning. Multitask learning (MTL) <ref type="bibr">[1,</ref><ref type="bibr">4,</ref><ref type="bibr">12,</ref><ref type="bibr">64]</ref> aims to learn a single model to solve multiple tasks simultaneously by sharing information and computation among them, which is essential for practical deployment. Over the years, various MTL approaches have been proposed, including hard parameter sharing <ref type="bibr">[3]</ref>, soft parameter sharing <ref type="bibr">[58]</ref>, and task clustering <ref type="bibr">[22]</ref>. In hard parameter sharing, a set of parameters in the backbone model are shared among tasks while in soft parameter sharing, each task has its own set of parameters, but the difference between the parameters of different tasks is regularized to encourage them to be similar. MTL has been successfully applied to a wide range of applications, such as natural language processing <ref type="bibr">[8,</ref><ref type="bibr">18,</ref><ref type="bibr">29]</ref>, computer vision <ref type="bibr">[17,</ref><ref type="bibr">30,</ref><ref type="bibr">44,</ref><ref type="bibr">57]</ref>, and reinforcement learning <ref type="bibr">[42,</ref><ref type="bibr">53]</ref>.</p><p>Subsequently, the integration of neural architecture search (NAS) with MTL has emerged as a promising direction. NAS for MTL, exemplified by works like MTL-NAS <ref type="bibr">[15]</ref>, Learning Sparse Sharing Architectures for Multiple Tasks <ref type="bibr">[50]</ref>, and Controllable Dynamic Multi-Task Architectures <ref type="bibr">[43]</ref>, focuses on discovering optimal architectures that can efficiently learn shared and task-specific features. These approaches, including Adashare <ref type="bibr">[52]</ref> and AutoMTL <ref type="bibr">[63]</ref>, demonstrate the potential of dynamically adjusting architectures to the requirements of multiple tasks, optimizing both performance and computational efficiency.</p><p>Pruning. Pruning techniques have been widely studied to reduce the computational complexity of deep neural networks while maintaining their performance. Early works on pruning focused on unstructured weight pruning <ref type="bibr">[20,</ref><ref type="bibr">25]</ref>, where unimportant weights were removed based on a given criterion, and the remaining weights were fine-tuned. There are different kinds of criterion metrics, such as magnitude-based <ref type="bibr">[20,</ref><ref type="bibr">27]</ref>, gradient-based <ref type="bibr">[36,</ref><ref type="bibr">37]</ref>, Hessianbased <ref type="bibr">[21]</ref>, connection sensitivity-based <ref type="bibr">[26,</ref><ref type="bibr">33,</ref><ref type="bibr">48]</ref>, and so on. Other works explored structured pruning <ref type="bibr">[56,</ref><ref type="bibr">66]</ref>, which removes entire filters or channels, leading to more efficient implementations on hardware platforms. Recently, the lottery ticket hypothesis <ref type="bibr">[13]</ref> has attracted considerable attention, suggesting that dense, randomly initialized neural networks contain subnetworks (winning tickets) that can be trained to achieve comparable accuracy with fewer parameters. This has led to follow-up works <ref type="bibr">[13,</ref><ref type="bibr">32,</ref><ref type="bibr">38]</ref> that provide a better understanding of the properties and initialization of winning tickets. Single-Shot Network Pruning (SNIP) <ref type="bibr">[26]</ref> is a data-driven method for pruning neural networks in a one-shot manner. By identifying an initial mask to guide parameter selection, it maintains a static network architecture during training. Some other work, like the layer-wise pruning method <ref type="bibr">[23]</ref>, inspiringly attempts to learn a layer-wise sparsity for individual layers rather than considering the network as a whole. This approach allows for fine-grained sparsity allocation across layers. To reduce the total time involved in pruning and training, pruning during training techniques <ref type="bibr">[11,</ref><ref type="bibr">35,</ref><ref type="bibr">39]</ref> have been proposed to directly learn sparse networks without the need for an iterative pruning and finetuning process. These methods involve training networks with sparse connectivity from scratch, updating both the weights and the sparsity structure during the training process.</p><p>Pruning for Multitask Learning. Recently, attention has shifted to the intersection of MTL and pruning techniques. A compact multitask model has the potential to deliver high performance across various tasks while minimizing resource requirements, making it well-suited for deployment on resource-constrained devices or in real-time scenarios. For example, MTP <ref type="bibr">[6]</ref> focuses on efficient semantic segmentation networks, demonstrating the potential of multitask pruning to enhance performance in specialized domains. Similarly, the work by Cheng et al. <ref type="bibr">[7]</ref> introduces a novel approach to multi-task pruning through filter index sharing, optimizing model efficiency through a many-objective optimization framework. Additionally, Ye et al. <ref type="bibr">[59]</ref> propose a global channel pruning method tailored for multitask CNNs, highlighting the importance of performance-aware approaches in maintaining accuracy while reducing model size. Disparse <ref type="bibr">[51]</ref> proposes joint learning and pruning methods to achieve efficient multitask models. However, these methods often neglect the importance of the shared backbone, leading to equal treatment of each component during pruning, rather than accounting for their varying importance. Our work aims to address this limitation by adaptively allocating sparsity across the shared backbone and task-specific heads based on their importance and sensitivity.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Methodology 3.1 Preliminary</head><p>We formulate multitask model pruning as an optimization problem. Given a dataset</p><p>.., &#119905; &#119879; }, and a desired sparsity level &#119904; (i.e. the percentage of zero weights), the multitask model pruning aims to find a sparse weight &#119882; that minimizes the sum of task-specific losses. Mathematically, it is formulated as:</p><p>where the L (&#8226;) is the total loss function, L &#119905; (&#8226;) is the task-specific loss for each individual task &#119905;, &#119882; are the parameters of neural network to be learned, &#119875; is the total number of parameters and &#8741; &#8226; &#8741; 0 denotes the &#8467; 0 -norm, i.e. the number of non-zero weights.</p><p>The key challenge here is how to enforce sparsity on weight &#119882; while minimizing the loss. This involves finding an optimal balance between maintaining the performance of each task and pruning the model to achieve the desired sparsity level. We next describe our proposed adaptive pruning algorithm that can effectively handle the unique characteristics of multitask models and efficiently allocate sparsity across different components to preserve the overall model performance.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Adaptive Multitask Model Pruning</head><p>Multitask models typically have a backbone shared across tasks and task-specific heads. We observe that these different model components have different sensitivities to pruning and thus should be treated differently. The challenge lies in how to automatically capture the sensitivity of each model component to pruning and leverage the signal to automatically allocate sparsity across components. To address the challenge, we propose a component-wise pruning framework that assigns different learnable soft thresholds to each component to capture its sensitivity to pruning. The framework then co-optimizes the thresholds with model weights to automatically determine the suitable sparsity level for each component during training. Specifically, we introduce a set of learnable soft thresholds &#120572; = {&#120572; &#119861; , &#120572; 1 , &#120572; 2 , ..., &#120572; &#119879; } for each component, where &#120572; &#119861; represents the threshold for the shared backbone and &#120572; &#119905; represents the threshold for the &#119905;-th task-specific head. The thresholds &#120572; are determined based on the significance and sensitivity of the respective components and are adaptively updated using gradient descent during the backpropagation process. The soft threshold &#120572; &#119905; and sparse weight &#119882; &#119905; for each component can be computed as follows: </p><p>where &#120579; init is a learnable parameter that controls the initial pruning threshold &#120572; &#119905; . We will discuss the choice of &#120579; init in the supplementary material. The &#119877;&#119890;&#119871;&#119880; (&#8226;) function here is used to set zero weights.</p><p>In other words, if some weights |&#119882; &#119905; | are less than the threshold &#120572; &#119905; , then the sparse version of this weight &#119878; (&#119908; &#119905; , &#120572; &#119905; ) is set to 0. Otherwise, we obtain the soft-thresholding version of this weight.</p><p>The reason why we choose soft thresholding <ref type="bibr">[54]</ref> rather than hard thresholding is illustrated in Figure <ref type="figure">2</ref>. Soft parameter sharing is the best fit for our approach as it allows us to calculate the gradient and perform the backpropagation process more effectively.</p><p>AdapMTL reformulates the pruning problem in Equation 1 to find a set of optimal thresholds &#120572; = {&#120572; &#119861; , &#120572; 1 , &#120572; 2 , ..., &#120572; &#119879; } across different components as follows:</p><p>where the &#120573; &#119905; represents the adaptive weighting factor for &#119905;-th task, which will be elaborated in Section 3.3.</p><p>We next describe how AdapMTL optimizes the problem in Equantion 3. Considering a multitask model with T tasks, we divide the weight parameters into &#119882; = {&#119882; &#119861; ,&#119882; 1 ,&#119882; 2 , ...,&#119882; &#119879; }, where &#119882; &#119861; represents the weight parameters for the shared backbone and &#119882; &#119905; represents the weight parameters for the &#119905;-th task-specific head. We derive the gradient descent update equation at the &#119899;-th epoch for &#119882; &#119905; as follows:</p><p>where &#120578; &#119899; is the learning rate at the &#119899;-th epoch. We use the partial derivative to calculate the gradients. As mentioned earlier, different task heads may have varying sensitivities to pruning and, consequently, may require different levels of sparsity to achieve the best accuracy. By setting a set of learnable parameters for each component and treating them separately during the backpropagation process, our component-wise pruning framework can effectively account for these differences in sensitivity and adaptively adjust the sparsity allocation for each component. Although</p><p>is non-differentiable, we can approximate the gradients using the sub-gradient method. In this case, we introduce B&#119905; &#119899; , an indicator function that acts like a binary mask. The value of B &#119899; &#119905; should be 0 if the sparse version of the weight &#119878; (&#119882; &#119899; &#119905; , &#120572; &#119899; &#119905; ) is equal to 0. This indicator function facilitates the approximation of gradients and the update of the sparse weights and soft thresholds during the backpropagation process. Mathematically, the indicator function is:</p><p>By updating the sparse weights &#119882; &#119905; , and similarly the soft thresholds &#120572; &#119905; , for each component in this manner (the derivation process is provided in the supplementary material), the framework can effectively and discriminatively allocate sparsity across the multitask model. By taking into account the significance and sensitivity of each component, this approach ultimately leads to more efficient and accurate multitask learning.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">Adaptive Weighting Mechanism</head><p>This subsection introduces the adaptive weighting mechanism that dynamically adjusts the weight of each task loss based on each task's robustness to pruning. The adaptive weighting mechanism determines the &#120573; &#119905; for the &#119905;-th task in Equation <ref type="formula">3</ref>during training.</p><p>The rationales behind the proposed adaptive weighting mechanism are two folds. First, if the training loss of a specific task &#119905; tends to be stable, then we can assign a higher weighting factor &#120573; &#119905; and subsequently prune more aggressively on that component, as the task head is robust to pruning. On the contrary, if the loss of a specific task fluctuates significantly, we should consider pruning less on that component by lowering the weighting factor since the training is less likely to converge at higher sparsity levels. The weighting factor is learned in an adaptive way, eliminating the need for manual effort to fine-tune the hyper-parameters elaborately.</p><p>Second, the adaptive weighting mechanism should automatically consider different multitask model architectures as well. The ratio of backbone to task head weights, &#119882; &#119887;&#119886;&#119888;&#119896;&#119887;&#119900;&#119899;&#119890; &#119882; &#8462;&#119890;&#119886;&#119889; , matters because it may be beneficial to focus more on pruning the task heads instead if the backbone is already highly compact. For example, in MobileNet-V2, the backbone has only 2.2M parameters, which is 25 times fewer than the task head.</p><p>We define a set of adaptive weights &#120573; = {&#120573; &#119861; , &#120573; 1 , &#120573; 2 , ..., &#120573; &#119879; }, where &#120573; &#119861; represents the weighting factor for the shared backbone, &#120573; &#119905; represents the weighting factor for the &#119905;-th task-specific head. The weighting factor can be formulated as follows:</p><p>Here, &#120590; L window &#119905; is the average deviation of the loss within the sliding window for the &#119905;-th task, which is then divided by L &#119905; to normalize the scale. We divide it by the sum of all tasks to normalize between different tasks. The (&#8226;) -1 is a multiplicative inverse. &#120582; is a scaling factor, and we will discuss the choice of &#120582; for different architectures in the supplementary material. |&#119882; &#119861; | &#119887;&#119886;&#119888;&#119896;&#119887;&#119900;&#119899;&#119890; , |&#119882; &#119905; | &#8462;&#119890;&#119886;&#119889; represent the weight parameters of shared backbone and &#119905;-th taskspecific head, separately. The right ratio in the equation reveals the importance of each component by considering their relative parameterizing contributions to the overall model structure. The weighting factor &#120573; &#119905; is used to guide the pruning for the task-specific head, depending on the stability of its loss and its contribution to the model.</p><p>To make the multitask pruning more robust, we incorporate a sliding window mechanism that tracks the past loss values to calculate the average &#120590; L window in Equation 6 instead of relying solely on the variance between two adjacent epochs. This approach provides a more stable and reliable estimation of the fluctuations in the task losses, as it accounts for a larger number of samples and reduces the impact of potential outliers or short-term variations. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.2">Evaluation Metrics and Loss</head><p>Functions. We adopt a range of evaluation metrics for different tasks, evaluating the model performance at different sparsity levels to provide a comprehensive view of the model's effectiveness and robustness across tasks. On the NYUv2 dataset, there are totally three tasks. For Semantic Segmentation, we employ the mean Intersection over Union (mIoU) and Pixel Accuracy (Pixel Acc) as our primary evaluation metrics and use cross-entropy to calculate the loss. Surface normal prediction uses the inverse of cosine similarity between the normalized prediction and ground truth, and is performed using mean and median angle distances between the prediction and the ground truth. We also report the percentage of pixels whose prediction is within the angles of 11.25&#176;, 22.5&#176;, and 30&#176;to the ground truth. Depth estimation utilizes the L1 loss, with the absolute and relative errors between the prediction and ground truth being calculated. Again, We also present the relative difference between the prediction and ground truth by calculating the percentage of &#120575; = &#119898;&#119886;&#119909; (</p><p>&#119910; &#119901;&#119903;&#119890;&#119889; ) within the thresholds of 1.25, 1.25 2 , and 1.25 3 . On the Taskonomy dataset, there are two more tasks. In the context of both the Keypoint and Edge Detection tasks, the mean absolute error compared to the provided ground-truth map serves as the main evaluation metric.</p><p>In multitask learning scenarios, tasks involve multiple evaluation metrics with values potentially at different scales. To address this, we compute a single relative performance metric following the common practice <ref type="bibr">[34] [49]</ref>.</p><p>where &#119897; &#119895; = 1 if a lower value shows better performance for the metric &#119872; &#119895; and 0 otherwise. &#119872; &#119879; &#119894; ,&#119895; , &#119872; &#119863;&#119872;,&#119895; are the sparse and dense model value of metric &#119895;, respectively. The &#9651; &#119879; &#119894; is defined to compare results with their equivalent dense task values and the overall performance is obtained by averaging the relative performance across all tasks, denoted as &#9651; &#119879; = 1 &#119879; &#119879; &#119894;=1 &#9651; &#119879; &#119894; , This metric provides a unified measure of relative performance across tasks. Eventually, by employing these diverse evaluation metrics, we can effectively assess the performance of our method as well as the counterparts across various tasks and datasets.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.3">Baselines for</head><p>Comparison. We compare our work with LTH <ref type="bibr">[13]</ref>, IMP <ref type="bibr">[19]</ref>, SNIP <ref type="bibr">[26]</ref>, and DiSparse <ref type="bibr">[51]</ref>. For LTH, we first train a dense model and subsequently prune it until the desired sparsity level is reached, yielding the winning tickets (sparse network structure). We then reset the model to its initial weights to start the sparse training process. For IMP, we iteratively remove the least important weights, determined by their magnitudes. For SNIP and IMP, we directly use the official implementation provided by the authors from GitHub. For DiSparse, the latest multitask pruning work and first-of-its-kind, we utilize the official PyTorch implementation and configure the method to use the DiSparse dynamic mechanism, which is claimed as the best-performing approach in the paper. We also train a fully dense multitask model as our baseline, which will be used to calculate a single relative performance metric Norm. Score.</p><p>We use the same backbone model at the same sparsity level across all methods for a fair comparison. In our work, we define overall sparsity as the percentage of weights pruned from the entire MTL model, which includes both the shared backbone and task-specific heads. We utilize Deeplab-ResNet34 <ref type="bibr">[5]</ref> and MobileNetV2 <ref type="bibr">[45]</ref> as the Table <ref type="table">1</ref>: Comparison with state-of-the-art pruning methods on the NYU-V2 dataset using the Deeplab-ResNet34 backbone. Each pruning method enforces a consistent overall sparsity of 90%, with the &#9651; &#119879; indicating the normalized performance of all three tasks to the baseline dense model's performance. We also report the evaluation metrics for each task and the sparsity allocation for each component.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Model</head><p>&#119879; 1 : Semantic Seg. &#119879; 2 : Surface Normal Prediction &#119879; 3 : Depth Estimation Sparsity % &#9651; &#119879; &#8593; mIoU &#8593; pixel Acc&#8593; &#9651; &#119879; 1 &#8593; Error &#8595; Angle &#120579; ,within &#8593; &#9651; &#119879; 2 &#8593; Error &#8595; &#9651;, within &#8593; &#9651; &#119879; 3 &#8593; Back bone S. S. head S.N.P. head D. E. head Mean Median 11.25&#176;22.5&#176;30&#176;Abs. Rel. 1.25 1.25^2 1.25^3 Dense Model (baseline) 25.54 57.91 0.00 17.11 14.95 36.35 72.25 85.44 0.00 0.55 0.22 65.21 89.87 97.52 0.00 -0.00 SNIP [26] 24.09 55.32 -10.15 16.94 14.93 36.17 72.39 86.98 2.63 0.61 0.23 60.61 87.88 96.77 -25.49 85.46 90.24 92.28 91.17 -11.00 LTH [13] 25.42 57.98 -0.35 16.73 15.08 35.20 72.35 87.22 0.41 0.57 0.22 60.93 88.64 96.20 -12.92 78.32 90.54 95.21 95.49 -4.29 IMP [19] 25.68 57.86 0.46 16.86 15.18 35.53 71.96 86.26 -1.77 0.56 0.22 65.23 89.29 97.53 -3.82 74.98 92.34 97.23 95.15 -1.71 DiSparse [51] 25.71 58.08 0.96 17.03 15.23 35.10 71.85 86.22 -4.48 0.57 0.22 64.93 88.64 97.20 -5.76 75.07 90.41 98.51 94.86 -3.10 AdapMTL w/o adaptive thresholds 25.59 57.53 -0.46 17.26 15.75 36.21 71.53 85.91 -7.06 0.58 0.22 62.52 87.12 96.50 -13.68 79.12 89.37 96.85 95.74 -7.07 AdapMTL (ours) 26.28 58.29 3.55 16.92 14.91 36.36 72.97 86.29 3.41 0.55 0.22 65.39 89.93 97.58 0.38 71.74 93.18 99.26 96.22 2.45 50 60 70 80 90 95 99 Overall sparsity (%) 0.70 0.75 0.80 0.85 0.90 0.95 1.00 Normalized test score Dense Model Ours LTH Disparse SNIP IMP (a) ResNet34 50 60 70 80 90 95 99 Overall sparsity (%) 0.80 0.85 0.90 0.92 0.94 0.96 0.98 1.00 Normalized test score Dense Model Ours LTH Disparse SNIP IMP (b) MobileNetV2 , LTH <ref type="bibr">[13]</ref>, SNIP <ref type="bibr">[26]</ref>, and IMP <ref type="bibr">[19]</ref>, on the NYUv2 dataset, evaluated with different MTL backbones and under various sparsity settings.</p><p>backbone models, and the Atrous Spatial Pyramid Pooling (ASPP) architecture <ref type="bibr">[5]</ref> as the task-specific head. Both of them are popular architectures for pixel-wise prediction tasks. We share a common backbone for all tasks while each task has an independent taskspecific head branching out from the final layer of the backbone, which is widely used in multitasking scenarios.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Experiment Results</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.1">Results on NYU-V2.</head><p>We first present the comparison results with state-of-the-art methods on the NYU-V2 dataset in table <ref type="table">1</ref>.</p><p>Overall, AdapMTL outperforms all other methods by a significant margin across most metrics and achieves the highest &#9651; &#119879; . Recall that the major difference between our method and the baselines lies in our ability to adaptively learn the sparsity allocation across the components adaptively, maintaining a dense shared backbone (71.74%) while keeping the task-specific heads relatively sparse. Within the scope of our research, we characterize overall sparsity as the percentage of weights pruned from the entire MTL model, which includes both the shared backbone and task-specific heads.</p><p>SNIP <ref type="bibr">[26]</ref> exhibits the lowest performance in the multi-task scenario because its pruning mask is determined from a single batch of data's gradient, which treats all components, including the shared backbone, equally. Since all input information passes through the shared backbone, accuracy loss in the shallow layers is inevitable, regardless of how well the task heads perform with relatively high density. LTH's <ref type="bibr">[13]</ref> winning tickets do not sufficiently focus on the backbone, as they intentionally create a dense surface normal prediction task head. Although this approach performs well on this specific task, the bias still causes an imbalance in the metrics across all tasks, resulting in a lower &#9651; &#119879; score. IMP <ref type="bibr">[19]</ref> achieves a good normalized score across all tasks. However, this method is trained in an iterative manner and prunes the model step-by-step, resulting in a significantly longer training time. DiSparse <ref type="bibr">[51]</ref> learns an effective dense backbone by adopting a unanimous decision across all tasks. However, it falls short of differentiating the relative sensitivities between specific task heads, leading to an imbalanced normalized score among all tasks. Here, we add an additional row, AdapMTL without adaptive thresholds, to demonstrate the effectiveness of our approach. Rather than using multiple adaptive thresholds, this version utilizes a single shared threshold for all components. As Table <ref type="table">2</ref>: Comparison with state-of-the-art pruning methods on the NYU-V2 dataset using the MobileNetV2 backbone. Each pruning method enforces a consistent overall sparsity of 90%, with the &#9651; &#119879; indicating the normalized performance of all three tasks to the baseline dense model's performance. We also report the evaluation metrics for each task and the sparsity allocation for each component.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Model</head><p>&#119879; 1 : Semantic Seg. &#119879; 2 : Surface Normal Prediction &#119879; 3 : Depth Estimation Sparsity % &#9651; &#119879; &#8593; mIoU &#8593; pixel Acc&#8593; &#9651; &#119879; 1 &#8593; Error &#8595; Angle &#120579; , within &#8593; &#9651; &#119879; 2 &#8593; Error &#8595; &#9651;, within &#8593; &#9651; &#119879; 3 &#8593; Back bone S. S. head S.N.P. head D. E. head Mean Median 11.25&#176;22.5&#176;30&#176;Abs. Rel. 1.25 1.25^2 1.25^3 Dense Model [5] (baseline) 19.94 48.71 0.00 17.85 16.21 29.77 72.19 86.19 0.00 0.64 0.24 58.93 86.27 96.16 0.00 -0.00 SNIP [26] 18.96 46.93 -8.57 18.33 16.97 28.93 71.21 85.78 -12.03 0.64 0.25 56.75 85.71 95.33 -9.38 78.46 88.19 92.08 90.25 -9.99 LTH [13] 19.14 47.25 -7.01 17.67 16.32 29.67 72.15 86.22 -0.03 0.65 0.25 57.68 85.89 96.13 -8.32 71.32 88.34 92.19 90.52 -5.12 IMP [13] 18.76 48.12 -7.13 18.71 16.68 29.63 71.76 85.91 -9.11 0.64 0.23 59.75 86.52 96.31 6.00 68.49 88.07 95.13 87.74 -3.41 DiSparse [51] 19.87 48.83 -0.10 17.92 16.79 29.87 71.76 85.64 -4.87 0.65 0.24 58.42 85.72 96.28 -2.94 65.22 87.21 93.55 90.53 -2.64 AdapMTL w/o adaptive thresholds 18.93 47.51 -7.53 18.16 16.87 28.37 71.53 86.63 -10.91 0.65 0.24 58.26 85.82 95.92 -3.47 73.61 88.64 92.37 89.82 -7.30 AdapMTL (ours) 20.16 49.14 1.99 17.53 15.96 30.16 72.36 86.51 5.25 0.64 0.24 59.03 86.57 96.38 0.75 52.74 86.18 94.72 90.76 2.66</p><p>expected, performance significantly deteriorates because a uniform threshold makes it hard to capture the nuances in different components' sensitivity. Moreover, we extended our experiments to different model architectures to assess the model-agnostic nature of our method, using MobileNetV2 as an alternative architecture. The results, detailed in Table <ref type="table">2</ref>, show how AdapMTL adeptly manages the dense representation of MobileNetV2's compact backbone, ensuring it remains sufficiently dense (52.74% ) while enforcing higher sparsity in the task-specific heads. This is very important, especially with such backbone compact architectures where over-pruning the backbone can easily lead to significant degradation in accuracy. Our approach ensures that the backbone remains dense enough, thereby preserving overall performance.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.2">Results</head><p>under various sparsity settings. We show a comparison of results under different sparsity settings using different backbones, namely ResNet34 and MobileNetV2, as illustrated in Figure <ref type="figure">4</ref>, where AdapMTL consistently demonstrates superiority over other methods. The normalized test score, following the common practice <ref type="bibr">[34]</ref>  <ref type="bibr">[49]</ref>, is obtained by averaging the relative performance across all tasks with respect to the dense model. We observe a slightly better performance for medium sparsity levels(from 50% to 80% ), which even surpasses dedicated dense multitask learning approaches despite the high sparsity enforced. This observation aligns with our assumptions and motivates the research community to further explore and develop sparse models. The score of SNIP drops significantly as higher sparsity levels (&gt;90%) are enforced. This is because it fails to maintain the density of the shared backbone effectively.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>4.2.3</head><p>Results on Tiny-Taskonomy. On the Tiny-Taskonomy dataset, which encompasses five distinct tasks, AdapMTL exhibits a more consistent performance across all tasks, as detailed in Table <ref type="table">3</ref>. Here, we use the ResNet backbone at sparsity 90%. Our method consistently achieved the highest scores in each task, unlike other methods which exhibited noticeable biases. The DiSparse method struggles to achieve unanimous decisions, particularly as the number of tasks increases, highlighting a key limitation in its approach.</p><p>The consistent superiority of AdapMTL across both NYUv2 and Tiny-Taskonomy datasets, and with different backbone architectures, highlights the effectiveness of our approach in achieving high sparsity with minimal performance degradation for multitask models. More results on the other datasets, using the different architectures, can be found in the supplementary material.  4.3 Analysis 4.3.1 Pruning sensitivity. AdapMTL results in different sparsity for backbone parameters and task-specific parameters, indicating that it captures their different sensitivity to pruning. To compare the sensitivity to pruning between the shared backbone and task heads, we create a 3D plot, as shown in Figure <ref type="figure">5</ref>. The x-axis represents the shared backbone sparsity from 50% to 99%, while the y-axis represents the total head sparsity for all three tasks from 90% to 99%. The z-axis represents the normalized score.</p><p>From the xz-plane, we can observe that the normalized score drops significantly when we prune the backbone at sparsity levels of 90% and higher. In contrast, from the yz-plane, we can see that the task heads are highly robust to pruning, as they maintain a good normalized score even when extreme sparsity levels are reached. This observation highlights the importance of preserving the shared backbone's density and suggests that pruning strategies should prioritize maintaining the backbone's performance while aggressively pruning the task-specific heads. 4.3.2 Computational cost. The computational cost of the AdapMTL under varying sparsity levels is detailed in Table <ref type="table">4</ref>, which illustrates a significant reduction in both parameters and FLOPs as sparsity increases. These reductions highlight not only the adaptability of AdapMTL across different architectures but also its capability to maintain a balance between performance, measured by &#9651; &#119879; , and efficiency, evidenced by the substantial decrease in FLOPs. This balance is crucial for deploying high-performance models in resourceconstrained environments. By leveraging specialized hardware and software solutions that can efficiently handle sparse matrix operations, such as sparse matrix-vector multiplication (SpMV), these models can achieve faster inference times <ref type="bibr">[14,</ref><ref type="bibr">39,</ref><ref type="bibr">55]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4">Ablation Studies</head><p>We conducted ablation studies to validate the effectiveness of the proposed adaptive multitask model pruning (Section 3.2), and the adaptive weighting mechanism (Equation <ref type="formula">6</ref>). We tested variations including models without adaptive thresholds, where all components share a single threshold, and models with only two adaptive thresholds, where the backbone has a unique threshold while other task heads share another. The results, presented in Table <ref type="table">5</ref>, highlight the critical role of adaptive thresholding. Models without adaptive thresholds showed significantly poorer performance, with a drastic decrease in &#9651; &#119879; , especially affecting tasks with higher sensitivity to pruning, such as Depth Prediction. Conversely, the full AdapMTL configuration, employing independent thresholds for each component, achieved the best &#9651; &#119879; score. These variations help illustrate the impact and necessity of differentiated thresholding in multitask environments. The results confirm that our full AdapMTL setup, with all components active, performs superiorly across different  settings, underscoring the indispensable nature of each proposed component.</p><p>We have implemented a sliding window mechanism to enhance the robustness and accuracy of our pruning strategy. This mechanism is pivotal in tracking the loss values over a sequence of epochs to compute the average change in loss, &#120590; L window , as formalized in Equation <ref type="formula">6</ref>. By integrating this approach, we significantly mitigate the influence of abrupt variations and potential outliers that may occur in task-specific loss calculations. The sliding window, set at a size of 400 as demonstrated in Figure <ref type="figure">6</ref>, represents an optimal balance between computational memory demands and the need for a comprehensive data scope. This size ensures that the model captures sufficient temporal loss information without excessive memory consumption, thereby maintaining efficiency.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Conclusion</head><p>In this paper, we propose a novel adaptive pruning method designed specifically for multitask learning (MTL) scenarios. Our approach effectively addresses the challenges of balancing overall sparsity and accuracy for all tasks in multitask models. AdapMTL introduces multiple learnable soft thresholds, each independently assigned to the shared backbone and task-specific heads to capture the nuances in different components' sensitivity to pruning. Our method cooptimizes the soft thresholds and model weights during training, enabling automatic determination of the ideal sparsity level for each component to achieve high task accuracy and overall sparsity. Furthermore, AdapMTL incorporates an adaptive weighting mechanism that dynamically adjusts the importance of task-specific losses based on each task's robustness to pruning. The effectiveness of AdapMTL has been extensively validated through comprehensive experiments on the NYU-v2 and Tiny-Taskonomy datasets with different architectures. The results demonstrate that our method outperforms state-of-the-art pruning methods, thereby establishing its suitability for efficient and effective multitask learning.</p></div></body>
		</text>
</TEI>
