Dissecting Paraphrases: The Impact of Prompt Syntax and supplementary Information on Knowledge Retrieval from Pretrained Language Models

Stephan Linzbach, Dimitar Dimitrov, Laura Kallmeyer, Kilian Evang, Hajira Jabeen, Stefan DietzeNAACL 2024 · DOI

TL;DR

This paper introduces CONPARE-LAMA, a novel benchmark for systematically studying how prompt phrasing (syntax and supplementary information) affects knowledge retrieval in large language models (LLMs). They find that clausal syntax consistently improves LLM performance and consistency, while appositive syntax can introduce noise and reduce reliability.

What Problem Does This Paper Address?

Large Language Models (LLMs) like BERT and GPT-3 have demonstrated an impressive ability to store and retrieve factual knowledge directly from their parameters. This capability is often tested using "cloze-style" prompts, where the model predicts a missing word (e.g., "Paris is the capital of [MASK]"). However, the performance of these models is highly sensitive to the exact wording of the prompt. Even minor changes in syntax or the addition of extra information (like "Paris is a city and is the capital of France") can significantly alter retrieval accuracy.

The challenge has been to disentangle the effects of these prompt variations. Previous work often struggled to control for both syntactic structure and the type of supplementary information simultaneously, making it hard to pinpoint why certain prompts work better than others. This paper aims to address this by creating a controlled environment to isolate and measure the independent impact of prompt syntax and supplementary information on knowledge retrieval.

Methods

The core of this paper is the CONPARE-LAMA benchmark. They developed a meta-template that allows for the systematic generation of paraphrased prompts for various relations. This meta-template enables controlled variation in:

  • Syntax: Differentiating between clausal (e.g., "Paris is a city and is the capital of [MASK]") and appositive (e.g., "The city Paris is the capital of [MASK]") sentence structures.
  • Supplementary Information (sInf): Adding domain information (e.g., "Paris is a city...") or range information (e.g., "...which is a country") to the basic relation prompt.

They then automatically generated approximately 34 million prompts by combining these variations with existing knowledge triples from corpora like TREx, GoogleRE, and ConceptNet. This massive dataset allows for rigorous experiments to measure the impact of these prompt design choices on LLM performance.

Datasets

The experiments were conducted using data from three established corpora:

  • TREx: A large-scale dataset for knowledge retrieval.
  • GoogleRE: Another dataset for relation extraction and knowledge retrieval.
  • ConceptNet: A commonsense knowledge graph.

The CONPARE-LAMA benchmark itself is a newly introduced resource, derived from these existing corpora but structured to allow for controlled syntactic and semantic variations.

Key Insights and Ideas

  • Clausal Syntax is King: Prompts using clausal structures consistently outperform those using appositive syntax across all tested models and corpora. This suggests that the way information is embedded within a sentence's grammatical structure significantly impacts an LLM's ability to access knowledge.
  • Appositive Syntax Can Be Noisy: Appositive phrases, while seemingly simple, can introduce noise and reduce the consistency of knowledge retrieval. This might be because they are less common in typical training data or their semantic function is different from clauses.
  • Range Information is Powerful (but tricky): Adding range information (e.g., specifying the type of the object) has the greatest potential to boost performance, even more so than domain information. However, this boost is highly dependent on the syntax used.
  • Information Synergy vs. Interference: Supplementary information that is helpful in isolation can become distracting when combined, especially with appositive syntax. This highlights the complex interplay between prompt elements.
  • Consistency Matters: Clausal syntax leads to more consistent knowledge recall, meaning the model is more likely to retrieve the same correct answer across different paraphrased prompts.

Key Results

  • Performance Boost: Clausal syntax consistently leads to higher P@1 (precision at 1) scores compared to appositive syntax for all models (BERT, RoBERTa, Luke). For example, on the TREx corpus, clausal prompts showed significantly higher recall of correctly retrieved triples compared to appositive prompts.
  • Consistency Improvement: RoBERTa, for instance, recalled approximately 80% of triples with clausal syntax when adding domain and range information, compared to only about 62% with appositive syntax.
  • Response Uncertainty: Clausal syntax helps decrease response uncertainty (measured by binary entropy), indicating more confident and reliable predictions. Appositive syntax, conversely, can increase uncertainty.
  • Model Differences: While clausal syntax generally benefits all models, RoBERTa showed a particular ability to reliably combine information with clausal syntax. BERT often achieved the best overall performance, potentially due to its extensive pre-training data.

Limitations and Future Work

  • English and Single Tokens: The current study is limited to English text and primarily focuses on single-token object prediction. Future work could explore multilingual settings and multi-token entities.
  • Base Models: Experiments were conducted on base LLM models. Testing larger, more advanced versions could reveal further insights.
  • Type of Information: The study focused on domain and range type information. Exploring other types of supplementary information (e.g., more descriptive entity attributes) could be valuable.
  • Pre-training Data: The authors suggest that future research could investigate how knowledge-enhanced pre-training datasets, incorporating insights from this study, might lead to more robust knowledge representation. They also plan to expand the CONPARE-LAMA template to include more diverse syntax and knowledge types.

Summary updated

BibTeX
@inproceedings{linzbach2024dissecting,
  author = {Stephan Linzbach and Dimitar Dimitrov and Laura Kallmeyer and Kilian Evang and Hajira Jabeen and Stefan Dietze},
  title = {{Dissecting Paraphrases: The Impact of Prompt Syntax and supplementary Information on Knowledge Retrieval from Pretrained Language Models}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.naacl-long.201},
}
Figure