Home

Awesome

AttList

Introduction

This is the implementation of AttList as described in the paper:<br>

A Hierarchical Self-Attentive Model for Recommending User-Generated Item Lists.<br> CIKM, 2019.<br> Yun He, Jianling Wang, Wei Niu and James Caverlee.<br> Department of Computer Science and Engineering, Texas A&M University.<br> Contact: yunhe@tamu.edu <br> Personal Page: http://people.tamu.edu/~yunhe/ <br>

The AttList algorithm recommends user-generated item lists (playlists on Spotify, book lists on Goodreads and answer collections on Zhihu) to other users.

We also have another related work in WSDM 2020, which predicts the next item of a list:

Consistency-Aware Recommendation for User-Generated ItemList Continuation.<br> WSDM, 2020.<br> Yun He, Yin Zhang, Weiwen Liu and James Caverlee.<br> Department of Computer Science and Engineering, Texas A&M University.<br> Link: https://github.com/heyunh2015/ListContinuation_WSDM2020 <br>

Usage of AttList

AttList learns the user preference from training datasets and then ranks the lists for the users in testing datasets. Folder AttList_cikm2019 contains our code and preprocessed datasets with split used in our paper. Folder attList_CIKM2019_data contains raw datasets without preprocessed (which have been de-identified. No real user id, list id and item id are released, no worries!).

Input

The input of AttList includes the set of interactions between users and lists:

userId [listId_1, listId_2, listId_3,...]

which means that the user interacted with the lists (e.g., playlists on Spoftify). These interactions are stored in userList_*.txt file, like AttList/AttList_cikm2019/data/goodreads/userList_goodreads.txt.

Note that we split userList_*.txt into train.txt, validation.txt and test.txt and only use train.txt in the training phase, otherwise the information will be leaked. Of course, validation.txt is for hyper-parameters selection and test.txt is for the evaluation.

The format of train.txt, validation.txt and test.txt are like this:

userId listId 1.0

And items contained in that list.

listId [itemId_1, itemId_2, itemId_3,...]

which means that the list contains these items. These containing relationships are storded in listItem_*.txt, like AttList/AttList_cikm2019/data/goodreads/listItem_goodreads.txt

Output

The output are the evaluation results comparing the ranked lists of AttList and the groundtruth from the test.txt. An example is presented as follows:

precision@5: 0.0297358342335
recall@5: 0.0993438722178
precision@10: 0.0212903859373
recall@10: 0.139846678794
NDCG@5: 0.0738304666949
NDCG@10: 0.088376425288

Run

python Attlist_cikm2019.py --dataSetName Spotify

For more hyper-parameters, please see Attlist_cikm2019.py.

Files in folder

attList_CIKM2019_data

AttList_cikm2019

Data (included in AttList_cikm2019)

Citation

@inproceedings{he2019hierarchical,<br> title={A Hierarchical Self-Attentive Model for Recommending User-Generated Item Lists},<br> author={He, Yun and Wang, Jianling and Niu, Wei and Caverlee, James},<br> booktitle={Proceedings of the 28th ACM International Conference on Information and Knowledge Management},<br> pages={1481--1490},<br> year={2019},<br> organization={ACM}<br> }<br>

Important Tip

The evaluation protocol in our paper is to generated the prediction scores for all lists in the dataset, which is slow. Hence, in the future, we may first randomly sample 100 negative samples. And the model only needs to predict scores for these 100 negative samples and ground-truth samples. This protocol has been widely used in recommendation research community.