ReadPrompt: A Readable Prompting Method for Reliable Knowledge Probing

Zezhong Wang, Luyao Ye, Hongru Wang, Wai-Chung Kwan, David Ho, Kam-Fai Wong

Introduction

Determining what a Pre-trained Language Model (PLM) truly "knows" is a fundamental challenge in AI. The standard technique, knowledge probing, involves querying the model with fill-in-the-blank prompts like "Italy is located in [MASK]." However, PLMs are notoriously sensitive to phrasing. To maximize accuracy, researchers often use "automated prompts"—either discrete prompts (nonsensical strings of real words) or soft prompts (uninterpretable mathematical vectors).

While these automated methods achieve high performance, they create a "black box" problem. If a model correctly predicts "Europe" from a nonsensical string like "Italy national art Petroleum outside [MASK]", is it demonstrating geographical knowledge or just exploiting statistical shortcuts? Without readability, we cannot verify the model's reasoning.

Comparison of different prompting methods and their outputs.

ReadPrompt addresses this by balancing high-performance knowledge probing with human readability. By optimizing for both prediction accuracy and low perplexity, it ensures that prompts are both effective and linguistically meaningful.

Methodology

ReadPrompt treats prompt generation as a multi-objective search problem, optimizing for two primary goals:

  1. Capability Loss: Ensuring the prompt effectively triggers the model to predict the correct "golden" object. This is achieved through a gradient-based first-order approximation to identify vocabulary words that minimize prediction loss.
  2. Readability Loss: Constraining the search using perplexity (PPL). By penalizing high-perplexity sequences, the algorithm selects words that form natural, fluent sentences with the subject.

The process is iterative, swapping tokens until a sequence is found that is both effective and fluent. Additionally, an alignment strategy using BERTScore ensures the generated prompt remains semantically consistent with the intended relation, preventing the search from drifting into deceptive but high-scoring patterns.

Experimental Setup

The method was evaluated across several standard knowledge probing benchmarks, including T-REx (Wikidata triples), Google-RE (Wikipedia facts), ConceptNet (commonsense), and LAMA-UHN (a "hard" version of LAMA designed to filter out surface-level patterns).

Key Results and Insights

ReadPrompt demonstrates that readability does not have to come at the expense of performance. On the T-REx dataset using BERT-base, ReadPrompt achieved a Precision@1 (P@1) of 52.8%, significantly outperforming the previous leading discrete method, AutoPrompt (43.3%), and even rivaling "soft" vector-based methods.

Performance comparison of ReadPrompt against other methods on BERT and RoBERTa models.

Beyond raw accuracy, ReadPrompt achieved a massive reduction in perplexity—approximately 70% lower than AutoPrompt. This shift from "word salads" to interpretable sentences allowed for deeper analysis of model behavior.

The "Stochastic Parrot" Trap

Through an Attack Experiment, the authors found that unreadable soft prompts often have high "confusion rates." When the subject and object are swapped (e.g., asking about "Europe" being located in "Italy"), these unreadable prompts often trigger the same answer. This suggests that unreadable prompts may simply be triggering high-frequency co-occurrence patterns rather than querying actual relations.

Readability as a Truth Filter

Human-readable prompts allow researchers to identify "deceptive" successes. For instance, a prompt for the "capital of" relation might evolve into "X has a province called Y." While often yielding the correct answer, this is factually a different question. ReadPrompt's readability makes such semantic drifts visible and manageable.

Conclusion and Future Work

ReadPrompt proves that meaningful, human-readable prompts can be just as powerful as "black box" vectors while providing much-needed reliability in knowledge probing. Future work will focus on automating the template structures and further refining the balance between strict grammatical rules and raw model performance. As models scale, developing more efficient search indicators that do not require constant gradient access will also be a priority.

Summary updated

BibTeX
@inproceedings{wang2023readprompt,
  author = {Zezhong Wang and Luyao Ye and Hongru Wang and Wai-Chung Kwan and David Ho and Kam-Fai Wong},
  title = {{ReadPrompt: A Readable Prompting Method for Reliable Knowledge Probing}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.501},
}
Figure