生成式對抗網絡GAN研究進展(五)——Deep Convolutional Generative Adversarial Nerworks,DCGAN

【前言】
    本文首先介紹生成式模型,然後着重梳理生成式模型(Generative Models)中生成對抗網絡(Generative Adversarial Network)的研究與發展。作者按照GAN主幹論文、GAN應用性論文、GAN相關論文分類整理了45篇近兩年的論文,着重梳理了主幹論文之間的聯繫與區別,揭示生成式對抗網絡的研究脈絡。
本文涉及的論文有:

  • Goodfellow Ian, Pouget-Abadie J, Mirza M, et al. Generative adversarial nets[C]//Advances in Neural Information Processing Systems. 2014: 2672-2680.
  • Denton E L, Chintala S, Fergus R. Deep Generative Image Models using a Laplacian Pyramid of Adversarial Networks[C]//Advances in neural information processing systems. 2015: 1486-1494.
  • Radford A, Metz L, Chintala S. Unsupervised representation learning with deep convolutional generative adversarial networks[J]. arXiv preprint arXiv:1511.06434, 2015.

5. 深度卷積生成式對抗網絡,Deep Convolutional Generative Adversarial Nerworks

5.1 DCGAN的思想

    DCGAN[1]這篇論文的提出看似並沒有很大創新,但其實它的開源代碼現在被使用和借鑑的頻率最高。這一切必須歸功於這篇工作中比 LAPGAN [2]更 robust 的工程經驗分享。也就是說,DCGAN,Deep Convolutional Generative Adversarial Networks,這個工作[1],指出了許多對於GAN這種不穩定學習方式重要的架構設計和針對CNN這種網絡的特定經驗。重點來看:
    比如他們提出既然之前已經被提出的strided convolutional networks 可以從理論上實現和有pooling的 CNN一樣的功能和效果,那麼strided convolutional networks作爲一個可以 fully differentiable的generator G,在GAN中會表現得更加可控和穩定。
    又比如,本來 Facebook的LAPGAN中指出Batch Normalization(BN)被用在 GAN 中的D上會導致整個學習的collapse ,但是DCGAN中則成功將 BN 用在了 G 和 D 上。這些工程性的突破無疑是更多人選擇DCGAN 這一工作作爲 base 的重要原因。
    另一方面,他們在 visualize generative models 也有許多貢獻。比如他們學習了 ICLR 2016 論文《Generating Sentences From a Continuous Space》中的 interpolate space 的方式,將生成圖片中的 hidden states 都 show 了出來,可以看出圖像逐漸演變的過程。
    與此同時,他們也講 Vector Arithmetic 運用在了圖像上,得到了如下的一些結果:
這裏寫圖片描述

5.2 UNSUPERVISED R EPRESENTATION L EARNING WITH D EEP C ONVOLUTIONAL GENERATIVE A DVERSARIAL N ETWORKS

5.2.1 Introduction

    相較有監督學習,CNN在無監督學習上的進展緩慢。本文結合CNN在有監督學習的成功和無監督學習,提出一類被稱爲“深度卷積生成對抗網絡(DCGANs)”使用生成模型和判別模型,從物體物件到場景圖像,學習到一種層次的表徵。最後,使用學習到的特徵實現新任務——闡明它們可以用於生成圖像的表徵
    無監督地學習表徵,用於有監督學習。

    通過GAN構建表徵,然後重用部分生成模型、判別模型作爲有監督學習的特徵提取器。

    GAN是“最大似然方法”的一個有吸引力的替代方法。

    對於表徵學習,無需啓發式損失函數是有吸引力的。

    GAN有一個通病:訓練過程的unstable : 經常導致生成器產出無意義的輸出。目前在試圖理解和可視化GANs學到什麼以及多層GANs的中間層標準方面研究非常有限。
    這篇文章主要貢獻:

  • 我們提出和評估了一系列卷積GANs在結構拓撲方面約束條件,讓其更加穩定。我們將其命名爲深度卷積生成式對抗網絡Deep Convolutional GANs
  • 使用訓練好的判別模型用於圖像分類,和其他無監督方法的結果具有可比較性。
  • 可視化了卷積核
  • 生成模型具有向量算是運算性能

Representation Learning from Unlabeled Data
無監督表徵學習是一個CV領域中相當好的研究問題
經典的無監督表徵學習方法:聚類分析利用聚類的簇改善分類性能
In the context of images

  • Do hierarchical clustering of image patches (Coates & Ng, 2012) to learn powerful image representations.
  • Train auto-encoders (convolutionally, stacked (Vincent et al., 2010), separating the what and where components of the code (Zhao et al., 2015), ladder structures (Rasmus et al., 2015)) that encode an image into a compact code, and decode the code to reconstruct the image as accurately as possible.
  • Deep belief networks (Lee et al., 2009) have also been shown to work well in learning hierarchical representations.

Generating natural images
分爲參數生成模型 和 非參生成模型
Non-parametric models
    The non-parametric models often do matching from a database of existing images, often matching patches of images.
