Skip to main content
QUICK REVIEW

[Paper Review] P-Adapters: Robustly Extracting Factual Information from Language Models with Diverse Prompts

Benjamin Newman, Prafulla Kumar Choubey|arXiv (Cornell University)|Oct 14, 2021
Topic ModelingComputer Science11 citations
TL;DR

P-Adapters are lightweight, trainable adapters that sit between the embedding layer and first attention layer of frozen large language models (LLMs), transforming natural language prompts into optimized continuous prompts to improve factual information extraction. They achieve 12–26% absolute precision gains and 36–50% consistency improvements over natural language prompting alone, with success primarily due to access to the LLM’s embeddings of the prompt’s subject entity.

ABSTRACT

Recent work (e.g. LAMA (Petroni et al., 2019)) has found that the quality of the factual information extracted from Large Language Models (LLMs) depends on the prompts used to query them. This inconsistency is problematic because different users will query LLMs for the same information using different wording, but should receive the same, accurate responses regardless. In this work we aim to address this shortcoming by introducing P-Adapters: lightweight models that sit between the embedding layer and first attention layer of LLMs. They take LLM embeddings as input and output continuous prompts that are used to query the LLM. Additionally, we investigate Mixture of Experts (MoE) models that learn a set of continuous prompts ("experts") and select one to query the LLM. They require a separate classifier trained on human-annotated data to map natural language prompts to the continuous ones. P-Adapters perform comparably to the more complex MoE models in extracting factual information from BERT and RoBERTa while eliminating the need for additional annotations. P-Adapters show between 12-26% absolute improvement in precision and 36-50% absolute improvement in consistency over a baseline of only using natural language queries. Finally, we investigate what makes P-Adapters successful and conclude that a significant factor is access to the LLM's embeddings of the original natural language prompt, particularly the subject of the entity pair being queried.

Motivation & Objective

  • To address the inconsistency in factual information extraction from LLMs when using semantically equivalent but differently worded prompts.
  • To develop a method that requires only natural language prompts at inference time, without needing relation annotations or subject identity during inference.
  • To improve robustness and accuracy of factual extraction from frozen LLMs in user-centric settings where prompt variation is inevitable.
  • To investigate whether access to the LLM’s internal embeddings of the prompt subject contributes significantly to performance.

Proposed method

  • P-Adapters are lightweight neural networks inserted between the embedding layer and first attention layer of a frozen LLM, taking input embeddings and outputting continuous prompts.
  • The adapters are trained end-to-end using only (prompt, object) pairs at training time, without requiring relation annotations or subject identity.
  • The model learns to map diverse natural language prompts to a shared, optimal continuous prompt representation that improves factual prediction.
  • The method implicitly encourages consistency by mapping multiple phrasings of the same fact to the same predicted object.
  • A variant, the Prefix P-Adapter, uses a learnable prefix token to condition the input, while the Rewrite P-Adapter attempts to rephrase the prompt in continuous space.
  • The approach is compared to Mixture-of-Experts (MoE) models that require relation annotations and subject identity to select a relation-specific expert prompt.

Experimental results

Research questions

  • RQ1Can we improve factual information extraction from frozen LLMs without requiring relation annotations or subject identity during inference?
  • RQ2How does access to the LLM’s embeddings of the prompt subject influence the performance of prompt adaptation methods?
  • RQ3To what extent can a lightweight adapter model outperform natural language prompting in terms of precision and consistency across diverse prompt phrasings?
  • RQ4Does conditioning the adapter on the full natural language prompt (rather than just the relation) lead to better generalization?
  • RQ5Why do P-Adapters outperform other prompt optimization methods despite using less supervision?

Key findings

  • P-Adapters achieve 12–26% absolute improvement in precision and 36–50% absolute improvement in consistency over natural language prompting alone on factual extraction tasks.
  • The success of P-Adapters is significantly diminished when the LLM’s embeddings of the prompt subject are not accessible, indicating that subject-aware representations are crucial.
  • P-Adapters perform comparably to more complex Mixture-of-Experts (MoE) models that require relation annotations and subject identity, but without those requirements.
  • The Prefix P-Adapter variant achieves performance close to MoE models, suggesting that simple prefix tuning can be highly effective.
  • Even with optimal prompt tuning, the oracle method only achieves 50% precision on in-distribution objects and 25% on out-of-distribution objects, indicating inherent limitations in prompt optimization.
  • The study confirms that LLMs’ factual knowledge is sensitive to prompt phrasing, and that small, learned prompt adjustments via P-Adapters can dramatically improve reliability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.