본문 바로가기

Papers/SSL

[리뷰] In Defense of Pseudo-Labeling: An Uncertainty-Aware Pseudo-label Selection Framework for Semi-Supervised Learning (ICLR 2021)

by Rizve et al.

Paper Link: https://arxiv.org/pdf/2101.06329.pdf

Code Link : https://github.com/nayeemrizve/ups

Contents

1. Introduction
2. Related Works
3. Proposed Method
4. Experiments
5. Discussion
6. Summary

Abbreviation & Keyword

SSL : Semi-supervied Learning
PL : Pseudo-labeling
CR : Consistency-regularization
UPS : Uncertainty-aware pseudo-label selection framework


Introduction

Deep Learning 모델은 large-scale labeled datasets이 사용 가능하다는 전제로 큰 발전과 성공을 이루었습니다.

본 논문에서는 superviesd learning에서 사용하는 large labeled datasets이 비용이 많이 들고 어떤 task에 대해서는 사용이 불가함에 대해 문제를 제기하고 있습니다.

이에 등장한 Semi-supervied Learning (SSL)은 이러한 문제를 푸는 데 가장 널리쓰이는 방법론이며, "large unlabeled dataset과 small labeled dataset을 함께 이용한다"는 목적을 가지고 있습니다.

SSL의 기본 가정 중 하나는 결정 경계(decision boundary)가 밀도가 낮은 공간(low density regions)에 위치하고 있다*는 것입니다.

Cluster asumption은 SSL 성공의 키이다. Cluster asumption이란 data가 discrete cluster를 형성하는 경향이 있고, 같은 cluster에 속한 data points는 label을 공유한다는 것이다.
Cluster를 나누어 각각에 label을 부여하려면 decision boundary로 data가 모여있는(high density region) cluster 내부를 가로질러 나누는 게 아니라, 여러 clusters 간을 구별하기 위해 data가 희소한 영역(low density region)을 나누어야 한다고 주장한 것이다.

 

(Ref) Semi-Supervised Classification by Low Density Separation (Chapelle & Zien, 2005) http://is.tuebingen.mpg.de/fileadmin/user_upload/files/publications/pdf2899.pdf
(Ref) Semi-supervised learning, 위키피디아 Cluster assumption, Low-density seperation

 

Consistency-regularization 기반 방법론은 우리의 neural network가 작은 인풋 데이터 변형(pertubation)에 일관적인 아웃풋을 내도록 만듦으로써 목적을 달성합니다.

그러나 이 방법론은 다양한 데이터 증강 방법(rich set of augmentation)에 의존하고 있으며, augmentation 기법이 효과적이지 않는 도메인에서 사용성이 제한됩니다.

 

Pseudo-labeling 기반 방법론은 high confidence를 가지는 unlabeled samples을 선별해 training targets (pseudo-labels)으로 사용합니다. Decision boundary에서의 data point 밀도를 줄이므로써 entropy를 최소화하는 것으로 볼 수 있습니다.

 

Pseudo-labeling (PL) vs. Consistency-regularization (CR)

PL이 CR 보다 좋은 점은 data augmentation이 필요하지 않으며 대부분의 도메인에 적용될 수 있다는 점입니다.

하지만 최근 CR 방법론은 SSL benchmark dataset에서 PL 보다 좋은 성능을 보이고 있습니다.

그러나 이 연구는 PL을 support하는 주장을 펼치며, PL이 CR 만큼 중요하다는 입장을 보이고 있습니다.

앞서, pseudo-labeling 방법론은 high confidence를 가지는 unlabeled samples를 선별해 decision boundary를 low density regions으로 옮긴다고 했습니다. 선별된 predictions 중 많은 것들이 "poor calibration"로 인해 틀린 예측이었습니다. 이 연구에서는 이러한 nosiy training과 poor generalization에 문제를 제기하고, output prediction uncertainty와 calibration 같의 관계를 연구하므로써 해결책을 제시합니다. Low uncertainty를 갖는 prediction을 선택하는 것이 poor calibration의 효과를 감소시키고, 개선된 generalization을 보였다고 합니다.

 

Contributions

  1. UPS : uncertainty-aware pseudo label selection framework를 제안했다. 이 방법론은 poor network calibration의 영향을 감소시켰다.
  2. 기존 SSL 연구들이 single-label task에 집중한 데 비해, 이 연구는 pseudp-labeling을 일반화하므로써 negative labels를 만들고 negative learning, multi-label task에 적용할 수 있게 했다.
  3. Flexibility: different modality - vision과 video datasets에서 sota 성능을 보였다.

Related Works

Uncertainty and Calibration

SSL 도메인의 한 연구에서는 uncertainty를 consistency regularization을 개선하는 데 사용했습니다. Mukherjee의 연구에서 Hard sample(confidence가 낮거나 certain하지 않은 샘플)을 선별하여 positive learning을 활용했으나, 이 연구에서는 noise를 감소시키기 위해 negative learning을 사용했습니다.

