Git Product home page Git Product logo

smdn's Introduction

SMDN: SofterMax and Deep Novelty detection

This repository contains the implementation of the research paper A post-processing framework for detecting unknown intent of dialogue system via pre-trained deep neural network classifier, submitted to Knowledge-based Systems by Tingen Lin, Hua Xu

In this paper, we propose SofterMax and deep novelty detection (SMDN), a simple yet effective post-processing method for detecting unknown intent in dialogue systems based on pre-trained deep neural network classifiers . We calibrate the confidence of DNN classifier via temperature scaling to make more reasonable/conservative prediction. Here is an example illustrating the difference between Softmax and SofterMax:

softermax

The architecture of the proposed SMDN method for the single-turn dialogue system.

Multi-turn

The architecture of the proposed SMDN method for the multi-turn dialogue system.

Single-turn

Usage

  1. Install all required library
pip install -r requirements.txt
  1. Unzip and preprocess SwDA dataset (and download your GloVe embedding & change the path in file)
unzip data/swda.zip
python preprocessing_swda.py
  1. Get the pre-trained intent classifiers with different settings
python train.py

or you can get a single pre-trained classifier with

python train_BiLSTM.py <dataset> <proportion>
python train_BiLSTM-DOC.py <dataset> <proportion>
python train_HCNN.py <proportion>
python train_HCNN-DOC.py <proportion>
  1. Evaluate the results with different detection method (DOC, SofterMax, LOF, SMDN, ...)
python eval.py

or you can get a single result with

python eval_BiLSTM.py <dataset> <proportion>
python eval_BiLSTM-DOC.py <dataset> <proportion>
python eval_HCNN.py <proportion>
python eval_HCNN-DOC.py <proportion>

Result

% of known intents 25% 50% 75% 25% 50% 75% 25% 50% 75%
Datasets SNIPS ATIS SwDA
Softmax (t=0.5) - 6.15 8.32 8.14 15.3 17.2 19.3 18.4 8.36
DOC 72.5 67.9 63.9 61.6 63.8 37.7 25.4 19.6 7.63
DOC (Softmax) 72.8 65.7 61.8 63.6 63.3 39.7 23.6 18.9 7.67
SofterMax 78.8 70.5 67.2 67.2 65.5 40.7 28.0 20.7 7.51
LOF 76.0 69.4 65.8 67.3 61.8 38.9 21.1 12.7 4.50
SMDN 79.8 73.0 71.0 71.1 66.6 41.7 20.8 18.4 8.44

Confusion matrix for SMDN experiment results on three different datasets

SNIPS ATIS SwDA

smdn's People

Contributors

tnlin avatar

Stargazers

 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.