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 in either discrete or continuous forms. However, these methods do not consider the 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 the popular factual probing dataset, LAMA, show significant improvement of SPE over previous probing methods.
Introduction
Pretrained language models like BERT and RoBERTa act as massive, unstructured knowledge bases. Researchers typically use "prompts"—cloze-style sentences such as "The capital of France is [MASK]"—to probe what these models actually know. However, current probing methods are often "brittle"; minor changes in sentence structure can lead to wildly different results. Furthermore, these models suffer from frequency bias, where the model defaults to high-frequency words (e.g., "USA" or "Microsoft") when it is uncertain, rather than providing the specific correct answer.
Most existing methods only examine the relationship in one direction (Subject $\rightarrow$ Object). SPE addresses these limitations by leveraging the inherent symmetry of facts: if a model truly understands a relationship, it should be able to verify it in both directions.
Methodology: Symmetrical Prompt Enhancement
SPE is a continuous prompt-based method. Unlike discrete prompts that use fixed natural language strings, SPE utilizes "continuous prompts"—trainable vectors optimized to trigger the model's internal knowledge. These vectors are generated by a small neural network (a BiLSTM with an MLP) and fed into a frozen PLM.
The SPE workflow operates in three distinct stages:
- Candidate Generation: Given a subject (e.g., Luxembourg) and a relation (e.g., location), the model generates a list of the top $K$ most likely object candidates (e.g., Germany, France, Europe).
- Symmetrical Verification: For each candidate, the model generates a "symmetrical" prompt to predict the original subject. For example, it asks: "If the location is Europe, what is the subject?"
- Joint Scoring: The final prediction is determined by a weighted combination of the likelihood of the object given the subject and the likelihood of the subject given that specific object candidate.
By using continuous prompts, the model explores a larger search space to find the optimal "trigger" for the PLM's internal weights, making the probing process more robust than traditional text-based prompts.
Experimental Setup
The researchers evaluated SPE using the LAMA (LAnguage Model Analysis) dataset, a standard benchmark for factual probing consisting of triples sourced from Wikidata. The evaluation focused on two specific subsets:
- LAMA-Easy: Facts that are often guessable through simple surface patterns.
- LAMA-Hard: Facts requiring deeper, more specific knowledge.
The method was tested across several architectures, including BERT-base, BERT-large, and RoBERTa-base.
Key Insights and Results
Symmetry as a Knowledge Filter
The primary innovation of SPE is using symmetry as a verification step. This effectively filters out "spurious associations." For instance, while a model might guess "Microsoft" as a common employer, it is unlikely to rank a niche subject as the top employee when the prompt is reversed. This mechanism significantly mitigates frequency bias, allowing the model to output precise, low-frequency terms (e.g., identifying "opera" for Richard Wagner rather than the broader "music").
Performance Benchmarks
SPE achieved state-of-the-art performance across the tested models:
- Overall Accuracy: On BERT-base, SPE achieved a 50.3% P@1 (Precision at 1), outperforming the previous best method, P-tuning (48.2%).
- LAMA-Hard Success: The gains were most significant on the LAMA-Hard split, showing a 4.2% improvement over P-tuning. This suggests that SPE is tapping into genuine factual knowledge rather than surface-level pattern matching.
- Domain Consistency: Qualitative analysis indicated that SPE's top predictions were more likely to remain within the correct semantic domain (e.g., suggesting other languages when the target answer is a language) compared to baseline methods.
Limitations and Future Work
While SPE marks a significant advancement, it faces certain challenges. The method is more computationally expensive than single-pass probing because it requires a two-step inference process (generating $K$ candidates and running $K$ symmetrical checks). Additionally, if the correct object is not present in the initial top $K$ candidates, the symmetrical check cannot recover it.
Future research may explore applying this symmetrical approach to more complex reasoning tasks or relation extraction, and finding ways to reduce the overhead of the verification stage.
Summary updated