그러나 uncertainty를 pseudo-labeling 과정에서 poor network calibration 효과를 감소시키는 데 활용한 연구는 없었습니다. 그래서 이 연구는 network calibration을 개선하기 보다, uncertainty estimation 방법론을 위해 더 calibration이 잘된 pseudo-label 부분집합을 선별하는 데 집중했습니다.

Proposed Methods

3.1 Pseudo-labeling for Semi-supervised Learning

Problem Formulation

  • Labeled data $D_L = {\{(x^{(i)}, y^{(i)})\}}^{N_L}_{i=1}$
  • Unlabeled data $D_U = {\{x^{(i)}\}}^{N_U}_{i=1}$
    • y는 {0,1} 중에 해당되는 label입니다.
  • $D_U = {\{(x^{(i)}, \tilde y^{(i)})\}}^{N_L + N_U}_{i=1}$
    • $\tilde y$는 생성된 pseudo-label입니다.
  • Pseudo-labeling SSL 방법론을 적용하면 parameterized model $f_{\theta}$을 Labeled sample에 대해서는 $\tilde y^{(i)} = y^{(i)}$에 대해 학습시킵니다.

Generalization Pseudo-label Generation

Hard pseudo-labels를 class c에 대해 network prediction에서 나온 확률 $p_c$가 threshold $\gamma$ 보다 크거나 같으면 1로, 작으면 0을 얻는 방법을 쓰겠습니다.

$\gamma = max_c p_c^{(i)}$이면 single-label pseudo-labeling이 됩니다.

 

3.2 Pseudo-label Selection

Goal : 성능을 개선하기 위해 training 과정에서 noise를 감소시킨다.

How? Pseudo-labels의 부분집합을 선택한다.

 

Motivation

PL은 다양하고 modality-agnostic한 방법론입니다. 하지만 최근의 SSL 방법론에 비해 저조한 성능을 보였는데, 이는 training 과정에서 많은 incorrect pseudo-labels가 발생하기 때문입니다.

 

Notation

$g^{(i)}$는 샘플 i에 대해 선택된 pseudo-labels를 나타낸 binary vector입니다.

$$g^{(i)} = [g^{(i)}_1, g^{(i)}_2, ..., g^{(i)}_{C}]$$

$$g_c^{(i)} = I[g_c^{(i)} \geq \tau_p] + I[g_c^{(i)} \geq \tau_n] (2)$$

  • $\tau_p$, $\tau_n$ : confidence threshold for positive / negative lavels ($\tau_p \geq \tau_n$)

 

Training

  • Single-label classification
    • Positive pseudo-labels에 대해 cross-entropy loss 계산합니다.
    • 만약 positive pseudo-label가 하나도 없으면, negative cross-entropy loss를 이용해 negative learning을 수행합니다.

  • Multi-label classification
    • 변형된 binary cross-entropy loss를 계산합니다.

  • 두 가지 경우에 대해 모두 high confidence pseudo-labels을 선택하므로써 training 과정에서의 noise를 제거합니다.

3.3 Uncertainty-aware Pseudo-label Selection

Goal : Poorly calibrated neural networks의 영향을 감소시킨다.

How? Uncertainty-aware pseudo-label selection

 

Is there a relationship between calibration and individual prediction uncertainties?

Subsets of labels에 대해서는 high-confidence prediction가 correct pseudo-label를 생성하는 경향이 있습니다.

 

Confidence와 uncertainty를 모두 사용해서 accurate subset of pseudo-labels를 사용할 것입니다. Eq. 2를 다음과 같이 다시 쓸 수 있습니다.

$$g^{(i)} = I [u(p^{(i)}_c) \geq \kappa_p] I[p^{(i)}_c \geq \tau_p] + I [u(p^{(i)}_c) \geq \kappa_n] I[p^{(i)}_c \geq \tau_n]$$

  • $u(p)$ : uncertainty of prediction p

Uncertainty-aware selection이 pseudo-label accuary를 높여준다. 기존의 PL 방법론과 confidence-based PL selection 방법론 보다도 우수하다.

3.4 Learning with UPS

  1. A neural network $f_{\theta, 0}$를 작은 labeled dataset $D_L$에 대해 학습한다.
  2. # selected pseudo-labels가 수렴할 때까지 반복적으로 수행한다.
    1. 학습된 network $f_{\theta, i-1}$를 이용해 모든 unlabeled dataset $D_U$에 대해 pseudo-labels를 생성한다.
    2. 또 다른 neural network $f_{\theta, i}$를 UPS를 사용해 선택된 pseudo-labels $D_{selected}$ + labeled set $D_L$에 학습시킨다.
    3. $f_{\theta} \leftarrow f_{\theta, i}$

Experiments

4.2 Results

Datasets : CIFAR-10, CIFAR-100

Settings : 1000 / 4000 labels for CIFAR-10, 4000 / 10000 CIFAR-100

