[Paper Review] Efficient Contextualized Representation: Language Model Pruning for Sequence Labeling
This paper proposes LD-Net, a method for efficient contextualized representation via layer selection in pre-trained language models, using dense connectivity and sparsity-inducing regularization to enable pruning without retraining. It achieves up to 91.86% F1 on CoNLL03 NER with over 90% computation reduction, outperforming smaller models and prior methods.
Many efforts have been made to facilitate natural language processing tasks with pre-trained language models (LMs), and brought significant improvements to various applications. To fully leverage the nearly unlimited corpora and capture linguistic information of multifarious levels, large-size LMs are required; but for a specific task, only parts of these information are useful. Such large-sized LMs, even in the inference stage, may cause heavy computation workloads, making them too time-consuming for large-scale applications. Here we propose to compress bulky LMs while preserving useful information with regard to a specific task. As different layers of the model keep different information, we develop a layer selection method for model pruning using sparsity-inducing regularization. By introducing the dense connectivity, we can detach any layer without affecting others, and stretch shallow and wide LMs to be deep and narrow. In model training, LMs are learned with layer-wise dropouts for better robustness. Experiments on two benchmark datasets demonstrate the effectiveness of our method.
Motivation & Objective
- To reduce the computational cost of large pre-trained language models during inference for sequence labeling tasks.
- To enable model compression without costly retraining, especially for RNN-based architectures with sequential dependencies.
- To identify and retain only the most relevant layers of a language model for a specific downstream task.
- To maintain high performance while significantly reducing model size and inference cost through structured pruning.
- To develop a plug-in-and-play compression framework compatible with existing language models and downstream models.
Proposed method
- Introduces dense connectivity in RNNs to allow independent layer detachment, enabling layer pruning without disrupting the network structure.
- Applies sparsity-inducing regularization (modified L1) to encourage binary selection weights, promoting sparse and binary layer selection.
- Uses layer-wise dropout during training to improve robustness and generalization for subsequent pruning.
- Employs a learnable layer selection mechanism that identifies and retains only the most informative layers for the target task.
- Replaces wide and shallow RNNs with deep and narrow architectures via dense connectivity, enabling fine-grained pruning.
- Designs a pruning strategy that selects layers based on their contribution to the final task performance, avoiding full retraining.
Experimental results
Research questions
- RQ1Can we compress large pre-trained language models for sequence labeling without retraining, while preserving performance?
- RQ2How can we enable structured pruning of RNN layers when standard stacking prevents independent layer removal?
- RQ3What role does dense connectivity play in enabling efficient and robust model pruning?
- RQ4To what extent can layer selection preserve performance while reducing FLOPs in sequence labeling tasks?
- RQ5Does a pruned model trained with layer-wise dropout and sparsity regularization outperform a smaller, independently trained model?
Key findings
- On the CoNLL03 NER dataset, LD-Net achieves an F1 score of 91.86% ± 0.15%, a significant improvement over the unpruned baseline of 90.78% ± 0.24%.
- After pruning over 90% of the FLOPs, the pruned model maintains an F1 score of 91.84% ± 0.14%, outperforming smaller models and prior methods like TagLM (91.62%) and R-ELMo (91.54%).
- The pruned model on CoNLL03 shows only a 2% relative increase in error despite over 90% computation reduction, demonstrating high efficiency.
- On the CoNLL00 Chunking task, the pruned model achieves a 25% error reduction over the NoLM baseline, though performance degrades faster due to smaller dataset size.
- Layer selection exhibits two distinct clusters: some layers are consistently preserved, while others are frequently pruned, indicating meaningful structural patterns in layer importance.
- The method's effectiveness is validated by consistent performance gains across multiple runs and datasets, with minimal degradation even under aggressive pruning.
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.