Understanding, Detecting, and Separating Out-of-Distribution Samples and Adversarial Samples in Text Classification

04/09/2022
by   Cheng-Han Chiang, et al.
0

In this paper, we study the differences and commonalities between statistically out-of-distribution (OOD) samples and adversarial (Adv) samples, both of which hurting a text classification model's performance. We conduct analyses to compare the two types of anomalies (OOD and Adv samples) with the in-distribution (ID) ones from three aspects: the input features, the hidden representations in each layer of the model, and the output probability distributions of the classifier. We find that OOD samples expose their aberration starting from the first layer, while the abnormalities of Adv samples do not emerge until the deeper layers of the model. We also illustrate that the models' output probabilities for Adv samples tend to be more unconfident. Based on our observations, we propose a simple method to separate ID, OOD, and Adv samples using the hidden representations and output probabilities of the model. On multiple combinations of ID, OOD datasets, and Adv attacks, our proposed method shows exceptional results on distinguishing ID, OOD, and Adv samples.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/18/2023

Pseudo Outlier Exposure for Out-of-Distribution Detection using Pretrained Transformers

For real-world language applications, detecting an out-of-distribution (...
research
06/19/2022

Supervision Adaptation Balances In-Distribution Generalization and Out-of-Distribution Detection

When there is a discrepancy between in-distribution (ID) samples and out...
research
01/07/2021

Bridging In- and Out-of-distribution Samples for Their Better Discriminability

This paper proposes a method for OOD detection. Questioning the premise ...
research
10/31/2017

Grouping-By-ID: Guarding Against Adversarial Domain Shifts

When training a deep network for image classification, one can broadly d...
research
10/06/2021

A Uniform Framework for Anomaly Detection in Deep Neural Networks

Deep neural networks (DNN) can achieve high performance when applied to ...
research
12/22/2021

GAN Based Boundary Aware Classifier for Detecting Out-of-distribution Samples

This paper focuses on the problem of detecting out-of-distribution (ood)...
research
06/01/2023

Estimating Semantic Similarity between In-Domain and Out-of-Domain Samples

Prior work typically describes out-of-domain (OOD) or out-of-distributio...

Please sign up or login with your details

Forgot password? Click here to reset