[Paper Review] RandAugment: Practical automated data augmentation with a reduced search space

2020. 8. 28. 14:07DeepLearning

Overview

제목: RandAugment: Practical automated data augmentation with a reduced search space

저자: Ekin D. Cubuk , Barret Zoph , Jonathon Shlens, Quoc V. Le

기관: Google Brain

Paper: https://arxiv.org/abs/1909.13719

Summary: automated data augmentation 기법으로써, 오직 두 개의 parameter (N,M) 를 이용하여 기존 Automated Augmentation 기법보다 매우 간단한데 더 좋은 성능을 냄.


기존 연구

  • 기존 automated augmentation 기법(AutoAugment, Fast Autoaugment)들은 separate search phase를 통해서 augmentation의 성능을 높였다. 그러나 이는
    • (1)학습이 매우 오래 걸리며(Computational Cost),
    • (2) 모델과 데이터의 크기에 맞게 조정할 수 없다(unable to adjust the regularization strength based on model or dataset size)

본 연구

  • Separate Search phase를 없앰

  • Parameterization 을 통해 다양한 모델과 데이터 크기에 맞출 수 있음

    • 오직 두 개의 Parameters

      • N: Number of augmentation transformations to apply sequentially.
      • M: Magnitude for all the transformations.

위의 표에서도 알 수 있듯이, RA(RandAugment)의 Search space의 크기가 훨씬 적다.

"The primary goal of RandAugment is to remove the need for a separate search phase on a proxy task."

도입

데이터 증강 기법의 한계

  • Domain specific

→ Learned Data Augmentation 제시

그러나 여기에도 한계가 존재

  • computational requirements
  • Added complexity of two separate optimization procedure
    • 즉 모델과 함께 증강 기법 또한 최적화를 해야함

Neural Architecture Search(NAS)에서, 이처럼 서로 다른 두 최적화 문제(dual optimization)를 수행하면 더 나은 결과를 낳는다고 한다. 그러나 문제는 계산이 너무 많이 필요함.

이에 따라, RandAugment를 제시하며 실험적으로 다음을 보인다.

  • 데이터셋과 모델의 크기에 따라 증강기법의 최적 지점이 달라짐
  • 오직 두 개의 parameter로 단순한 grid search 방법만으로 충분히 좋은 결과를 낼 수 있음을 보임
  • 다양한 데이터셋에 실험했음
    • Leveraging this formulation, we demonstrate state-of- the-art results on CIFAR [22], SVHN [34], and ImageNet [6]. On object detection [27], our method is within 0.3% mAP of state-of-the-art. On ImageNet we achieve a state-of-the-art accuracy of 85.0%, a 0.6% increment over previous methods and 1.0% over base- line augmentation.

Methods

Separate Search Phase → Optimization with only two parameter N,M

"The primary goal of RandAugment is to remove the need for a separate search phase on a proxy task."

이전 논문들에서 Automated Augmentation의 성능은 증강 기법의 종류가 다양할수록 더 좋은 결과를 낸다는 것을 보임

그러나 본 논문에서는 AutoAugment와의 비교를 위해 14개의 augmentation만을 적용했음

AutoAugment는 Search space가 augmentation 기법의 가짓 수에 따라 지수적으로 증가하기 때문에 14가지만으로 제한을 두었다.

이는 일반적인 데이터 증강기법의 가짓 수보다 적은 편이며, 실제 RandAugment 적용 시에는 더욱 많은 augmentation기법들을 적용할 것을 추천한다고 한다.

→ 많은 augmentation 기법이 많을 수록 더 큰 return

N

: Number of augmentation transformations to apply sequentially.

매번 K개의 증강 기법 중 동일한 확률 1/K 로 하나씩 무작위로 총 N번 골라 변환을 적용

만일 K개의 증강 기법을 적용한다고 하면, K^N 만큼의 잠재적 증강 기법을 적용할 수 있는 것과 같다.

M

: Magnitude for all the transformations

이 때, 모든 변환에 대한 magnitude를 동일하게 적용한다.

(이 부분에서 separate search phase를 없앴다는 뜻으로 이해할 수 있다.)

각 변환은 magnitude의 Min과 max를 정해두고 magnitude를 [1,10]까지의 정수로 두어 그 상대적 세기를 동일하게 적용한다.

class RandAugment:
    def __init__(self, n, m):
        self.n = n
        self.m = m      # [0, 10]
        self.augment_list = augment_list()

    def __call__(self, img):
        ops = random.choices(self.augment_list, k=self.n)
        for op, minval, maxval in ops:
            val = (float(self.m) / 10) * float(maxval - minval) + minval
            img = op(img, val)

        return img

RandAugment의 적용 시

  • Network Size가 클수록 보상이 크다
  • Traning Set Size가 클수록 보상이 적다

이는 기존 AutoAugment가 sub-optimal solution임을 나타낸다

AutoAugment는 부분 데이터셋에서 optimal solution을 찾아내고, 이를 전체 데이터셋에 대한 optimal solution이라고 주장.

The dependence of augmentation strength on the dataset and model size indicate that a small proxy task may provide a sub-optimal indicator of performance on a larger task.

오직 두 개의 parameter (N,M)만이 존재하기 때문에 Grid Search 알고리즘이면 충분하다.

a minimal grid search and com- pare these results against computationally-heavy learned data augmentations based on proxy tasks.

위 그래프는 Augmentation 적용 시에 transformation을 다양하게 적용할수록 좋다는 것을 나타낸다.

Learning the probabilities for selecting image transformations

이 섹션의 연구는 future work를 제시.

Question.

  • RandAugment에서는 모든 K개의 augmentation에 대하여 1/K 의 확률로 선택하였다.
  • 그렇다면 1/K가 아닌 다른 확률로 선택하였을 때는 어떠할까?

We further see that the 1st order method always performs better than RandAugment.

Questions & Thoughts

  • 기존 AutoAugment의 전제(가정)에 대한 반박으로 시작하며 매우 간단한 방법으로 더욱 좋은 결과를 낸 것이 인상 깊다.

  • Future Work로 3가지를 제시

    1. 이미지 말고도 다른 도메인에 적용해보자

    2. 더 성능을 높이려면 Separate Search Phase는 필요한 것 같다.

      → 어떠한 상황에 필요할까?

    3. 그리고 어떻게 transformation tailor를 적용하면 좋을까?