ACL2021
Unsupervised Out-of-Domain Detection via Pre-trained Transformers
Keyang Xu, Tongzheng Ren, Shikun Zhang, Yihao Feng, Caiming Xiong
摘要
Deployed real-world machine learning applications are often subject to uncontrolled and even potentially malicious inputs. Those outof-domain inputs can lead to unpredictable outputs and sometimes catastrophic safety issues. Prior studies on out-of-domain detection require in-domain task labels and are limited to supervised classification scenarios. Our work tackles the problem of detecting out-ofdomain samples with only unsupervised indomain data. We utilize the latent representations of pre-trained transformers and propose a simple yet effective method to transform features across all layers to construct outof-domain detectors efficiently. Two domainspecific fine-tuning approaches are further proposed to boost detection accuracy. Our empirical evaluations of related methods on two datasets validate that our method greatly improves out-of-domain detection ability in a more general scenario. 1