TL;DR
The authors introduce Multi-task Pre-trained Modular Prompt ($MP^2$), a novel method that drastically improves few-shot learning performance for large language models by pre-training a set of combinable "soft prompts" across 38 diverse tasks. By framing all tasks as Machine Reading Comprehension (MRC) and using a learnable router to sparsely combine these prompts, $MP^2$ achieves state-of-the-art results in few-shot settings—sometimes by tuning as few as 8 parameters.
What Problem Does This Paper Address?
While large pre-trained language models (PTMs) are incredibly powerful, fine-tuning all of their parameters for every specific downstream task is computationally expensive and inefficient. "Prompt tuning"—which keeps the core model frozen and only trains a small set of continuous "soft prompt" vectors appended to the input—offers a parameter-efficient alternative.
However, prompt tuning notoriously struggles in few-shot learning scenarios. Because these soft prompts are initialized randomly, they introduce a new optimization gap between the model's original pre-training and the downstream task. Prior attempts to pre-train prompts (like PPT) suffer from three major flaws: they use simple pre-training objectives that don't capture complex task knowledge, they are limited to rigid formats (like multiple-choice with a maximum of 16 labels), and they suffer from a parameter-data complexity mismatch.
Methods
To solve these limitations, the authors propose $MP^2$, which builds on three core pillars:
- Unified MRC Format: Instead of formatting tasks as multiple-choice or standard language modeling, $MP^2$ reformulates both upstream pre-training and downstream tasks into a unified Machine Reading Comprehension (MRC) framework (Passage + Query $\rightarrow$ Answer Span). For classification, the text is the passage, and all possible labels are listed in the query. The model simply extracts the correct label as the answer span, allowing it to naturally scale to any number of labels.
- Deep Modular Prompts: Rather than just adding prompts to the input layer, $MP^2$ injects soft prompts into every layer of the PTM (increasing parameter capacity). Crucially, instead of a single static prompt per layer, it introduces a pool of $K$ modular prompts (skills) per layer.
- Gated Router Network: To combine these modular prompts, the authors introduce a layer- and task-specific "router." The router uses a differentiable Relaxed Bernoulli Distribution to sparsely activate and weight a subset of prompts tailored to the task at hand.
The training pipeline follows a clear three-step process, visualized below:
For downstream adaptation, the authors propose a Two-Stage Tuning approach. In Stage I, the PTM and prompts are frozen, and only the router is trained to find the best combination of existing skills. In Stage II, the router is frozen, and the selected prompts are fine-tuned.
Datasets
- Pre-training: $MP^2$ was pre-trained on a massive mixture of 38 public Chinese NLP datasets totaling 15GB of data. This included tasks across Natural Language Inference (NLI), Text Classification (TC), Coreference Resolution (CR), Keyword Extraction (KE), and MRC.
- Downstream Evaluation: The model was evaluated on 14 downstream tasks split into two tracks:
- UNSEEN DATA: 7 tasks that were part of the pre-training family but evaluated on entirely fresh, held-out data samples.
- UNSEEN TASK: 7 tasks that were completely excluded from pre-training to test true generalization (e.g., ChnSent, TNews, OCNLI, LCQMC, DRCD, $C^3$, COTE-BD).
Key Insights and Ideas
- The Power of Depth: Injecting modular prompts into every layer of the network (Deep Prompts) vastly outperforms just prepending them to the input layer (Shallow Prompts).
- Emergent Task Clustering: When analyzing the router, the authors discovered that it automatically performs hierarchical clustering on tasks. Without explicit supervision, the router naturally assigns similar subsets of modular prompts to similar types of tasks (e.g., grouping sentiment analysis tasks together), proving that the modules function as reusable, fundamental NLP "skills."
- Extreme Parameter Efficiency: In Stage I of black-box tuning, optimizing just 8 parameters (the router weights for a shallow model) yielded performance that rivaled full two-stage tuning, showing that few-shot adaptation can often be reduced to simply recombining pre-existing knowledge.
Key Results
The authors evaluated $MP^2$ using both gradient descent and gradient-free "black-box tuning" (BBT) against strong baselines like full Model Tuning, standard Prompt Tuning, P-Tuning v2, PPT, and SPoT.
- Overall Performance: Deep $MP^2$ achieved the highest average scores across the board. On completely Unseen Tasks, Deep $MP^2$ scored an average of 71.7% (Gradient Descent), significantly outperforming P-Tuning v2 (48.3%) and full Model Tuning (51.4%).
- Many-Label Generalization: Thanks to the MRC formatting, $MP^2$ maintained steady performance as the number of classification labels scaled up to 30, whereas previous methods like PPT suffered a sharp decline in accuracy once the number of labels exceeded 16.
- Training Speedup: "Router-only" tuning (Stage I) proved to be incredibly fast. For instance, on the TNews dataset, running only Stage I took just 2.28 minutes compared to the 4.51 minutes required for full two-stage tuning, while retaining nearly all of the performance.
Limitations and Future Work
While highly effective, the authors note a few limitations:
- Backbone Constraints: Due to high pre-training costs, $MP^2$ was only evaluated using the
CPT-largebackbone. Its behavior on varying PTM architectures and much larger scales remains untested. - Language and Resource Dependency: The study focuses entirely on Chinese NLP tasks. While the framework is language-agnostic, its success relies on the availability of diverse public datasets for multi-task pre-training, which might limit its efficacy in low-resource languages or highly specialized domains.
Summary updated