SPE: Symmetrical Prompt Enhancement for Fact Probing

Yiyuan Li, Tong Che, Yezhen Wang, Zhengbao Jiang, Caiming Xiong, Snigdha Chaturvedi

Abstract

Pretrained language models (PLMs) have been shown to accumulate factual knowledge during pretraining. Recent works probe PLMs for the extent of this knowledge through prompts either in discrete or continuous forms. However, these methods do not consider symmetry of the task: object prediction and subject prediction. In this work, we propose Symmetrical Prompt Enhancement (SPE), a continuous prompt-based method for factual probing in PLMs that leverages the symmetry of the task by constructing symmetrical prompts for subject and object prediction. Our results on a popular factual probing dataset, LAMA, show significant improvement of SPE over previous probing methods.

Introduction

Pretrained language models like BERT and RoBERTa serve as massive digital encyclopedias, having internalized vast amounts of information during their training phases. Researchers typically extract this knowledge using "prompts" (e.g., "The capital of France is [MASK]"). However, this probing process is notoriously brittle; minor changes in phrasing can lead to wildly different outputs.

Furthermore, these models often suffer from frequency bias. When a model is uncertain, it tends to output high-frequency words (like "USA" or "music") rather than the specific, correct answer (like "Luxembourg" or "opera"). Existing probing methods generally operate in a unidirectional manner (Subject + Relation → Object), ignoring the inherent relational symmetry of most factual knowledge.

Methodology: Symmetrical Prompt Enhancement

The authors introduce Symmetrical Prompt Enhancement (SPE), a continuous prompt-based method. Unlike discrete prompts that use fixed text strings, continuous prompts utilize learnable mathematical vectors to "nudge" the model toward the correct factual associations.

The SPE workflow operates in two distinct stages:

  1. Forward Prediction: Given a subject and a relation, the model generates a list of the top-$K$ most likely object candidates.
  2. Symmetrical Verification: For each candidate, SPE generates a "symmetrical" prompt. It essentially asks the model to reverse the query: "If the object is [Candidate], how likely is it that the subject is [Original Subject]?"
The SPE workflow: combining forward prediction with symmetrical verification to refine candidate probabilities.

The final prediction is a weighted combination of the forward and backward scores. This "double-check" mechanism ensures that the relationship holds true in both directions. To implement this, the authors utilize a BiLSTM (Bidirectional Long Short-Term Memory) network followed by a Multi-Layer Perceptron (MLP) to generate these optimized prompt vectors.

Experimental Evaluation

The researchers evaluated SPE using the LAMA (Language Model Analysis) dataset, specifically the subset derived from Wikidata. This includes 41 different relations such as "place of birth," "capital of," and "employer." They utilized specific splits: LAMA-Easy (facts guessable through simple patterns) and LAMA-Hard (facts requiring robust internal knowledge). They tested the method across various model architectures, including BERT-base, BERT-large, and RoBERTa-base.

Key Results

SPE achieved state-of-the-art results across the tested PLMs on the LAMA benchmark, consistently outperforming previous methods like P-tuning and SoftPrompt.

Performance comparison of SPE against various state-of-the-art probing methods across different PLMs.

As shown in the results table, SPE improves Precision@1 (P@1) significantly. For example, on BERT-base, it improved P@1 from the previous best of 48.2% to 50.3%. Similar gains were observed for larger models and different architectures, demonstrating the robustness of the symmetrical approach.

Insights and Discussion

Symmetry as a Filter

The core innovation of SPE is using symmetry to enforce precision. While a model might associate "music" with Richard Wagner due to high co-occurrence frequency, it is unlikely to identify Richard Wagner as the primary representative of the broad field of "music" in a reverse prompt. However, it will strongly associate Wagner with the more specific term "opera." Symmetry forces the model to move beyond shallow associations toward specific factual accuracy.

Breaking the Frequency Trap

SPE is remarkably effective at retrieving low-frequency but correct tokens. By requiring the relationship to work backwards, the model is less likely to hallucinate a high-frequency "safe" answer that doesn't actually fit the specific subject. This is evidenced by SPE's superior performance on the "LAMA-Hard" dataset (4.2% improvement) compared to the "Easy" set (1.5%), suggesting it taps into deeper factual understanding.

Limitations and Future Work

Despite its success, SPE has several limitations:

  • Broad Concepts: The method struggles when the correct answer is a very broad category (e.g., distinguishing between "river" and "tributary"), where symmetrical checks might be ambiguous.
  • Error Propagation: As a two-step process, if the correct answer is not captured in the initial top-$K$ list, the symmetrical check cannot recover it.
  • Computational Cost: The two-pass inference process is more computationally demanding than standard one-pass probing.
  • Model Scope: This study focused on Masked Language Models (MLMs). Future research could explore how this symmetry applies to generative, decoder-only models like GPT.

Summary updated

BibTeX
@inproceedings{li2022spe,
  author = {Yiyuan Li and Tong Che and Yezhen Wang and Zhengbao Jiang and Caiming Xiong and Snigdha Chaturvedi},
  title = {{SPE: Symmetrical Prompt Enhancement for Fact Probing}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  url = {https://openreview.net/forum?id=W27HCI2Rox},
}
Figure