Enhancing The Reliability Of Out-Of-Distribution Image Detection In Neural Networks

이상민·2022년 5월 10일
0

Language translation

목록 보기
10/12

Enhancing The Reliability Of Out-Of-Distribution Image Detection In Neural Networks

발표일 : 2022-05-08

ABSTRACT
We consider the problem of detecting out-of-distribution images in neural networks.
우리는 신경망의 분포 외 이미지를 탐지하는 문제를 고려한다.

We propose ODIN, a simple and effective method that does not require any change to a pre-trained neural network.
우리는 사전 훈련된 신경망에 대한 어떠한 변경도 필요하지 않은 간단하고 효과적인 방법인 ODIN을 제안한다.

Our method is based on the observation that using temperature scaling and adding small perturbations to the input can separate the softmax score distributions between in- and out-of-distribution images, allowing for more effective detection.
우리의 방법은 온도 스케일링을 사용하고 입력에 작은 섭동을 추가하면 배포 내 이미지와 배포 외 이미지 사이의 소프트맥스 점수 분포를 분리할 수 있어 더 효과적인 탐지가 가능하다는 관찰을 기반으로 한다.

Temperature Scaling 
: 매우 간단해 많이 사용된다. 기존에 많이 사용되는 calibration 방법들이 scaling 에 기반한 것은 착안하여, scalar (>1) 값을 가진 scalar 로 마지막 logit 값을 나눠주고, softmax/sigmoid 를 통과시키는, 가장 간단한 방식의 scaling 을 한다. softmax/sigmoid 가 exponential 하기 때문에, 큰 값에 민감하게 반응하며, 같은 방식으로 조금만 그 값을 줄여도 그 값이 기하급수적으로 준다. 따라서 scale 방식은 vector norm 을 줄이고, over-confidence 를 줄이는 데에 효과적이다. 또한, 양의 값으로 나눠주기 때문에, classification error 에 영향을 주지 않는다.

perturbations : 작은 변화들

We show in a series of experiments that ODIN is compatible with diverse network architectures and datasets.
우리는 일련의 실험에서 ODIN이 다양한 네트워크 아키텍처 및 데이터 세트와 호환된다는 것을 보여줍니다.

It consistently outperforms the baseline approach (Hendrycks & Gimpel, 2017) by a large margin, establishing a new state-of-the-art performance on this task.
그것은 지속적으로 기준 접근 방식(Hendrycks & Gimpel, 2017)을 크게 능가하여 이 작업에 대한 새로운 최첨단 성과를 확립한다.

For example, ODIN reduces the false positive rate from the baseline 34.7% to 4.3% on the DenseNet (applied to CIFAR-10 and Tiny-ImageNet) when the true positive rate is 95%.
예를 들어, ODIN은 실제 양의 비율이 95%일 때 DenseNet(CIAR-10 및 Tiny-ImageNet에 적용)에서 기준 34.7%에서 4.3%로 거짓 양의 비율을 감소시킨다.

INTRODUCTION
Modern neural networks are known to generalize well when the training and testing data are sampled from the same distribution (Krizhevsky et al., 2012; Simonyan & Zisserman, 2015; He et al., 2016; Cho et al., 2014; Zhang et al., 2017).
현대 신경망은 훈련 및 테스트 데이터가 동일한 분포에서 샘플링될 때 잘 일반화하는 것으로 알려져 있다(Krizhevsky et al., 2012; Simonyan & Zisserman, 2015; He et al., 2016; Cho et al., 2014; Zhang et al., 2017).

However, when deploying neural networks in real-world applications, there is often very little control over the testing data distribution.
그러나, 실제 애플리케이션에 신경망을 배포할 때, 종종 테스트 데이터 배포에 대한 통제가 거의 없다.

Recent works have shown that neural networks tend to make high confidence predictions even for completely unrecognizable (Nguyen et al., 2015) or irrelevant inputs (Hendrycks & Gimpel, 2017; Szegedy et al., 2014; Moosavi-Dezfooli et al., 2017).
최근 연구에 따르면 신경망은 완전히 인식할 수 없는(Nguyen et al., 2015) 또는 관련 없는 입력에도 높은 신뢰 예측을 하는 경향이 있다(Hendrycks & Gimpel, 2017; Szegedy et al., 2014; Moosavi-Dezfooli et al., 2017).

It has been well documented (Amodei et al., 2016) that it is important for classifiers to be aware of uncertainty when shown new kinds of inputs, i.e., out-of- distribution examples.
분류자가 새로운 종류의 입력, 즉 배포 외 예제를 보여줄 때 불확실성을 인식하는 것이 중요하다고 잘 문서화되어 있다.

Therefore, being able to accurately detect out-of-distribution examples can be practically important for visual recognition tasks (Krizhevsky et al., 2012; Farabet et al., 2013; Ji et al., 2013).
따라서 분포 외 사례를 정확하게 탐지할 수 있는 것은 시각적 인식 작업에 실질적으로 중요할 수 있다(Krizhevsky et al., 2012; Farabet et al., 2013; Ji et al., 2013).

A seemingly straightforward approach of detecting out-of-distribution images is to enlarge the training set of both in- and out-of-distribution examples.
배포되지 않은 이미지를 탐지하는 간단한 접근 방식은 배포 내 및 배포 외 예제의 교육 세트를 확장하는 것이다.

However, the number of out-of-distribution examples can be infinitely many, making the re-training approach computationally expensive and intractable.
그러나 배포되지 않은 예제의 수는 무한히 많을 수 있으므로 재교육 접근법이 계산적으로 비싸고 다루기 어렵다.

Moreover, to ensure that a neural network accurately classifies in-distribution samples into correct classes while correctly detecting out-of-distribution samples, one might need to employ exceedingly large neural network architectures, which further complicates the training process.
또한, 신경망이 배포되지 않은 샘플을 정확하게 감지하는 동시에 배포되지 않은 샘플을 올바른 클래스로 정확하게 분류하기 위해, 매우 큰 신경망 아키텍처를 사용해야 할 수 있으며, 이는 훈련 과정을 더욱 복잡하게 한다.

Hendrycks & Gimpel proposed a baseline method to detect out-of-distribution examples without further re-training networks.
헨드릭스 & 김펠은 추가 네트워크 재교육 없이 배포되지 않은 예제를 탐지할 수 있는 기본 방법을 제안했다.

The method is based on an observation that a well-trained neural network tends to assign higher softmax scores to in-distribution examples than out-of-distribution examples.
이 방법은 잘 훈련된 신경망이 배포되지 않은 예보다 배포 중인 예제에 더 높은 소프트맥스 점수를 할당하는 경향이 있다는 관찰에 기초한다.

In this paper, we go further. We observe that after using temperature scaling in the softmax function (Hinton et al., 2015; Pereyra et al., 2017) and adding small controlled perturbations to inputs, the softmax score gap between in - and out-of-distribution examples is further enlarged.
이 논문에서 우리는 더 나아간다. 소프트맥스 함수(Hinton et al., 2015; Peeryra et al., 2017)에서 온도 스케일링을 사용하고 입력에 작은 제어된 섭동을 추가한 후, 분포 내 및 분포 외 예 사이의 소프트맥스 점수 차이가 더욱 커짐을 관찰한다.

We show that the combination of these two techniques (temperature scaling and input perturbation) can lead to better detection performance.
우리는 이 두 가지 기술(온도 스케일링 및 입력 섭동)의 결합이 더 나은 감지 성능을 가져올 수 있음을 보여준다.

For example, provided with a pre-trained DenseNet (Huang et al., 2016) on CIFAR-10 dataset (positive samples), we test against images from TinyImageNet dataset (negative samples).
예를 들어 CIFAR-10 데이터 세트(양성 샘플)에 대해 사전 훈련된 DenseNet(Huang 등, 2016)과 함께 제공된 경우 TinyImageNet 데이터 세트의 이미지(음성 샘플)에 대해 테스트한다.

Our method reduces the False Positive Rate (FPR), i.e., the fraction of misclassified out-of-distribution samples, from 34.7% to 4.3%, when 95% of in-distribution images are correctly classified.
우리의 방법은 분포 내 이미지의 95%가 올바르게 분류될 때 FPR(False Positive Rate) 즉, 잘못 분류된 분포 외 샘플의 비율을 34.7%에서 4.3%로 줄인다.

We summarize the main contributions of this paper as the following:
우리는 이 논문의 주요 기여를 다음과 같이 요약합니다:

We propose a simple and effective method, ODIN (Out-of-DIstribution detector for Neural networks), for detecting out-of-distribution examples in neural networks.
우리는 신경망에서 분포 외 사례를 탐지하기 위한 간단하고 효과적인 방법인 ODIN(뉴럴 네트워크용 분포 외 검출기)을 제안한다.

Our method does not require re-training the neural network and is easily implementable on any modern neural architecture.
우리의 방법은 신경망을 재교육할 필요가 없으며 현대 신경 구조에서 쉽게 구현할 수 있습니다.

