Counterfactual samples constructing and training for commonsense statements estimation

Chong Liu, Zaiwen Feng, Zhenyun Deng, Lin Liu, Jiuyong Li, Ruifang Zhai, Debo Cheng, Li Qin

Abstract

Large Language Models (LLMs) often rely on superficial word correlations rather than genuine reasoning when estimating the plausibility of commonsense statements. We present CCSG (Commonsense Counterfactual Samples Generating), a model-agnostic framework designed to mitigate language bias. By generating counterfactual samples through keyword intervention and employing contrastive learning, CCSG forces models to focus on critical linguistic features. Our approach achieves a 3.07% improvement over existing state-of-the-art methods and significantly outperforms GPT-4 in plausibility estimation tasks.

The Challenge of Language Bias in Plausibility Estimation

Plausibility Estimation (PE) is the task of determining whether a given statement aligns with everyday commonsense. While LLMs demonstrate proficiency in this area, they frequently suffer from "language bias," where correct predictions are made based on incorrect cues. The authors identify two critical abilities currently lacking in standard PE models:

  1. Language-Explainable Ability: The capacity to identify the specific words that render a statement implausible (e.g., recognizing that "wires" is the problematic element in "ordering wires for dinner").
  2. Commonsense-Sensitive Ability: The ability to detect how minor semantic shifts (e.g., changing "swim" to "run") fundamentally alter the truth value of a sentence.
Illustration of Language-Explainable and Commonsense-Sensitive abilities.

The CCSG Framework

To address these shortcomings, the CCSG framework introduces a "plug-and-play" training component that emphasizes causal intervention. The methodology consists of four primary stages:

1. Keyword Identification and Contribution Analysis

The system first identifies potential "critical" nouns using POS tagging and word embeddings. It then employs a modified Grad-CAM technique to quantify the actual influence of each word on the model's prediction. This ensures the intervention targets the most semantically significant components of the statement.

2. Counterfactual Generation

CCSG generates two types of samples to sharpen the model's discernment:

  • Negative Samples: High-contribution keywords are replaced with semantically similar but logically incorrect alternatives from a Vector Knowledge Base (VKB), creating "anti-commonsense" counterfactuals.
  • Positive Samples: Low-level dropout is applied to the original sentence to create variations that preserve the original truth value.

3. Causal Intervention and SCM

The researchers utilize a Structural Causal Model (SCM) to theoretically analyze and mitigate "commonsense bias." By treating word replacement as a causal intervention, the model moves beyond simple data augmentation, effectively asking: "If this specific causal factor is altered, does the logical conclusion change?"

Structural Causal Models (SCM) for analyzing and mitigating commonsense bias.

4. Contrastive Training

The model is optimized using a dual-loss objective: standard binary classification loss combined with a supervised contrastive loss. This training regime encourages the model to cluster "true" representations together while maximizing the distance from "false" counterfactuals in the latent space.

Experimental Results

The CCSG framework was rigorously evaluated across nine diverse datasets covering scientific, social, and physical reasoning.

  • Performance Gains: Utilizing a Flan-T5 5B backbone, CCSG achieved an average accuracy of 87.49%, a 3.07% improvement over the previous state-of-the-art (VERA+T5).
  • Comparison with GPT-4: Remarkably, the CCSG-enhanced 5B model outperformed GPT-4 (using 5-shot Chain-of-Thought prompting) by an average of 11.69%.
  • Robustness and Bias Reduction: Manual evaluations demonstrated a significant drop in error rates caused by superficial correlations. For instance, in the "Food" category, the error rate plummeted from 21% in a vanilla T5 model to just 4% with CCSG.

Conclusion and Future Directions

CCSG demonstrates that forcing models to engage with the causal structure of language significantly improves commonsense reasoning. Beyond performance metrics, the framework serves as an effective filter for cleaning synthetic datasets by identifying hallucinations in LLM-generated content.

Future work will focus on expanding the framework's scope to include fictional or abstract contexts and integrating explicit ethical reasoning mechanisms to ensure the model's outputs remain aligned with human values.

Summary updated

BibTeX
@article{liu2024counterfactual,
  author = {Chong Liu and Zaiwen Feng and Zhenyun Deng and Lin Liu and Jiuyong Li and Ruifang Zhai and Debo Cheng and Li Qin},
  title = {{Counterfactual samples constructing and training for commonsense statements estimation}},
  journal = {Information Processing \& Management},
  year = {2024},
}
Figure