Home

Awesome

Discovering New Intents with Deep Aligned Clustering

A deep aligned clustering method to discover new intents.

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

Introduction

This repository provides the official PyTorch implementation of the research paper Discovering New Intents with Deep Aligned Clustering (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

Get the pre-trained BERT model and convert it into Pytorch.

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
factor_of_clusters: 1 (default) | 2 | 3 | 4 
known_class_ratio: 0.25 | 0.5 | 0.75 (default)

Model

The model architecture of DeepAligned: Model

Results

The detailed results can be seen in known_intent_ratio_results.csv and k_results.csv.

Main experiments

CLINCBANKING
MethodNMIARIACCNMIARIACC
KM70.8926.8645.0654.5712.1829.55
AG73.0727.7044.0357.0713.3131.58
SAE-KM73.1329.9546.7563.7922.8538.92
DEC74.8327.4646.8967.7827.2141.29
DCN75.6631.1549.2967.5426.8141.99
DAC78.4040.4955.9447.3514.2427.41
DeepCluster65.5819.1135.7041.778.9520.69
PCK-means68.7035.4054.6148.2216.2432.66
BERT-KCL86.8258.7968.8675.2146.7260.15
BERT-MCL87.7259.9269.6675.6847.4361.14
CDAC+86.6554.3369.8972.2540.9753.83
BERT-DTC90.5465.0274.1576.5544.7056.51
DeepAligned93.8979.7586.4979.5653.6464.90

Ablation study

MethodCLINCBANKING
MethodNMIARIACCNMIARIACC
w/o Pre + Reinit57.809.6323.0234.344.4913.67
w/o Pre + Align62.5314.1028.6336.915.2315.42
Pre + Reinit82.9045.6755.8068.1231.5641.32
Pre + Align93.8979.7586.4979.5653.6464.90

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_Lyu_2021, 
    title={Discovering New Intents with Deep Aligned Clustering}, 
    volume={35}, 
    number={16}, 
    journal={Proceedings of the AAAI Conference on Artificial Intelligence}, 
    author={Zhang, Hanlei and Xu, Hua and Lin, Ting-En and Lyu, Rui}, 
    year={2021}, 
    month={May}, 
    pages={14365-14373}
}

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.