We test ODIN on state-of-the-art network architectures (e.g., DenseNet (Huang et al., 2016) and Wide ResNet (Zagoruyko & Komodakis, 2016)) under a diverse set of in- and out-distribution dataset pairs.
우리는 다양한 유통 및 외 데이터 세트 쌍으로 최첨단 네트워크 아키텍처(예: DenseNet (Huang et al., 2016) 및 Wide ResNet (Zagoruyko & Komodakis, 2016))에서 ODIN을 테스트합니다.

We show ODIN can significantly improve the detection performance, and consistently outperforms the baseline method (Hendrycks & Gimpel, 2017) by a large margin.
우리는 ODIN이 탐지 성능을 크게 향상시킬 수 있으며, 기본 방법(Hendrycks & Gimpel, 2017)을 크게 능가한다는 것을 보여줍니다.

We empirically analyze how parameter settings affect the performance, and further provide simple analysis that provides some intuition behind our method.
우리는 매개 변수 설정이 성능에 어떤 영향을 미치는지 경험적으로 분석하고, 또한 우리의 방법 뒤에 약간의 직관을 제공하는 간단한 분석을 제공합니다.

The outline of this paper is as follows. In Section 2, we present the necessary definitions and the problem statement.
이 논문의 개요는 다음과 같다. 섹션 2에서, 우리는 필요한 정의와 문제 진술을 제시합니다.

In Section 3, we introduce ODIN and present performance results in Section 4.
섹션 3에서는 ODIN을 소개하고 섹션 4에서 성능 결과를 제시합니다.

We experimentally analyze the proposed method and provide some justification for our method in Section 5.
우리는 제안된 방법을 실험적으로 분석하고 섹션 5에서 우리의 방법에 대한 정당성을 제공합니다.

We summarize the related works and future directions in Section 6 and conclude the paper in Section 7.
우리는 섹션 6에서 관련 작품과 향후 방향을 요약하고 섹션 7에서 논문을 마무리합니다.

PROBLEM STATEMENT(문제 진술)

In this paper, we consider the problem of distinguishing in- and out-of-distribution images on a pretrained neural network.
본 논문에서는 사전 훈련된 신경망에서 배포 내 이미지와 배포 외 이미지를 구별하는 문제를 고려한다.

Let PX and QX denote two distinct data distributions defined on the image space X .
PX와 QX가 영상 공간 X에 정의된 두 개의 서로 다른 데이터 분포를 나타내도록 합니다.

Assume that a neural network f is trained on a dataset drawn from the distribution PX .
신경 네트워크 f가 분포 PX에서 도출된 데이터 세트에서 훈련된다고 가정한다.

We call PX the in-distribution and QX the out-distribution, respectively.
우리는 각각 PX를 in-distribution, QX를 out-distribution이라고 부른다.

In testing, we draw new images from a mixture distribution PX ×Z defined on X × {0, 1}, where the conditional probability distributions PX|Z=0 = PX and PX|Z=1 = QX denote in- and out-distribution respectively.
테스트에서, 우리는 조건부 확률 분포 PX|Z=0 = PX 및 PX|Z=1 = QX가 각각 내부 및 외부 분포를 나타내는 X × {0,1}에 정의된 혼합 분포에서 새로운 이미지를 도출한다.

We consider the following problem: Given an image X drawn from the mixture distribution PX ×Z , can we distinguish whether the image is from in-distribution PX or not?
다음 문제를 고려합니다. 혼합물 분포 PX × Z에서 그려진 이미지 X를 고려할 때, 이미지가 분포 내 PX인지 아닌지 구별할 수 있습니까?

In this paper, we focus on detecting out-of-distribution images.
본 논문에서는 배포되지 않은 이미지를 감지하는 데 중점을 둔다.

However, it is equally important to correctly classify an image into the right class if it is an in-distribution image.
그러나 이미지가 배포 중인 이미지인 경우 올바른 클래스로 올바르게 분류하는 것도 중요합니다.

But this can be easily done: once it has been detected that an image is in-distribution, we can simply use the original image and run it through the neural network to classify it.
그러나 이것은 쉽게 할 수 있다: 일단 이미지가 배포 중이라는 것이 감지되면, 우리는 단순히 원본 이미지를 사용하고 신경망을 통해 그것을 분류할 수 있다.

Thus, we do not change the predictions of the neural network for in-distribution images and only focus on improving the detection performance for out-of-distribution images.
따라서, 우리는 분포 내 이미지에 대한 신경망의 예측을 변경하지 않고 분포 외 이미지에 대한 감지 성능 향상에만 초점을 맞춘다.

ODIN: OUT-OF-DISTRIBUTION DETECTOR (분포 외 검출기)

In this section, we present our method, ODIN, for detecting out-of-distribution samples.
이 섹션에서는 분포 외 샘플을 탐지하기 위한 방법인 ODIN을 제시한다.

The detector is built on two components: temperature scaling and input preprocessing. We describe the details of both components below.
디텍터는 온도 스케일링과 입력 전처리라는 두 가지 구성 요소로 구성됩니다. 아래에 두 구성 요소에 대한 세부 정보가 설명되어 있습니다.

Temperature Scaling.
Assume that the neural network f = (f1, ..., fN ) is trained to classify N classes.
신경망 f = (f1, ..., fN)이 N개의 클래스를 분류하도록 훈련되었다고 가정하자.

For each input x, the neural network assigns a label yˆ(x) = arg maxi Si (x; T ) by computing the softmax output for each class. Specifically,
각 입력 x에 대해 신경망은 각 클래스에 대한 소프트맥스 출력을 계산하여 y²(x) = arg maxi Si(x;T)라는 레이블을 할당합니다. 특히,

where T ∈ R+ is the temperature scaling parameter and set to 1 during the training.
여기서 T r R+는 온도 스케일링 파라미터이며 교육 중에 1로 설정됩니다.

For a given input x, we call the maximum softmax probability, i.e., Syˆ(x; T ) = maxi Si(x; T ) the softmax score.
주어진 입력 x에 대해 최대 소프트맥스 확률, 즉 Syθ(x; T) = maxi Si(x; T)를 소프트맥스 점수라고 부른다.

