[논문 리뷰] Precise Recovery of Latent Vectors From Generative Adversarial Networks

2020. 11. 18. 16:37카테고리 없음

  • Conference: ICLR 2017
  • Authors: Zachary C Lipton, Subarna Tripathi
  • Affiliation: University of California, San Diego.
  • Contribution:
    • stochastic clipping
      • GAN에서 주어진 이미지의 latent code를 복원하는 과정에서 latent code z에 stochastic clipping 을 제안
      • 간단히 구현 가능하며, 기존 방식보다 더욱 정확하고 노이즈에 강건한 복원을 간단하게 가능케 함.
      • 또한, 학습할 때 사용하지 않은 도메인의 이미지를 projection 하는 과정에서도 유의미한 encoding을 보인다.

Introduction

본 논문에서는 gradient 기반으로 GAN에서 주어진 이미지의 latent vector를 복원하는 과정에서 "stochastic clipping"을 제안하고, 아래 두 가지 질문에 대한 답을 구하고자 한다.

  1. Will the optimization achieve the globally minimal loss of 0 or get stuck in sub-optimal critical points?
  2. Will the optimization recover precisely the same input every time?

실험 결과에서 stochastic clipping을 이용할 경우 1000회의 반복 실험에서 온전히 latent vector를 복원할 수 있음을 확인했다.

Gradient-based input reconstruction and stochastic clipping

생성자의 역변환을 구하기 위해서 gradient 기반으로 아래와 같이 무작위로 초기화 된 latent code로부터 복원한다.

위 방식의 문제로 주어진 optimization 문제는 Non-convex이기 때문에 쉽게 local minimum에 빠진다는 것이다.

이에 따라, 초기에 저자들은 DCGAN의 latent vector는 -1 부터 1 사이에 uniform하게 있어야 하기에 아래와 같은 단순한 clipping을 수행하였다. 그러나 아래 standard clipping 방식은 latent vector의 값이 1과 -1에서 정체된 문제를 가졌고, standard clipping을 개선한 stochastic clipping 을 제안한다.

# clipping
if clip == 'standard':
    z_approx.data[z_approx.data > 1] = 1
    z_approx.data[z_approx.data < -1] = -1

implementation of Stochasic Clipping

코드는 아래와 같이 매우 간단하다. 실제 논문의 주요 아이디어인 stochastic clipping만 고려한다면 1~2줄 내외로 구현 가능.

if clip == 'stochastic':
    z_approx.data[z_approx.data > 1] = random.uniform(-1, 1)
    z_approx.data[z_approx.data < -1] = random.uniform(-1, 1)

Results

노이즈에도 강건하고, 못 본 이미지도 잘 복원한다.

Thoughts..

  • Stochasticity를 추가함으로써 Local minimum에 빠지는 문제를 해결한 것이 요인이 되었지 않을까.