<div align="center">
  <h1>SteerRec: Sculpting User Preferences for Recommendation with Positive-Negative Diffusion Guidance</h1>
</div>

Welcome to SteerRec, this is an implementation of SteerRec for Recommendation.

### Guide for Running SteerRec
```bash
python main.py --model=SteerRec --dataset_code=O --loss_type=cosine --mu=0.4 --w=2 --margin=0.1 --hidden_size=3072 --timesteps=1000
```

### Best Hyperparameters

| Dataset | `lr` | `μ` (mu) | `m` (margin) | `w` | `T` (timesteps) |
| :--- | :---: | :---: | :---: | :---: | :---: |
| Sports | 1e-4 | 0.4 | 0.1 | 2.0 | 1000 |
| Beauty | 5e-5 | 0.2 | 0.1 | 4.0 | 1200 |
| Toys | 1e-4 | 0.2 | 0.1 | 4.0 | 800 |

### Acknowledgments
The implementation of the diffusion model framework and evaluation parts are referred to **[PreferDiff](https://github.com/lswhim/PreferDiff)**. Thank you for this contribution.