In this paper, we use notations Syˆ(x; T ) and S(x; T ) interchangeably.
본 논문에서 우리는 주석 Sy((x;T)와 S(x;T)를 상호 교환적으로 사용한다.

Prior works have established the use of temperature scaling to distill the knowledge in neural networks (Hinton et al., 2015) and calibrate the prediction confidence in classification tasks (Guo et al., 2017).
이전 연구는 신경망의 지식을 증류하고(Hinton et al., 2015), 분류 작업에서 예측 신뢰도를 보정하기 위해 온도 스케일링을 사용하는 것을 확립했다(Guo et al., 2017).

As we shall see, using temperature scaling can separate the softmax scores between in- and out-of-distribution images, making out-of-distribution detection effective.
우리가 보게 될 것처럼, 온도 스케일링을 사용하면 배포 내 이미지와 배포 외 이미지 간에 소프트맥스 점수를 분리할 수 있어 배포 외 감지가 효과적이다.

Input Preprocessing.
In addition to temperature scaling, we preprocess the input by adding small perturbations:
온도 스케일링 외에도 작은 섭동을 추가하여 입력을 사전 처리한다.

where the parameter ε is the perturbation magnitude.
여기서 모수 ε 는 섭동 크기이다.

The method is inspired by the idea of adversarial examples (Goodfellow et al., 2015), where small perturbations are added to decrease the softmax score for the true label and force the neural network to make a wrong prediction.
이 방법은 작은 섭동이 추가되어 실제 레이블에 대한 소프트맥스 점수를 줄이고 신경망이 잘못된 예측을 하도록 하는 적대적 사례(Goodfellow et al., 2015)의 아이디어에서 영감을 받았다.

Here, our goal and setting are the opposite: we aim to increase the softmax score of any given input, without the need for a class label at all.
여기서 우리의 목표와 설정은 반대이다. 우리는 클래스 레이블이 전혀 필요 없이 주어진 입력의 소프트맥스 점수를 높이는 것을 목표로 한다.

As we shall see later, the perturbation can have stronger effect on the in- distribution images than that on out-of-distribution images, making them more separable.
나중에 보게 되겠지만, 섭동은 배포되지 않은 이미지보다 배포 중인 이미지에 더 강한 영향을 미칠 수 있으므로, 그것들을 더 분리할 수 있다.

Note that the perturbations can be easily computed by back-propagating the gradient of the cross-entropy loss w.r.t the input.
입력된 교차 엔트로피 손실 w.r.t의 기울기를 역전파함으로써 섭동을 쉽게 계산할 수 있다는 점에 유의한다.

Out-of-distribution Detector. (배포되지 않은 디텍터)
The detector combines the two components described above.
디텍터는 위에서 설명한 두 가지 구성 요소를 결합합니다.

For each image x, we first calculate the preprocessed image x ̃ according to the equation (2).
각 이미지 x에 대해 먼저 방정식 (2)에 따라 사전 처리된 이미지 x according를 계산합니다.

Next, we feed the preprocessed image x ̃ into the neural network, calculate its calibrated softmax score S(x ̃; T ) and compare the score to the threshold δ.
그런 다음, 우리는 사전 처리된 이미지 x into를 신경망으로 공급하고, 보정된 소프트맥스 점수 S(x t; T)를 계산하고, 점수를 임계값 δ과 비교한다.

An image x is classified as in-distribution if the softmax score is greater than the threshold and vice versa.
소프트맥스 점수가 임계값보다 크거나 그 반대일 경우 이미지 x는 배포 내로 분류됩니다.

Mathematically, the out-of-distribution detector can be described as
수학적으로 분포 외 검출기는 다음과 같이 설명할 수 있다.

The parameters T , ε and δ are chosen so that the true positive rate (i.e., the fraction of in-distribution images correctly classified as in-distribution images) is 95%.
매개 변수 T, α 및 β는 실제 양의 비율(즉, 분포 내 영상으로 올바르게 분류된 분포 내 영상의 부분)이 95%가 되도록 선택됩니다.

EXPERIMENTS (실험)

In this section, we demonstrate the effectiveness of ODIN on several computer vision benchmark datasets.
이 섹션에서는 여러 컴퓨터 비전 벤치마크 데이터 세트에 대한 ODIN의 효과를 보여준다.

We run all experiments with PyTorch1 and we release the code to reproduce all experimental results2 .
우리는 PyTorch1로 모든 실험을 실행하고 모든 실험 결과를 재현하는 코드를 공개한다.

4.1 TRAINING SETUP (실험 설정)

Architectures and training configurations. (아키텍처 및 교육 구성.)
We adopt two state-of-the-art neural network architectures, including DenseNet (Huang et al., 2016) and Wide ResNet (Zagoruyko & Komodakis, 2016).
우리는 DenseNet(Huang 등, 2016)과 Wide ResNet(Zagoruyko & Komodakis, 2016)을 포함한 두 개의 최첨단 신경망 아키텍처를 채택한다.

For DenseNet, our model follows the same setup as in (Huang et al., 2016), with depth L = 100, growth rate k = 12 (Dense-BC) and dropout rate 0.
DenseNet의 경우, 우리의 모델은 깊이 L = 100, 성장률 k = 12(Dense-BC) 및 탈락률 0으로 (Huang 등, 2016)과 동일한 설정을 따른다.

In addition, we evaluate the method on a Wide ResNet, with depth 28, width 10 (WRN-28-10) and dropout rate 0.
또한 깊이 28, 폭 10(WRN-28-10) 및 탈락률 0으로 Wide ResNet에서 방법을 평가한다.

The hyper-parameters of neural networks are set identical to the original Wide ResNet (Zagoruyko & Komodakis, 2016) and DenseNet (Huang et al., 2016) implementations.
신경망의 하이퍼 매개 변수는 원래의 Wide ResNet(자고루이코 & 코모다키스, 2016) 및 DenseNet(황 외, 2016) 구현과 동일하게 설정된다.

All neural networks are trained with stochastic gradient descent with Nesterov momentum (Duchi et al., 2011; Kingma & Ba, 2014).
모든 신경망은 네스테로프 운동량에 의한 확률적 경사 하강으로 훈련된다(Duchi et al., 2011; Kingma & Ba, 2014).

Specifically, we train Dense-BC for 300 epochs with batch size 64 and momentum 0.9; and Wide ResNet for 200 epochs with batch size 128 and momentum 0.9.
구체적으로, 배치 크기 64와 모멘텀 0.9로 300 에폭에 대해 Dense-BC를, 배치 크기 128과 모멘텀 0.9로 200 에폭에 대해 Wide ResNet을 훈련한다.

The learning rate starts at 0.1, and is dropped by a factor of 10 at 50% and 75% of the training progress, respectively.
학습률은 0.1에서 시작하여 훈련 진행률의 50%, 75%에서 각각 10배씩 떨어진다.

Accuracy of pre-trained networks. (사전 훈련된 네트워크의 정확성.)
Each neural network architecture is trained on CIFAR-10 (C-10) and CIFAR- 100 (C-100) datasets (Krizhevsky & Hinton, 2009), respectively.
각 신경망 아키텍처는 각각 CIFAR-10(C-10) 및 CIFAR-100(C-100) 데이터 세트(Krizhevsky & Hinton, 2009)에 대해 훈련된다.

CIFAR-10 and CIFAR-100 images are drawn from 10 and 100 classes, respectively.
CIFAR-10 및 CIFAR-100 영상은 각각 10개 클래스와 100개 클래스에서 그려집니다.

Both datasets consist of 50,000 training images and 10,000 test images.
두 데이터 세트는 모두 50,000개의 교육 이미지와 10,000개의 테스트 이미지로 구성된다.

The test error on CIFAR datasets are given in Table 1.
CIFAR 데이터 세트의 테스트 오류는 표 1에 나와 있다.


Table 1: Test error rates on CIFAR-10 and CIFAR-100 datasets.
표 1: CIFAR-10 및 CIFAR-100 데이터 세트에 대한 오류율 테스트


Table 2: Distinguishing in- and out-of-distribution test set data for image classification.
표 2: 이미지 분류를 위한 배포 내 및 배포 외 테스트 세트 데이터 구분

All values are percentages.
모든 값은 백분율입니다.
↑ indicates larger value is better, and ↓ indicates lower value is better.
↑는 값이 클수록 좋다는 것을 나타내고 ↓는 값이 작을수록 좋다는 것을 나타냅니다.
We use T = 1000 for all experiments.
모든 실험에 T = 1000을 사용합니다.
The noise magnitude ε was selected on a separate validation dataset, which is different from the out-of-distribution test sets.
노이즈 크기 ε는 별도의 검증 데이터 세트에서 선택되었으며, 이는 분포 외 테스트 세트와 다르다.
On CIFAR-10 pretrained model, we use ε = 0.0014 for all OOD test datasets; and ε = 0.002 for CIFAR-100 pretrained model.
CIFAR-10 사전 훈련 모델에서, 우리는 모든 OOD 테스트 데이터 세트에 대해 ε = 0.0014를 사용하고 CIFAR-100 사전 훈련 모델의 경우 ε = 0.002를 사용한다.

4.2 OUT-OF-DISTRIBUTION DATASETS (배포되지 않은 데이터 셋)
At test time, the test images from CIFAR-10 (CIFAR-100) datasets can be viewed as the in-distribution (positive) examples.
테스트 시 CIFAR-10(CIFAR-100) 데이터 세트의 테스트 이미지는 배포 내(양성) 예제로 볼 수 있다.

For out-of-distribution (negative) examples, we follow the setting in (Hendrycks & Gimpel, 2017) and test on several different natural image datasets and synthetic noise datasets.
분포 외(음성) 예제의 경우, 우리는 (Hendricks & Gimpel, 2017)의 설정을 따르고 몇 가지 다른 자연 이미지 데이터 세트와 합성 노이즈 데이터 세트에 대해 테스트한다.

We consider the following out-of-distribution test datasets.
우리는 다음과 같은 배포 외 테스트 데이터 세트를 고려한다.

(1) TinyImageNet.
The Tiny ImageNet dataset consists of a subset of ImageNet images (Deng et al., 2009).
Tiny ImageNet 데이터 세트는 ImageNet 이미지의 하위 집합으로 구성된다(Deng 등, 2009).

It contains 10,000 test images from 200 different classes.
그것은 200개의 다른 클래스의 10,000개의 테스트 이미지를 포함한다.

We construct two datasets, TinyImageNet (crop) and TinyImageNet (resize), by either randomly cropping image patches of size 32 × 32 or downsampling each image to size 32 × 32.
크기 32 × 32의 이미지 패치를 무작위로 자르거나 각 이미지를 크기 32 × 32로 다운샘플링하여 TinyImageNet(crop)과 TinyImageNet(크기 조정)이라는 두 개의 데이터 세트를 구성한다.

(2)  LSUN.
The Large-scale Scene Understanding dataset (LSUN) has a testing set of 10,000 images of 10 different scenes categories such as bedroom, kitchen room, living room, etc. (Yu et al., 2015).
LSUN(Large-scale Scene Underging dataset)은 침실, 부엌, 거실 등과 같은 10개의 다른 장면 범주의 10,000개의 이미지로 구성된 테스트 세트를 가지고 있다(Yu et al., 2015).

Similar to TinyImageNet, we construct two datasets, LSUN (crop) and LSUN (resize), by randomly cropping and downsampling the LSUN testing set, respectively.
TinyImageNet과 유사하게, 우리는 LSUN 테스트 세트를 각각 무작위로 자르고 다운샘플링하여 LSUN(크기)과 LSUN(크기 조정)이라는 두 개의 데이터 세트를 구성한다.

(3)  Gaussian Noise.
The synthetic Gaussian noise dataset consists of 10,000 random 2D Gaussian noise images, where each RGB value of every pixel is sampled from an i.i.d Gaussian distribution with mean 0.5 and unit variance.
합성 가우스 노이즈 데이터 세트는 10,000개의 랜덤 2D 가우스 노이즈 이미지로 구성되며, 여기서 모든 픽셀의 각 RGB 값은 평균 0.5 및 단위 분산을 갖는 가우스 분포에서 샘플링된다.

We further clip each pixel value into the range [0, 1].
또한 각 픽셀 값을 [0, 1] 범위로 클립합니다.

(4) Uniform Noise.
The synthetic uniform noise dataset consists of 10,000 images where each RGB value of every pixel is independently and identically sampled from a uniform distribution on [0, 1].
합성 균일한 노이즈 데이터 세트는 [0, 1]의 균일한 분포에서 각 픽셀의 RGB 값이 독립적으로 동일하게 샘플링되는 10,000개의 이미지로 구성된다.

For hyperparameter tuning, we use a separate validation dataset iSUN (Xu et al., 2015), which is independent from the OOD test datasets.
초 매개 변수 조정을 위해, 우리는 OOD 테스트 데이터 세트와 독립적인 별도의 검증 데이터 세트 iSUN(Xu 등, 2015)을 사용한다.

iSUN (Xu et al., 2015) consists of natural scene images.
iSUN(Xu et al., 2015)은 자연 장면 이미지로 구성됩니다.

We include the entire collection of 8925 images in iSUN and downsample each image to size 32 by 32.
우리는 iSUN에 8925개의 전체 이미지 컬렉션을 포함시키고 각 이미지를 32x32 크기로 다운샘플링한다.

4.3 EVALUATION METRICS (평가 지표)
We adopt the following four different metrics to measure the effectiveness of a neural network in distinguishing in- and out-of-distribution images.
우리는 배포 내 이미지와 배포 외 이미지를 구별하는 데 있어 신경망의 효과를 측정하기 위해 다음과 같은 네 가지 다른 메트릭을 채택한다.

(1) FPR at 95% TPR can be interpreted as the probability that a negative (out-of-distribution) example is misclassified as positive (in-distribution) when the true positive rate (TPR) is as high as 95%.
95% TPR에서 FPR은 실제 양성 비율(TPR)이 95%만큼 높을 때 음수(분포 외) 예제가 양성(분포 내)으로 잘못 분류될 확률로 해석될 수 있습니다.

(2) Detection Error, i.e., Pe measures the misclassification probability when TPR is 95%.
탐지 오류, 즉 Pe는 TPR이 95%일 때 오분류 확률을 측정합니다.

The definition of Pe is given by Pe = 0.5(1 − TPR) + 0.5FPR, where we assume that both positive and negative examples have the equal probability of appearing in the test set.
Pe의 정의는 Pe = 0.5 (1 - TPR) + 0.5로 주어진다.FPR, 여기서 우리는 양성 및 음성 예제가 모두 테스트 세트에 나타날 확률이 동일하다고 가정한다.

(3) AUROC is the Area Under the Receiver Operating Characteristic curve, which is also a threshold- independent metric (Davis & Goadrich, 2006).
AUOC는 수신기 작동 특성 곡선 아래의 영역이며, 임계값 독립 메트릭이기도 하다(Davis & Goadrich, 2006).

The ROC curve depicts the relationship between TPR and FPR.
ROC 곡선은 TPR과 FPR 사이의 관계를 나타냅니다.

The AUROC can be interpreted as the probability that a positive example is assigned a higher detection score than a negative example (Fawcett, 2006).
AUROC는 양의 예에 음의 예보다 높은 검출 점수가 할당될 확률로 해석할 수 있다(Fawcett, 2006).

A perfect detector corresponds to an AUROC score of 100%.
완벽한 검출기는 100%의 AUROC 점수에 해당합니다.

(4) AUPR is the Area under the Precision-Recall curve, which is another threshold independent metric (Manning et al., 1999; Saito & Rehmsmeier, 2015).
AUPR은 또 다른 임계 독립 메트릭인 정밀도-호출 곡선 아래의 영역이다(Manning et al., 1999; Saito & Rhemmeier, 2015).

The PR curve is a graph showing the precision=TP/(TP+FP) and recall=TP/(TP+FN) against each other.
PR 곡선은 정밀도를 나타내는 그래프입니다=TP/(TP+FP) 및 호출=TP/(TP+FN)가 서로 반대입니다.

The metric AUPR-In and AUPR-Out in Table 2 denote the area under the precision-recall curve where in-distribution and out-of-distribution images are specified as positives, respectively.
표 2의 메트릭 AUPR-In 및 AUPR-Out은 분포 내 이미지와 분포 외 이미지가 각각 양으로 지정된 정밀 리콜 곡선 아래의 영역을 나타냅니다.

4.4 EXPERIMENTAL RESULTS (실험 결과)
Comparison with baseline. (기준선과 비교)
In Figure 1, we show the ROC curves when DenseNet-BC-100 is evaluated on CIFAR-10 (positive) images against TinyImageNet (negative) test examples.
그림 1에서 우리는 TinyImageNet(음성) 테스트 예제에 대해 DenseNet-BC-100이 CIFAR-10(양성) 이미지에서 평가될 때 ROC 곡선을 보여준다.

The red curve corresponds to the ROC curve when using baseline method (Hendrycks & Gimpel, 2017), whereas the blue curve corresponds to ODIN.
빨간색 곡선은 기준 방법을 사용할 때 ROC 곡선에 해당하며(Hendricks & Gimpel, 2017), 파란색 곡선은 ODIN에 해당한다.

We observe a strikingly large gap between the blue and red ROC curves. 
우리는 파란색과 빨간색 ROC 곡선 사이의 현저한 차이를 관찰한다.

For example, when TPR= 95%, the FPR can be reduced from 34% to 4.2% by using our approach.
예를 들어 TPR= 95%일 때 우리의 접근 방식을 사용하면 FPR을 34%에서 4.2%로 줄일 수 있다.

Hyperparameters.
We use a separate OOD validation dataset for hyperparameter selection, which is independent from the OOD test datasets.
우리는 하이퍼 매개 변수 선택을 위해 별도의 OOD 검증 데이터 세트를 사용하는데, 이는 OOD 테스트 데이터 세트와 독립적이다.

For temperature T , we select among 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000; and for perturbation magnitude ε we choose from 21 evenly spaced numbers starting from 0 and ending at 0.004.
온도 T의 경우 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 중에서 선택하고 섭동 크기 α의 경우 0에서 시작하여 0.004로 끝나는 21개의 균등 간격 숫자 중에서 선택합니다.

The optimal parameters are chosen to minimize the FPR at TPR 95% on the validation OOD dataset.
최적의 매개 변수는 유효성 검사 OOD 데이터 세트에서 TPR 95%에서 FPR을 최소화하기 위해 선택된다.

Main results.
The main results are summarized in Table 2, where we use iSUN (Xu et al., 2015) as validation set.
주요 결과는 표 2에 요약되어 있으며, 여기서 iSUN(Xu 등, 2015)을 검증 세트로 사용한다.

We use T = 1000 for all settings.
모든 설정에 T = 1000을 사용합니다.

For DenseNet, we use ε = 0.0014 for CIFAR-10 and ε = 0.002 for CIFAR-100.
DenseNet의 경우 CIFAR-10의 경우 α = 0.0014를 사용하고 CIFAR-100의 경우 β = 0.002를 사용합니다.

We provide additional details on the effect of parameters in Section 5.
섹션 5에서 매개 변수의 영향에 대한 추가 세부 정보를 제공합니다.

For each in- and out-of-distribution dataset pair, we report both the performance of the baseline (Hendrycks & Gimpel, 2017) and ODIN.
각 배포 내 및 배포 외 데이터 세트 쌍에 대해 기준(Hendricks & Gimpel, 2017)과 ODIN의 성능을 모두 보고한다.

In Table 2, we observe significant performance improvement across all dataset pairs.
표 2에서, 우리는 모든 데이터 세트 쌍에서 상당한 성능 향상을 관찰한다.

Parameter transferability. (매개 변수 전송 가능성.)
In Table 3, we show how the parameters tuned on one validation set can generalize across datasets.
표 3에서 우리는 하나의 검증 세트에서 조정된 매개 변수가 데이터 세트 전체에서 어떻게 일반화될 수 있는지 보여준다.

Specifically, we tune the parameters using one validation dataset and then evaluated on the remaining OOD test datasets.
특히, 우리는 하나의 검증 데이터 세트를 사용하여 매개 변수를 조정한 다음 나머지 OOD 테스트 데이터 세트에서 평가한다.

The results are very similar across different validation sets, which suggests the insensitivity of our method w.r.t the tuning set.
결과는 서로 다른 검증 세트에서 매우 유사하며, 이는 튜닝 세트에 대한 우리 방법의 무감각성을 시사한다.


Figure 1 : (a) ROC curves of baseline (red) and our method (blue) on DenseNet-BC-100 network, where CIFAR-10 and TinyImageNet (crop) are in-and out of-distribution dataset, respectively.
그림 1: (a) CIFAR-10과 TinyImageNet(crop)이 각각 배포 데이터 세트 내 및 배포 외 데이터 세트인 DenseNet-BC-100 네트워크에서 기준(빨간색)과 우리의 방법(파란색)의 ROC 곡선.


Table 3: Detection performance using different validation OOD datasets.
표 3: 다양한 유효성 검사 OOD 데이터 세트를 사용한 탐지 성능

The hyperparameters are tuned using one validation dataset and then evaluate on the remaining OOD test datasets.
하이퍼 매개 변수는 하나의 검증 데이터 세트를 사용하여 조정된 다음 나머지 OOD 테스트 데이터 세트에서 평가한다.

The neural network is pre-trained on CIFAR-10.
신경망은 CIFAR-10에서 사전 훈련된다.

Data distributional distance vs. detection performance. (데이터 분포 거리 대 탐지 성능.)
To measure the statistical distance between in- and out-of-distribution datasets, we adopt a commonly used metric, maximum mean discrepancy (MMD) with Gaussian RBF kernel (Sriperumbudur et al., 2010; Gretton et al., 2012; Sutherland et al., 2016).
분포 내 데이터 세트와 분포 외 데이터 세트 사이의 통계 거리를 측정하기 위해 가우스 RBF 커널(Sriperumbudur et al., 2010; Gretton et al., 2012; Sutherland et al., 2016)과 함께 일반적으로 사용되는 메트릭, 최대 평균 불일치(MMMMD)를 채택한다.

Specifically, given two image sets, V = {v1, ..., vm} and W = {w1, ..., wm}, the maximum mean discrepancy between V and Q is defined as

where k(x,x’) is the Gaussian RBF kernel, i.e., k(x,x′) = exp
특히, 두 이미지 세트인 V = {v1, ..., vm} 및 W = {w1, ..., wm}이(가) 가우스 RBF 커널인 경우, 여기서 k(x,x')는 k(x,x²) = exp로 정의됩니다.

We use the same method used by Sutherland et al. (2016) to choose σ, where 2σ^2 is set to the median of all Euclidean distances between all images in the aggregate set V ∪ W .
우리는 서덜랜드 외(2016)가 사용한 동일한 방법을 사용하여 α를 선택하는데, 여기서 2θ^2는 집계 세트 V v W의 모든 이미지 사이의 모든 유클리드 거리의 중위수로 설정된다.

In Figure 2 (a)(b), we show how the performance of ODIN varies against the MMD distances between in- and out-of-distribution datasets.
그림 2(a)(b)에서 우리는 ODIN의 성능이 분포 내 데이터 세트와 분포 외 데이터 세트 사이의 MMD 거리에 대해 어떻게 변화하는지를 보여준다.

The datasets (on x-axis) are ranked in the descending order of MMD distances with CIFAR-100.
데이터 세트(x축)는 CIFAR-100을 사용하여 MMD 거리의 내림차순으로 순위가 매겨진다.

There are two interesting observations can be drawn from these figures.
이 수치에서 두 가지 흥미로운 관찰 결과를 도출할 수 있다.

First, we find that the MMD distances between the cropped datasets and CIFAR-100 tend to be larger.
먼저, 우리는 잘린 데이터 세트와 CIFAR-100 사이의 MMD 거리가 더 큰 경향이 있음을 발견했다.

This is likely due to the fact that cropped images only contain local image context and are therefore more distinct from CIFAR-100 images, while resized images contain global patterns and are thus similar to images in CIFAR-100.
이는 잘라낸 이미지가 로컬 이미지 컨텍스트만 포함하므로 CIFAR-100 이미지와 더 구별되는 반면 크기가 조정된 이미지는 전역 패턴을 포함하므로 CIFAR-100의 이미지와 유사하기 때문일 수 있다.

Second, we observe that the MMD distance tends to be negatively correlated with the detection performance.
둘째, 우리는 MMD 거리가 감지 성능과 부정적인 상관 관계를 갖는 경향이 있음을 관찰한다.

This suggests that the detection task becomes harder as in- and out-of-distribution images are more similar to each other.
이는 배포 내 이미지와 배포 외 이미지가 서로 유사할수록 탐지 작업이 더 어려워진다는 것을 시사한다.


Figure 2: (a)-(b) Performance of our method vs. MMD between in- and out-of-distribution datasets. Neural networks are trained on CIFAR-100.
그림 2: (a)-(b) 방법의 성능 대 분포 내 데이터 세트와 분포 외 데이터 세트 사이의 MMD. 신경망은 CIFAR-100에서 훈련된다.

The out-of-distribution datasets are 1: LSUN (cop), 2: TinyImageNet (crop), 3: LSUN (resize), 4: is iSUN (resize), 5: TinyImageNet (resize).
배포되지 않은 데이터 세트는 1: LSUN(cop), 2: TinyImageNet(crop), 3: LSUN(크기 조정), 4: is iSUN(크기 조정), 5: TinyImageNet(크기 조정)이다.

  1. DISCUSSIONS (결론)
    5.1 ANALYSIS ON TEMPERATURE SCALING (온도 스케일링에 관한 분석)
    In this subsection, we analyze the effectiveness of the temperature scaling method.
    이 하위 섹션에서는 온도 스케일링 방법의 효과를 분석합니다.

As shown in Figure 3 (a) and (b), we observe that a sufficiently large temperature yields better detection performance although the effects diminish when T is too large.
그림 3(a)와 (b)에 나타난 바와 같이, T가 너무 클 때 효과는 감소하지만 충분히 큰 온도는 더 나은 검출 성능을 산출하는 것을 관찰한다.

To gain insight, we can use the Taylor expansion of the softmax score (details provided in Appendix B).
통찰력을 얻으려면 소프트맥스 점수의 테일러 확장을 사용할 수 있다(자세한 내용은 부록 B에 제공).

When T is sufficiently large, we have
T가 충분히 클 때, 우리는

by omitting the third and higher orders.
세 번째와 더 높은 순서를 생략함으로써.

For simplicity of notation, we define
표기법의 단순성을 위해, 우리는 다음과 같이 정의한다.

Interpretations of U1 and U2. By definition, U1 measures the extent to which the largest unnormalized output of the neural network deviates from the remaining outputs; while U2 measures the extent to which the remaining smaller outputs deviate from each other.
U1 및 U2의 해석 정의에 따르면, U1은 신경망의 가장 큰 정규화되지 않은 출력이 나머지 출력에서 벗어나는 정도를 측정하는 반면, U2는 나머지 작은 출력들이 서로 벗어나는 정도를 측정한다.

We provide formal mathematical derivations in Appendix D.
우리는 부록 D에서 공식적인 수학적 도출을 제공한다.

In Figure 5(a), we show the distribution of U1 for each out-of-distribution dataset vs. the in-distribution dataset (in red).
그림 5(a)에서, 우리는 각 분포 외 데이터 세트 대 분포 내 데이터 세트(빨간색)에 대한 U1의 분포를 보여준다.

We observe that the largest outputs of the neural network on in-distribution images deviate more from the remaining outputs.
우리는 분포 중인 이미지에 대한 신경망의 가장 큰 출력은 나머지 출력에서 더 많이 벗어나는 것을 관찰한다.

This is likely due to the fact that neural networks tend to make more confident predictions on in-distribution images.
이는 신경망이 배포 중인 이미지에 대해 더 자신 있는 예측을 하는 경향이 있기 때문일 수 있다.

Further, we show in Figure 5(b) the expectation of U2 conditioned on U1, i.e., E[U2|U1], for each dataset.
또한, 우리는 그림 5(b)에서 각 데이터 세트에 대해 U1, 즉 E[U2|U1]에 대해 조건화된 U2의 기대를 보여준다.

The red curve (in-distribution images) has overall higher expectation.
빨간색 곡선(분포 내 영상)은 전체적으로 더 높은 기대치를 가집니다.

This indicates that, when two images have similar values on U1, the in-distribution image tends to have a much higher value of U2 than the out-of-distribution image.
이는 두 영상이 U1에서 유사한 값을 가질 때 분포 내 영상이 분포 외 영상보다 U2의 값이 훨씬 더 높은 경향이 있음을 나타냅니다.

In other words, for in-distribution images, the remaining outputs (excluding the largest output) tend to be more separated from each other compared to out-of-distribution datasets.
즉, 분포 내 이미지의 경우, 나머지 출력(최대 출력 제외)은 분포 외 데이터 세트에 비해 서로 더 분리되는 경향이 있다.

This may happen when some classes in the in-distribution dataset share common features while others differ significantly.
이는 배포 중인 데이터 세트의 일부 클래스가 공통 기능을 공유하는 반면 다른 클래스는 크게 다를 때 발생할 수 있다.

To illustrate this, in Figure 5 (f)(g), we show the outputs of each class using a DenseNet (trained on CIFAR-10) on a dog image from CIFAR-10, and another image from TinyImageNet (crop).
이를 설명하기 위해 그림 5(f)(g)에서 우리는 CIFAR-10의 개 이미지에 DenseNet(CIFAR-10에서 훈련된)을 사용하고 TinyImageNet(crop)의 다른 이미지를 사용하여 각 클래스의 출력을 보여준다.

For the image of dog, we can observe that the largest output for the label dog is close to the output for the label cat but is quite separated from the outputs for the label car and truck.
개의 이미지의 경우 레이블 도그의 최대 출력은 레이블 캣의 출력과 가깝지만 레이블 차량 및 트럭의 출력과는 상당히 분리되어 있음을 관찰할 수 있습니다.

This is likely due to the fact that, in CIFAR-10, images of dogs are very similar to the images of cats but are quite distinct from images of car and truck.
이는 CIFAR-10에서 개의 이미지가 고양이의 이미지와 매우 유사하지만 자동차와 트럭의 이미지와 상당히 다르다는 사실 때문일 것이다.

For the image from TinyImageNet (crop), despite having one large output, the remaining outputs are close to each other and thus have a smaller deviation.
TinyImageNet(crop)의 영상의 경우 하나의 큰 출력에도 불구하고 나머지 출력은 서로 가깝기 때문에 편차가 더 작습니다.


Figure 3: (a)(b) Effects of temperature T when ε = 0.
그림 3: (a)(b) ε = 0일 때 온도 T의 영향

(c)(d) Effects of perturbation magnitude ε when T = 1.
(c)(d) T = 1일 때 섭동 크기 ε의 영향.

All networks are trained on CIFAR-10 (in-distribution).
모든 네트워크는 CIFAR-10(분산 중)에 대해 교육된다.


Figure 4: (a)(b) Effects of perturbation magnitude ε on DenseNet when T is large (e.g., T = 1000).
그림 4: (a)(b) T가 클 때 DenseNet에 대한 섭동 크기 ε의 영향(예: T = 1000).

(c)(d) Effects of perturbation magnitude of ε on Wide-ResNet-28-10 when T is large (e.g., T = 1000).
All networks are trained on CIFAR-10.
(c)(d) T가 클 때(예: T = 1000) Wide-ResNet-28-10에 대한 ε의 섭동 크기 영향
모든 네트워크는 CIFAR-10에서 훈련된다.


Figure 5:
(a) Probability density of U1 under different datasets on DenseNet.
(a) DenseNet의 서로 다른 데이터 세트에서 U1의 확률 밀도.

(b) Expectations of U2 conditioned on U1 on DenseNet.
(b) U2에 대한 기대는 DenseNet의 U1에 달려 있다.

(c) Probability density of the norm of gradient on DenseNet under temperature 1, 000.
(c) 온도 1,000에서 DenseNet의 그레이디언트 노름의 확률 밀도입니다.

(c)(d) Expectation of the norm of gradient conditioned on the softmax scores on DenseNet under temperature T = 1000 and T = 1, respectively.
(c)(d) 각각 온도 T = 1000 및 T = 1에서 DenseNet의 소프트맥스 점수에 대한 그레이디언트 규범의 기대치.

(f)(g) Outputs of DenseNet on each class for an image of dog from CIFAR-10 and an image from TinyImageNet (crop).
(f)(g) CIFAR-10의 개 이미지와 TinyImageNet(crop)의 이미지에 대한 각 클래스의 DenseNet 출력.

The DenseNet is trained on CIFAR-10. Additional results on other architectures are provided in Appendix A.
DenseNet은 CIFAR-10에서 훈련된다. 다른 아키텍처에 대한 추가 결과는 부록 A에 나와 있습니다.

The effects of T (T의 효과)
To see the usefulness of adopting a large T , we can first rewrite the softmax score function in Equation (3) as S ∝ (U1 − U2 /2T )/T .
큰 T를 채택하는 것의 유용성을 보기 위해, 우리는 먼저 식 (3)의 소프트맥스 점수 함수를 S ( (U1 - U2/2T)/T로 다시 쓸 수 있다.

Hence the softmax score is largely determined by U1 and U2/2T. As noted earlier, U1 makes in-distribution images produce larger softmax scores than out-of-distribution images since S ∝ U1, while U2 has the exact opposite effect since S ∝ −U2.
따라서 소프트맥스 점수는 주로 U1과 U2/2T에 의해 결정된다. 앞에서 언급한 바와 같이, U1은 S u U1 이후 배포 내 이미지를 배포 외 이미지보다 더 큰 소프트맥스 점수를 생성하도록 하는 반면, U2는 S - - U2 이후 정반대의 효과를 갖는다.

Therefore, by choosing a sufficiently large temperature, we can compensate the negative impacts of U2/2T on the detection performance, making the softmax scores between in- and out-of-distribution images more separable.
따라서, 충분히 큰 온도를 선택함으로써, 우리는 U2/2T가 검출 성능에 미치는 부정적인 영향을 보상할 수 있어 배포 내 및 배포 외 이미지 사이의 소프트맥스 점수를 더 분리할 수 있다.

Eventually, when T is sufficiently large, the distribution of softmax score is almost dominated by the distribution of U1 and thus increasing the temperature further is no longer effective.
결국, T가 충분히 크면, 소프트맥스 점수의 분포는 U1의 분포에 의해 거의 지배되므로, 온도를 더 이상 상승시키는 것은 더 이상 효과적이지 않다.

This explains why we see in Figure 3 (a)(b) that the performance does not change when T is too large (e.g., T > 100).
이는 그림 3(a)(b)에서 T가 너무 클 때(예: T > 100) 성능이 변하지 않는 이유를 설명합니다.

In Appendix C, we provide a formal proof showing that the detection error eventually converges to a constant number when T goes to infinity.
부록 C에서, 우리는 T가 무한대로 갈 때 감지 오류가 결국 일정한 수로 수렴된다는 것을 보여주는 공식적인 증거를 제공한다.

5.2 ANALYSIS ON INPUT PREPROCESSING (입력 전처리에 관한 분석)
As noted previously, using the temperature scaling method by itself can be effective in improving the detection performance.
앞서 언급한 바와 같이, 온도 스케일링 방법 자체를 사용하는 것이 검출 성능 향상에 효과적일 수 있다.

However, the effectiveness quickly diminishes as T becomes very large.
그러나 T가 매우 커지면 효과가 빠르게 감소한다.

In order to make further improvement, we complement temperature scaling with input preprocessing.
추가적인 개선을 위해, 우리는 입력 전처리로 온도 스케일링을 보완한다.

This has already been seen in Figure 4, where the detection performance is improved by a large margin on most datasets when T = 1000, provided with an appropriate perturbation magnitude ε is chosen.
이것은 이미 그림 4에서 볼 수 있으며, 적절한 섭동 등급 ε가 선택되면 T = 1000일 때 대부분의 데이터 세트에서 감지 성능이 큰 마진으로 향상됩니다.

In this subsection, we provide some intuition behind this.
이 하위 절에서는 이 뒤에 있는 몇 가지 직관을 제공합니다.

To explain, we can look into the first order Taylor expansion of the log-softmax function for the perturbed image x ̃, which is given by
설명하자면, 우리는 섭동된 이미지 x ,에 대한 log-softmax 함수의 1차 테일러 확장을 조사할 수 있다.

where x is the original input.
여기서 x는 원래 입력입니다.

The effects of gradient. (그라데이션의 효과)
In Figure 5 (c), we present the distribution of ∥∇ log S(x; T )∥1 — the 1-norm of gradient of log-softmax with respect to the input x — for all datasets.
그림 5(c)에서, 우리는 모든 데이터 세트에 대한 입력 x에 대한 log-softmax의 기울기의 1-노름인 α 로그 S(x;T)∥1의 분포를 제시한다.

A salient observation is that CIFAR-10 images (in-distribution) tend to have larger values on the norm of gradient than most out-of-distribution images. To further see the effects of the norm of gradient on the softmax score, we provide in Figures 5 (d) the conditional expectation E[∥∇x logS(x;T)∥1|S].
두드러진 관찰은 CIFAR-10 이미지(분포 내)가 대부분의 분포 외 이미지보다 기울기 규범에서 더 큰 값을 갖는 경향이 있다는 것이다. 소프트맥스 점수에 대한 그레이디언트 규범의 영향을 추가로 확인하기 위해 그림 5(d)에 조건부 기대치 E[[x logS(x;T)t1|S]를 제공한다.

We can observe that, when an in- distribution image and an out-of-distribution image have the same softmax score, the value of ∥∇x log S(x; T )∥1 for in-distribution image tends to be larger.
우리는 분포 내 이미지와 분포 외 이미지의 소프트맥스 점수가 같을 때 분포 내 이미지에 대한 xx log S(x; T)11의 값이 더 큰 경향이 있음을 관찰할 수 있다.

We illustrate the effects of the norm of gradient in Figure 6.
우리는 그림 6에서 그레이디언트 규범의 효과를 설명한다.

Suppose that an in-distribution image x1 (blue) and an out-of-distribution image x2 (red) have similar softmax scores, i.e., S(x1) ≈ S(x2).
분포 내 이미지 x1(파란색)과 분포 외 이미지 x2(빨간색)가 유사한 소프트맥스 점수, 즉 S(x1) → S(x2)를 가지고 있다고 가정합니다.

After input processing, the in-distribution image can have a much larger softmax score than the out-of-distribution image x2 since x1 results in a much larger value on the norm of softmax gradient than that of x2.
입력 처리 후 배포 내 이미지는 배포 외 이미지 x2보다 훨씬 큰 소프트맥스 점수를 가질 수 있다. 왜냐하면 x1은 x2보다 소프트맥스 그레이디언트 규범에 훨씬 큰 값을 초래하기 때문이다.

Therefore, in- and out-of-distribution images are more separable from each other after input preprocessing4.
따라서, 입력 전처리 후 배포 내 및 배포 외 이미지는 서로 더 분리할 수 있습니다.


Figure 6 : illustrious of effects of the input preprocessing.
그림 6: 입력 전처리의 효과를 잘 보여줍니다.

The effect of ε. When the magnitude ε is sufficiently small, adding perturbations does not change the predictions of the neural network, i.e., yˆ(x ̃) = yˆ(x).
크기 ε가 충분히 작을 때, 섭동을 추가하는 것은 신경망의 예측, 즉 yˆ(x ̃) = yˆ(x)를 바꾸지 않는다.

However, when ε is not negligible, the gap of softmax scores between in- and out-of-distribution images can be affected by ∥∇_x log S (x; T )∥1 .
그러나, ε가 무시할 수 없을 때, 배포 중 이미지와 배포되지 않은 이미지 사이의 소프트맥스 점수의 간격은 ∥∇_x 로그 S (x; T )∥1에 의해 영향을 받을 수 있다.

Our observation is consistent with that in (Szegedy et al., 2014; Goodfellow et al., 2015; Moosavi- Dezfooli et al., 2017), which show that the softmax scores tend to change significantly if small perturbations are added to the in-distribution images. It is also worth noting that using a very large ε can lead to performance degradation, as seen in Figure 4.
우리의 관찰은 (Szegedy et al., 2014; Goodfellow et al., 2015; Moosavi-Dezfooli et al., 2017)의 그것과 일치하며, 이는 분포 내 이미지에 작은 동요가 추가될 경우 소프트맥스 점수가 크게 변하는 경향이 있음을 보여준다. 그림 4에서 보는 바와 같이, 매우 큰 α를 사용하면 성능 저하를 초래할 수 있다는 점도 주목할 필요가 있다.

This is likely due to the fact that the second and higher order terms in the Taylor expansion are no longer insignificant when the perturbation magnitude is too large.
이는 섭동 크기가 너무 클 때 테일러 확장의 2차 항과 고차 항이 더 이상 중요하지 않기 때문일 수 있다.

  1. RELATED WORKS AND FUTURE DIRECTIONS (관련 작업 및 향후 방향)
    The problem of detecting out-of-distribution examples in low-dimensional space has been well-studied in various contexts (see the survey by Pimentel et al. (2014)).
    저차원 공간에서 분포 외 사례를 감지하는 문제는 다양한 맥락에서 잘 연구되어 왔다(Pimentel et al. (2014)의 조사 참조).

Conventional methods such as density estimation, nearest neighbor and clustering analysis are widely used in detecting low-dimensional out- of-distribution examples (Chow, 1970; Vincent & Bengio, 2003; Ghoting et al., 2008; Devroye et al., 2013), .
밀도 추정, 가장 가까운 이웃 및 클러스터링 분석과 같은 기존 방법은 저차원 분포 외 사례를 탐지하는 데 널리 사용된다(Chow, 1970; Vincent & Bengio, 2003; Ghoting et al., 2008; Devroye et al., 2013).

The density estimation approach uses probabilistic models to estimate the in-distribution density and declares a test example to be out-of-distribution if it locates in the low-density areas.
밀도 추정 접근법은 확률론적 모델을 사용하여 분포 내 밀도를 추정하며, 저밀도 영역에 위치하는 경우 테스트 예가 분포 외임을 선언한다.

The clustering method is based on the statistical distance, and declares an example to be out-of- distribution if it locates far from its neighborhood.
군집화 방법은 통계적 거리를 기반으로 하며, 이웃에서 멀리 떨어진 곳에 위치하는 경우 예제가 분포에서 벗어나 있다고 선언합니다.

Despite various applications in low-dimensional spaces, unfortunately, these methods are known to be unreliable in high-dimensional space such as image space (Wasserman, 2006; Theis et al., 2015).
저차원 공간에서 다양한 응용 프로그램에도 불구하고 안타깝게도 이러한 방법은 이미지 공간과 같은 고차원 공간에서는 신뢰할 수 없는 것으로 알려져 있다(Wasserman, 2006; Theis et al., 2015).

In recent years, out-of-distribution detectors based on deep models have been proposed. Schlegl et al. (2017) train a generative adversarial networks to detect out-of-distribution examples in clinical scenario. Sabokrou et al. (2016) train a convolutional network to detect anomaly in scenes. Andrews et al. (2016) adopt transfer representation-learning for anomaly detection.
최근 몇 년 동안 심층 모델을 기반으로 한 분포 외 검출기가 제안되었다. Schlegle et al. (2017)은 임상 시나리오에서 분포 외 사례를 탐지하기 위해 생성적 적대 네트워크를 훈련한다. Sabokrou 외 연구진(2016)은 장면의 이상을 감지하기 위해 컨볼루션 네트워크를 훈련시킨다. Andrews 외 연구진(2016)은 이상 탐지를 위해 전이 표현 학습을 채택한다.

All these works require enlarging or modifying the neural networks.
이러한 모든 작업은 신경망을 확대하거나 수정해야 한다.

In a more recent work, Hendrycks & Gimpel (2017) found that pre-trained neural networks can be overconfident to out-of-distribution example, limiting the effectiveness of detection.
헨드릭스 & 김펠(2017)은 보다 최근의 연구에서 사전 훈련된 신경망이 배포되지 않은 예에 대해 과신할 수 있어 탐지 효과를 제한할 수 있다는 것을 발견했다.

Our paper aims to improve the performance of detecting out-of-distribution examples, without requiring any change to an existing well-trained model.
본 논문은 기존의 잘 훈련된 모델에 대한 변경을 요구하지 않고 배포되지 않은 예를 탐지하는 성능을 향상시키는 것을 목표로 한다.

Our approach leverages the following two interesting observations to help better distinguish between in- and out-of-distribution examples:
우리의 접근 방식은 다음 두 가지 흥미로운 관찰을 활용하여 분포 내 및 분포 외 예를 더 잘 구별하는 데 도움이 된다.

(1) On in-distribution images, modern neural networks tend to produce outputs with larger variance across class labels, and
(1) 분포 중인 이미지에서 현대 신경망은 클래스 레이블에 걸쳐 더 큰 분산을 갖는 출력을 생성하는 경향이 있다.

(2) neural networks have larger norm of gradient of log-softmax scores when applied on in-distribution images.
(2) 신경망은 배포 중인 이미지에 적용될 때 로그 소프트맥스 점수의 기울기 기준이 더 크다.

We believe that having a better understanding of these phenomenon can lead to further insights into this problem.
우리는 이러한 현상을 더 잘 이해하면 이 문제에 대한 더 많은 통찰력을 얻을 수 있다고 믿는다.

  1. CONCLUSIONS (결론)
    In this paper, we propose a simple and effective method to detect out-of-distribution data samples in neural networks.
    본 논문에서는 신경망에서 분포 외 데이터 샘플을 탐지하는 간단하고 효과적인 방법을 제안한다.

Our method does not require retraining the neural network and significantly improves on the baseline method Hendrycks & Gimpel (2017) on different neural architectures across various in and out-distribution dataset pairs.
우리의 방법은 신경망을 재교육할 필요가 없으며 다양한 내부 및 외부 분포 데이터 세트 쌍에 걸쳐 서로 다른 신경 아키텍처에서 기본 방법 헨드릭스 & 김펠(2017)을 크게 개선한다.

We empirically analyze the method under different parameter settings, and provide some insights behind the approach.
우리는 다양한 매개 변수 설정에서 방법을 경험적으로 분석하고 접근 방식 뒤에 있는 몇 가지 통찰력을 제공한다.

Future work involves exploring our method in other applications such as speech recognition and natural language processing
향후 작업은 음성 인식 및 자연어 처리와 같은 다른 응용 분야에서 우리의 방법을 탐구하는 것을 포함한다.

A. Supplementary results is section 5.1 and 5.2
보충 결과는 섹션 5.1 및 5.2입니다.

Figure 7: Expectation of the second order term U2 conditioned on the first order term U1 under DenseNet, Wide-ResNet-28-10 and Wide ResNet-40-4. All networks are trained on CIFAR-10.
그림 7: DenseNet, Wide-ResNet-28-10 및 Wide ResNet-40-4에서 1차 항 U1에 대한 2차 항 U2의 기대치 모든 네트워크는 CIFAR-10에서 훈련된다.


Figure 8: Expectation of gradient norms conditioned on the softmax scores under DenseNet, Wide-ResNet-28- 10 and Wide ResNet-40-4, where the temperature scaling is not used. All networks are trained on CIFAR-10.
그림 8: 온도 스케일링이 사용되지 않는 DenseNet, Wide-ResNet-28-10 및 Wide ResNet-40-4의 소프트맥스 점수에 대한 그레이디언트 규범의 기대. 모든 네트워크는 CIFAR-10에서 훈련된다.


Figure 9: Expectation of gradient norms conditioned on the softmax scores under DenseNet, Wide-ResNet-28- 10 and Wide ResNet-40-4, where the optimal temperature is used, i.e., T = 1000. All networks are trained on CIFAR-10.
그림 9: 최적의 온도가 사용되는 DenseNet, Wide-ResNet-28-10 및 Wide ResNet-40-4의 소프트맥스 점수에 조건화된 그레이디언트 규범의 기대치(예: T = 1000). 모든 네트워크는 CIFAR-10에서 훈련된다.

B. Taylor expansion
In this section, we present the Taylor expansion of the soft-max score function:
이 섹션에서는 소프트맥스 점수 함수의 테일러 확장을 제시한다.

C. Proposition 1
The following proposition 1 shows that the detection error Pe(T,0) ≈ c if T is sufficiently large.
하기 명제 1은 T가 충분히 큰 경우 검출 오차 Pe(T,0) ≤ c를 나타낸다.

Thus, increasing the temperature further can only slightly improve the detection performance.
따라서 온도를 더 높이면 검출 성능이 약간 향상될 뿐이다.

Proposition 1.
There exists a constant c only depending on function U1, in-distribution PX and out-of-distribution QX such that limT→∞ Pe (T , ε) = c, when ε = 0 (i.e., no input preprocessing).
함수 U1, 분포 내 PX 및 분포 외 QX에 따라 다음과 같은 상수 c가 존재한다.T→α Pe(T, α) = c일 때, α = 0일 때(즉, 입력 전처리 없음).

Proof. Since

D. Analysis of TEMPERATURE

E. ADDITIONAL RESULTS ON DISTANCE MEASUREMENT
Apart from the Maximum Mean Discrepancy, we also calculate the Energy distance between in- and out-of-distribution datasets.
최대 평균 불일치와는 별도로 분포 내 데이터 세트와 분포 외 데이터 세트 사이의 에너지 거리도 계산한다.

Let P and Q denote two different distributions.
P와 Q가 서로 다른 두 분포를 나타내도록 합시다.

Then the energy distance between distributions P and Q is defined as
분포 P와 Q 사이의 에너지 거리는 다음과 같이 정의된다.


Figure 10: False positive rate (FPR) and true positive rate (TPR) under different thresholds (δ) when the temperature (T ) is set to 1, 000 and the perturbation magnitude (ε) is set to 0.0014. The DenseNet is trained on CIFAR-10.
온도(T)가 1,000으로 설정되고 섭동 크기(β)가 0.0014로 설정될 때 서로 다른 임계값(α)에서 거짓 양성률(FPR)과 참 양성률(TPR)이 발생한다. DenseNet은 CIFAR-10에서 훈련된다.


Figure 11: (a) The test accuracy on the images having softmax scores above the threshold corresponding to a certain true positive rate.
특정 실제 양성 속도에 해당하는 임계값보다 높은 소프트맥스 점수를 가진 이미지의 테스트 정확도입니다.

(b) The test accuracy on the images having softmax scores below the threshold corresponding to a certain true positive rate.
소프트맥스 점수가 특정 실제 양성 속도에 해당하는 임계값보다 낮은 이미지의 테스트 정확도입니다.

All networks are trained on CIFAR-10.
모든 네트워크는 CIFAR-10에서 훈련된다.

F. ADDITIONAL DISCUSSIONS (추가 토론)
In this section, we present additional discussion on the proposed method.
이 섹션에서는 제안된 방법에 대한 추가 논의를 제시한다.

We first empirically show how the threshold δ affects the detection performance.
우리는 먼저 임계값 δ가 탐지 성능에 어떤 영향을 미치는지 경험적으로 보여줍니다.

We next show how the proposed method performs when the parameters are tuned on a certain out-of-distribution dataset and are evaluated on other out-of-distribution datasets.
다음으로 매개 변수가 특정 분포 외 데이터 세트에서 조정되고 다른 분포 외 데이터 세트에서 평가될 때 제안된 방법이 어떻게 수행되는지 보여준다.

Effects of the threshold.
임계값의 효과입니다.

We analyze how the threshold affects the following metrics:
우리는 임계값이 다음 메트릭에 어떤 영향을 미치는지 분석한다.

(1) FPR, i.e., the fraction of out-of-distribution images misclassified as in-distribution images;
(1) FPR, 즉 분포 내 이미지로 잘못 분류된 분포 외 이미지의 부분;

(2) TPR, i.e, the fraction of in-distribution images correctly classified as in-distribution images.
(2) TPR, 즉, 분포 내 이미지로 올바르게 분류된 분포 내 이미지의 부분.

In Figure 10, we show how the thresholds affect FPR and TPR when the temperature and perturbation magnitude are chosen optimally (i.e., T = 1, 000, ε = 0.0014).
그림 10에서 온도와 섭동 크기가 최적으로 선택되었을 때 임계값이 FPR과 TPR에 어떻게 영향을 미치는지 보여준다(즉, T = 1,000, α = 0.0014).

From the figure, we can observe that the threshold corresponding to 95% TPR can produce small FPRs on all out-of-distribution datasets.
그림에서 95% TPR에 해당하는 임계값이 모든 분포 외 데이터 세트에서 작은 FPR을 생성할 수 있음을 관찰할 수 있다.

Difficult-to-classify images and difficult-to-detect images. (이미지를 분류하기 어렵고 이미지를 감지하기 어렵습니다.)
We analyze the correlation between the images that tend to be out-of-distribution and images on which the neural network tend to make incorrect predictions.
우리는 분포가 어긋나는 경향이 있는 이미지와 신경망이 잘못된 예측을 하는 경향이 있는 이미지 사이의 상관 관계를 분석한다.

To understand the correlation, we devise the following experiment.
상관 관계를 이해하기 위해 다음 실험을 고안한다.

For the fixed temperature T and perturbation magnitude ε, we first set δ to the softmax score threshold corresponding to a certain true positive rate.
고정 온도 T와 섭동 등급 ε의 경우, 우리는 먼저 δ를 특정 진정한 양수 속도에 해당하는 소프트맥스 점수 임계값으로 설정합니다.

Next, we calculate the test accuracy on the images with softmax scores above δ and the test accuracy on the images with softmax score below δ, respectively.
다음으로, 우리는 각각 δ 이상의 소프트맥스 점수로 이미지의 테스트 정확도와 소프트맥스 점수가 δ보다 낮은 이미지의 테스트 정확도를 계산합니다.

We report the results in Figure 11(a) and (b).
우리는 그 결과를 그림 11(a)와 (b)에 보고한다.

From these two figures, we can observe that the images that are difficult to detect are more likely to be the images that are difficult to classify.
이 두 가지 수치에서, 우리는 감지하기 어려운 이미지가 분류하기 어려운 이미지일 가능성이 더 높다는 것을 관찰할 수 있다.

For example, the DenseNet can achieve up to 98.5% test accuracy on the images having softmax scores above the threshold corresponding to 80% TPR, but can only achieve around 82% test accuracy on the images having softmax scores below the threshold corresponding to 80% TPR.
예를 들어, DenseNet은 80% TPR에 해당하는 임계값보다 높은 소프트맥스 점수를 가진 이미지에 대해 최대 98.5%의 테스트 정확도를 달성할 수 있지만 80% TPR에 해당하는 임계값보다 낮은 소프트맥스 점수를 가진 이미지에 대해서는 약 82%의 테스트 정확도만 달성할 수 있다.

profile
AI Engineer가 되고싶은 석사 연구생입니다.

0개의 댓글