Coder Social home page Coder Social logo

ctir's Introduction

CTIR (Learning Class-Transductive Intent Representations for Zero-shot Intent Detection)

Here is the implementation of our IJCAI-2021 Learning Class-Transductive Intent Representations for Zero-shot Intent Detection.

The Appendix mentioned in this paper are shown in Appendix.pdf

image

This repository contains code modified from here for CapsNet+CTIR, here for ZSDNN+CTIR and here for +LOF+CTIR, many thanks!

Download the Glove embedding file

cd data/nlu_data

You can download the Glove embedding file we used from here.

Train & Test (CapsNet+CTIR)

cd capsnet-CTIR

image

Train & Test for SNIP dataset in the ZSID setting

python main.py SNIP ZSID

Train & Test for SNIP dataset in the GZSID setting

python main.py SNIP GZSID

Train & Test for CLINC dataset in the ZSID setting

python main.py CLINC ZSID

Train & Test for CLINC dataset in the GZSID setting

python main.py CLINC GZSID

Train & Test (ZSDNN+CTIR)

cd zerodnn-CTIR

image

Train & Test for SNIP dataset in the ZSID setting

python zerodnn_main.py SNIP ZSID

Train & Test for SNIP dataset in the GZSID setting

python zerodnn_main.py SNIP GZSID

Train & Test for CLINC dataset in the ZSID setting

python zerodnn_main.py CLINC ZSID

Train & Test for CLINC dataset in the GZSID setting

python zerodnn_main.py CLINC GZSID

Train & Test (+LOF+CTIR in the GZSID setting)

The main idea of two-stage method for GZSID is to first determine whether an utterance belongs to unseen intents (i.e., Y_seen ), and then classify it into a specific intent class. This method bypasses the need to classify an input sentence among all the seen and unseen intents, thereby alleviating the domain shift problem. To verify the performance of integrating CTIR into the two-stage method, we design a new two-stage pipeline (+LOF+CTIR ). In Phase 1, a test utterance is classified into one of the classes from Y_seen ∪ { y_unseen } using the density-based algorithm LOF(LMCL) (refer here). In Phase2, we perform ZSID for the utterances that have been classified into y_unseen , using the CTIR methods such as CapsNet+CTIR, ZSDNN+CTIR.

Reference

If you found this code is useful, please cite the following paper:

@article{si2020learning,
  title={Learning Disentangled Intent Representations for Zero-shot Intent Detection},
  author={Si, Qingyi and Liu, Yuanxin and Fu, Peng and Li, Jiangnan and Lin, Zheng and Wang, Weiping},
  journal={arXiv preprint arXiv:2012.01721},
  year={2020}
}

ctir's People

Contributors

phoebussi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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