File size: 2,158 Bytes
6077218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84


<div align='center'>
<h1>Preference Diffusion for Recommdation (ICLR 2025)</h1>
 <a href='https://scholar.google.com/citations?user=sRoqbLwAAAAJ&hl=en'>Shuo Liu<sup>1,2</sup></a>,
 <a href='https://github.com/anzhang314'>An Zhang<sup>2*</sup></a>,
 <a href='https://hugo-chinn.github.io/'>Guoqing Hu<sup>3</sup></a>,
 <a href='https://faculty.ecnu.edu.cn/_s16/qh_en/main.psp'>Hong Qian<sup>1</sup></a>,
   <a href='https://www.chuatatseng.com/'>Tat-Seng Chua<sup>2</sup></a>,
    <br>
    <sup>1</sup>East China Normal University, <sup>2</sup>National University of Singapore, 
    <br>
    <sup>3</sup>University of Science and Technology of China, (*Correspondence )
</div>







<img src='imgs/moti.svg' />

------

:smile_cat: Welcome to PreferDiff, this is a implementation of ***Preference Diffusion for Recommendation***







## :one:  ​ Guide for Running PreferDiff



### :walking_man: Single GPU 

```sh
python main.py --model=PreferDiff --sd=O --td=O --loss_type=cosine  --lamda=0.4 --w=2 --hidden_size=3072  --ab=iids
```



### :runner: Multi-GPU

```sh
CUDA_VISIBLE_DEVICES=0,1,2,3 accelerate launch --main_process_port=12330 main.py --model=PreferDiff --sd=O --td=O --loss_type=cosine  --lamda=0.4 --w=2 --hidden_size=3072 --ab=iids
```



## :two: Best Hyperparameters

| Dataset    | learning rate | Weight Decay | lambda | w    | Embedding Size |
| ---------- | ------------- | ------------ | ------ | ---- | -------------- |
| **Sports** | 1e-4          | 0            | 0.4    | 2    | 3072           |
| **Beauty** | 1e-4          | 0            | 0.4    | 8    | 3072           |
| **Toys**   | 1e-4          | 0            | 0.6    | 6    | 3072           |



## :three: Guide for Running Baselines



```sh
CUDA_VISIBLE_DEVICES=0,1,2,3 accelerate launch --main_process_port=12330 main.py --model=SASRec --sd=O --td=O 
```

## Bibtex

```
@inproceedings{Liu2024PreferDiff,
author = {Shuo Liu, An Zhang, Guoqing Hu, Hong Qian, Tat-seng Chua},
booktitle = {Proceedings of the 13th International Conference on Learning Representations},
title = {Preference Diffusion for Recommendation},
year = {2024},
address={Singapore}
}
```