Skip to main content
QUICK REVIEW

[Paper Review] Parameter-Efficient Transfer Learning with Diff Pruning

Demi Guo, Alexander M. Rush|arXiv (Cornell University)|Dec 14, 2020
Domain Adaptation and Few-Shot LearningComputer Science70 references23 citations
TL;DR

This paper proposes diff pruning, a parameter-efficient transfer learning method that extends pretrained models via a sparse, task-specific difference vector ($\bm{\delta}_{\text{task}}$) learned by fine-tuning and regularized with a differentiable $L_0$-norm approximation to induce sparsity. It achieves GLUE benchmark performance comparable to full fine-tuning while modifying only 0.5% of the model's parameters per task, enabling efficient on-device deployment with minimal storage overhead.

ABSTRACT

While task-specific finetuning of pretrained networks has led to significant empirical advances in NLP, the large size of networks makes finetuning difficult to deploy in multi-task, memory-constrained settings. We propose diff pruning as a simple approach to enable parameter-efficient transfer learning within the pretrain-finetune framework. This approach views finetuning as learning a task-specific diff vector that is applied on top of the pretrained parameter vector, which remains fixed and is shared across different tasks. The diff vector is adaptively pruned during training with a differentiable approximation to the L0-norm penalty to encourage sparsity. Diff pruning becomes parameter-efficient as the number of tasks increases, as it requires storing only the nonzero positions and weights of the diff vector for each task, while the cost of storing the shared pretrained model remains constant. It further does not require access to all tasks during training, which makes it attractive in settings where tasks arrive in stream or the set of tasks is unknown. We find that models finetuned with diff pruning can match the performance of fully finetuned baselines on the GLUE benchmark while only modifying 0.5% of the pretrained model's parameters per task.

Motivation & Objective

  • To address the high storage cost of fine-tuning large pretrained models for multiple tasks in memory-constrained environments like on-device applications.
  • To enable parameter-efficient transfer learning without requiring access to all tasks during training, supporting stream-based or federated task deployment.
  • To maintain high performance comparable to full fine-tuning while drastically reducing the number of trainable parameters per task.
  • To explore a new paradigm where model updates are sparse, structured, and efficiently stored as only nonzero weights and positions.

Proposed method

  • Reparameterize task-specific model parameters as $\bm{\theta}_{\text{task}} = \bm{\theta}_{\text{pretrained}} + \bm{\delta}_{\text{task}}$, keeping the pretrained weights fixed.
  • Train only the task-specific difference vector $\bm{\delta}_{\text{task}}$ while applying a differentiable approximation to the $L_0$-norm penalty to encourage sparsity.
  • Use a soft masking mechanism with a temperature-controlled sigmoid to differentially prune elements of $\bm{\delta}_{\text{task}}$ during training.
  • Store only the nonzero entries of $\bm{\delta}_{\text{task}}$ (positions and values) per task, enabling constant amortized storage cost across tasks.
  • Introduce a structured variant of diff pruning that applies sparsity constraints across feature dimensions to improve generalization and performance.
  • Train the model end-to-end with standard backpropagation, using the differentiable relaxation to allow gradient flow through the sparsity-inducing mechanism.

Experimental results

Research questions

  • RQ1Can a sparse, task-specific update vector achieve performance comparable to full fine-tuning while modifying only a small fraction of the model’s parameters?
  • RQ2Does the use of a differentiable $L_0$-norm approximation enable effective and efficient sparsity in the update vector without sacrificing model accuracy?
  • RQ3How does diff pruning scale in terms of storage efficiency as the number of tasks increases, compared to standard fine-tuning and other pruning-based methods?
  • RQ4Can diff pruning be applied in streaming or decentralized settings where tasks arrive sequentially and not all are available during training?
  • RQ5Does the structured variant of diff pruning improve performance or generalization compared to the unstructured version?

Key findings

  • Diff pruning achieves performance on the GLUE benchmark that matches or exceeds that of fully fine-tuned BERT baselines while modifying only 0.5% of the model’s parameters per task.
  • The method scales favorably with increasing numbers of tasks, requiring significantly less storage than full fine-tuning or standard pruning approaches due to sparse storage of only nonzero updates.
  • The structured variant of diff pruning further improves performance, suggesting that structured sparsity can enhance generalization and model efficiency.
  • Diff pruning is approximately 1.5× to 2× slower per minibatch than standard fine-tuning, but this trade-off is acceptable given the substantial gains in parameter efficiency.
  • The approach enables on-device deployment and stream-based task learning, as it does not require access to all tasks during training.
  • The method demonstrates a regularization effect, sometimes improving generalization beyond standard fine-tuning, particularly in low-data regimes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.