GithubHelp home page GithubHelp logo

wenjiewwj / clickbait Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 3.0 93.3 MB

Clicks can be Cheating: Counterfactual Recommendation for Mitigating Clickbait Issue

Python 98.89% Shell 1.11%
recommender-system debiasing debiasing-recommendation clickbait clickbait-issue

clickbait's Introduction

Clicks can be Cheating: Counterfactual Recommendation for Mitigating Clickbait Issue

This is the pytorch implementation of our paper at SIGIR 2021:

Clicks can be Cheating: Counterfactual Recommendation for Mitigating Clickbait Issue

Wenjie Wang, Fuli Feng, Xiangnan He, Hanwang Zhang, Tat-Seng Chua.

Environment

  • Anaconda 3
  • python 3.7.3
  • pytorch 1.4.0
  • numpy 1.16.4

Usage

Parameters

  • model_name: MMGCN.
  • l_r: learning rate. Default: 1e-3.
  • weight_decay: the hyper-parameter for weight decay. Default: 1e-3.
  • gpu_id: the gpu used for training.

Other parameter settings can be found in train.py. We keep the default setings as MMGCN.

Training

python train.py --model_name=$1 --l_r=$2 --weight_decay=$3

or use run.sh

sh run.sh gpu_id model_name l_r weight_decay

The log file will be in the ./log/ folder.

Inference

  1. Download the checkpoints released by us from Google drive.
  2. Put the '.pth' file into the model_1 folder.
  3. Run inference.py or run_inference.sh:
python inference.py --model_name=$2 --l_r=$3 --weight_decay=$4 --log_name="$2_tiktok_$3lr_$4wd_$5"
sh run_inference.sh gpu_id model_name l_r weight_decay log_name

Examples

  1. Train MMGCN on Tiktok:
cd ./code/tiktok
CUDA_VISIBLE_DEVICES=0 python main.py --model_name=MMGCN --l_r=1e-3 --weight_decay=1e-3
  1. Inference MMGCN on Adressa
cd ./code/adressa
sh run_inference.sh 0 MMGCN 1e-3 1e-3 TIE

Citation

If you use our code, please kindly cite:

@inproceedings{wang2021Clicks,
  title={Clicks can be Cheating: Counterfactual Recommendationfor Mitigating Clickbait Issue},
  author={Wenjie Wang, Fuli Feng, Xiangnan He, Hanwang Zhang, and Tat-Seng Chua},
  booktitle={SIGIR},
  year={2021},
  publisher={ACM}
}

Acknowledgment

Thanks to the MMGCN implementation:

License

NUS © NExT++

clickbait's People

Contributors

wenjiewwj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

clickbait's Issues

a issue about dataset

hi,wenjie
I've been trying to run your code recently,
but I found that the tiktok dataset byte recommendation can't be downloaded from the official website.
So can you give me a dataset or Google drive disk access (my email address is [email protected]
Thank you very muchhhh.

.

Could you please provide the hyper-parameters to help the reader get the results published in the paper?

'Net' object has no attribute 'model'

I came across an error message when I run it with the command "python train.py --model_name=$1 --l_r=$2 --weight_decay=$3": AttributeError: 'Net' object has no attribute 'model'.I checked carefully and didn't know the reason for the mistake.Have you ever made a similar mistake?We hope to receive your reply, which will be greatly appreciated.

edge_index is empty

FYI: if you meet the problem above while running train.py, consider checking the version of TorchGeometric

If version <=1.4.3, try change file in TorchGeometric lib: nn\conv\message_passing.py,
Add these lines at line 170:
out['dim_size'] = out['size_i']
out['edge_index'] = edge_index
out['size'] = size
so the edge_index won't be viewed as "empty".

By the way, updating version may help with the bug, but you have to change "Scatter_" to torch version for there's no “Scatter_” in new version of TorchGeometric

Good Luck

数据集

你好,我看到你的代码Clickbait中提供的tiktok数据集中有三个特征文件,feat_a.pt,feat_v.pt,feat_t.pt。其中feat_a.pt和feat_v.pt的维度为[34756, 128],但是feat_t.pt的维度为[2, 261230]。这个feat_t.pt文件是否有问题呢?如果有问题的话,您能提供一下正确的feat_t.pt文件吗?非常感谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.