Skip to content

weiyinwei/HUIGN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hierarchical User Intent Graph Network for Multimedia Recommendation

This is our Pytorch implementation for the paper: Hierarchical User Intent Graph Network for Multimedia Recommendation

Environment Requirement

The code has been tested running under Python 3.5.2. The required packages are as follows:

  • Pytorch == 1.1.0
  • torch-cluster == 1.4.2
  • torch-geometric == 1.2.1
  • torch-scatter == 1.2.0
  • torch-sparse == 0.4.0
  • numpy == 1.16.0

Example to Run the Codes

The instruction of commands has been clearly stated in the codes.

  • Movielens dataset
    python main.py --data_path 'Movielens' --l_r 0.0001 --weight_decay 0.0001 --batch_size 1024 --dim_x 64 --num_workers 30 --topK 10 --cluster_list 32 8 4
  • Tiktok dataset
    python train.py --data_path 'Tiktok' --l_r 0.0005 --weight_decay 0.1 --batch_size 1024 --dim_latent 64 --num_workers 30 --topK 10 --cluster_list 32 8 4
  • Kwai dataset
    python train.py --data_path 'Kwai' --l_r 0.0005 --weight_decay 0.1 --batch_size 1024 --dim_latent 64 --num_workers 30 --topK 10 --cluster_list 32 8 4

Some important arguments:

has_ind: It indicates the optional independence loss function.

has_cro: It indicates the optional cross_entropy loss function.

has_v, has_a, and has_t: They are used to indicate which modalities are included in this work.

--num_links: It indicates the number of co-occurrence.

--cluster_list: It describes the structure of hierarchical user intents.

Dataset

We provide three processed datasets: Movielnes, Tiktok, and Kwai.

#Interactions #Users #Items Visual Acoustic Textual
Movielens 1,239,508 55,485 5,986 2,048 128 100
Tiktok 726,065 36,656 76,085 128 128 128
Kwai 298,492 86,483 7,010 2,048 - -

-train.npy Train file. Each line is a pair of one user and one of her/his postive items: (userID and micro-video ID)
-val_full.npy Validation file. Each line is a user with her/his positive interactions with items: (userID and micro-video ID)
-test_full.npy Test file. Each line is a user with her/his positive interactions with items: (userID and micro-video ID)

About

Hierarchical User Intent Graph Network for Multimedia Recommendation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages