Context-aware Fairness Evaluation and Mitigation in LLMs
Afrozah Nadeem, Mark Dras, Usman Naseem
TL;DR
The paper tackles fairness in LLMs by addressing bias that accumulates across multi-turn conversations, a setting where training-time remedies are expensive and static inference methods often fail. It introduces Dynamic Neuron Masking, an inference-time, reversible framework that detects bias signals at the neuron level and gates them during generation using memory-aware cues. Key components include Behavioral Detection with turn-level scores $S_t$, Bias Neuron Identification via integrated gradients decomposed into local and carry components, a Memory Consistency Probe for $C_t$, and dynamic gating $g_l^{(t)} = \sigma(\alpha S_t + \beta C_t)$ to modulate neuron influence. On multilingual single-turn (PCT) and multi-turn (FairMT-Bench) benchmarks, the approach reduces bias while preserving fluency, faithfulness, and relevance, outperforming prompts, filters, steering, and static pruning. This work demonstrates practical, scalable fairness control for real-world conversational AI without retraining, highlighting the importance of memory-aware, context-sensitive interventions in dynamic dialogue settings.
Abstract
Large language models often display undesirable behaviors embedded in their internal representations, undermining fairness, inconsistency drift, amplification of harmful content, and the propagation of unwanted patterns during extended dialogue and conversations. Although training-time or data-centric methods attempt to reduce these effects, they are computationally expensive, irreversible once deployed, and slow to adapt to new conversational contexts. Pruning-based methods provide a flexible and transparent way to reduce bias by adjusting the neurons responsible for certain behaviors. However, most existing approaches are static; once a neuron is removed, the model loses the ability to adapt when the conversation or context changes. To address this, we propose a dynamic, reversible, pruning-based framework that detects context-aware neuron activations and applies adaptive masking to modulate their influence during generation. Our inference-time solution provides fine-grained, memory-aware mitigation with knowledge-preserved, more coherent behavior across multilingual single- and multi-turn dialogues, enabling dynamic fairness control in real-world conversational AI.
