[Paper Review] Take Care of Your Prompt Bias! Investigating and Mitigating Prompt Bias in Factual Knowledge Extraction
This paper investigates prompt bias in factual knowledge extraction from pre-trained language models (PLMs), demonstrating that all prompts exhibit non-negligible bias—especially gradient-based ones like AutoPrompt and OptiPrompt—leading to inflated benchmark accuracy and impaired retrieval performance. The authors propose a representation-based debiasing method that estimates prompt-only bias via masked input queries and subtracts it from internal representations, significantly improving retrieval accuracy (up to 10% absolute gain) and enhancing benchmark reliability by correcting overfitting-induced performance inflation.
Recent research shows that pre-trained language models (PLMs) suffer from "prompt bias" in factual knowledge extraction, i.e., prompts tend to introduce biases toward specific labels. Prompt bias presents a significant challenge in assessing the factual knowledge within PLMs. Therefore, this paper aims to improve the reliability of existing benchmarks by thoroughly investigating and mitigating prompt bias. We show that: 1) all prompts in the experiments exhibit non-negligible bias, with gradient-based prompts like AutoPrompt and OptiPrompt displaying significantly higher levels of bias; 2) prompt bias can amplify benchmark accuracy unreasonably by overfitting the test datasets, especially on imbalanced datasets like LAMA. Based on these findings, we propose a representation-based approach to mitigate the prompt bias during inference time. Specifically, we first estimate the biased representation using prompt-only querying, and then remove it from the model's internal representations to generate the debiased representations, which are used to produce the final debiased outputs. Experiments across various prompts, PLMs, and benchmarks show that our approach can not only correct the overfitted performance caused by prompt bias, but also significantly improve the prompt retrieval capability (up to 10% absolute performance gain). These results indicate that our approach effectively alleviates prompt bias in knowledge evaluation, thereby enhancing the reliability of benchmark assessments. Hopefully, our plug-and-play approach can be a golden standard to strengthen PLMs toward reliable knowledge bases. Code and data are released in https://github.com/FelliYang/PromptBias.
Motivation & Objective
- To investigate the extent and impact of prompt bias in factual knowledge extraction from pre-trained language models (PLMs).
- To demonstrate that prompt bias leads to overfitting on benchmark datasets, artificially inflating accuracy and distorting evaluation results.
- To show that prompt bias impairs the model's ability to retrieve correct factual knowledge by misleading predictions.
- To propose a plug-and-play, inference-time debiasing method that removes prompt-induced bias from model representations without retraining.
- To improve the reliability of factual knowledge benchmarks by correcting for bias-induced performance inflation and enhancing true retrieval capability.
Proposed method
- Estimate prompt bias by querying the PLM with a prompt-only input, replacing the subject with [MASK] to isolate the prompt's influence on output probabilities.
- Construct a 'biased representation' from the model's hidden states when prompted with the [MASK] input, capturing the bias introduced by the prompt structure.
- Use vector operations to subtract the estimated biased representation from the original representation of a given input, generating a debiased representation.
- Generate final predictions using the debiased representations, effectively removing the influence of prompt-specific biases.
- Apply the method across various prompts, PLMs (e.g., BERT, Llama2), and benchmarks (e.g., LAMA), demonstrating generalization and robustness.
- Use the debiased representations as sentence embeddings, enabling compatibility with downstream tasks like PromptBERT.
Experimental results
Research questions
- RQ1To what extent do different prompt types exhibit non-negligible prompt bias in factual knowledge extraction?
- RQ2How does prompt bias affect the reliability of benchmark evaluations, particularly on imbalanced datasets like LAMA?
- RQ3Can prompt bias mislead PLMs into making incorrect factual predictions, even when the model's internal knowledge supports the correct answer?
- RQ4Can a representation-based, inference-time debiasing method effectively correct for prompt bias without retraining or data manipulation?
- RQ5Does debiasing improve the true factual retrieval capability of prompts, especially when removing overfitting-induced performance inflation?
Key findings
- All prompts evaluated, including high-performing gradient-based ones like AutoPrompt and OptiPrompt, exhibit non-negligible prompt bias, with the latter showing significantly higher bias levels.
- Prompt bias can inflate absolute accuracy by over 16.47% on the LAMA benchmark when probing BERT-base, due to overfitting on test data.
- Prompt bias impairs model performance by misleading predictions—e.g., causing BERT to incorrectly predict 'Christian' for the religion of Albanians instead of 'Muslim'.
- The proposed representation-based debiasing method successfully corrects inflated performance caused by prompt bias, restoring more reliable benchmark evaluation.
- The method improves prompt retrieval capability by up to 10% absolute performance gain across multiple models and benchmarks.
- After debiasing, the performance gap between state-of-the-art prompts and simple manual prompts diminishes, indicating that prior gains were largely due to overfitting rather than superior knowledge retrieval.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.