Towards Alleviating the Object Bias in Prompt Tuning-based Factual Knowledge Extraction

Yuhang Wang, Dongyuan Lu, Chao Kong, Jitao Sang

Abstract

Many works employed prompt tuning methods to automatically optimize prompt queries and extract the factual knowledge stored in Pretrained Language Models. In this paper, we observe that the optimized prompts, including discrete prompts and continuous prompts, exhibit undesirable object bias. To handle this problem, we propose a novel prompt tuning method called MeCoD, consisting of three modules: Prompt Encoder, Object Equalization and Biased Object Obstruction. Experimental results show that MeCoD can significantly reduce the object bias and at the same time improve accuracy of factual knowledge extraction.

Introduction

Pre-trained language models (PLMs) such as BERT and RoBERTa have demonstrated a remarkable capacity for storing factual knowledge. To retrieve this information, researchers typically use "prompts"—queries like "The native language of Douglas Adams is [MASK]". While manual prompt engineering was the initial standard, recent advancements have shifted toward "prompt tuning," which automates the optimization of prompt wording or mathematical representations to maximize extraction accuracy.

However, this paper identifies a critical flaw in automated prompt tuning: Object Bias. When a model is presented with a query where the subject is missing (e.g., "The native language of [MASK] is [MASK]"), it should ideally express high uncertainty. Instead, prompt-tuned models often exhibit "favorite" answers, predicting common words like "English" or "French" with high confidence regardless of the actual subject. Paradoxically, the very methods designed to improve extraction (such as P-tuning or Prefix-tuning) often exacerbate this bias compared to simple manual prompts.

The MeCoD Framework

To mitigate this bias, we introduce MeCoD (Maximum entropy and Contrastive learning for object Debiasing). The framework is designed to prevent the model from relying on shallow statistical correlations and high-frequency objects. MeCoD consists of three primary components:

  1. Prompt Encoder: This module establishes the baseline by learning a "continuous prompt," a high-dimensional mathematical representation of the query.
  2. Object Equalization: This module utilizes a Maximum Entropy loss function. It identifies the top-300 most likely objects for a specific relation and forces the model to distribute its probability mass equally among them when the subject is masked. This prevents the model from defaulting to a specific "biased" object when it lacks subject-specific information.
  3. Biased Object Obstruction: Using Contrastive Learning, this module refines the model's internal representations. It "pushes" the model away from biased, high-frequency objects and "pulls" it toward the actual ground-truth object, discouraging the model from taking the "easy way out" by selecting common words.

Experimental Setup and Results

We evaluated MeCoD using two major benchmarks: LAMA-TREx, the standard for factual knowledge extraction (41 relations, ~30,000 triples), and WIKI-UNI, a specialized dataset where objects are balanced to test debiasing performance in controlled environments.

Performance Improvements

MeCoD consistently outperformed standard prompt tuning methods across multiple PLMs:

  • Accuracy: On the LAMA benchmark, MeCoD improved Precision@1 (P@1) by approximately 2% for BERT-base and 4% for RoBERTa-base over standard P-tuning.
  • Bias Reduction: We measured bias using Shannon Entropy; a higher score indicates a more balanced distribution. MeCoD increased Object Bias Entropy by 22% for BERT and 27% for RoBERTa, indicating a significantly more diverse and less biased prediction set.
  • Qualitative Analysis: In practical case studies, such as identifying the developer of the "B-17 Flying Fortress," standard P-tuning incorrectly guessed "Atari" (a common, biased object), while MeCoD correctly identified "Boeing."

Discussion and Key Insights

Our research highlights a "Tuning Trap": automated methods often maximize accuracy on training sets by exploiting pre-existing biases in the PLM. Analysis of the learned prompt tokens reveals that models often learn shallow literal correlations—for instance, a "place of birth" prompt might simply learn to associate the query with the vector space of major cities like London or Paris rather than learning the underlying factual relationship.

Conclusion and Future Work

MeCoD provides a robust framework for reducing object bias while simultaneously improving the accuracy of factual knowledge extraction in Masked Language Models (MLMs). While effective, this study focused on MLMs like BERT; future research will explore how these biases manifest in generative models like GPT-4 and aim to develop debiasing techniques that do not rely on shallow associations. Understanding the underlying mechanism of how these biases are formed during the initial pre-training phase remains a vital open question.

Summary updated

Abstract

Many works employed prompt tuning methods to automatically optimize prompt queries and extract the factual knowledge stored in Pretrained Language Models. In this paper, we observe that the optimized prompts, including discrete prompts and continuous prompts, exhibit undesirable object bias. To handle this problem, we propose a novel prompt tuning method called MeCoD. consisting of three modules: Prompt Encoder, Object Equalization and Biased Object Obstruction. Experimental results show that MeCoD can significantly reduce the object bias and at the same time improve accuracy of factual knowledge extraction.
BibTeX
@inproceedings{wang2023towards,
  author = {Yuhang Wang and Dongyuan Lu and Chao Kong and Jitao Sang},
  title = {{Towards Alleviating the Object Bias in Prompt Tuning-based Factual Knowledge Extraction}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  url = {https://openreview.net/forum?id=s1zclJYkRk},
}
Figure