Home

Awesome

Deep Unknown Intent Detection with Margin Loss

Implementation of the research paper Deep Unknown Intent Detection with Margin Loss (ACL2019)

Identifying the unknown (novel) user intents that have never appeared in the training set is a challenging task in the dialogue system. In this paper, we present a two-stage method for detecting unknown intents. We use bidirectional long short-term memory (BiLSTM) network with the margin loss as the feature extractor.

With margin loss, we can learn discriminative deep features by forcing the network to maximize inter-class variance and to minimize intra-class variance. Then, we feed the feature vectors to the density-based novelty detection algorithm, local outlier factor (LOF), to detect unknown intents.

The architecture of the proposed method:

Architecture

Usage

  1. Install all required library
pip install -r requirements.txt
  1. Get the GloVe embedding and modify the embedding_path in experiment.py/ipynb
wget http://nlp.stanford.edu/data/glove.6B.zip
unzip glove.6B.zip
  1. Run the experiments by:
python experiment.py <dataset> <proportion>
python experiment.py SNIPS 50
python experiment.py ATIS 25

Result

% of known intents25%50%75%25%50%75%
SNIPSATIS
MSP-6.28.38.115.317.2
DOC72.567.963.961.662.837.7
DOC (Softmax)72.865.761.863.663.338.7
LOF (Softmax)76.069.465.867.361.838.9
LOF (LMCL)79.284.178.869.663.439.6

Citation

If you mentioned the method in your research, please cite this article:

@inproceedings{lin-xu-2019-deep,
    title = "Deep Unknown Intent Detection with Margin Loss",
    author = "Lin, Ting-En  and
      Xu, Hua",
    booktitle = "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",
    month = jul,
    year = "2019",
    address = "Florence, Italy",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/P19-1548",
    pages = "5491--5496",
}