Abstract
Traditional fine-tuning of large pre-trained language models (PLMs) for sequence labeling tasks is resource-intensive, requiring separate model instances for every task. We present Plug-Tagger, a framework that allows a single frozen PLM to perform multiple sequence labeling tasks—such as Named Entity Recognition (NER) and Part-of-Speech (POS) tagging—by simply swapping lightweight "plugin" vectors. Plug-Tagger achieves performance comparable to full fine-tuning with 1,000x fewer task-specific parameters and enables task switching up to 70 times faster.
Introduction
In Natural Language Processing (NLP), the standard paradigm involves fine-tuning a massive Pre-trained Language Model (PLM) like BERT for specific downstream tasks. While effective, this approach is inefficient for multi-task environments or edge devices. Storing and deploying a full model for every task leads to significant storage overhead and slow redeployment times.
Existing parameter-efficient methods like prefix-tuning are well-suited for text generation but struggle with sequence labeling. Sequence labeling tasks typically require task-specific classification heads because each task has a unique label set (e.g., "Person" for NER vs. "Noun" for POS). This architectural dependency prevents a truly "pluggable" system where the core model remains untouched.
Methodology: The Plug-Tagger Framework
Plug-Tagger overcomes these limitations through two primary innovations: Label Word Prediction and Plugin Vectors.
1. Label Word Prediction
Instead of using a task-specific classifier head, Plug-Tagger reformulates sequence labeling as a masked language modeling (MLM) task. Each label is mapped to a high-frequency "proxy" word from the model's original vocabulary. For instance, the model might be trained to predict the word "John" to represent the PER (Person) label or "it" for an NP (Noun Phrase) label. This allows the model to reuse its frozen language model head across all tasks.
2. Plugin Vectors
To guide the frozen model toward a specific task, trainable "plugin vectors" are inserted into the input and every hidden layer. These vectors act as continuous prompts that steer the model's internal representations without modifying its weights.
By keeping the core model frozen and only swapping these tiny plugin vectors and the label-to-word mapping, the system becomes modular and highly efficient.
Experimental Setup
The framework was evaluated on three standard sequence labeling tasks across multiple datasets:
- Named Entity Recognition (NER): CoNLL 2003 and ACE 2005.
- Part-of-Speech (POS) Tagging: CoNLL 2003 and Wall Street Journal (WSJ).
- Chunking: CoNLL 2003 and CoNLL 2000.
Key Results and Insights
- Parameter Efficiency: Plug-Tagger uses only 0.1% of the task-specific parameters required by full fine-tuning. Despite this reduction, it maintains competitive performance, even slightly outperforming fine-tuning on the CoNLL 2003 NER task (91.58 vs. 91.45 F1).
- Rapid Task Switching: In scenarios requiring frequent task changes, Plug-Tagger is 50 to 70 times faster than traditional methods. Swapping kilobyte-sized plugin vectors is nearly instantaneous compared to reloading 400MB+ model files.
- Semantic Leveraging: By using actual words as labels, the framework taps into the semantic knowledge the model acquired during pre-training. Predicting "John" for a person is more intuitive for the model than mapping to an abstract label index.
Conclusion and Future Work
Plug-Tagger demonstrates that sequence labeling can be made "pluggable" without sacrificing performance. While highly effective, future work is needed to optimize label word selection for complex datasets like ACE 2005 and to improve the handling of the "O" (Outside) label in BIO tagging schemes. Nonetheless, Plug-Tagger represents a significant step toward deploying versatile, efficient NLP systems on resource-constrained devices.
Summary updated