ZhihuRec Dataset

December 2, 2022 · View on GitHub

Note: We cleaned and republished the dataset because we found some errors in the original dataset.

ZhihuRec dataset is constructed by the Information Retrieval group of Tsinghua Unversity (THUIR) and Zhihu company, and it is for research purposes only.

ZhihuRec dataset is collected from a knowledge-sharing platform (Zhihu), which is composed of around 100M interactions collected within 10 days, 798K users, 165K questions, 554K answers, 240K authors, 70K topics, and more than 501K user query logs. There are also descriptions of users, answers, questions, authors, and topics, which are anonymous. To the best of our knowledge, this is the largest real-world interaction dataset for personalized recommendation.

As the ZhihuRec dataset contains about 100M user-answer impression logs, it is also called ZhihuRec-100M. Two smaller datasets randomly sampled from ZhihuRec-100M dataset called ZhihuRec-20M and ZhihuRec-1M are also constructed to facilitate various application requirements. They contain about 20M and 1M user-answer impression logs and can be viewed as a medium-size dataset and a relatively small-size dataset.

Files in the dataset

FilenameSizeDescription
inter_impression.csv2.6GBuser clicks and impressions
inter_query.csv111MBuser queries
info_user.csv135MBthe features of the users occured in the dataset
info_answer.csv917MBthe features of the answers occured in the dataset
info_question.csv14MBthe features of the questions occured in the dataset
info_author.csv3.1MBthe features of the authors occured in the dataset
info_topic.csv413KBthe IDs of the topics occured in the dataset
info_token.csv409MBthe features of the tokens occured in the dataset

Statistics of the dataset

DatasetZhihuRec-100MZhihuRec-20MZhihuRec-1M
#impressions *99,978,52319,999,857999,970
#clicks26,981,5835,402,345268,656
#clicks : #non-clicks1 : 2.711 : 2.701 : 2.72
#queries *3,899,553776,20138,422
#users *798,086159,6427,974
avg #impressions per user125.27125.28125.40
avg #clicks per user33.8133.8433.69
#users with queries501,893100,2715,047
avg #queries per user7.777.747.61
#answers *554,976343,10381,563
#questions *165,012104,13029,340
#authors *240,956167,79647,888
#topics *72,31854,78522,897
#tokens *556,546428,334249,586

* The two smaller datasets can be generated by taking the top NN lines in the eight files.

Fields in the dataset

Some fields in the data set are null, which are represented by empty strings in the file.

inter_impression.csv

IndexNullableDescription
0user ID
1answer ID
2impression timestamp
3click timestamp (0 for non-click)

inter_query.csv

IndexNullableDescription
0user ID
1token IDs in the query (separated by spaces)
2query timestamp

info_user.csv

IndexNullableDescription
0user ID
1register timestamp
2gender
3login frequency
4#followers
5#topics followed by this user
6#questions followed by this user
7#answers
8#questions
9#comments
10#thanks received by this user
11#comments received by this user
12#likes received by this user
13#dislikes received by this user
14register type
15register platform
16from android or not
17from iphone or not
18from ipad or not
19from pc or not
20from mobile web or not
21device model
22device brand
23platform
24province
25city
26\sqrt{}topic IDs followed by this user (separated by spaces)

info_answer.csv

IndexNullableDescription
0answer ID
1\sqrt{}question ID
2anonymous or not
3\sqrt{}author ID (null for anonymous)
4labeled high-value answer or not
5recommended by the editor or not
6create timestamp
7contain pictures or not
8contain videos or not
9#thanks
10#likes
11#comments
12#collections
13#dislikes
14#reports
15#helpless
16\sqrt{}token IDs in the answer (separated by spaces)
17\sqrt{}topic IDs of the answer (separated by spaces)

info_question.csv

IndexNullableDescription
0question ID
1create timestamp
2#answers
3#followers
4#invitations
5#comments
6\sqrt{}token IDs in the question (separated by spaces)
7\sqrt{}topic IDs of the queation (separated by spaces)

info_author.csv

IndexNullableDescription
0author ID
1is excellent author or not
2#followers
3is excellent answerer or not

info_topic.csv

IndexNullableDescription
0topic ID

info_token.csv

IndexNullableDescription
0token ID *
1word vector trained by word2vec (64 dimensions, separated by spaces)

* ZhihuRec can't provide the corresponding text of tokens for privacy reasons. Researchers can use word vectors in the dataset or train word vectors from scratch.

Citation

ZhihuRec dataset can be downloaded from here, and it is for the paper:

Bin Hao, Min Zhang, Weizhi Ma, Shaoyun Shi, Xinxing Yu, Houzhi Shan, Yiqun Liu and Shaoping Ma, 2021, A Large-Scale Rich Context Query and Recommendation Dataset in Online Knowledge-Sharing. arXiv preprint arXiv:2106.06467.

please cite the paper if you use this dataset:

@misc{hao2021largescale, title={A Large-Scale Rich Context Query and Recommendation Dataset in Online Knowledge-Sharing}, author={Bin Hao and Min Zhang and Weizhi Ma and Shaoyun Shi and Xinxing Yu and Houzhi Shan and Yiqun Liu and Shaoping Ma}, year={2021}, eprint={2106.06467}, archivePrefix={arXiv}, primaryClass={cs.IR} }

Contact

This dataset is for research use only. If you have any problem about this work or dataset, please contact with Bin Hao at haobin9527@qq.com.