DifFaiRec: Generative Fair Recommender with Conditional Diffusion Model

Zhenhao Jiang, Jicong Fan

Introduction

Recommendation systems are ubiquitous in modern digital life, yet they frequently suffer from group unfairness. This phenomenon occurs when an algorithm learns to favor a dominant group (e.g., more active users or a specific demographic) while providing suboptimal recommendations to minority groups. Traditionally, researchers have viewed this as a multi-objective optimization problem, leading to a "Pareto frontier" where improving fairness inevitably degrades recommendation accuracy.

DifFaiRec (Diffusion-based Fair Recommender) challenges this paradigm. It is the first fair recommendation algorithm built on conditional diffusion models, designed to achieve a "win-win" scenario: superior recommendation accuracy and significantly improved group fairness. By leveraging the generative power of diffusion models and a novel counterfactual module, DifFaiRec effectively bypasses the traditional hard trade-off between these two critical metrics.

The DifFaiRec Framework

The architecture of DifFaiRec is built upon three primary pillars designed to decouple sensitive attributes from user preferences while maintaining high-fidelity recommendations.

1. Group Vector Builder

To address group-level bias, the model must first understand the characteristics of those groups. The Group Vector Builder represents sensitive attributes (such as gender, age, or activity level) as high-dimensional vectors. This is achieved using either Mean Pooling or Principal Component Analysis (PCA) on the interaction histories of users within a specific group. These vectors serve as the "conditions" for the generative process.

2. Counterfactual Module

The "secret sauce" of DifFaiRec is its counterfactual reasoning. For every user in the training set, the model generates a "counterfactual" version of that user as if they belonged to a different sensitive group. By training the model to predict interests based on these counterfactual mappings, the system is forced to learn latent features that are independent of the sensitive attribute. This effectively shields the recommendation logic from demographic or behavioral biases.

3. Conditional Diffusion Model

Unlike traditional models that predict a single preference score, DifFaiRec utilizes a diffusion process. The model operates in two phases:

  • Forward Process: It takes the user's actual interaction data and incrementally adds Gaussian noise.
  • Reverse (Denoising) Process: The model learns to reconstruct the original preferences from the noise, conditioned on the counterfactual group information.

By conditioning the denoising process on group vectors, the model learns the underlying distribution of data in a way that is flexible and robust. A key theoretical contribution of the paper is a mathematical proof using Bayesian logic, demonstrating that within a diffusion framework, the objectives of accuracy and fairness can be compressed into a single optimization goal. This significantly simplifies the training process compared to traditional adversarial or multi-objective methods.

Experimental Evaluation

The authors evaluated DifFaiRec against several "utility-only" baselines (e.g., Matrix Factorization, DiffRec) and "fairness-aware" baselines (e.g., FairGAN, FairGO) across two major benchmarks:

  • MovieLens-1M: Focused on demographic fairness, specifically gender (Male vs. Female) and age (Young vs. Old).
  • LastFM: Focused on behavioral fairness, specifically activity level (Active vs. Inactive) and interest diversity (Focused vs. Divergent).

Key Findings

  • Superior Performance: DifFaiRec consistently outperformed both utility-focused and fairness-focused baselines. On the MovieLens (Age) dataset, it improved fairness metrics like Absolute Equality by 15.79% and Equal Opportunity by 2.25%, while simultaneously exceeding baselines in Recall and NDCG.
  • Behavioral Fairness: On LastFM, the model achieved a 3.23% improvement in Recall and a 3.65% improvement in fairness metrics, proving its efficacy beyond simple demographic splits.
  • Representation Strategy: The choice of group vector construction matters. While PCA retains more information and can lead to higher raw accuracy, Mean Pooling was found to be "fairer." This is because Mean Pooling tends to smooth out the noisy, long-tail distributions that often encode hidden biases.
  • Robustness: The model remains stable even when the minority group is significantly smaller than the majority. However, fairness begins to degrade if the minority group is extremely sparse (e.g., 90% under-sampled), indicating a limit to the model's ability to generalize from minimal data.

Conclusion and Future Directions

DifFaiRec demonstrates that diffusion models are a natural fit for fair recommendation. Their ability to incorporate complex conditions through iterative denoising allows for a more nuanced integration of fairness constraints than rigid architectures.

Despite its success, the model faces challenges regarding computational cost, as the iterative nature of diffusion is more resource-intensive than simple matrix factorization. Additionally, the quality of recommendations remains dependent on the density of group data. Future work may explore two-sided fairness (considering both users and items) and more complex, non-binary group definitions to further refine the equity of automated recommendation systems.

Summary updated

BibTeX
@inproceedings{jiang2024diffairec,
  author = {Zhenhao Jiang and Jicong Fan},
  title = {{DifFaiRec: Generative Fair Recommender with Conditional Diffusion Model}},
  booktitle = {ICDM},
  year = {2024},
  doi = {10.1109/icdm59182.2024.00082},
}
Figure