Table 1를 보면, CIFAR-10에 대한 실험에서 1000 labels만 사용했을 때 성능이 outperform 했습니다. 4000 labels의 경우는 에러가 marginally 감소했습니다.

Table 1
UPS는 backbone에 의존하지 않으며, stronger backbone을 사용하면 더 향상된 성능을 보인다.

4.4 Analysis

UPS는 hyperparamter 선택에 robust하고, 많은 hyperparameter tuning을 요구하지 않습니다.

$\kappa < 0.1$에서는 상대적으로 성능 하락이 심하지 않았으나, threshold 값이 높아질수록 더 많은 noisy pseudo-labels가 선택되어 test error 증가로 이어졌습니다.

Discussion

UPS는 특정 uncertainty measure에 의존하지 않는 general framework입니다. (= 어떤 uncertainty measure에서도 좋은 성능을 보였습니다.)

Beysian inference methods/NN은 계산 비용이 비싸고 어려워, network 변형이 필요 없는 Monte Cralo sampling으로 uncertainty measure를 얻을 수 있는 방법론을 쓰겠습니다.

최신 CR 기반의 SSL 방법론들에 비해 UPS는 domain-specific data augmentation에 의존하지 않는다는 장점이 있습니다.

비디오, 텍스트, 음성에서는 다양한 augmentation을 시도하기 어렵습니다. Table 3에서 consistency-regularization based method (MT)가 좋은 성능을 보이지 못하는 것을 보면 알 수 있습니다.

Consistency-regularization based method, MT (Mean Teacher) 보다 PL과 UPS가 우수한 성능을 보이는 것을 볼 수 있다.

Summary

  • Consistency-regularization과 견줄만한 성능을 보이는 UPS (uncertainty-aware pseudo-label selection framework)를 제안했습니다.
  • Poor neural network calibration 때문에 기존의 pseudo-labeling 방법론들은 많은 incorrect pseudo-labels에 의해 noisy training을 하여 성능 하락으로 이어졌습니다. 이를 해결하기 위해 prediction uncertainty를 이용한 pseudo-label selection을 도입하여 noise를 감소시켰습니다.
  • UPS의 특장점은 다양한 data modality 및 multi-label classification 문제에 적용할 수 있다는 점입니다.

 

※ 위 내용은 스터디 및 개인 학습 용으로 작성된 글로, 일부 정확하지 않은 내용을 포함할 수도 있습니다.

(피드백 환영합니다!)※


Q&A

What is 'moving decision boundaries to low density regions'? Why is it important?

Decision boundary를 low density regions으로 옮기는 것이 중요하다는 것은 cluster assumption 가정에 따라 unlabeled 데이터와 SSL을 더 성공적으로 사용해, 결국 모델 성능을 높이겠다는 의미입니다.

 

What is difference between Positive Learning vs. Negative Learning?

  • Positive learning : 인풋이 속하는 라벨로 모델을 학습합니다. (training model by labeling sample in a supervised manner as in "input belongs to this label")
    • 모든 라벨이 정확하다면 빠르고 정확하지만, incorrect labels (noisy labels)가 있는 경우 PL로 학습하는 것이 잘못된 정보를 주게 되고 모델 성능이 심각하게 떨어집니다.
  • Negative learning : 인풋이 속하지 않는 라벨로 모델을 학습합니다. (training model by using complementary labels as in "input does not belong to this complementary label")
    • True label이 complementary label로 선택되는 경우는 적기 때문에, NL은 잘못된 정보를 전달할 리스크를 낮춥니다. (적어도 PL 만큼 잘못된 정보를 자주 주지는 않습니다)

(Ref) NLNL: Negative Learning for Noisy Labels (Kim et al.) https://arxiv.org/pdf/1908.07387.pdf

 

On equation (2), why the two items are added (especially second item, for negative labels), when getting the boolean label?

만약 $\tau_p = 0.8$, $\tau_n = 0.2$가 돼서 $p^{(i)}_c$가 0.2-0.8 사이에 들어가는 경우를 걱정했는데, 식 2를 보면

$\tau_p \geq \tau_n$ 조건 때문에 $p^{(i)}_c \geq \tau_p$ 또는 $p^{(i)}_c \leq \tau_n$ 둘 중 하나에 해당될 수밖에 없습니다. 즉, 1) $p^{(i)}_c$가 0.2 보다 작아서 negative label이 채택되는 경우, 2) 0.2-0.8 사이에 들어가서 negative / positive 중 그 어느 것에도 속하지 않는 경우, 3) $p^{(i)}_c$가 0.8 보다 커서 positive label이 채택되는 경우 세 가지가 있습니다.

그렇다면 negative label과 positive label은 어떻게 구분하나요?

식 2에서는 두 항을 더하는 것처럼 보이지만, 코드에서는 nl_mask(negative labels)와 selected_idx(positive labels)로 분리하여 학습에 사용한 것으로 보이네요.

(Ref) UPS Code

반응형