Graph Representation Learning via Causal Diffusion for Out-of-Distribution Recommendation

Chu Zhao, Enneng Yang, Yuliang Liang, Pengxiang Lan, Yuting Liu, Jianzhe Zhao, Guibing Guo, Xingwei Wang

TL;DR

CausalDiffRec is a novel framework designed to enhance the robustness of graph-based recommendation systems against out-of-distribution (OOD) data. By integrating Structural Causal Models (SCM) with Denoising Diffusion Probabilistic Models, the framework identifies and removes unstable correlations—such as temporary shopping surges during a pandemic—to focus on invariant user preferences that persist across varying environments.

The Challenge: Distribution Shift in Recommendations

Standard Graph Neural Network (GNN) recommendation algorithms typically assume that training and testing data are Independently and Identically Distributed (IID). However, real-world scenarios frequently violate this assumption.

Figure 3: Illustration of distribution shift caused by COVID-19 and the resulting performance degradation in standard models.

Consider the impact of the COVID-19 pandemic: consumer behavior shifted drastically toward face masks and home gym equipment. A standard GNN might learn a strong correlation between these items. Yet, once the pandemic ends, a user purchasing a mask for a different purpose (e.g., DIY work) is unlikely to be interested in a treadmill. These are unstable correlations driven by environmental confounders. When the environment shifts, model accuracy often plummets because the system relied on "shortcuts" rather than genuine, long-term user interests.

Methodology: The CausalDiffRec Framework

CausalDiffRec addresses distribution shifts through three integrated modules:

  1. Environment Generator: To simulate diverse conditions, the model employs Reinforcement Learning to "edit" the interaction graph, creating $K$ distinct simulated environments. This forces the model to observe user behavior under varying hypothetical scenarios.
  2. Environment Inference: Using variational inference, the model estimates latent environmental factors—the hidden "why" behind the data—and represents them as pseudo-labels.
  3. Causal Diffusion: This core engine utilizes a diffusion process to represent user-item interactions. During the "reverse" phase, the model is guided by the inferred environment to reconstruct only the invariant components of the graph—the signals that remain stable across different environments.
Figure 5: Causal diagrams illustrating (a) the data generation process with confounders, (b) standard model training, and (c) the proposed interventional model that deconfounds environmental factors.

By applying backdoor adjustment, the model mathematically "deconfounds" the data, isolating the user's intrinsic preferences from environmental influences.

Datasets and Evaluation

The authors evaluated CausalDiffRec against three types of distribution shifts using four benchmark datasets:

  • Food (Temporal Shift): Evaluates handling of changing trends over time.
  • KuaiRec (Exposure Shift): Tests the ability to manage recommendation bias in datasets with varying item exposure.
  • Yelp2018 & Douban (Popularity Shift): Assesses the model's capacity to recommend "cold" (unpopular) items despite the dominance of "hot" items in training data.

Key Insights

  • Confounders as Backdoor Paths: Environmental factors (e.g., economic shifts, global events) create "backdoor" paths that lead GNNs to learn transient correlations.
  • Diffusion as a Selective Filter: In this context, diffusion acts as a sophisticated denoiser. By reconstructing representations while conditioning on the environment, the model filters out environmental "noise" to retain the invariant "signal."
  • The Power of Invariant Learning: Robust recommendations must rely on patterns that hold true across all simulated environments. Correlations that vanish when the graph is tweaked are identified as unreliable shortcuts.

Results and Performance

CausalDiffRec consistently outperformed state-of-the-art baselines, including LightGCN, SGL, and SimGCL, across all OOD scenarios:

  • Popularity Shifts: On Yelp2018, the model achieved a 36.73% improvement in Recall@10 over the best baseline.
  • Temporal Shifts: On the Food dataset, it improved Recall@10 by 5.63% and NDCG@10 by 17.93%.
  • IID Performance: The model maintained high performance on standard IID test sets, often outperforming baselines even when no shift was present.
  • Embedding Analysis: t-SNE visualizations confirmed that CausalDiffRec clusters "hot" and "cold" items more effectively, demonstrating a significant reduction in popularity bias.

Limitations

While effective, CausalDiffRec faces challenges regarding hyperparameter sensitivity, particularly the number of diffusion steps ($T$) and simulated environments ($K$). Additionally, the computational overhead of diffusion processes is higher than simpler models like LightGCN. Future work may explore making the discrete environment generation process more efficient through differentiable methods.

Summary updated

BibTeX
@inproceedings{zhao2024graph,
  author = {Chu Zhao and Enneng Yang and Yuliang Liang and Pengxiang Lan and Yuting Liu and Jianzhe Zhao and Guibing Guo and Xingwei Wang},
  title = {{Graph Representation Learning via Causal Diffusion for Out-of-Distribution Recommendation}},
  booktitle = {The Web Conference},
  year = {2024},
}
Figure