Home

Awesome

Deep Open Intent Classification with Adaptive Decision Boundary

A method to automatically learn the adaptive decision boundary (ADB) for open world classification.

The proposed method together with baselines are also integrated into the open intent detection module in our another scalable framework TEXTOIR, enjoy it!

Introduction

This repository provides the official PyTorch implementation of the research paper Deep Open Intent Classification with Adaptive Decision Boundary (Accepted by AAAI2021).

Related works can refer to the reading list.

Dependencies

We use anaconda to create python environment:

conda create --name python=3.6

Install all required libraries:

pip install -r requirements.txt

Model Preparation

Download the pre-trained bert model (bert-base-uncased) from the following link:
Baidu Cloud Drive with code: v8tk

Set the path of the uncased-bert model (parameter "bert_model" in init_parameter.py).

Usage

Run the experiments by:

sh scripts/run.sh

You can change the parameters in the script. The selected parameters are as follows:

dataset: clinc | banking | oos (default)
known_class_ratio: 0.25 | 0.5 | 0.75 (default)
labeled_ratio: 0.2 | 0.4 | 0.6 | 0.8 | 1.0 (default) 

Model

The model architecture of ADB: Model

Results

The detailed results can be seen in results.md.

Overall Performance

BANKINGOOSStackOverflow
KIR*MethodsAccuracyF1-scoreAccuracyF1-scoreAccuracyF1-score
25%MSP43.6750.0947.0247.6228.6737.85
DOC56.9958.0374.9766.3742.7447.73
OpenMax49.9454.1468.5061.9940.2845.98
DeepUnk64.2161.3681.4371.1647.8452.05
ADB78.8571.6287.5977.1986.7280.83
50%MSP59.7371.1862.9670.4152.4263.01
DOC64.8173.1277.1678.2652.5362.84
OpenMax65.3174.2480.1180.5660.3568.18
DeepUnk72.7377.5383.3582.1658.9868.01
ADB78.8680.9086.5485.0586.4085.83
75%MSP75.8983.6074.0782.3872.1777.95
DOC76.7783.3478.7383.5968.9175.06
OpenMax77.4584.0776.8073.1674.4279.78
DeepUnk78.5284.3183.7186.2372.3378.28
ADB81.0885.9686.3288.5382.7885.99

*KIR means "Known Intent Ratio".

Fine-grained Performance

BANKINGOOSStackOverflow
KIRMethodsOpenKnownOpenKnownOpenKnown
25%MSP41.4350.5550.8847.5313.0342.82
DOC61.4257.8581.9865.9641.2549.02
OpenMax51.3254.2875.7661.6236.4147.89
DeepUnk70.4460.8887.3370.7349.2952.60
ADB84.5670.9491.8476.8090.8878.82
50%MSP41.1971.9757.6270.5823.9966.91
DOC55.1473.5979.0078.2525.4466.58
OpenMax54.3374.7681.8980.5445.0070.49
DeepUnk69.5377.7485.8582.1143.0170.51
ADB78.4480.9688.6585.0087.3485.68
75%MSP39.2384.3659.0882.5933.9680.88
DOC50.6083.9172.8783.6916.7678.95
OpenMax50.8584.6476.3573.1344.8782.11
DeepUnk58.5484.7581.1586.2737.5981.00
ADB66.4786.2983.9288.5873.8686.80

“Open” and “Known” denote the macro f1-score over open class and known classes respectively.

If you are insterested in this work, and want to use the codes or results in this repository, please star this repository and cite by:

@article{Zhang_Xu_Lin_2021, 
      title={Deep Open Intent Classification with Adaptive Decision Boundary}, 
      volume={35}, 
      number={16}, 
      journal={Proceedings of the AAAI Conference on Artificial Intelligence}, 
      author={Zhang, Hanlei and Xu, Hua and Lin, Ting-En}, 
      year={2021}, 
      month={May}, 
      pages={14374-14382} 
}

Acknowledgments

This paper is founded by seed fund of Tsinghua University (Department of Computer Science and Technology)- Siemens Ltd., China Joint Research Center for Industrial Intelligence and Internet of Things.