Direct Preference Optimization (DPO) guides large language models (LLMs) to generate recommendations aligned with user historical behavior distributions by minimizing preference alignment loss. However, our systematic empirical research and theoretical analysis reveal that DPO tends to amplify spurious correlations caused by environmental confounders during the alignment process, significantly undermining the generalization capability of LLM-based generative recommendation methods in out of distribution (OOD) scenarios. To mitigate this issue, we propose CausalDPO, an extension of DPO that incorporates a causal invariance learning mechanism. This method introduces a backdoor adjustment strategy during the preference alignment phase to eliminate interference from environmental confounders, explicitly models the latent environmental distribution using a soft clustering approach, and enhances robust consistency across diverse environments through invariance constraints. Theoretical analysis demonstrates that CausalDPO can effectively capture users stable preference structures across multiple environments, thereby improving the OOD generalization performance of LLM-based recommendation models. We conduct extensive experiments under four representative distribution shift settings to validate the effectiveness of CausalDPO, achieving an average performance improvement of 17.17% across four evaluation metrics.
Figures & tables
Figure 1: Left : This figure presents the number of interactions (frequency) for DPO-based models across item popularity groups, with popularity decreasing from G1 (head) to G5 (tail). Middle : This figure illustrates how LLM-based recommendation models can learn and amplify spurious correlations during preference alignment, and how the DPO mechanism further reinforces these spurious correlations. Right : Using a Structural Causal Model (SCM), this figure analyzes how environmental confounders E affect the model and demonstrates how their influence can be mitigated via the backdoor adjustment criterion.
Methods
Yelp2018
ML-10M
Book-Crossing
H@10
N@10
H@20
N@20
H@10
N@10
H@20
N@20
H@10
N@10
H@20
N@20
SASRec
1.01
0.43
1.51
0.61
0.50
0.02
0.84
0.30
0.33
0.21
0.68
0.21
BIGRec
0.77
0.50
1.28
0.62
0.53
0.29
0.76
0.35
0.53
0.30
0.98
0.43
RW
0.51
0.42
1.02
0.56
0.50
0.28
0.74
0.30
0.59
0.29
0.91
0.41
D3
0.63
0.38
1.15
0.51
0.50
0.25
0.80
0.34
0.50
0.27
0.94
0.40
DMPO
0.76
0.26
1.54
0.43
0.44
0.20
0.81
0.29
0.19
0.10
0.39
0.15
Table 1: The performance (%) comparison between the baselines and CausalDPO on the three datasets with three OOD distributions . We highlight the methods with the best and second-best results.
Figure 2: Further study on performance under distribution shifts and clustering Visualization.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
Movielens-10M
Yelp2018
Book-Crossing
#Sequence
71,567
31,668
278,858
#Items
10,681
38,048
271,379
#Interactions
10,000,054
1,561,406
1,149,780
Appendix
Table 2: Statistics of datasets.
Methods
ML-10M
Book-Crossing
H@10
N@10
H@20
N@20
H@10
N@10
H@20
N@20
SASRec
0.47
0.17
0.75
0.27
1.70
0.90
3.12
1.02
BIGRec
0.66
0.31
1.00
0.40
1.64
0.73
2.19
0.87
RW
0.77
0.45
1.03
0.45
1.52
0.81
1.89
0.95
D3
0.72
0.41
0.99
0.40
1.48
0.71
2.03
0.82
DMPO
0.63
0.33
0.97
0.42
1.61
0.79
2.25
0.91
Appendix
Table 3: The performance (%) comparison between the baselines and CausalDPO on the two datasets with three IID distributions . We highlight the methods with the best and second-best performances.
Metric
SASRec
BIGRec
RW
D3
DMPO
SDPO
RosePO
SPRec
Ours
H@10
0.48
0.49
0.25
0.45
0.50
0.51
0.39
0.41
0.53
N@10
0.20
0.22
0.08
0.18
0.14
0.15
0.19
0.20
0.24
H@20
0.72
0.76
0.51
0.68
0.75
0.76
0.70
0.75
1.51
N@20
0.25
0.28
0.15
0.23
0.20
0.21
0.26
0.28
0.47
Appendix
Table 4: Model Performance (%) Comparison Across Two Distribution Shift Types. We highlight the methods with the best and second-best performances.
Methods
ML-10M
Book-Crossing
H@10
N@10
H@20
N@20
H@10
N@10
H@20
N@20
Dr.DPO
0.17
0.20
0.55
0.18
0.39
0.19
0.50
0.26
CPO
0.41
0.25
0.81
0.31
0.34
0.20
0.54
0.24
SimPO
0.29
0.21
0.58
0.23
0.39
0.18
0.61
0.24
DPO
0.43
0.20
0.81
0.29
0.19
0.10
0.39
0.20
SimPO w/ Causal Reg.
0.36
0.27
0.64
0.34
0.45
0.03
0.70
0.30
Appendix
Table 5: Comparison of models with and without causal regularization on ML-10M and Book.
Methods
DPO
CPO
SimPO
CausalDPO
Complexity
O(3B⋅L2⋅d)
O(3B⋅L2⋅d+BnLd)
O(2B⋅L2⋅d)
O(B⋅L2⋅d+B2)
seconds / epoch
2482s
2160s
1445s
2971s
Appendix
Table 6: Computational Complexity Comparison of Models
Methods
Dr.DPO w/ Causal
CPO w/ Causal
SimPO w/ Causal
CausalDPO
seconds / epoch
2504s
2659s
2280s
2971s
Appendix
Table 7: Computational Complexity Comparison of Models with Causal Invariant Regularization
Variant
Yelp2018
ML-10M
Book-Crossing
H@10
N@10
H@10
N@10
H@10
N@10
w/o SFT
1.28
0.54
0.52
0.26
0.25
0.12
w/o CausalDPO
1.47
0.69
0.55
0.28
0.52
0.30
w/o Both
1.32
0.37
0.46
0.22
0.27
0.12
Ours
1.53
0.77
0.58
0.32
0.64
0.37
Appendix
Table 8: Ablation study results (%).
Methods
Yelp2018
ML-10M
H@10
N@10
H@20
N@20
H@10
N@10
H@20
N@20
SASRec
1.01
0.43
1.51
0.61
0.50
0.02
0.84
0.30
BIGRec
0.77
0.50
1.28
0.62
0.53
0.29
0.76
0.35
RW
0.51
0.42
1.02
0.56
0.50
0.28
0.74
0.30
D3
0.63
0.38
1.15
0.51
0.50
0.25
0.80
0.34
Ours
1.53
0.77
1.79
0.82
0.61
0.35
1.02
0.45
Appendix
Table 9: Under two OOD distribution settings on two datasets, we compare the performance (%) of CausalDPO with different model sizes against strong baselines. The best results are highlighted in red , and the second-best results are highlighted in blue .
Figure 3: Evaluating the impact of model hyperparameter sets on recommendation performance.
Large language model-based recommendation uses language models to personalize ranking, retrieval, and conversational suggestions from text and behavior.
Direct Preference Optimization (DPO) minimizes empirical risk over observed preference comparisons, implicitly assuming that the training preference distribution matches the deployment preference distribution. In practice, this i.i.d. assumption often fails, as preference distribution shift exhibits a natural hierarchical structure across three levels: group-level shift, prompt-level shift, and preference-level shift. Such multi-level distributional mismatch poses a critical challenge for safe LLM deployment, yet existing robust DPO methods typically either model uncertainty over the joint preference distribution or focus on individual sources of shift, leaving the hierarchical structure of OOD preference shifts underexplored. We propose TPO, a tri-level distributionally robust framework for OOD preference alignment, which jointly models all three levels of distributional uncertainty through a hierarchically structured rectangular ambiguity set. By instantiating it with Wasserstein distance, we derive a tractable and interpretable objective that combines a closed-form preference-level margin penalty, prompt-level adversarial embedding perturbation, and worst-case group reweighting, each governed by an independent radius. We establish finite-sample convergence guarantees and empirically validate the effectiveness of TPO over existing robust DPO methods.
Chengtao Jian, Kai Yang
School of Computer Science and Technology, Tongji University, Shanghai, China · Shenzhen Loop Area Institute, Shenzhen, China · Shanghai Research Institute for Intelligent Autonomous Systems, Shanghai, China
Predictive models trained on observational data often fail to generalise when deployed, especially when the training data is a product of the system being optimised. Recommender systems are a canonical example: they are trained on interaction logs confounded by the deployed policy, past user behaviour, and platform filtering. As a result, the training distribution differs from the candidate distribution scored at serving time, a gap that makes offline metrics unreliable predictors of online performance. We address the distribution shift problem with a method motivated by causal representation learning (CRL). We propose an information-theoretic disentanglement criterion and prove that its optimum excludes confounder-dependent non-causal information from the treatment representation. We derive a tractable variational lower bound making the criterion optimisable from finite observational data. The scope of our method is narrower than that of much of the CRL literature, in that we target better generalisation under distribution shift, not full identification of latent causal factors. This narrower target makes the method practical, requiring only existing confounded logs, applying to any standard supervised model, and adding no inference-time cost. Our headline evaluation is an A/B test with millions of users on Spotify, applied to a production ranker for personalised playlist generation. A CRL variant matched in capacity to the production baseline performed on par offline but delivered substantial online gains in listener engagement. Complementary evidence on a synthetic dataset with known causal structure and a semi-synthetic variant of the public KuaiRand recommendation dataset shows similar in-distribution performance to the baseline but gains under distribution shift. Across all three settings, adding our causal disentanglement objective yields better out-of-distribution generalisation.
Yorgos Felekis, Michael O'Riordan, Oriol Corcoll +1
University of Warwick · Spotify · Spotify & University College London
Out-of-distribution (OOD) recommendation is vulnerable to preference shifts induced by a latent environment. Existing methods can infer latent states from logged interactions, yet the statistical meaning of the latent environment and its effect on preference remain underdetermined. We formulate this task as conditionally identifiable risk-aware recommendation (CI-RR) and propose Conditionally Identifiable Latent-Environment Recommendation (CILER). CILER uses a user-conditioned exponential family to model the latent environment and a feature-indexed polynomial to specify how it changes preference. It predicts by marginalizing item probabilities over the inferred environment distribution. Under sufficient variation, correct specification, and decoder regularity, CILER identifies the environment-sensitive representation up to the stated equivalence class. We further bound excess deployment log-risk by environment-inference error. Controlled studies test the observable consequences of sufficient variation and model specification. Experiments on three datasets show that CILER improves all twelve OOD ranking metrics under feature, temporal, and geographical shifts within shared support.
Qianqian Wang, Wenwu Gong, Yunshan Li +3
Shenzhen Key Laboratory of Safety and Security for Next Generation of Industrial Internet, Southern University of Science and Technology, Shenzhen, China · Department of Statistics and Data Science, Southern University of Science and Technology, Shenzhen, China · School of Mathematical and Computational Sciences, Massey University, Auckland, New Zealand