Coder Social home page Coder Social logo

attlist's Introduction

AttList

Introduction

This is the implementation of AttList as described in the paper:

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

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

Usage

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

  • -goodreads.zip, unpreprocessed goodreads dataset;
  • -spotify.zip, unpreprocessed spotify dataset;
  • -zhihu.zip, unpreprocessed zhihu dataset;
  • -examples_listContainItem.txt;
  • -examples_userFollowingList.txt;

AttList_cikm2019

  • -Attlist_cikm2019.py, the main function of AttList;
  • -AttLayer_cikm2019.py, the file of vanilla attention module;
  • -AttLayerSelf_cikm2019.py, the file of self-attention module;
  • -getDataSet_cikm2019.py, the file to get data structure for training and testing;
  • -evaluate_cikm2019.py, the file to do the evaluation;

Data (included in AttList_cikm2019)

  • -goodreads: userList_goodreads.txt, listItem_goodreads.txt, train.txt, validation.txt and text.txt;
  • -spotify: userList_spotify.txt, listItem_spotify.txt, train.txt, validation.txt and text.txt;
  • -zhihu: userList_zhihu.txt, listItem_zhihu.txt, train.txt, validation.txt and text.txt;

Citation

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

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.

attlist's People

Watchers

James Cloos avatar

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.