Show Me the Whole World: Towards Entire Item Space Exploration for Interactive Personalized Recommendations

Overview

HierarchicyBandit

Introduction

This is the implementation of WSDM 2022 paper : Show Me the Whole World: Towards Entire Item Space Exploration for Interactive Personalized Recommendations
The reference codes for HCB and pHCB, which are based on three different base bandit algorithms.

  1. LinUCB from A contextual-bandit approach to personalized news article recommendation
  2. epsilon-Greedy [This strategy, with random exploration on an epsilon fraction of the traffic and greedy exploitation on the rest]
  3. Thompson Sampling from Thompson Sampling for Contextual Bandits with Linear Payoffs

Files in the folder

  • data/
    • MIND/ and TaoBao/
      • item_info.pkl: processed item file, including item id, item feature and embeddings for simulator;
      • user_info.pkl: processed user file, including user id, and embeddings for simulator;
      • item_info_ts.pkl: processed item file for Thompson sampling;
  • algs/: implementations of PCB and pHCB based on LinUCB.
  • algsE/: implementations of PCB and pHCB based on epsilon-Greedy.
  • algsTS/: implementations of PCB and pHCB based on Thompson Sampling.

Note

  1. Before testing the algorithms, you should modify the settings in config.py.
  2. For thompson sampling, we provide another 16 dimensonal feature vectors to run the experiments, since it can be faster . The original feature vectors are also work with the algorithms.
  3. the user_info.pkl and item_info.pkl is formated as dictionary type.
  4. The implementation of ConUCB is released at ConUCB. HMAB and ICTRUCB are specical case of CB-Category and CB-Leaf.

Usage:

Download the HierarchicyBandit.zip and unzip. You will get five folders, they are algs/, algsE/, algsTS/, data/, and logger/.

Parameters:
The config.py file contains:

dataset: is the dataset used in the experiment, it can be 'MIND' or 'TaoBao';  
T: the number of rounds of each bandit algorithm;  
k: the number of items recommended to user at each round, default is 1;  
activate_num: the hyper-papamter p for pHCB;  
activate_prob: the hyper-papamter q for pHCB;  
epsilon: the epsilon value for greedy-based algorithms;  
new_tree_file: the tree file name;  
noise_scale: the standard deviation of environmental noise;  
keep_prob: sample ratio; default is 1.0, which means testing all users.
linucb_para: the hyper-parameters for linucb algorithm;
ts_para: the hyper-parameters for thompson sampling algorithm;
poolsize: the size of candidate pool;
random_choice: whether random choice an item to user;   

Environment: python 3.6 with Anaconda To run the bandit codes based on LinUCB:

$ cd algs
$ python simulator_multi_process.py

To run the bandit codes based on epsilon-Greedy:

$ cd algsE
$ python simulator_multi_process.py

To run the bandit codes based on Thompson sampling:

$ cd algsTS
$ python simulator_multi_process.py
You might also like...
Official code implementation for
Official code implementation for "Personalized Federated Learning using Hypernetworks"

