COFT: Counterfactual-Conformal Decoding for Fair Chain-of-Thought Reasoning in Large Language Models

TL;DR

COFT employs counterfactual causal intervention with distribution-free marginal guarantees, reducing bias by 30-55% without retraining.

cs.CL 🔴 Advanced 2026-05-29 51 views
Arya Fayyazi Mehdi Kamal Massoud Pedram
bias mitigation causal inference distribution-free calibration large language models fairness

Key Findings

Methodology

COFT introduces a training-free decoding framework that utilizes counterfactual causal masking and logit fusion to mitigate bias during inference. It generates a masked prompt by replacing sensitive spans with neutral tokens, then runs parallel inference on both original and masked prompts. The logits from these two views are fused via a convex combination controlled by λ, attenuating attribute-driven disparities. A dual-branch split-conformal calibration is performed offline to determine per-step candidate token sets with marginal guarantees, ensuring the generated tokens are stable under hypothetical attribute changes. This approach requires no model fine-tuning or auxiliary classifiers, making it model-agnostic and auditable, suitable for any frozen causal language model.

Key Results

  • Across six models including LLaMA-2-13B and Mistral-7B-Instruct, COFT reduces bias metrics (StereoSet, CrowS-Pairs) by 30-55%, with a median of 38%, while maintaining task accuracy within noise margins. The additional computational overhead is limited to one forward pass (~11%), demonstrating efficiency. Ablation studies confirm the importance of logit fusion and conformal calibration for bias reduction. The method outperforms traditional fine-tuning and post-processing approaches in bias mitigation and utility preservation.
  • On bias benchmarks, COFT achieves significant bias reduction, with improvements exceeding 40% in stereotyping metrics, and maintains language fluency and reasoning performance. The approach adapts well across different model sizes and bias types, showing robustness and scalability. The split-conformal calibration ensures that at each decoding step, the set of supported tokens is statistically valid with a confidence level of 1−α, providing a strong theoretical foundation for safe deployment.
  • Ablation experiments reveal that removing either the logit fusion or the calibration step diminishes bias mitigation effectiveness, highlighting their critical roles. The method’s flexibility allows tuning the trade-off between bias reduction and diversity by adjusting λ, offering practical control over fairness-performance balance.

Significance

This work advances the field of fair NLP by providing a model-agnostic, provably safe decoding mechanism that directly intervenes during inference. It addresses a critical gap: ensuring stepwise fairness guarantees in open-ended generation without retraining or external classifiers. The approach enhances transparency, auditability, and safety, making it highly suitable for deployment in sensitive applications like healthcare, legal, or social services. Its theoretical guarantees and practical efficiency make it a promising foundation for future research in bias mitigation and trustworthy AI.

Technical Contribution

COFT introduces a novel combination of counterfactual causal masking, logit fusion, and split-conformal calibration, enabling distribution-free, stepwise marginal guarantees during decoding. It departs from traditional bias mitigation strategies by operating entirely at inference time, without requiring model modifications. The method provides rigorous statistical guarantees, leveraging exchangeability assumptions, and offers a flexible, model-agnostic framework that can be integrated with any frozen causal language model. Its theoretical analysis demonstrates how fusion attenuates attribute bias while preserving high-probability support, establishing a new paradigm for safe, fair language generation.

Novelty

This is the first approach to embed distribution-free, stepwise marginal fairness guarantees directly into the decoding process of large language models using counterfactual causal interventions combined with split-conformal calibration. Unlike prior methods relying on fine-tuning, classifiers, or global representation debiasing, COFT operates solely during inference, providing explicit, auditable bounds on bias at each token generation step. Its innovative fusion of causal masking, logit manipulation, and statistical calibration marks a significant leap in fair NLP research.

Limitations

  • The method depends on accurate identification of sensitive spans; automatic detection remains imperfect, potentially limiting coverage of biases.
  • In highly biased or complex scenarios, conservative calibration may overly restrict candidate tokens, reducing diversity and fluency.
  • Current experiments focus on open datasets and models; real-world deployment may encounter distribution shifts and unseen bias types, requiring further validation.

Future Work

Future directions include extending the framework to multi-attribute and multi-modal settings, automating bias span detection, and integrating with interactive systems. Enhancing calibration robustness under distribution shifts and exploring adaptive λ tuning for dynamic bias-performance trade-offs are also promising avenues. Additionally, applying the approach to multi-turn dialogues and real-time applications could broaden its impact in trustworthy AI deployment.

AI Executive Summary

The rapid development of large language models (LLMs) has revolutionized natural language processing, enabling applications from chatbots to automated reasoning. However, societal biases embedded in training data—such as gender, racial, or religious stereotypes—pose significant ethical challenges. Existing mitigation strategies, including fine-tuning and post-processing, often require costly retraining or rely on external classifiers, which can introduce blind spots and lack formal guarantees. Moreover, biases tend to manifest progressively during chain-of-thought (CoT) reasoning, making real-time control essential.

This paper introduces COFT (Counterfactual-Conformal Decoding), a novel inference-time framework that directly intervenes during decoding to mitigate bias. COFT leverages a counterfactual causal masking mechanism, where sensitive spans in prompts are replaced with neutral tokens to generate a control view. It then fuses the logits from the original and masked prompts via a convex combination, attenuating attribute-driven disparities. To ensure statistical reliability, the method employs a split-conformal calibration procedure, precomputing thresholds on a calibration set to certify candidate token sets at each decoding step with distribution-free marginal guarantees.

The core innovation lies in combining causal counterfactual reasoning with rigorous statistical calibration, all without retraining or auxiliary classifiers. Extensive experiments across six models and multiple bias benchmarks demonstrate that COFT reduces bias metrics by 30-55%, with negligible impact on task utility and only modest computational overhead. The approach provides a transparent, auditable pathway toward safer, fairer language generation, addressing a critical need in deploying large models responsibly.

Looking ahead, future work aims to extend this framework to multi-attribute, multi-modal scenarios, automate bias span detection, and enhance robustness under distribution shifts. COFT’s model-agnostic, provably safe design marks a significant step toward trustworthy AI systems capable of fair and accountable language reasoning.

Deep Dive

Abstract

Large language models (LLMs) can reveal and amplify societal biases during chain-of-thought (CoT) generation. We present COFT (Chain of Fair Thought), a training-free decoding method that applies token-level fairness control at decode time, with distribution-free marginal validity guarantees (under exchangeability) for any frozen causal language model. COFT operates in three stages. First, it creates a masked counterfactual prompt by replacing sensitive spans with neutral tokens. Second, it compares the factual and masked logit distributions through lightweight logit fusion to attenuate attribute-driven biases. Third, it uses dual-branch split-conformal calibration to certify per-step candidate token sets at a user-chosen risk level. We evaluate COFT across six models and multiple bias benchmarks. Our method reduces standard bias metrics by 30-55% (median 38%) while preserving task utility and language quality. Reasoning accuracies remain unchanged within run-to-run noise margins. The computational overhead is modest, equivalent to one additional cached forward pass (<=11%). COFT offers a clear, auditable path to safer CoT generation with significant bias reduction, negligible utility loss, and no requirement for retraining, auxiliary classifiers, or weight access.

cs.CL cs.AI