MCPcopy Index your code
hub / github.com/HKUDS/DCCF

github.com/HKUDS/DCCF @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
26 symbols 67 edges 5 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Disentangled Contrastive Collaborative Filtering

This is the PyTorch implementation by @Re-bin for DCCF model proposed in this paper:

Disentangled Contrastive Collaborative Filtering
Xubin Ren, Lianghao Xia, Jiashu Zhao, Dawei Yin, Chao Huang\ SIGIR 2023*

* denotes corresponding author

DCCF

In this paper, we propose a disentangled contrastive learning method for recommendation, which explores latent factors underlying implicit intents for interactions. In particular, a graph structure learning layer is devised to enable the adaptive interaction augmentation, based on the learned disentangle user (item) intent-aware dependencies. Along the augmented intent-aware graph structures, we propose a intent-aware contrastive learning scheme to bring the benefits of disentangled self-supervision signals.

Environment

The codes are written in Python 3.8.13 with the following dependencies.

  • numpy == 1.22.3
  • pytorch == 1.11.0 (GPU version)
  • torch-scatter == 2.0.9
  • torch-sparse == 0.6.14
  • scipy == 1.9.3

Dataset

We utilized three public datasets to evaluate DCCF: Gowalla, Amazon-book, and Tmall.

Note that the validation set is only used for tuning hyperparameters, and for Gowalla / Tmall, the validation set is merged into the training set for training.

Examples to run the codes

The command to train DCCF on the Gowalla / Amazon-book / Tmall dataset is as follows.

We train DCCF with a fixed number of epochs and save the parameters obtained after the final epoch for testing.

  • Gowalla

    python DCCF_PyTorch.py --dataset gowalla --epoch 150

  • Amazon-book:

    python DCCF_PyTorch.py --dataset amazon --epoch 100

  • Tmall:

    python DCCF_PyTorch.py --dataset tmall --epoch 100

For advanced usage of arguments, run the code with --help argument.

Thanks for your interest in our work.

Citation

If you find this work is helpful to your research, please consider citing our paper:

@inproceedings{ren2023disentangled,
  title={Disentangled contrastive collaborative filtering},
  author={Ren, Xubin and Xia, Lianghao and Zhao, Jiashu and Yin, Dawei and Huang, Chao},
  booktitle={Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval},
  pages={1137--1146},
  year={2023}
}

Core symbols most depended-on inside this repo

inference
called by 3
model.py
_adaptive_mask
called by 2
model.py
load_adjacency_list_data
called by 1
DCCF_PyTorch.py
_init_weight
called by 1
model.py
_cal_sparse_adj
called by 1
model.py
cal_ssl_loss
called by 1
model.py
predict
called by 1
model.py
parse_args
called by 1
utility/parser.py

Shape

Method 17
Function 7
Class 2

Languages

Python100%

Modules by API surface

model.py10 symbols
utility/load_data.py9 symbols
utility/batch_test.py5 symbols
utility/parser.py1 symbols
DCCF_PyTorch.py1 symbols

For agents

$ claude mcp add DCCF \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact