Demo code for news click-through rate prediction competition.
The framework of base model for news recommendation, it consists of several parts: (1) a news encoder that uses rich textual content to learn news embeddings, and all news encoder parameters are shared; (2) a cheap sequential behavior moduel learns user embeddings from news click history; (3) a prediction moduel calculates predictive scores using the dot product of user embeddings with candidate news embeddings.
Note: only the title information is used in this demo.
torch==1.12.1
tqdm==4.65.0
pandas==2.0.3
numpy==1.23.5
scikit-learn==1.3.0
nltk==3.8.1
The code works fine on Python 3.8
We recommend developing this repository on Linux.
- Clone this repository
git clone https://github.com/nipirennipi/BJTU-M502075B-2023 cd BJTU-M502075B-2023
- Download dataset
- Link1: https://www.aliyundrive.com/s/y9jegdc2nVG
- Link2: https://www.aliyundrive.com/s/4ixMCMzc5k6
- Move them to the
data
folder└── data ├── train_behaviors.txt ├── test_behaviors_1.txt ├── test_behaviors_2.txt ├── news.txt └── ...
- Download pre-trained word vectors
cd data bash download.sh
- Training and prediction
cd .. bash run.sh
- More Powerful News Encoder
- Sequential Behavior Modeling
- Training Strategy
- Data Imbalance
Some papers that might be helpful.
-
Survey
- Wu et al., Personalized News Recommendation: Methods and Challenges, TOIS 2023.
- Zhang et al., Deep Learning for Click-Through Rate Estimation, IJCAI 2021.
-
Sequential Behavior Modeling
- Zhou et al., Deep Interest Network for Click-Through Rate Prediction, KDD 2018.
-
Prompt Learning
- Zhang et al., Prompt Learning for News Recommendation, SIGIR 2023.
- Li et al., PBNR: Prompt-based News Recommender System, arXiv 2023.