[Paper Review] Incorporating Priors with Feature Attribution on Text Classification
This paper proposes a method to incorporate domain-specific priors into text classification models by minimizing the L2 distance between Integrated Gradients feature attributions and predefined target attribution values during training. The approach improves fairness by reducing model reliance on identity terms without sacrificing original task performance, and enhances performance in low-data regimes by focusing on known toxic terms, validated on the Wikipedia toxic comments dataset.
Feature attribution methods, proposed recently, help users interpret the predictions of complex models. Our approach integrates feature attributions into the objective function to allow machine learning practitioners to incorporate priors in model building. To demonstrate the effectiveness our technique, we apply it to two tasks: (1) mitigating unintended bias in text classifiers by neutralizing identity terms; (2) improving classifier performance in a scarce data setting by forcing the model to focus on toxic terms. Our approach adds an L2 distance loss between feature attributions and task-specific prior values to the objective. Our experiments show that i) a classifier trained with our technique reduces undesired model biases without a trade off on the original task; ii) incorporating priors helps model performance in scarce data settings.
Motivation & Objective
- To address model bias in text classification, especially unintended associations between identity terms and toxicity predictions.
- To enable practitioners to inject domain-specific priors into model training without compromising original task performance.
- To provide a method that directly corrects undesirable model behavior using interpretable feature attributions as a training signal.
- To improve model robustness and performance in data-scarce settings by guiding attention toward known toxic or relevant terms.
- To offer a scalable, actionable alternative to data augmentation or adversarial debiasing that avoids trade-offs between fairness and accuracy.
Proposed method
- The method introduces an L2 distance loss between the Integrated Gradients attributions of pre-selected tokens and a target attribution value (e.g., 0 for identity terms, 1 for toxic terms) in the model's objective function.
- For fairness, identity terms are assigned a target attribution of 0, penalizing the model for attributing predictions to these terms.
- For low-data performance, known toxic terms are assigned a target attribution of 1, encouraging the model to focus on them during training.
- The combined objective function includes both cross-entropy loss and the attribution-based L2 loss, enabling joint optimization.
- The method operates at the token level using Path Integrated Gradients, ensuring interpretability and alignment with human-understandable units of input.
- The approach allows fine-tuning of a pre-trained model with minimal epochs to achieve debiased and more robust predictions.
Experimental results
Research questions
- RQ1Can we reduce model bias toward identity terms in text classification without degrading performance on the original task?
- RQ2How effective is incorporating prior attribution values into the training objective for improving fairness in toxic comment classification?
- RQ3Can we enhance model performance in low-data regimes by guiding attention toward known toxic terms through attribution priors?
- RQ4Does the proposed method produce better word representations as a by-product compared to standard training?
- RQ5Can the method be applied to other NLP tasks requiring domain-specific feature importance constraints?
Key findings
- Models trained with the proposed method achieved comparable or better performance on the original task while significantly reducing attribution to identity terms.
- The method improved fairness metrics and AUC on a synthetic, unbiased dataset without sacrificing original task accuracy.
- On the Wikipedia toxic comments dataset, the model showed lower average attribution to identity terms (e.g., 'gay', 'jew') compared to the baseline.
- In low-data settings, forcing attention on known toxic terms via a target attribution of 1 led to improved classifier performance.
- The approach produced higher-quality word vectors as a by-product compared to baseline models.
- Fine-tuning with the attribution loss converged to a more debiased classifier in just a few epochs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.