Home

Awesome

TEXT Open Intent Recognition (TEXTOIR)

TEXTOIR is the first high-quality Text Open Intent Recognition platform. This repo contains a convenient toolkit with extensible interfaces, integrating a series of state-of-the-art algorithms of two tasks (open intent detection and open intent discovery). We also release the pipeline framework and the visualized platform in the repo TEXTOIR-DEMO.

Introduction

TEXTOIR aims to provide a convenience toolkit for researchers to reproduce the related text open classification and clustering methods. It contains two tasks, which are defined as open intent detection and open intent discovery. Open intent detection aims to identify n-class known intents, and detect one-class open intent. Open intent discovery aims to leverage limited prior knowledge of known intents to find fine-grained known and open intent-wise clusters. Related papers and codes are collected in our previous released reading list.

Open Intent Recognition:
Example

Updates 🔥 🔥 🔥

DateAnnouncements
12/2023🎆 🎆 New paper and SOTA in Open Intent Discovery. Refer to the directory USNID for the codes. Read the paper -- A Clustering Framework for Unsupervised and Semi-supervised New Intent Discovery (Published in IEEE TKDE 2023).
04/2023🎆 🎆 New paper and SOTA in Open Intent Detection. Refer to the directory DA-ADB for the codes. Read the paper -- Learning Discriminative Representations and Decision Boundaries for Open Intent Detection (Published in IEEE/ACM TASLP 2023).
09/2021🎆 🎆 The first integrated and visualized platform for text Open Intent Recognition TEXTOIR has been released. Refer to the directory TEXTOIR-DEMO for the demo codes. Read our paper TEXTOIR: An Integrated and Visualized Platform for Text Open Intent Recognition (Published in ACL 2021).
05/2021New paper and baselines DeepAligned in Open Intent Discovery have been released. Read our paper Discovering New Intents with Deep Aligned Clustering (Published in AAAI 2021).
05/2021New paper and baselines ADB in Open Intent Detection have been released. Read our paper Deep Open Intent Classification with Adaptive Decision Boundary (Published in AAAI 2021).
05/2020New paper and baselines CDAC+ in Open Intent Discovery have been released. Read our paper Discovering New Intents via Constrained Deep Adaptive Clustering with Cluster Refinement (Published in AAAI 2020).
07/2019New paper and baselines DeepUNK in Open Intent Detection have been released. Read our paper Deep Unknown Intent Detection with Margin Loss (Published in ACL 2019).

We strongly recommend you to use our TEXTOIR toolkit, which has standard and unified interfaces (especially data setting) to obtain fair and persuable results on benchmark intent datasets!

Benchmark Datasets

DatasetsSource
BANKINGPaper
OOS / CLINC150Paper
StackOverflowPaper

Integrated Models

Open Intent Detection

Model NameSourcePublished
OpenMax*Paper CodeCVPR 2016
MSPPaper CodeICLR 2017
DOCPaper CodeEMNLP 2017
DeepUnkPaper CodeACL 2019
SEGPaper CodeACL 2020
ADBPaper CodeAAAI 2021
(K+1)-wayPaper CodeACL 2021
MDFPaper CodeACL 2021
ARPL*Paper CodeIEEE TPAMI 2022
KNNCLPaper CodeACL 2022
DA-ADBPaper CodeIEEE/ACM TASLP 2023

New Intent Discovery

SettingModel NameSourcePublished
UnsupervisedKMPaperBSMSP 1967
UnsupervisedAGPaperPR 1978
UnsupervisedSAE-KMPaperJMLR 2010
UnsupervisedDECPaper CodeICML 2016
UnsupervisedDCNPaper CodeICML 2017
UnsupervisedCCPaper CodeAAAI 2021
UnsupervisedSCCLPaper CodeNAACL 2021
UnsupervisedUSNIDPaper CodeIEEE TKDE 2023
Semi-supervisedKCL*Paper CodeICLR 2018
Semi-supervisedMCL*Paper CodeICLR 2019
Semi-supervisedDTC*Paper CodeICCV 2019
Semi-supervisedCDAC+Paper CodeAAAI 2020
Semi-supervisedDeepAlignedPaper CodeAAAI 2021
Semi-supervisedGCDPaper CodeCVPR 2022
Semi-supervisedMTP-CLNNPaper CodeACL 2022
Semi-supervisedUSNIDPaper CodeIEEE TKDE 2023

