Inference-Time Selective Debiasing to Enhance Fairness in Text Classification Models (2025)

Abstract: We propose selective debiasing – an inference-time safety mechanism designed to enhance the overall model quality in terms of prediction performance and fairness, especially in scenarios where retraining the model is impractical. The method draws inspiration from selective classification, where at inference time, predictions with low quality, as indicated by their uncertainty scores, are discarded. In our approach, we identify the potentially biased model predictions and, instead of discarding them, we remove bias from these predictions using LEACE – a post-processing debiasing method. To select problematic predictions, we propose a bias quantification approach based on KL divergence, which achieves better results than standard uncertainty quantification methods. Experiments on text classification datasets with encoder-based classification models demonstrate that selective debiasing helps to reduce the performance gap between post-processing methods and debiasing techniques from the at-training and pre-processing categories.

## introduction fairness is an important safety characteristic of a machine learning (ml) model, representing the model's ability to classify instances without discrimination based on various sensitive attributes, such as race, gender, and age @xcite . for the past few years, numerous works have investigated and promoted fairness, and a variety of fairness definitions have been proposed @xcite . one prominent type of fairness is group fairness, also known as the equal opportunity criterion, which reflects the inequality of opportunities across different groups @xcite . the inequality in the model predictions usually comes from inadequate or biased training data, and to address this problem and achieve better fairness, researchers have proposed various debiasing techniques @xcite @xcite @xcite . the majority of these techniques assume that one has access to the complete training data and the ability to retrain the model from scratch using some special loss function or reweighting the training instances. however, there are many situations when this assumption does not hold. there is a need for inference-time safety mechanisms that protect users from inadequate model behavior. inference-time safety mechanisms are primarily associated with uncertainty quantification (uq) techniques @xcite and selective classification @xcite @xcite . selective classification aims to enhance the reliability of ml-based applications by abstaining from unreliable predictions with high uncertainty. we suggest that the same approach could be applied to increase fairness. in this work, we propose an inference-time safety mechanism that aims to increase the overall quality of models in terms of prediction performance and fairness in situations when model retraining is prohibitive. we call this approach selective debiasing. instead of rejecting predictions of selected instances as in selective classification, we apply to them inference-time debiasing using post-processing debiasing techniques. to the best of our knowledge, this style of approach is novel to the nlp community. our main contributions are as follows: ## background debiasing techniques can be categorized into three groups: at-training, pre-processing, and postprocessing @xcite . at-training and pre-processing methods. one of the most popular at-training methods is adversarial training (adv) @xcite . it aims to solve a minimax game between minimizing the loss for the primary task and maximizing the loss for predicting the protected attribute. the diverse adversaries method (dadv) @xcite extends adv by using an ensemble of multiple diverse discriminators instead of just one. in the pre-processing category, one of the most remarkable methods is balanced training with equal opportunity (bteo) @xcite . it rebalances the dataset to minimize the true positive rate (tpr) gap between two protected groups. in the same category, balanced training with joint balance (btj) @xcite aims to improve the worst-case performance over all unobserved protected groups by focusing on the computationally identifiable regions of error. ## proposed method we propose a selective approach, based on applying debiasing only to predictions with the highest bias score. this section introduces the general concept of selective debiasing and presents the bias quantification method underlying this approach. selective debiasing. selective classification is a widely recognized safety mechanism that safeguards against using unreliable model predictions. in this approach, predictions flagged as unreliable due to high uncertainty scores are handled differently, e.g. they are rejected or are escalated to human operators for further review. instead of rejecting instances completely as in selective classification, we apply debiasing to selected predictions. in particular, we identify the potentially most biased instances using a bias quantification method b(x i , p i ) and replace the original prediction p @xmath0: ## conclusion and future work we proposed selective debiasing -a new simple inference-time safety mechanism for increasing model performance and fairness. we showed that it is helpful in the case when re-training a model from scratch for better fairness is prohibitive or there is no access to full training data. additionally, for the selection of problematic predictions, we suggest a bias quantification approach based on kl divergence that achieves better results than the standard uq method. the proposed mechanism fills the gap for efficient techniques that can be applied at inference time and opens the door for safer ml-based systems. in future work, we aim to investigate a deeper integration between uq and debiasing methods.