Home

Awesome

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 intents25%50%75%25%50%75%25%50%75%
DatasetsSNIPSATISSwDA
Softmax (t=0.5)-6.158.328.1415.317.219.318.48.36
DOC72.567.963.961.663.837.725.419.67.63
DOC (Softmax)72.865.761.863.663.339.723.618.97.67
SofterMax78.870.567.267.265.540.728.020.77.51
LOF76.069.465.867.361.838.921.112.74.50
SMDN79.873.071.071.166.641.720.818.48.44

Confusion matrix for SMDN experiment results on three different datasets

SNIPS ATIS SwDA