(* denotes the CV model replaced with the BERT backbone)

Quick Start

  1. Use anaconda to create Python (version >= 3.6) environment
conda create --name textoir python=3.6
conda activate textoir
  1. Install PyTorch (Cuda version 11.2)
conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch -c conda-forge  
  1. Clone the TEXTOIR repository, and choose the task (Take open intent detection as an example).
git clone git@github.com:thuiar/TEXTOIR.git
cd TEXTOIR
cd open_intent_detection
  1. Install related environmental dependencies
pip install -r requirements.txt
  1. Run examples (Take ADB as an example)
sh examples/run_ADB.sh

Extensibility

This toolkit is extensible and supports adding new methods, datasets, configurations, backbones, dataloaders, losses conveniently. More detailed information can be seen in the tutorials of the directories open_intent_detection and open_intent_discovery.

<!-- ### Extensibility This toolkit is extensible and supports adding new methods, datasets, configurations, backbones, dataloaders, losses conveniently. More detailed information can be seen in the directory [open_intent_detection](./open_intent_detection/README.md) and [open_intent_discovery](./open_intent_discovery/README.md) respectively. ### Reliability The codes in this repo have been confirmed and are reliable. The experimental results are close to the reported ones in our AAAI 2021 papers [Discovering New Intents with DeepAligned Clustering](https://ojs.aaai.org/index.php/AAAI/article/view/17689) and [Deep Open Intent Classification with Adaptive Decision Boundary](https://ojs.aaai.org/index.php/AAAI/article/view/17690). Note that the results of some methods may fluctuate in a small range due to the selected random seeds, hyper-parameters, optimizers, etc. The final results are the average of 10 random seeds to reduce the influence of different selected known classes. -->

Citations

If this work is helpful, or you want to use the codes and results in this repo, please cite the following papers:

@inproceedings{zhang-etal-2021-textoir,
    title = "{TEXTOIR}: An Integrated and Visualized Platform for Text Open Intent Recognition",
    author = "Zhang, Hanlei  and Li, Xiaoteng  and Xu, Hua  and Zhang, Panpan and Zhao, Kang  and Gao, Kai",
    booktitle = "Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing: System Demonstrations",
    pages = "167--174",
    year = "2021",
    url = "https://aclanthology.org/2021.acl-demo.20",
    doi = "10.18653/v1/2021.acl-demo.20",
}
@article{DA-ADB, 
    title = {Learning Discriminative Representations and Decision Boundaries for Open Intent Detection},  
    author = {Zhang, Hanlei and Xu, Hua and Zhao, Shaojie and Zhou, Qianrui}, 
    journal = {IEEE/ACM Transactions on Audio, Speech, and Language Processing},  
    volume = {31},
    pages = {1611-1623},
    year = {2023}, 
    doi = {10.1109/TASLP.2023.3265203} 
} 
@ARTICLE{USNID,
  author={Zhang, Hanlei and Xu, Hua and Wang, Xin and Long, Fei and Gao, Kai},
  journal={IEEE Transactions on Knowledge and Data Engineering}, 
  title={A Clustering Framework for Unsupervised and Semi-supervised New Intent Discovery}, 
  year={2023},
  doi={10.1109/TKDE.2023.3340732}
} 

Contributors

Hanlei Zhang, Shaojie Zhao, Xin Wang, Ting-En Lin, Qianrui Zhou, Huisheng Mao.

Bugs or questions?

If you have any questions, please open issues and illustrate your problems as detailed as possible. If you want to integrate your method in our repo, please feel free to pull request!