Abstract
NPPrompt (Nonparametric Prompting) enables pre-trained language models (PLMs) to perform complex tasks in a "fully zero-shot" manner—requiring no labeled data, no additional raw text for training, and no human-designed word mappings. By automatically extracting "verbalizers" from a model's own internal embedding space, it achieves significant performance gains over previous zero-shot methods, rivaling much larger models like GPT-3.
Introduction
While Pre-trained Language Models (PLMs) like BERT and GPT are powerful, adapting them to specific tasks typically requires either computationally expensive fine-tuning on labeled data or manual prompting. Prompting involves converting a task into a "fill-in-the-blank" question, but it often relies on a verbalizer—a manual mapping of class labels to specific words (e.g., mapping "SPORTS" to "basketball"). This process is labor-intensive and prone to human bias. Existing automatic methods for finding these words often require a large corpus of unlabeled text to "warm up" the model. This paper introduces a method to make a model a "fully" zero-shot learner that works out of the box using only the names of the target labels.
Methodology: NPPrompt
The authors propose NPPrompt (Nonparametric Prompting PLM). The core innovation is treating the PLM's internal word embeddings as a pre-existing knowledge base to build verbalizers automatically.
The process involves three main steps:
- k-Nearest-Neighbor Verbalizer Construction: Instead of a human picking one word to represent a label, NPPrompt identifies the top-$k$ most similar words in the model's own embedding space for a given label name (e.g., "SPORTS" might map to "athletics," "NBA," and "football").
- Nonparametric Aggregation: Test sentences are placed into a template, such as "[Sentence]. This topic is about [MASK]."
- Kernel Smoothing: NPPrompt aggregates the "logits" (raw prediction scores) of all $k$-nearest neighbor words. These scores are weighted by their similarity to the original label name, creating a robust, multi-faceted prediction.
This method is nonparametric, meaning no model weights are updated; it uses the PLM exactly as released.
Experimental Evaluation
The researchers evaluated NPPrompt across a wide variety of Natural Language Understanding (NLU) tasks, including:
- Text Classification: AG News, DBPedia, IMDB, and Amazon.
- GLUE Benchmark: Eight tasks including linguistic acceptability (CoLA), sentiment (SST-2), and natural language inference (MNLI, QNLI, RTE).
- Multiple-Choice QA: CommonsenseQA (CQA).
Key Results and Insights
NPPrompt demonstrates that initial word embeddings contain the latent knowledge needed to define tasks without explicit teaching. It often outperforms manual verbalizers, suggesting that internal model associations are more comprehensive than human intuition.
Key performance metrics include:
- Classification Gains: NPPrompt outperformed previous best fully zero-shot methods by an absolute 12.8% in accuracy on text classification.
- GLUE Benchmark: A massive 15.6% improvement was observed compared to other zero-shot baselines.
- Efficiency: RoBERTa-large (355M parameters) using NPPrompt outperformed the 175B-parameter GPT-3 on several benchmarks, such as achieving 85.2% accuracy on AG News compared to GPT-3's 83.4%.
Limitations and Future Work
NPPrompt relies on label names having semantic meaning; abstract labels (e.g., "Category A") require descriptive keywords. Additionally, while the verbalizer is automatic, the prompt template remains manually chosen. Future work may explore automatic template selection and extending this approach to open-ended tasks like relation extraction.
Summary updated