Probing via Prompting

Jiaoda Li, Ryan Cotterell, Mrinmaya Sachan

Abstract

Researchers from ETH Zürich propose "Probing via Prompting" (PP), a novel method for investigating linguistic knowledge in language models using prompting instead of external classifiers. By reformulating linguistic tasks into a native question-answering format, PP addresses the "probe's dilemma"—the uncertainty of whether a probe extracts existing knowledge or learns the task itself. Our findings demonstrate that PP is significantly more selective than traditional diagnostic probes and reveals that syntactic information in GPT-2 is stored in higher layers than previously suggested, challenging the conventional "NLP pipeline" view.

Introduction

In Natural Language Processing (NLP), understanding the internal representations of models like GPT-2 and BERT is crucial. Traditionally, researchers use "diagnostic probes"—small classifiers trained on internal model states—to predict linguistic features. However, this approach faces the probe's dilemma: high accuracy might result from the probe's own learning capacity rather than the model's inherent knowledge. Probing via Prompting (PP) offers a "model-free" alternative that queries the model natively.

Methods

PP converts linguistic tasks into a format the model can solve directly using Pattern-Verbalizer Pairs. For example, a sentence and its target spans are formatted as [Sentence] SEP [Span] EOS, and class labels are mapped to specific tokens in the model's vocabulary.

To adapt GPT-2 without altering its core weights, the authors utilize continuous prefix tuning. This involves prepending learnable "virtual token" vectors to the input. Only these prefix vectors are trained, while the language model remains frozen.

Architecture of the Probing via Prompting (PP) method, showing the use of prefixes and the LM Head to predict linguistic labels.

Additionally, the study employs Differentiable Subset Pruning (DSP) to identify specific attention heads essential for various tasks, allowing researchers to map linguistic knowledge to the model's architecture.

Key Insights and Results

The Selectivity Advantage

A critical test for any probe is its performance on a model with random weights. While traditional MLP probes can achieve ~48% accuracy on POS tagging using random representations, PP's accuracy drops to near-chance (~13%). This high selectivity ensures that PP is truly extracting what the model knows rather than "cheating" by learning the task independently.

Challenging the "NLP Pipeline" Myth

Previous research suggested that models follow a "classical pipeline" where syntax is processed in early layers and semantics in later ones. PP contradicts this for GPT-2. By calculating the "center of gravity" for different tasks, the researchers found that syntactic information (POS and Constituents) is actually localized in higher layers than previously discovered by diagnostic probes.

Comparison of the 'Center of Gravity' across different linguistic tasks, showing that PP often identifies knowledge in higher layers than traditional probes.

Functional Knowledge and Performance

Using "Amnesic Probing"—the removal of heads essential for specific linguistic tasks—the authors demonstrated that this knowledge is functional. Removing heads associated with "Entity" or "Coreference" tasks caused the most significant spikes in language modeling loss, suggesting these features are vital for coherent text generation.

Conclusion

Probing via Prompting provides a more faithful and selective method for interpreting the internal states of language models. By revealing that syntactic knowledge may reside in higher layers, this work prompts a re-evaluation of how autoregressive models organize linguistic information. Future research will explore these dynamics in masked language models and larger-scale architectures.

Summary updated

BibTeX
@inproceedings{li2022probing,
  author = {Jiaoda Li and Ryan Cotterell and Mrinmaya Sachan},
  title = {{Probing via Prompting}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.84},
}
Figure