Skip to main content
QUICK REVIEW

[Paper Review] Causal Prompting: Debiasing Large Language Model Prompting based on Front-Door Adjustment

Congzhi Zhang, Linhai Zhang|arXiv (Cornell University)|Mar 5, 2024
Topic ModelingComputer Science4 citations
TL;DR

This paper proposes Causal Prompting, a novel prompting method that leverages front-door adjustment in causal inference to debias large language models (LLMs) without accessing model parameters or logits. By treating chain-of-thought (CoT) reasoning as a mediator variable, it estimates causal effects between input prompts and outputs through clustering and normalized weighted geometric mean (NWGM) approximation, achieving state-of-the-art robustness on both natural and adversarial NLP datasets across open-source and closed-source LLMs.

ABSTRACT

Despite the notable advancements of existing prompting methods, such as In-Context Learning and Chain-of-Thought for Large Language Models (LLMs), they still face challenges related to various biases. Traditional debiasing methods primarily focus on the model training stage, including approaches based on data augmentation and reweighting, yet they struggle with the complex biases inherent in LLMs. To address such limitations, the causal relationship behind the prompting methods is uncovered using a structural causal model, and a novel causal prompting method based on front-door adjustment is proposed to effectively mitigate LLMs biases. In specific, causal intervention is achieved by designing the prompts without accessing the parameters and logits of LLMs. The chain-of-thought generated by LLM is employed as the mediator variable and the causal effect between input prompts and output answers is calculated through front-door adjustment to mitigate model biases. Moreover, to accurately represent the chain-of-thoughts and estimate the causal effects, contrastive learning is used to fine-tune the encoder of chain-of-thought by aligning its space with that of the LLM. Experimental results show that the proposed causal prompting approach achieves excellent performance across seven natural language processing datasets on both open-source and closed-source LLMs.

Motivation & Objective

  • To address the persistent issue of bias in in-context learning and chain-of-thought prompting in LLMs, particularly under adversarial perturbations.
  • To overcome the limitations of traditional debiasing methods that rely on model fine-tuning or data reweighting, which are infeasible in prompt-based inference.
  • To develop a debiasing method that operates purely at inference time, without requiring access to model parameters, logits, or confounder values.
  • To enable effective causal intervention in prompting by leveraging the structural causal model with CoT as a mediator variable.
  • To improve model generalization across both in-distribution and out-of-distribution (adversarial) data through causal intervention.

Proposed method

  • The method models the prompting process as a structural causal model where input prompts (X) influence outputs (A) via chain-of-thought reasoning (R), with unobserved confounders (U) introducing bias.
  • It applies front-door adjustment to estimate the total causal effect of X on A by decomposing it into the effect of X on R and R on A, avoiding direct modeling of confounders.
  • The probability of CoT responses (P(R|X)) is estimated using a BERT-based encoder with contrastive learning to align representation spaces between the encoder and LLM.
  • A clustering algorithm is applied to CoT responses to identify representative reasoning paths, enabling accurate estimation of P(R|do(X)) without access to logits.
  • The causal effect from R to A is estimated using the normalized weighted geometric mean (NWGM) approximation to select the optimal demonstration set that best represents the data distribution.
  • Final predictions are generated via weighted voting over multiple CoT responses, with weights derived from the NWGM approximation to ensure robust and unbiased inference.

Experimental results

Research questions

  • RQ1Can front-door adjustment be effectively applied to debias LLM prompting without access to model parameters or logits?
  • RQ2How can chain-of-thought reasoning serve as a valid mediator variable for causal intervention in prompting?
  • RQ3To what extent does combining contrastive learning with clustering improve the accuracy of causal effect estimation in prompt-based inference?
  • RQ4Does the proposed method generalize across different LLM architectures and data distributions, including adversarial examples?
  • RQ5How do individual components—clustering and contrastive learning—contribute to the overall performance of the causal prompting framework?

Key findings

  • Causal Prompting achieves the highest overall performance on both original and adversarial versions of ABSA and NLI datasets across LLaMA2-7b and GPT-3.5.
  • On adversarial data, Causal Prompting significantly outperforms CoT-SC and other baselines, demonstrating strong robustness to distributional shift.
  • The method improves performance on out-of-distribution (adversarial) data more than on in-distribution data, indicating effective bias mitigation.
  • Ablation studies show that removing the clustering component causes a larger performance drop than removing contrastive learning, highlighting its critical role in accurate causal effect estimation.
  • The use of contrastive learning to align the encoder with the LLM leads to more accurate representation learning, which enhances the overall causal intervention quality.

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.