Fair decoding method improves fairness in language model recommendations

Conformal Fair Decoding for Large Language Model Recommenders

Artificial Intelligence

Summary

Recommendations made by large language models can unfairly change when a user’s protected attribute (like gender) is altered, even if their past interactions stay the same. The authors propose a new method called FairRec that controls which items these models recommend to reduce unfair differences without needing full access to the language model internals. Their approach adjusts recommendations by filtering or penalizing items based on their fairness, and experiments showed it keeps recommendation quality while improving fairness compared to previous methods.

What this means in practice

  • For recommendation system engineers: Control fairness in personalized recommendations by filtering or adjusting candidate items based on semantic disparities without retraining language models.
  • For e-commerce platform developers: Maintain fair and balanced product recommendations even when sensitive user attributes vary, improving user trust and compliance.

Authors

Ziwei Wu, Jingrui He

Abstract

Large language models (LLMs) can generate personalized recommendations without task-specific training, but changing a protected attribute while holding interaction history fixed can alter the semantic content of recommended items. We study fairness control when model weights and full-vocabulary logits are unavailable. We propose Fair- Rec, an item-level decoding framework that uses an offline-calibrated semantic-disparity threshold and controls candidate selection as recommendation lists are generated. A hard variant filters candidates against the threshold; a soft variant trades off candidate likelihood and disparity while adapting a penalty using observed violations. Under an explicit uniform enforceability assumption, we establish a pathwise O(1/T) upper bound on the excess empirical violation rate of the soft decoder. Experiments on MovieLens-1M and Amazon Movies & TV using Qwen3-8B and Llama3.1-8B-Instruct show that the soft variant lowers measured counterfactual disparity relative to zero- =shot recommendation, UP5, and FACTER, while retaining competitive HR@10 and NDCG@10.