Source code of WWW2022 long paper "Socialformer: Social Network Inspired Long Document Modeling for Document Ranking".
- python >= 3.6.0
- pytorch >= 1.9.0 (with GPU support)
- Transformers >= 4.5.1
- pytrec-eval == 0.5
- Referring to
/dataprocess
, including probability computing, graph construction, and graph partition.
cd dataprocess
bash ./run.sh
- Referring to
/model
, train and test the model.
bash ./model/run.sh
If you use the code, please cite the following paper:
@inproceedings{ZhouDYM22,
author = {Yujia Zhou and
Zhicheng Dou and
Huaying Yuan and
Zhengyi Ma},
title = {Socialformer: Social Network Inspired Long Document Modeling for Document Ranking},
booktitle = {{WWW}},
publisher = {{ACM}},
year = {2022}
}