Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DWRS-Data Watermarking for Recommender Systems

Implementation for Data Watermarking for Sequential Recommender Systems, KDD'25.

Requirements

Tested on Python==3.7.16 and PyTorch==1.13.1.

Dataset Watermarking

An example to train SASRec on ML-1M with watermark length 3 and insert ratio 0.01:

python train.py --device cuda:0 --dataset_code ml-1m --model_code sas --pattern_len 3 --n_watermarks 0.01 --method dataset
python test_watermark_acc.py --device cuda:0 --dataset_code ml-1m --model_code sas --pattern_len 3 --n_watermarks 0.01 --method dataset

Change the --dataset_code into "beauty" or "steam" for the corresponding datasets, and change the --model_code into "bert" or "narm" for the corresponding models.

Please check the results in the "experiments" folder.

User Watermarking

ML-1M:

python train.py --device cuda:0 --dataset_code ml-1m --model_code sas --pattern_len 10 --cn 10 --method user
python test_watermark_acc.py --device cuda:0 --dataset_code ml-1m --model_code sas --pattern_len 10 --cn 10 --method user

Beauty:

python train.py --device cuda:0 --dataset_code beauty --model_code sas --pattern_len 20 --cn 10 --method user
python test_watermark_acc.py --device cuda:0 --dataset_code beauty --model_code sas --pattern_len 20 --cn 10 --method user

Steam:

python train.py --device cuda:0 --dataset_code steam --model_code sas --pattern_len 10 --cn 10 --method user
python test_watermark_acc.py --device cuda:0 --dataset_code steam --model_code sas --pattern_len 10 --cn 10 --method user

Change the --model_code into "bert" or "narm" for the corresponding models.

Please check the results in the "experiments" folder.

Citation

Please cite the following paper if you use our methods in your research:

@article{zhang2024data,
  title={Data Watermarking for Sequential Recommender Systems},
  author={Zhang, Sixiao and Long, Cheng and Yuan, Wei and Chen, Hongxu and Yin, Hongzhi},
  journal={arXiv preprint arXiv:2411.12989},
  year={2024}
}

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages