Fairness Reprogramming

Guanhua Zhang, Yihua Zhang, Yang Zhang, Wenqi Fan, Qing Li, Sijia Liu, Shiyu Chang

Promoting fairness in machine learning (ML) usually comes at a high price. Most state-of-the-art methods require retraining or fine-tuning the entire model to remove demographic biases, such as those related to gender or race. For modern, large-scale models, this is often infeasible due to massive computational costs, low data efficiency, and privacy concerns. This is especially true when models are provided as a service (MLaaS), where the end-user has no access to the internal parameters.

To address this critical gap, researchers have introduced FAIRREPROGRAM, a novel "model reprogramming" paradigm. FAIRREPROGRAM makes machine learning models fairer without changing a single weight of the original network. Instead of modifying the model, it modifies the input data.

Methodology: The Fairness Trigger

FAIRREPROGRAM works by appending a small, optimized "fairness trigger" ($\delta$) to the input data. This perturbation effectively masks biased demographic signals, achieving superior fairness-accuracy trade-offs with significantly less data than traditional retraining methods.

  • In Images: The trigger can be a "border trigger" (a noisy frame around a resized image) or a "patch trigger" (replacing a small square of pixels).
  • In Text: The trigger consists of a sequence of optimized word embeddings added to the end of a sentence.
Example of a border fairness trigger applied to an image.

The trigger is tuned using an adversarial min-max optimization framework. A "discriminator" attempts to guess the sensitive demographic attribute (e.g., gender) from the model's output. Simultaneously, the fairness trigger is optimized to achieve two competing goals:

  1. Maintain the model's primary task accuracy (Utility Loss).
  2. Make it impossible for the discriminator to identify the demographic group (Fairness Loss).

Theoretical Foundation: The "Jamming" Effect

The most surprising insight from this research is that a constant trigger—the exact same few pixels or words added to every input—is sufficient to obscure demographic bias.

Causal graphs illustrating standard classification versus the FAIRREPROGRAM approach using a false constant trigger.

The paper provides an information-theoretic proof showing that this constant trigger acts like a signal jammer. By providing "false" demographic information, the trigger "tricks" the model into ignoring the actual, biased demographic features present in the original data. It drowns out the subtle correlations the model previously used to make biased decisions.

Key Results and Insights

The researchers evaluated FAIRREPROGRAM across diverse domains, including NLP (the Civil Comments dataset for toxicity detection), Computer Vision (the CelebA dataset for hair color prediction), and tabular data (the Adult dataset).

  • Superior Trade-offs: On the CelebA dataset, FAIRREPROGRAM achieved 10.5% and 36.5% lower bias scores across two different fairness metrics compared to retraining-based baselines, all while maintaining comparable accuracy. In NLP toxicity detection, it successfully reduced false-positive rates for minority groups without degrading the overall detection of abusive content.
  • Data Efficiency: FAIRREPROGRAM is incredibly lean. It can significantly improve fairness even when researchers only have access to 1% of the tuning data required by standard methods.
  • Transferability: Because the trigger is an input perturbation, a trigger trained on a "surrogate" model can often be successfully applied to a different, black-box model. This is a game-changer for users relying on third-party AI APIs.
  • Interpretability: Saliency maps (like Grad-CAM) revealed that without the trigger, models often looked at biased regions (e.g., a person's face when predicting hair color). With the trigger, the model's "attention" shifted toward the actual relevant features (the hair).

Limitations and Future Work

While FAIRREPROGRAM is a powerful and efficient tool, the authors note a few areas for further exploration. The current work primarily focuses on group fairness metrics (Demographic Parity and Equalized Odds); it remains to be seen how well this translates to individual fairness or complex intersectional biases. Additionally, while constant triggers are effective, input-dependent triggers might offer even finer control, albeit at the cost of higher complexity. Finally, developing more robust, purely black-box optimization techniques for these triggers—without relying on gradients from a source model—is a logical next step for the field.

Summary updated

BibTeX
@inproceedings{zhang2022fairness,
  author = {Guanhua Zhang and Yihua Zhang and Yang Zhang and Wenqi Fan and Qing Li and Sijia Liu and Shiyu Chang},
  title = {{Fairness Reprogramming}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
}
Figure