Skip to main content
QUICK REVIEW

[Paper Review] Prototypical Verbalizer for Prompt-based Few-shot Tuning

Ganqu Cui, Shengding Hu|arXiv (Cornell University)|Mar 18, 2022
Topic ModelingComputer Science8 citations
TL;DR

This paper proposes Prototypical Verbalizer (ProtoVerb), a novel method for automatic verbalizer construction in prompt-based few-shot tuning that learns class prototypes from training data using contrastive learning. ProtoVerb significantly outperforms existing automatic verbalizers, especially under low-data regimes, and boosts performance even on untuned pre-trained language models by capturing rich, abstract class-level semantics without human-designed label words.

ABSTRACT

Prompt-based tuning for pre-trained language models (PLMs) has shown its effectiveness in few-shot learning. Typically, prompt-based tuning wraps the input text into a cloze question. To make predictions, the model maps the output words to labels via a verbalizer, which is either manually designed or automatically built. However, manual verbalizers heavily depend on domain-specific prior knowledge and human efforts, while finding appropriate label words automatically still remains challenging.In this work, we propose the prototypical verbalizer (ProtoVerb) which is built directly from training data. Specifically, ProtoVerb learns prototype vectors as verbalizers by contrastive learning. In this way, the prototypes summarize training instances and are able to enclose rich class-level semantics. We conduct experiments on both topic classification and entity typing tasks, and the results demonstrate that ProtoVerb significantly outperforms current automatic verbalizers, especially when training data is extremely scarce. More surprisingly, ProtoVerb consistently boosts prompt-based tuning even on untuned PLMs, indicating an elegant non-tuning way to utilize PLMs. Our codes are avaliable at https://github.com/thunlp/OpenPrompt.

Motivation & Objective

  • To address the limitations of manual verbalizers, which require domain-specific knowledge and human effort, especially in low-resource settings.
  • To overcome the challenges of automatic verbalizer construction—such as suboptimal performance in low-data regimes—by learning representative class-level semantics from training instances.
  • To develop a plug-and-play, non-tuning method that enhances prompt-based tuning without requiring fine-tuning of the pre-trained language model.
  • To investigate whether prototypes learned from few examples can capture abstract, human-like class concepts and generalize well to unseen data.

Proposed method

  • ProtoVerb learns continuous prototype vectors for each class by applying contrastive learning with an InfoNCE loss to align instances and push prototypes toward class centers.
  • The method uses two loss components: an instance-instance contrastive loss to cluster intra-class instances and separate inter-class instances, and an instance-prototype loss to enforce prototypes as central representations.
  • Prototypes are optimized end-to-end using the pre-trained language model’s hidden representations, enabling them to summarize rich class-level semantics from limited training data.
  • The learned prototypes serve as verbalizers by mapping model predictions (e.g., [MASK] tokens) to class labels via cosine similarity with prototype vectors.
  • To interpret prototypes, the method retrieves the most similar words from the vocabulary using embedding space alignment, enabling analysis of prototype semantics.
  • The approach is designed to be plug-in and compatible with both manual verbalizers and untuned pre-trained models, enabling broad applicability.

Experimental results

Research questions

  • RQ1Can prototypes learned from a few training instances effectively represent class-level semantics in few-shot learning?
  • RQ2How does ProtoVerb compare to manual, search-based, and soft verbalizers in terms of performance and robustness under low-data conditions?
  • RQ3To what extent can ProtoVerb generalize to unseen data and capture abstract concepts rather than just entity-level names?
  • RQ4Does ProtoVerb improve performance even when used with untuned pre-trained language models?
  • RQ5How similar are the learned prototypes to human-designed verbalizers in terms of semantic alignment?

Key findings

  • ProtoVerb significantly outperforms state-of-the-art automatic verbalizers on both topic classification and entity typing tasks, especially when training data is scarce.
  • On AG’s News with only 1 shot, ProtoVerb achieves 78.4% accuracy, outperforming the next best baseline by over 5 percentage points.
  • When combined with manual verbalizers, ProtoVerb consistently improves performance with minimal additional cost, demonstrating its role as a complementary enhancement.
  • ProtoVerb is robust to label noise: even with 1–3 mislabeled samples, performance degradation is significantly lower than for baseline methods.
  • With just one training example, ProtoVerb generates meaningful prototypes—e.g., identifying 'Dodgers' or 'Knicks' for the 'Sports' class—demonstrating its ability to extract salient semantic cues.
  • Prototype similarity to manual verbalizers increases with shot size, reaching above 0.25 normalized similarity on average, and is highest for 'Sports' and 'Business', indicating effective abstraction of conceptual features.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.