Introduction
Knowledgeable Prompt-tuning (KPT) is a novel framework designed to enhance text classification in low-data scenarios. By expanding the "verbalizer"—the mapping between model outputs and class labels—using external knowledge bases, KPT significantly improves accuracy and stability in zero-shot and few-shot learning.
The Problem: Limitations of Standard Verbalizers
In Pre-trained Language Models (PLMs), prompt-tuning has emerged as a powerful alternative to traditional fine-tuning, particularly when training data is scarce. This approach involves wrapping input in a template (e.g., "A [MASK] question: [Input Text]") and tasking the model with filling the blank.
The "bridge" connecting the model's predicted word to a specific category is the verbalizer. Traditionally, these are either handcrafted (e.g., mapping "science" to the SCIENCE category) or discovered via gradient descent. However, manual verbalizers are often biased and limited in coverage, while searched verbalizers require substantial labeled data. If a model encounters text about "quantum mechanics" but the verbalizer only recognizes the word "science," the classification may fail despite the model's underlying knowledge.
The KPT Framework
The authors propose Knowledgeable Prompt-tuning (KPT), a three-stage framework to integrate external knowledge into the prompt-tuning process.
- Construction: KPT utilizes Knowledge Bases (KBs) such as ConceptNet and WordNet to generate an expansive set of "label words" for each class. For instance, a "Sports" category might include "athletics," "football," and "soccer."
- Refinement: To ensure quality, the framework employs four refinement techniques:
- Frequency Refinement: Filters words rarely predicted by the PLM in a general corpus.
- Relevance Refinement: Retains words highly relevant to their specific class using a TF-IDF-inspired approach.
- Contextualized Calibration (CC): Mitigates the model's inherent bias toward specific words.
- Learnable Refinement: In few-shot settings, the model learns to weight the most informative label words more heavily.
- Utilization: The model aggregates the probabilities of these refined label words to produce a final class prediction.
Experimental Setup
KPT was evaluated across five text classification benchmarks: AG’s News, DBPedia, and Yahoo (Topic Classification), as well as IMDB and Amazon (Sentiment Analysis). The study focused on zero-shot and few-shot (1, 5, 10, and 20-shot) configurations to assess performance in data-scarce environments.
Key Results and Insights
KPT consistently outperformed standard prompt-tuning and other automated verbalizer methods across various shot counts.
- Performance Gains: KPT achieved significant improvements, particularly in zero-shot topic classification. On the Yahoo dataset, accuracy rose from approximately 45% to over 61%. On average, KPT reduced the error rate by 16%, 18%, 10%, and 7% in 0, 1, 5, and 10-shot experiments, respectively.
- Breadth over Precision: A broad set of related words often proves more effective than a single "perfect" label word, as diversity allows the model to capture various granularities of a topic.
- PLMs as Self-Filters: Using the PLM to refine the KB by observing natural predictions on unlabeled data helps strip away words the model does not "understand" in context.
- Handling Out-of-Vocabulary (OOV) Terms: For KB words split into multiple tokens, averaging prediction scores of sub-tokens proved effective, enabling the use of complex terminology.
- Stability: KPT reduces result variance across different prompts, making prompt-tuning more reliable for real-world applications.
Conclusion
KPT demonstrates that incorporating external knowledge into verbalizers can drastically improve the performance and stability of PLMs in low-resource settings. While the method relies on high-quality KBs, it offers a robust path forward for few-shot learning. Future work may explore the joint design of templates and verbalizers or extending the framework to natural language generation tasks.
Summary updated