Personalized Federated Learning using Hypernetworks This is an official implementation of Personalized Federated Learning using Hypernetworks paper. [

Personalized Federated Learning using Pytorch (pFedMe)
Personalized Federated Learning using Pytorch (pFedMe)

Personalized Federated Learning with Moreau Envelopes (NeurIPS 2020) This repository implements all experiments in the paper Personalized Federated Le

The source codes for ACL 2021 paper 'BoB: BERT Over BERT for Training Persona-based Dialogue Models from Limited Personalized Data'
The source codes for ACL 2021 paper 'BoB: BERT Over BERT for Training Persona-based Dialogue Models from Limited Personalized Data'

BoB: BERT Over BERT for Training Persona-based Dialogue Models from Limited Personalized Data This repository provides the implementation details for

A PyTorch implementation of
A PyTorch implementation of "Predict then Propagate: Graph Neural Networks meet Personalized PageRank" (ICLR 2019).

APPNP ⠀ A PyTorch implementation of Predict then Propagate: Graph Neural Networks meet Personalized PageRank (ICLR 2019). Abstract Neural message pass

Personalized Transfer of User Preferences for Cross-domain Recommendation (PTUPCDR)

This is the official implementation of our paper Personalized Transfer of User Preferences for Cross-domain Recommendation (PTUPCDR), which has been accepted by WSDM2022.

JudeasRx - graphical app for doing personalized causal medicine using the methods invented by Judea Pearl et al.
JudeasRx - graphical app for doing personalized causal medicine using the methods invented by Judea Pearl et al.

JudeasRX Instructions Read the references given in the Theory and Notation section below Fire up the Jupyter Notebook judeas-rx.ipynb The notebook dra

Listing arxiv - Personalized list of today's articles from ArXiv
Listing arxiv - Personalized list of today's articles from ArXiv

Personalized list of today's articles from ArXiv Print and/or send to your gmail

Regulatory Instruments for Fair Personalized Pricing.

Fair pricing Source code for WWW 2022 paper Regulatory Instruments for Fair Personalized Pricing. Installation Requirements Linux with Python = 3.6 p

(Personalized) Page-Rank computation using PyTorch

torch-ppr This package allows calculating page-rank and personalized page-rank via power iteration with PyTorch, which also supports calculation on GP

Comments
  • Two questions

    Two questions

    Hi, thanks for sharing the code.

    Q1: IIUC, at https://github.com/CGCL-codes/HCB-pHCB/blob/main/algs/hcb.py#L80, we will never initialize a base_linucb for depth (L-1), which contains the leaf nodes (because we already quit the while loop at line 75 when it is a leaf).

    On the other hand, we did not add the root into the path. So when we update the parameters at https://github.com/CGCL-codes/HCB-pHCB/blob/main/algs/hcb.py#L104, we actually update the parameters for depth 0 to L-2. Is this expected?

    Q2: in pHCB, at line https://github.com/CGCL-codes/HCB-pHCB/blob/main/algs/phcb.py#L95, the reward is multiplied by the depth, I did not see this in the paper, is this intended?

    Thanks!

    opened by greeness 4
  • FileNotFoundError: [Errno 2] No such file or directory: '../data/MIND/tree/10000_100_btree.pkl'

    FileNotFoundError: [Errno 2] No such file or directory: '../data/MIND/tree/10000_100_btree.pkl'

    Hi, thanks for the code. I downloaded the MIND dataset from the google drive path you given, but there isn't '../data/MIND/tree/10000_100_btree.pkl' .

    opened by zhenyuhe00 3
  • FileNotFoundError: [Errno 2] No such file or directory: '../data/MIND/tree/10000_100_btree.pkl'

    FileNotFoundError: [Errno 2] No such file or directory: '../data/MIND/tree/10000_100_btree.pkl'

    Hi, thanks for the code. I downloaded the MIND dataset from the google drive path you given, but there isn't '../data/MIND/tree/10000_100_btree.pkl' .

    opened by zhenyuhe00 1
Owner
yu song
I am a master at Huazhong University of Science and Technology(HUST)
yu song
PULSE: Self-Supervised Photo Upsampling via Latent Space Exploration of Generative Models

PULSE: Self-Supervised Photo Upsampling via Latent Space Exploration of Generative Models Code accompanying CVPR'20 paper of the same title. Paper lin

Alex Damian 7k Dec 30, 2022
Systemic Evolutionary Chemical Space Exploration for Drug Discovery

SECSE SECSE: Systemic Evolutionary Chemical Space Explorer Chemical space exploration is a major task of the hit-finding process during the pursuit of

null 64 Dec 16, 2022
MetaBalance: Improving Multi-Task Recommendations via Adapting Gradient Magnitudes of Auxiliary Tasks

MetaBalance: Improving Multi-Task Recommendations via Adapting Gradient Magnitudes of Auxiliary Tasks Introduction This repo contains the pytorch impl

Meta Research 38 Oct 10, 2022
This is the repository for CVPR2021 Dynamic Metric Learning: Towards a Scalable Metric Space to Accommodate Multiple Semantic Scales

Intro This is the repository for CVPR2021 Dynamic Metric Learning: Towards a Scalable Metric Space to Accommodate Multiple Semantic Scales Vehicle Sam

null 39 Jul 21, 2022
Towards Open-World Feature Extrapolation: An Inductive Graph Learning Approach

This repository holds the implementation for paper Towards Open-World Feature Extrapolation: An Inductive Graph Learning Approach Download our preproc

Qitian Wu 42 Dec 27, 2022
FuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space OptimizationFuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space Optimization

FuseDream This repo contains code for our paper (paper link): FuseDream: Training-Free Text-to-Image Generation with Improved CLIP+GAN Space Optimizat

XCL 191 Dec 31, 2022
Space robot - (Course Project) Using the space robot to capture the target satellite that is disabled and spinning, then stabilize and fix it up

Space robot - (Course Project) Using the space robot to capture the target satellite that is disabled and spinning, then stabilize and fix it up

Mingrui Yu 3 Jan 7, 2022
True per-item rarity for Loot

True-Rarity True per-item rarity for Loot (For Adventurers) and More Loot A.K.A mLoot each out/true_rarity_{item_type}.json file contains probabilitie

Dan R. 3 Jul 26, 2022
Codes for SIGIR'22 Paper 'On-Device Next-Item Recommendation with Self-Supervised Knowledge Distillation'

OD-Rec Codes for SIGIR'22 Paper 'On-Device Next-Item Recommendation with Self-Supervised Knowledge Distillation' Paper, saved teacher models and Andro

Xin Xia 11 Nov 22, 2022
This repository contains the entire code for our work "Two-Timescale End-to-End Learning for Channel Acquisition and Hybrid Precoding"

Two-Timescale-DNN Two-Timescale End-to-End Learning for Channel Acquisition and Hybrid Precoding This repository contains the entire code for our work

QiyuHu 3 Mar 7, 2022