Parametric models
    A variational sampling approach to generating images (Kingma & Welling, 2013)
    Another approach generates images using an iterative forward diffusion process(Sohl-Dickstein et al., 2015)
Generative Adversarial Networks (Goodfellow et al., 2014) generated images suffering from being noisy and incomprehensible.
    A laplacian pyramid extension to this approach (Denton et al., 2015) showed higher quality images, but they still suffered from the objects looking wobbly because of noise introduced in chaining multiple models.
    A recurrent network approach (Gregor et al., 2015) and a deconvolution network approach (Dosovitskiy et al., 2014) have also recently had some success with generating natural images, not leveraged the generators for supervised tasks

5.2.3 DCGAN網絡模型

    歷史上使用CNN擴展GANs模型不是很成功(這裏的“擴展”含義是什麼?原始的GAN和LAPGAN都有用卷積網絡作爲生成模型/判別模型?)
    這驅使LAPGAN[2]的作者開發一種替代方法:迭代地升級低分辨率圖像
    Attempting to scale GANs using CNN architectures commonly used in the supervised literature
    試圖使用文獻中提及的通常用於有監督學習的CNN架構擴展GANs時遇到了困難。最終找到了一類結構,可以在多種數據集上穩定地訓練,並且產生更高分辨率的圖像:深度卷積生成網絡(DCGAN)。
Core to our approach is adopting and modifying three recently demonstrated changes to CNN architectures.
方法的核心:採用、修改了三種最近CNN結構的改進

All convolutional net (Springenberg et al., 2014) 全卷積網絡

  • 判別模型:使用帶步長的卷積(strided convolutions)取代了的空間池化(spatial pooling),容許網絡學習自己的空間下采樣(spatial downsampling)。
  • 生成模型:使用微步幅卷積(fractional strided),容許它學習自己的空間上採樣(spatial upsampling)。

在卷積特徵之上消除全連接層

  • e.g. Global average pooling which has been utilized in state of the
    art image classification models (Mordvintsev et al.).
  • 全局平均pooling有助於模型的穩定性,但損害收斂速度
    輸入:服從均勻分佈的噪聲向量,100維;
    輸出:並輸出一個64x64x3 的RGB圖像。
  • 激活函數:
    生成模型:輸出層用Tanh函數,其它層用ReLU激活函數。
    判別模型:所有層使用LeakyReLU

Batch Normalization 批標準化
    解決因糟糕的初始化引起的訓練問題,使得梯度能傳播更深層次。
    Batch Normalization證明了生成模型初始化的重要性避免生成模型崩潰:生成的所有樣本都在一個點上(樣本相同),這是訓練GANs經常遇到的失敗現象。
    This proved critical to get deep generators to begin learning, preventing the generator from collapsing all samples to a single point which is a common failure mode observed in GANs.
這裏寫圖片描述
    100維的噪聲被投影到一個小空間幅度的卷積表徵中。有四個微步幅卷積(在一些論文中,它們被誤稱爲反捲積deconvolutions),然後將這些高層表徵轉換到64 * 64像素的RGB三通道圖片。沒有全連接層,沒有池化層。
原文對DCGAN的網絡結構介紹的不是很清楚,Semantic Image Inpainting with Perceptual and
Contextual Losses
這篇文章使用了DCGAN進行圖像修復,對網絡結構和參數介紹的比較清楚(圖中判別網絡D的各層卷積操作的通道數應該和生成網絡G一樣,但是圖中是不同的,懷疑是不是判別網絡D的通道數(卷積核數目)畫錯了?)。如下圖所示:
    這裏寫圖片描述

    上圖a是生成模型G:輸入(100 維噪聲向量Z)到第一個層:全連接 100 —> 1024,然後再把1024的一維向量reshape成1024個通道的4*4的feature map。基本規律是生成網絡的每一個下一層是反捲積層,通道數減半,圖像尺寸加倍。
    下圖b判別模型D:就是一個沒有pooling的全卷積網絡,輸出是一個標量,表示輸入數據屬於訓練數據而非生成樣本的概率。

5.3 實驗

    在LSUN臥室數據集上訓練DCGAN,生成的圖像非常逼真:
這裏寫圖片描述

    We demonstrate that an unsupervised DCGAN trained on a large image dataset can also learn a hierarchy of features that are interesting.
    Using guided backpropagation as proposed by (Springenberg et al., 2014), we show in Fig.5 that the features learnt by the discriminator activate on typical parts of a bedroom, like beds and windows.
這裏寫圖片描述

    Vector arithmetic for visual concepts
這裏寫圖片描述

Reference

[1] Radford A, Metz L, Chintala S. Unsupervised representation learning with deep convolutional generative adversarial networks[J]. arXiv preprint arXiv:1511.06434, 2015.
[2] Denton E L, Chintala S, Fergus R. Deep Generative Image Models using a Laplacian Pyramid of Adversarial Networks[C]//Advances in neural information processing systems. 2015: 1486-1494.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章