GithubHelp home page GithubHelp logo

hyeongjun-jang / cr-walker_code Goto Github PK

View Code? Open in Web Editor NEW

This project forked from truthless11/cr-walker

0.0 0.0 0.0 165 KB

Conversational Recommender System with Tree-structured Graph Reasoning and Dialog Acts

Python 100.00%

cr-walker_code's Introduction

CR-Walker

Code for paper "CR-Walker: Conversational Recommender System with Tree-structured Graph Reasoning and Dialog Acts" EMNLP 2021.

you can find our paper at arxiv.

Cite this paper:

@inproceedings{ma2021crwalker,
  title={CR-Walker: Tree-Structured Graph Reasoning and Dialog Acts for Conversational Recommendation},
  author={Ma, Wenchang and Takanobu, Ryuichi and Huang, Minlie},
  booktitle={Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing},
  pages={1839--1851},
  year={2021},
  organization={ACL}
}

Data

  • google link to raw data and our model checkpoints. Table of content:

    CR-Walker
    ├─data
    │  ├─gorecdial
    │  │  └─raw
    │  ├─gorecdial_gpt
    │  ├─redial
    │  │  └─raw
    │  └─redial_gpt
    └─saved
    
  • download to [your home directory]/CR-Walker/.

Train

  • For GoRecdial:

    python train_gorecdial.py --option train --model_name <your_model_name> --pretrain
    
  • For Redial:

    python train_redial.py --option train --model_name <your_model_name> --pretrain 
    

    We implemented an MIM pretraining stage similar to KGSF to accelerate training. Also, we provided option of adding wordnet features by adding "--word_net" as command line option.

Test Recommendation

  • For GoRecdial

    python train_gorecdial.py --option test --model_name gorecdial_reason_128
    
  • For Redial:

    python train_redial.py --option test --model_name redial_reason_128
    

    You can directly evaluate the best model checkpoints for the two datasets that we provided. The results may slightly differ from the paper since we re-trained the model. Note that the reasoning width ('sample' argument in conf.py) has been set to 1 for speed during training. You can tune it larger along with the selection threshold ('threshold' argument in conf.py) to yield better performance.

Test Generation

  • For GoRecdial

    python train_gorecdial.py --option test_gen --model_name gorecdial_reason_128
    
  • For Redial:

    python train_redial.py --option test_gen --model_name redial_reason_128
    

    Similarly, you can tune the selection threshold, reasoning width and max number of leaf nodes ('max_leaf' argument in conf.py) to control generation.

Requirements

python==3.6.10

pytorch==1.4.0

torch_geometric==1.6.0

cr-walker_code's People

Contributors

arthurma71 avatar truthless11 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.