[Paper Review] Adapting by Pruning: A Case Study on BERT
This paper proposes a novel model adaptation paradigm called 'adapting by pruning' that prunes task-irrelevant connections in pre-trained BERT models while preserving all remaining weights, achieving performance comparable to fine-tuned models with up to 50% parameter reduction. The method formulates pruning as a differentiable optimization problem and demonstrates that connection recovery—reactivating pruned weights—is critical for high-sparsity performance.
Adapting pre-trained neural models to downstream tasks has become the standard practice for obtaining high-quality models. In this work, we propose a novel model adaptation paradigm, adapting by pruning, which prunes neural connections in the pre-trained model to optimise the performance on the target task; all remaining connections have their weights intact. We formulate adapting-by-pruning as an optimisation problem with a differentiable loss and propose an efficient algorithm to prune the model. We prove that the algorithm is near-optimal under standard assumptions and apply the algorithm to adapt BERT to some GLUE tasks. Results suggest that our method can prune up to 50% weights in BERT while yielding similar performance compared to the fine-tuned full model. We also compare our method with other state-of-the-art pruning methods and study the topological differences of their obtained sub-networks.
Motivation & Objective
- To address the high inference cost of fine-tuned BERT models on resource-constrained devices by reducing model size without retraining weights.
- To develop a model adaptation paradigm that reuses both the architecture and pre-trained weights of BERT, avoiding parameter expansion.
- To investigate whether pruning can yield high-performance sub-networks without fine-tuning, especially at high sparsity levels.
- To analyze the structural and sensitivity properties of pruned sub-networks compared to lottery ticket and magnitude-based pruning methods.
- To identify key mechanisms—particularly connection recovery—that enable superior performance in the proposed pruning framework.
Proposed method
- Formulates the pruning process as a differentiable optimization problem over binary masks, where the goal is to find an optimal mask that maximizes downstream task performance.
- Uses a continuous relaxation of the binary mask via a learnable parameter θ, allowing gradient-based optimization through stochastic gradient descent (SGD).
- Applies a differentiable sparsity regularization to control the number of remaining connections, enabling a trade-off between model efficiency and performance.
- Introduces a dynamic pruning strategy that allows pruned connections to be reactivated in later training steps, unlike standard magnitude-based or lottery ticket pruning.
- Employs a two-stage training process: first, learn the mask parameters θ; second, apply the final mask to the pre-trained weights and fine-tune only the task-specific layers.
- Uses a temperature-controlled sigmoid function to approximate the binary mask, enabling backpropagation through the mask selection process.
Experimental results
Research questions
- RQ1Can pruning task-irrelevant connections in a pre-trained BERT model yield performance comparable to full fine-tuning while reducing model size?
- RQ2How does the performance of the proposed pruning method compare to state-of-the-art magnitude-based and lottery ticket pruning approaches at high sparsity levels?
- RQ3What role does connection recovery—re-activating pruned weights—play in achieving high performance, especially in sparse sub-networks?
- RQ4Are the pruned sub-networks obtained by this method sensitive to weight reinitialization and mask shuffling, indicating structural importance of the selected connections?
- RQ5Can the same pruned sub-network be reused across multiple tasks with minimal retraining, enabling efficient on-device adaptation?
Key findings
- The proposed method achieves performance comparable to full fine-tuned BERT on GLUE benchmark tasks while pruning up to 50% of the model’s parameters.
- At a sparsity of 0.99 (99% pruned), the method maintains 50.9% accuracy on SST-2 and 32.8% accuracy on MNLI, outperforming other pruning methods at the same sparsity level.
- Sub-networks obtained via the proposed method are highly sensitive to weight reinitialization and mask shuffling, indicating that the selected connections are structurally critical and not randomly distributed.
- Connection recovery—where pruned weights are reactivated during training—accounts for 12.3% of connections in a 0.99 sparsity sub-network on MNLI, and disabling this mechanism causes a significant performance drop, especially at high sparsity.
- The performance gap between the proposed method and lottery ticket pruning increases with sparsity, indicating that connection recovery is a key enabler of high-performance pruning.
- The method enables reuse of the same pre-trained model across multiple tasks by downloading only a task-specific binary mask, reducing data transfer and storage costs on mobile devices.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.