본문 바로가기

비지도학습/GAN

A Style-Based Generator Architecture for Generative Adversarial Networks, 2019(버전 1)

A Style-Based Generator Architecture for Generative Adversarial Networks 생성적 적대 네트워크를위한 스타일 기반 생성기 아키텍처(NVIDIA)
Abstract
We propose an alternative generator architecture for generative adversarial networks, borrowing from style transfer literature. 
The new architecture leads to an automatically learned, unsupervised separation of high-level attributes (e.g., pose and identity when trained on human faces) and stochastic variation in the generated images (e.g., freckles, hair), and it enables intuitive, scale-specific control of the synthesis. 
The new generator improves the state-of-the-art in terms of traditional distribution quality metrics, leads to demonstrably better interpolation properties, and also better disentangles the latent factors of variation. 
To quantify interpolation quality and disentanglement, we propose two new, automated methods that are applicable to any generator architecture. 
Finally, we introduce a new, highly varied and high-quality dataset of human faces.
우리는 스타일 이전 문헌에서 차용 한 생성 적 적 네트워크를위한 대체 생성기 아키텍처를 제안합니다.
새로운 아키텍처는 자동으로 학습되고 감독되지 않은 높은 수준의 속성 (예 : 사람 얼굴에 대해 훈련 된 포즈 및 정체성)과 생성 된 이미지 (예 : 주근깨, 머리카락)의 확률 적 변화를 분리하고 직관적이고 스케일링을 가능하게합니다. 합성의 특정 제어.
새로운 생성기는 기존의 분포 품질 메트릭 측면에서 최첨단을 개선하고 더 나은 보간 특성을 입증하며 잠재적 인 변동 요인을 더 잘 분리합니다.
보간 품질과 엉킴 해제를 정량화하기 위해 모든 생성기 아키텍처에 적용 할 수있는 두 가지 새로운 자동화 방법을 제안합니다.
마지막으로, 우리는 인간 얼굴의 새롭고 매우 다양하며 고품질의 데이터 세트를 소개합니다.

1. Introduction
The resolution and quality of images produced by generative methods — especially generative adversarial networks (GAN) [22] — have seen rapid improvement recently [30, 45, 5]. 
Yet the generators continue to operate as black boxes, and despite recent efforts [3], the understanding of various aspects of the image synthesis process, e.g., the origin of stochastic features, is still lacking. 
The properties of the latent space are also poorly understood, and the commonly demonstrated latent space interpolations [13, 52, 37] provide no quantitative way to compare different generators against each other.
Motivated by style transfer literature [27], we re-design the generator architecture in a way that exposes novel ways to control the image synthesis process. 
Our generator starts from a learned constant input and adjusts the “style” of the image at each convolution layer based on the latent code, therefore directly controlling the strength of image features at different scales. 
Combined with noise injected directly into the network, this architectural change leads to automatic, unsupervised separation of high-level attributes (e.g., pose, identity) from stochastic variation (e.g., freckles, hair) in the generated images, and enables intuitive scale-specific mixing and interpolation operations. 
We do not modify the discriminator or the loss function in any way, and our work is thus orthogonal to the ongoing discussion about GAN loss functions, regularization, and hyperparameters [24, 45, 5, 40, 44, 36].
Our generator embeds the input latent code into an intermediate latent space, which has a profound effect on how the factors of variation are represented in the network. 
The input latent space must follow the probability density of the training data, and we argue that this leads to some degree of unavoidable entanglement. 
Our intermediate latent space is free from that restriction and is therefore allowed to be disentangled. 
As previous methods for estimating the degree of latent space disentanglement are not directly applicable in our case, we propose two new automated metrics —perceptual path length and linear separability — for quantifying these aspects of the generator. 
Using these metrics, we show that compared to a traditional generator architecture, our generator admits a more linear, less entangled representation of different factors of variation.
Finally, we present a new dataset of human faces (Flickr-Faces-HQ, FFHQ) that offers much higher quality and covers considerably wider variation than existing high-resolution datasets (Appendix A). 
We have made this dataset publicly available, along with our source code and pre-trained networks.
The accompanying video can be found under the same link.
생성 적 방법, 특히 생성 적 적대 네트워크 (GAN) [22]에 의해 생성 된 이미지의 해상도와 품질은 최근 급속한 개선을 보였습니다 [30, 45, 5].
그러나 생성기는 계속해서 블랙 박스로 작동하고 있으며 최근의 노력에도 불구하고 [3] 이미지 합성 프로세스의 다양한 측면 (예 : 확률 적 특징의 기원)에 대한 이해는 여전히 부족합니다.
잠재 공간의 특성도 잘 이해되지 않았으며 일반적으로 입증 된 잠재 공간 보간 [13, 52, 37]은 서로 다른 생성기를 서로 비교할 수있는 정량적 방법을 제공하지 않습니다.
스타일 전달 문헌 [27]에 동기를 부여하여 이미지 합성 프로세스를 제어하는 ​​새로운 방법을 노출하는 방식으로 생성기 아키텍처를 재 설계했습니다.
생성기는 학습 된 상수 입력에서 시작하여 잠복 코드를 기반으로 각 컨볼 루션 레이어에서 이미지의 "스타일"을 조정하므로 다양한 스케일에서 이미지 특징의 강도를 직접 제어합니다.
네트워크에 직접 주입 된 노이즈와 결합 된이 아키텍처 변경은 생성 된 이미지의 확률 적 변형 (예 : 주근깨, 머리카락)에서 높은 수준의 속성 (예 : 포즈, 정체성)을 감독없이 자동으로 분리하고 직관적 인 스케일을 가능하게합니다. 특정 믹싱 및 보간 작업.
우리는 어떤 식 으로든 판별 자 또는 손실 함수를 수정하지 않으며 따라서 우리의 작업은 GAN 손실 함수, 정규화 및 하이퍼 파라미터 [24, 45, 5, 40, 44, 36]에 대한 지속적인 논의와 직교합니다.
생성기는 입력 잠복 코드를 중간 잠복 공간에 내장하여 네트워크에서 변동 요인이 표현되는 방식에 큰 영향을 미칩니다.
입력 잠재 공간은 훈련 데이터의 확률 밀도를 따라야하며 이것이 어느 정도 피할 수없는 얽힘을 초래한다고 주장합니다.
우리의 중간 잠재 공간은 그러한 제한으로부터 자유롭고 따라서 얽히게 될 수 있습니다.
우리의 경우에는 잠재 공간 해체 정도를 추정하는 이전 방법이 직접 적용되지 않았기 때문에 생성기의 이러한 측면을 정량화하기 위해 두 가지 새로운 자동화 메트릭 인 지각 경로 길이 및 선형 분리 성을 제안합니다.
이러한 메트릭을 사용하여 기존 생성기 아키텍처와 비교할 때 생성기가 다양한 변동 요인에 대해보다 선형적이고 덜 얽힌 표현을 인정한다는 것을 보여줍니다.
마지막으로, 우리는 훨씬 더 높은 품질을 제공하고 기존 고해상도 데이터 세트 (부록 A)보다 훨씬 더 넓은 변형을 다루는 새로운 인간 얼굴 데이터 세트 (Flickr-Faces-HQ, FFHQ)를 제시합니다.
우리는 소스 코드 및 사전 훈련 된 네트워크와 함께이 데이터 세트를 공개적으로 사용할 수 있도록했습니다.
함께 제공되는 비디오는 동일한 링크에서 찾을 수 있습니다.

2. Style-based generator

그림 1. 기존 생성기 [30]가 잠재 코드를 공급하는 동안 입력 레이어 만 있지만 먼저 입력을 중간 잠재 공간 W에 매핑 한 다음 생성기를 제어합니다. 각 컨볼 루션 계층에서 적응 형 인스턴스 정규화 (AdaIN)를 통해 가우스 노이즈는 비선형 성을 평가하기 전에 각 컨볼 루션 후에 추가됩니다. 여기서 "A"는 학습 한 아핀 변환, "B"는 학습 된 채널 별 스케일링 계수를 노이즈 입력에 적용합니다. 매핑 네트워크 f는 8 개의 레이어로 구성되고 합성 네트워크 g는 18 개의 레이어로 구성됩니다. 각 해상도 (4 2 − 10242 ). 마지막 레이어의 출력은 Karras et al.과 유사하게 별도의 1 × 1 컨볼 루션을 사용하여 RGB로 변환됩니다. [30]. 우리의 발전기는 기존 발전기의 23.1M에 비해 총 26.2M의 훈련 가능한 매개 변수를 가지고 있습니다.


Traditionally the latent code is provided to the generator through an input layer, i.e., the first layer of a feedforward network (Figure 1a). 
We depart from this design by omitting the input layer altogether and starting from a learned constant instead (Figure 1b, right). 
Given a latent code z in the input latent space Z, a non-linear mapping network f : Z → W first produces w ∈ W (Figure 1b, left). 
For simplicity, we set the dimensionality of both spaces to 512, and the mapping f is implemented using an 8-layer MLP, a decision we will analyze in Section 4.1.
Learned affine transformations then specialize w to styles $y = (ys, yb)$ that control adaptive instance normalization (AdaIN) [27, 17, 21, 16] operations after each convolution layer of the synthesis network g. 
The AdaIN operation is defined as (1), where each feature map $x_i$ is normalized separately, and then scaled and biased using the corresponding scalar components from style y. 
전통적으로 잠재 코드는 입력 계층, 즉 피드 포워드 네트워크의 첫 번째 계층을 통해 생성기에 제공됩니다 (그림 1a).
입력 레이어를 모두 생략하고 대신 학습 된 상수에서 시작하여이 디자인에서 출발합니다 (그림 1b, 오른쪽).
입력 잠재 공간 Z의 잠재 코드 z가 주어지면 비선형 매핑 네트워크 f : Z → W는 먼저 w ∈ W를 생성합니다 (그림 1b, 왼쪽).
단순화를 위해 두 공간의 차원을 512로 설정하고 매핑 f는 섹션 4.1에서 분석 할 결정 인 8 계층 MLP를 사용하여 구현됩니다.
학습 된 아핀 변환은 합성 네트워크 g의 각 회선 계층 이후에 적응 형 인스턴스 정규화 (AdaIN) [27, 17, 21, 16] 작업을 제어하는 ​​스타일 $ y = (ys, yb) $로 전문화됩니다.
AdaIN 연산은 (1)로 정의되며, 여기서 각 기능 맵 $ x_i $는 개별적으로 정규화 된 다음 스타일 y의 해당 스칼라 구성 요소를 사용하여 크기가 조정되고 바이어스됩니다.
(1) : $AdaIN(x_i,y) = y_{s,i}fraction{X_i-µ(X_i}{σ(X_i)}+y_{b,i}$

Thus the dimensionality of y is twice the number of feature maps on that layer.
Comparing our approach to style transfer, we compute the spatially invariant style y from vector w instead of an example image. 
We choose to reuse the word “style” for y because similar network architectures are already used for feedforward style transfer [27], unsupervised image-toimage translation [28], and domain mixtures [23]. 
Compared to more general feature transforms [38, 57], AdaIN is particularly well suited for our purposes due to its efficiency and compact representation. 
Finally, we provide our generator with a direct means to generate stochastic detail by introducing explicit noise inputs. 
These are single-channel images consisting of uncorrelated Gaussian noise, and we feed a dedicated noise image to each layer of the synthesis network. 
The noise image is broadcasted to all feature maps using learned perfeature scaling factors and then added to the output of the corresponding convolution, as illustrated in Figure 1b. 
The implications of adding the noise inputs are discussed in Sections 3.2 and 3.3.
따라서 y의 차원은 해당 레이어에있는 피처 맵 수의 두 배입니다.
스타일 전송에 대한 접근 방식을 비교하여 예제 이미지 대신 벡터 w에서 공간적으로 고정 된 스타일 y를 계산합니다.
유사한 네트워크 아키텍처가 이미 피드 포워드 스타일 전송 [27], 감독되지 않은 이미지-이미지 변환 [28] 및 도메인 혼합 [23]에 사용되기 때문에 y에 대해 "스타일"이라는 단어를 재사용하기로 선택했습니다.
보다 일반적인 기능 변환 [38, 57]에 비해 AdaIN은 효율성과 간결한 표현으로 인해 우리의 목적에 특히 적합합니다.
마지막으로, 명시적인 노이즈 입력을 도입하여 확률 적 세부 정보를 생성하는 직접적인 수단을 생성기에 제공합니다.
이것은 상관 관계가없는 가우스 노이즈로 구성된 단일 채널 이미지이며 합성 네트워크의 각 레이어에 전용 노이즈 이미지를 제공합니다.
노이즈 이미지는 학습 된 기능별 스케일링 계수를 사용하여 모든 기능 맵에 브로드 캐스트 된 다음 그림 1b에 설명 된대로 해당 컨볼 루션의 출력에 추가됩니다.
노이즈 입력 추가의 의미는 섹션 3.2 및 3.3에서 설명합니다.


2.1. Quality of generated images 생성 된 이미지의 품질
Before studying the properties of our generator, we demonstrate experimentally that the redesign does not compromise image quality but, in fact, improves it considerably.
Table 1 gives Frechet inception distances (FID) [ ´ 25] for various generator architectures in CELEBA-HQ [30] and our new FFHQ dataset (Appendix A). 
Results for other datasets are given in Appendix E. 
Our baseline configuration (A) is the Progressive GAN setup of Karras et al. [30], from which we inherit the networks and all hyperparameters except where stated otherwise. 
We first switch to an improved baseline (B) by using bilinear up/downsampling operations [64], longer training, and tuned hyperparameters. 
A detailed description of training setups and hyperparameters is included in Appendix C. 
We then improve this new baseline further by adding the mapping network and AdaIN operations (C), and make a surprising observation that the network no longer benefits from feeding the latent code into the first convolution layer. 
We therefore simplify the architecture by removing the traditional input layer and starting the image synthesis from a learned 4 × 4 × 512 constant tensor(D). 
We find it quite remarkable that the synthesis network is able to produce meaningful results even though it receives input only through the styles that control the AdaIN operations.
Finally, we introduce the noise inputs (E) that improve the results further, as well as novel mixing regularization (F) that decorrelates neighboring styles and enables more finegrained control over the generated imagery (Section 3.1).
We evaluate our methods using two different loss functions: for CELEBA-HQ we rely on WGAN-GP [24], while FFHQ uses WGAN-GP for configuration A and nonsaturating loss [22] with R1 regularization [44, 51, 14] for configurations B–F. 
We found these choices to give the best results. 
생성기의 특성을 연구하기 전에 재 설계가 이미지 품질을 손상시키지 않지만 실제로는 상당히 향상된다는 것을 실험적으로 보여줍니다.
표 1은 CELEBA-HQ [30] 및 새로운 FFHQ 데이터 세트 (부록 A)의 다양한 생성기 아키텍처에 대한 FID (Frechet inception distance) [´ 25]를 제공합니다.
다른 데이터 세트에 대한 결과는 부록 E에 나와 있습니다.
우리의 기본 구성 (A)은 Karras 등의 프로그레시브 GAN 설정입니다. [30], 달리 명시되지 않는 한 네트워크와 모든 하이퍼 파라미터를 상속합니다.
먼저 쌍 선형 업 / 다운 샘플링 작업 [64], 더 긴 훈련 및 튜닝 된 하이퍼 파라미터를 사용하여 개선 된 기준선 (B)으로 전환합니다.
훈련 설정 및 하이퍼 파라미터에 대한 자세한 설명은 부록 C에 포함되어 있습니다.
그런 다음 매핑 네트워크와 AdaIN 연산 (C)을 추가하여이 새로운 기준을 추가로 개선하고 네트워크가 더 이상 잠재 코드를 첫 번째 컨볼 루션 계층에 공급하는 것으로부터 혜택을받지 않는다는 놀라운 관찰을 수행합니다.
따라서 기존 입력 레이어를 제거하고 학습 된 4 × 4 × 512 상수 텐서 (D)에서 이미지 합성을 시작하여 아키텍처를 단순화합니다.
우리는 합성 네트워크가 AdaIN 작업을 제어하는 ​​스타일을 통해서만 입력을 수신하더라도 의미있는 결과를 생성 할 수 있다는 점이 매우 놀랍습니다.
마지막으로 결과를 더욱 향상시키는 노이즈 입력 (E)과 인접한 스타일을 장식하고 생성 된 이미지를보다 세밀하게 제어 할 수있는 새로운 혼합 정규화 (F)를 소개합니다 (섹션 3.1).
두 가지 다른 손실 함수를 사용하여 방법을 평가합니다. CELEBA-HQ의 경우 WGAN-GP [24]에 의존하는 반면 FFHQ는 구성 A에 WGAN-GP를 사용하고 R1 정규화 [44, 51, 14]를 사용하여 비 포화 손실 [22]을 사용합니다. 구성 B–F.
최상의 결과를 제공하기 위해 이러한 선택을 찾았습니다.
Our contributions do not modify the loss function.
We observe that the style-based generator (E) improves FIDs quite significantly over the traditional generator (B), almost 20%, corroborating the large-scale ImageNet measurements made in parallel work [6, 5]. 
Figure 2 shows an uncurated set of novel images generated from the FFHQ dataset using our generator. 
As confirmed by the FIDs, the average quality is high, and even accessories such as eyeglasses and hats get successfully synthesized. 
For this figure, we avoided sampling from the extreme regions of W using the so-called truncation trick [42, 5, 34] —Appendix B details how the trick can be performed in W instead of Z. 
Note that our generator allows applying the truncation selectively to low resolutions only, so that highresolution details are not affected.
All FIDs in this paper are computed without the truncation trick, and we only use it for illustrative purposes in Figure 2 and the video. 
All images are generated in 10242 resolution.
우리의 기여는 손실 함수를 수정하지 않습니다.
우리는 스타일 기반 생성기 (E)가 기존 생성기 (B)에 비해 거의 20 % 인 FID를 상당히 개선하여 병렬 작업에서 이루어진 대규모 ImageNet 측정을 확증합니다 [6, 5].
그림 2는 생성기를 사용하여 FFHQ 데이터 세트에서 생성 된 큐레이팅되지 않은 새로운 이미지 세트를 보여줍니다.
FID에서 확인한 바와 같이 평균 품질이 높고 안경, 모자와 같은 액세서리도 성공적으로 합성됩니다.
이 그림의 경우, 소위 절단 트릭 [42, 5, 34]을 사용하여 W의 극단 영역에서 샘플링하는 것을 피했습니다. 부록 B는 트릭이 Z 대신 W에서 수행 될 수있는 방법을 자세히 설명합니다.
생성기는 저해상도에만 선택적으로 잘라내기를 적용 할 수 있으므로 고해상도 세부 정보는 영향을받지 않습니다.
이 백서의 모든 FID는 자르기 트릭없이 계산되며 그림 2와 비디오의 설명 목적으로 만 사용합니다.
모든 이미지는 10242 해상도로 생성됩니다.


2.2. Prior art 선행 기술
Much of the work on GAN architectures has focused on improving the discriminator by, e.g., using multiple discriminators [18, 47, 11], multiresolution discrimination [60, 55], or self-attention [63]. 
The work on generator side has mostly focused on the exact distribution in the input latent space [5] or shaping the input latent space via Gaussian mixture models [4], clustering [48], or encouraging convexity [52].
Recent conditional generators feed the class identifier through a separate embedding network to a large number of layers in the generator [46], while the latent is still provided though the input layer. 
A few authors have considered feeding parts of the latent code to multiple generator layers [9, 5]. 
In parallel work, Chen et al. [6] “self modulate” the generator using AdaINs, similarly to our work, but do not consider an intermediate latent space or noise inputs.
GAN 아키텍처에 대한 많은 작업은 예를 들어 다중 판별 기 [18, 47, 11], 다중 해상도 판별 [60, 55] 또는 자기주의 [63]를 사용하여 판별기를 개선하는 데 중점을 두었습니다.
생성기 측의 작업은 대부분 입력 잠복 공간의 정확한 분포 [5] 또는 가우스 혼합 모델 [4], 클러스터링 [48] 또는 볼록성 장려 [52]를 통해 입력 잠복 공간을 형성하는 데 중점을 두었습니다.
최근의 조건부 생성기는 별도의 임베딩 네트워크를 통해 생성기 [46]의 많은 레이어에 클래스 식별자를 공급하는 반면, 잠재 성은 여전히 ​​입력 레이어를 통해 제공됩니다.
몇몇 저자는 잠재 코드의 일부를 여러 생성기 계층에 공급하는 것을 고려했습니다 [9, 5].
병렬 작업에서 Chen et al. [6] 우리의 작업과 유사하게 AdaIN을 사용하여 발전기를 "자체 변조"하지만 중간 잠재 공간이나 잡음 입력을 고려하지 않습니다.

3. Properties of the style-based generator 스타일 기반 생성기의 속성
Our generator architecture makes it possible to control the image synthesis via scale-specific modifications to the styles. 
We can view the mapping network and affine transformations as a way to draw samples for each style from a learned distribution, and the synthesis network as a way to generate a novel image based on a collection of styles. 
The effects of each style are localized in the network, i.e., modifying a specific subset of the styles can be expected to affect only certain aspects of the image.
To see the reason for this localization, let us consider how the AdaIN operation (Eq. 1) first normalizes each channel to zero mean and unit variance, and only then applies scales and biases based on the style. 
The new per-channel statistics, as dictated by the style, modify the relative importance of features for the subsequent convolution operation, but they do not depend on the original statistics because of the normalization. 
Thus each style controls only one convolution before being overridden by the next AdaIN operation.
우리의 생성기 아키텍처를 사용하면 스케일 별 스타일 수정을 통해 이미지 합성을 제어 할 수 있습니다.
학습 된 분포에서 각 스타일에 대한 샘플을 그리는 방법으로 매핑 네트워크와 아핀 변환을 볼 수 있고 스타일 모음을 기반으로 새로운 이미지를 생성하는 방법으로 합성 네트워크를 볼 수 있습니다.
각 스타일의 효과는 네트워크에서 지역화됩니다. 즉, 스타일의 특정 하위 집합을 수정하면 이미지의 특정 측면에만 영향을 미칠 수 있습니다.
이 지역화의 이유를 알아보기 위해 AdaIN 연산 (Eq. 1)이 먼저 각 채널을 0 평균 및 단위 분산으로 정규화 한 다음 스타일에 따라 척도 및 편향 만 적용하는 방법을 고려해 보겠습니다.
스타일에 따라 새로운 채널 별 통계는 후속 컨볼 루션 작업에 대한 기능의 상대적 중요도를 수정하지만 정규화로 인해 원래 통계에 의존하지 않습니다.
따라서 각 스타일은 다음 AdaIN 작업에 의해 재정의되기 전에 하나의 회선 만 제어합니다.

3.1. Style mixing

그림 3. 각각의 잠복 코드 (소스 A와 B)에서 두 세트의 이미지가 생성되었습니다. 나머지 이미지는 소스 B에서 스타일의 지정된 하위 집합을 복사하고 소스 A에서 나머지를 가져옵니다. 거친 공간에 해당하는 스타일 복사 해상도 (4^2 – 8^2 ) 소스 B에서 포즈, 일반적인 헤어 스타일, 얼굴 형 및 안경과 같은 높은 수준의 측면을 가져 오며 모든 색상 (눈, 머리카락, 조명) 및 미세한 얼굴 특징은 A와 비슷합니다. 대신 중간 해상도 스타일 (16^2 – 32^2 ) B에서 상속 작은 규모의 얼굴 특징, 머리 스타일, B에서 눈을 떴거나 감았으며 포즈, 일반적인 얼굴 모양 및 A의 안경은 보존됩니다. 마지막으로 고급 스타일 복사 (64^2 – 1024^2 ) B에서 주로 색 구성표와 미세 구조를 가져옵니다.


To further encourage the styles to localize, we employ mixing regularization, where a given percentage of images are generated using two random latent codes instead of one during training. 
When generating such an image, we simply switch from one latent code to another — an operation we refer to as style mixing— at a randomly selected point in the synthesis network. 
To be specific, we run two latent codes z1, z2 through the mapping network, and have the corresponding w1, w2 control the styles so that w1 applies before the crossover point and w2 after it. 
This regularization technique prevents the network from assuming that adjacent styles are correlated.
Table 2 shows how enabling mixing regularization during training improves the localization considerably, indicated by improved FIDs in scenarios where multiple latents are mixed at test time. 
Figure 3 presents examples of images synthesized by mixing two latent codes at various scales.
We can see that each subset of styles controls meaningful high-level attributes of the image.
스타일의 현지화를 더욱 장려하기 위해 우리는 훈련 중에 하나가 아닌 두 개의 임의의 잠재 코드를 사용하여 주어진 비율의 이미지가 생성되는 혼합 정규화를 사용합니다.
이러한 이미지를 생성 할 때 합성 네트워크에서 무작위로 선택된 지점에서 하나의 잠복 코드에서 다른 코드 (스타일 믹싱이라고하는 작업)로 간단히 전환합니다.
구체적으로 우리는 매핑 네트워크를 통해 두 개의 잠복 코드 z1, z2를 실행하고 해당 w1, w2가 스타일을 제어하도록하여 w1이 크로스 오버 지점 이전에 적용되고 w2 이후에 적용되도록합니다.
이 정규화 기술은 네트워크가 인접한 스타일이 상관 관계가 있다고 가정하지 못하도록합니다.
표 2는 학습 중에 혼합 정규화를 활성화하면 현지화가 상당히 개선되는 방법을 보여줍니다. 이는 테스트 시간에 여러 잠재 성이 혼합 된 시나리오에서 개선 된 FID로 표시됩니다.
그림 3은 두 개의 잠복 코드를 다양한 규모로 혼합하여 합성 한 이미지의 예를 보여줍니다.
스타일의 각 하위 집합이 이미지의 의미있는 상위 수준 속성을 제어 함을 알 수 있습니다.

그림 4. 확률 적 변동의 예. (a) 2개 생성 이미지. (b) 입력 노이즈의 다른 실현으로 확대. 전체적인 모양은 거의 동일하지만 개별 머리카락 매우 다르게 배치됩니다. (c) 각 픽셀의 표준 편차 노이즈의 영향을받는 이미지 부분을 강조하는 100 가지 이상의 다른 실현. 주요 영역은 머리카락, 실루엣 및 배경 부분이지만 눈 반사에도 흥미로운 확률 적 변형이 있습니다. 정체성과 같은 글로벌 측면 포즈는 확률 적 변화의 영향을받지 않습니다.


3.2. Stochastic variation 확률적 변동

그림 5. 생성기의 여러 계층에서 노이즈 입력의 효과. (a) 모든 레이어에 노이즈가 적용됩니다. (b) 소음이 없습니다. (c) 소음 미세한 층만 (64^2 – 1024^2 ). (d) 거친 레이어에서만 노이즈 (4^2 – 32^2 ). 인위적으로 소음을 생략하면 특징없는 "회화적인"모습. 거친 노이즈로 인해 머리카락이 크게 말리고 더 큰 배경이 나타납니다. 미세한 소음은 더 미세한 머리카락, 더 미세한 배경을 이끌어냅니다. 디테일, 피부 모공.
그림 6. 두 가지 변동 요인이있는 예시적인 예 (이미지 특징, 예 : 남성 성 및 모발 길이). (a) 예 일부 조합 (예 : 장발 남성)이있는 트레이닝 세트 잃어버린. (b) 이렇게하면 Z에서 이미지 특징으로의 매핑이 금지 된 조합이 Z에서 사라지도록 곡선 화됩니다. 잘못된 조합의 샘플링을 방지합니다. (c) 배운 것 Z에서 W 로의 매핑은 대부분의 뒤틀림을 "실행 취소"할 수 있습니다.


There are many aspects in human portraits that can be regarded as stochastic, such as the exact placement of hairs, stubble, freckles, or skin pores. 
Any of these can be randomized without affecting our perception of the image as long as they follow the correct distribution.
Let us consider how a traditional generator implements stochastic variation. 
Given that the only input to the network is through the input layer, the network needs to invent a way to generate spatially-varying pseudorandom numbers from earlier activations whenever they are needed. 
This consumes network capacity and hiding the periodicity of generated signal is difficult — and not always successful, as evidenced by commonly seen repetitive patterns in generated images. 
Our architecture sidesteps these issues altogether by adding per-pixel noise after each convolution. 
Figure 4 shows stochastic realizations of the same underlying image, produced using our generator with different noise realizations. 
We can see that the noise affects only the stochastic aspects, leaving the overall composition and high-level aspects such as identity intact. 
Figure 5 further illustrates the effect of applying stochastic variation to different subsets of layers. 
Since these effects are best seen in animation, please consult the accompanying video for a demonstration of how changing the noise input of one layer leads to stochastic variation at a matching scale.
We find it interesting that the effect of noise appears tightly localized in the network.
We hypothesize that at any point in the generator, there is pressure to introduce new content as soon as possible, and the easiest way for our network to create stochastic variation is to rely on the noise provided. 
A fresh set of noise is available for every layer, and thus there is no incentive to generate the stochastic effects from earlier activations, leading to a localized effect.
머리카락, 수염, 주근깨 또는 모공의 정확한 배치와 같이 확률 적으로 간주 될 수있는 인간 초상화에는 많은 측면이 있습니다.
이들 중 어느 것이 든 올바른 분포를 따르는 한 이미지에 대한 우리의 인식에 영향을주지 않고 무작위로 추출 할 수 있습니다.
기존 생성기가 확률 적 변형을 구현하는 방법을 고려해 보겠습니다.
네트워크에 대한 유일한 입력이 입력 계층을 통한다는 점을 감안할 때 네트워크는 필요할 때마다 이전 활성화에서 공간적으로 변화하는 의사 난수를 생성하는 방법을 발명해야합니다.
이는 네트워크 용량을 소모하고 생성 된 신호의 주기성을 숨기는 것은 어렵습니다. 생성 된 이미지에서 일반적으로 나타나는 반복적 인 패턴에서 알 수 있듯이 항상 성공한 것은 아닙니다.
우리의 아키텍처는 각 컨볼 루션 후에 픽셀 당 노이즈를 추가하여 이러한 문제를 완전히 회피합니다.
그림 4는 다른 노이즈 실현을 가진 생성기를 사용하여 생성 된 동일한 기본 이미지의 확률 적 실현을 보여줍니다.
잡음이 확률 적 측면에만 영향을 미치고 전체 구성과 정체성과 같은 높은 수준의 측면은 그대로 유지된다는 것을 알 수 있습니다.
그림 5는 레이어의 다른 하위 집합에 확률 적 변화를 적용한 효과를 더 보여줍니다.
이러한 효과는 애니메이션에서 가장 잘 볼 수 있으므로 한 레이어의 노이즈 입력을 변경하면 일치하는 스케일에서 확률 적 변동이 발생하는 방법에 대한 데모는 함께 제공되는 비디오를 참조하십시오.
노이즈의 영향이 네트워크에서 밀접하게 국한되어 있다는 것이 흥미 롭습니다.
우리는 생성기의 어느 지점에서든 가능한 한 빨리 새로운 콘텐츠를 도입해야한다는 압력이 있으며 네트워크가 확률 적 변형을 생성하는 가장 쉬운 방법은 제공된 노이즈에 의존하는 것이라고 가정합니다.
모든 레이어에 대해 새로운 노이즈 세트를 사용할 수 있으므로 이전 활성화에서 확률 적 효과를 생성 할 인센티브가 없으므로 국부적 인 효과로 이어집니다.

3.3. Separation of global effects from stochasticity 확률성과 글로벌 효과의 분리
The previous sections as well as the accompanying video demonstrate that while changes to the style have global effects (changing pose, identity, etc.), the noise affects only inconsequential stochastic variation (differently combed hair, beard, etc.).
This observation is in line with style transfer literature, where it has been established that spatially invariant statistics (Gram matrix, channel-wise mean, variance, etc.) reliably encode the style of an image [20, 39] while spatially varying features encode a specific instance.
In our style-based generator, the style affects the entire image because complete feature maps are scaled and biased with the same values. 
Therefore, global effects such as pose, lighting, or background style can be controlled coherently. 
Meanwhile, the noise is added independently to each pixel and is thus ideally suited for controlling stochastic variation. 
If the network tried to control, e.g., pose using the noise, that would lead to spatially inconsistent decisions that would then be penalized by the discriminator. 
Thus the network learns to use the global and local channels appropriately, without explicit guidance.
이전 섹션과 함께 제공되는 비디오는 스타일 변경이 전체적인 효과 (포즈, 정체성 등 변경)를 가져 오지만 노이즈는 중요하지 않은 확률 적 변형 (다르게 빗질 한 머리카락, 수염 등)에만 영향을 미친다는 것을 보여줍니다.
이 관찰은 공간적으로 불변하는 통계 (그램 행렬, 채널 별 평균, 분산 등)가 이미지의 스타일을 안정적으로 인코딩하고 공간적으로 다양한 기능이 인코딩한다는 것이 확립 된 스타일 전달 문헌과 일치합니다. 특정 인스턴스.
스타일 기반 생성기에서는 전체 기능 맵이 동일한 값으로 축척되고 바이어스되기 때문에 스타일이 전체 이미지에 영향을줍니다.
따라서 포즈, 조명 또는 배경 스타일과 같은 전역 효과를 일관되게 제어 할 수 있습니다.
한편, 노이즈는 각 픽셀에 독립적으로 추가되므로 확률 적 변동을 제어하는 ​​데 이상적입니다.
네트워크가 예를 들어 노이즈를 사용하여 포즈를 제어하려고 시도하면 공간적으로 일관성이없는 결정으로 이어지고 판별 자에 의해 불이익을 받게됩니다.
따라서 네트워크는 명시적인 지침없이 글로벌 및 로컬 채널을 적절하게 사용하는 방법을 배웁니다.

4. Disentanglement studies
There are various definitions for disentanglement [54,50, 2, 7, 19], but a common goal is a latent space that consists of linear subspaces, each of which controls one factor of variation. 
However, the sampling probability of each combination of factors in Z needs to match the corresponding density in the training data. 
As illustrated in Figure 6, this precludes the factors from being fully disentangled with typical datasets and input latent distributions.
A major benefit of our generator architecture is that the intermediate latent space W does not have to support sampling according to any fixed distribution; its sampling density is induced by the learned piecewise continuous mapping f(z). 
This mapping can be adapted to “unwarp” W so that the factors of variation become more linear. 
We posit that there is pressure for the generator to do so, as it should be easier to generate realistic images based on a disentangled representation than based on an entangled representation. 
As such, we expect the training to yield a less entangled W in an unsupervised setting, i.e., when the factors of variation are not known in advance [10, 35, 49, 8, 26, 32, 7].
Unfortunately the metrics recently proposed for quantifying disentanglement [26, 32, 7, 19] require an encoder network that maps input images to latent codes. 
These metrics are ill-suited for our purposes since our baseline GAN lacks such an encoder. 
While it is possible to add an extra network for this purpose [8, 12, 15], we want to avoid investing effort into a component that is not a part of the actual solution. 
To this end, we describe two new ways of quantifying disentanglement, neither of which requires an encoder or known factors of variation, and are therefore computable for any image dataset and generator.
disentanglement에 대한 정의는 다양하지만 [54,50, 2, 7, 19], 공통 목표는 선형 부분 공간으로 구성된 잠재 공간이며, 각 공간은 하나의 변이 요인을 제어합니다.
그러나 Z의 각 요인 조합에 대한 샘플링 확률은 훈련 데이터의 해당 밀도와 일치해야합니다.
그림 6에서 볼 수 있듯이 이는 요소가 일반적인 데이터 세트 및 입력 잠재 분포와 완전히 분리되는 것을 방지합니다.
발전기 아키텍처의 주요 이점은 중간 잠재 공간 W가 고정 된 분포에 따라 샘플링을 지원할 필요가 없다는 것입니다. 샘플링 밀도는 학습 된 조각 연속 매핑 f (z)에 의해 유도됩니다.
이 매핑은 W를 "언 워프 (unwarp)"하도록 조정하여 변동 계수가 더 선형이되도록 할 수 있습니다.
얽힌 표현을 기반으로하는 것보다 얽힌 표현을 기반으로 사실적인 이미지를 생성하는 것이 더 쉬워야하기 때문에 생성기가 그렇게해야한다는 압력이 있다고 가정합니다.
따라서 우리는 훈련이 감독되지 않은 환경에서 덜 얽힌 W를 산출 할 것으로 예상합니다. 즉, 변동 요인이 미리 알려지지 않은 경우 [10, 35, 49, 8, 26, 32, 7].
불행히도 최근 disentanglement를 정량화하기 위해 제안 된 메트릭 [26, 32, 7, 19]은 입력 이미지를 잠복 코드에 매핑하는 인코더 네트워크를 필요로합니다.
이러한 메트릭은 기준 GAN에 이러한 인코더가 없기 때문에 우리의 목적에 적합하지 않습니다.
이 목적을 위해 추가 네트워크를 추가하는 것이 가능하지만 [8, 12, 15] 실제 솔루션의 일부가 아닌 구성 요소에 대한 노력은 피하고 싶습니다.
이를 위해 엔코더 나 알려진 변동 인자가 필요하지 않으므로 모든 이미지 데이터 세트 및 생성기에 대해 계산할 수있는 두 가지 새로운 방법을 설명합니다.

4.1. Perceptual path length 지각 경로 길이


As noted by Laine [37], interpolation of latent-space vectors may yield surprisingly non-linear changes in the image.
For example, features that are absent in either endpoint may appear in the middle of a linear interpolation path. 
This is a sign that the latent space is entangled and the factors of variation are not properly separated. 
To quantify this effect, we can measure how drastic changes the image undergoes as we perform interpolation in the latent space. 
Intuitively, a less curved latent space should result in perceptually smoother transition than a highly curved latent space.
As a basis for our metric, we use a perceptually-based pairwise image distance [65] that is calculated as a weighted difference between two VGG16 [58] embeddings, where the weights are fit so that the metric agrees with human perceptual similarity judgments. 
If we subdivide a latent space interpolation path into linear segments, we can define the total perceptual length of this segmented path as the sum of perceptual differences over each segment, as reported by the image distance metric. 
A natural definition for the perceptual path length would be the limit of this sum under infinitely fine subdivision, but in practice we approximate it using a small subdivision epsilon  = 10−4. 
The average perceptual path length in latent space Z, over all possible endpoints, is therefore (2) 
(2) where z1, z2 ∼ P(z), t ∼ U(0, 1), G is the generator (i.e.,g ◦f for style-based networks), and d(·, ·) evaluates the per ceptual distance between the resulting images. 
(2) : $l_z = E[fraction{1}{^2}d(G(slerp(z_1,z_2;t)),G(slerp(z_1,z_2;t+))]$
Here slerp denotes spherical interpolation [56], which is the most appropriate way of interpolating in our normalized input latent space [61]. 
To concentrate on the facial features instead of background, we crop the generated images to contain only the face prior to evaluating the pairwise image metric. 
As the metric d is quadratic [65], we divide by 2. 
We compute the expectation by taking 100,000 samples.
Computing the average perceptual path length in W is carried out in a similar fashion: (3)
(3) where the only difference is that interpolation happens in W space. 

Laine [37]에 의해 언급 된 바와 같이, 잠재 공간 벡터의 보간은 놀랍게도 이미지에서 비선형적인 변화를 가져올 수 있습니다.
예를 들어, 양쪽 끝점에없는 피쳐는 선형 보간 경로의 중간에 나타날 수 있습니다.
이것은 잠재 공간이 얽혀 있고 변동 요인이 제대로 분리되지 않았다는 신호입니다.
이 효과를 정량화하기 위해 잠복 공간에서 보간을 수행 할 때 이미지가 얼마나 급격하게 변화하는지 측정 할 수 있습니다.
직관적으로 덜 구부러진 잠재 공간은 고도로 구부러진 잠재 공간보다 지각 적으로 더 부드러운 전환을 가져야합니다.
메트릭의 기초로 두 VGG16 임베딩 간의 가중치 차이로 계산되는 지각 기반 쌍별 이미지 거리 [65]를 사용합니다. 여기서 가중치는 인간의 지각 적 유사성 판단과 일치하도록 가중치가 적합합니다.
잠복 공간 보간 경로를 선형 세그먼트로 세분화하면이 세그먼트 화 된 경로의 총 지각 길이를 이미지 거리 메트릭에 의해보고 된대로 각 세그먼트에 대한 지각 차이의 합으로 정의 할 수 있습니다.
지각 경로 길이에 대한 자연스러운 정의는 무한히 미세한 세분화에서이 합계의 한계가 될 것이지만 실제로는 작은 세분화 엡실론 = 10-4를 사용하여 대략적으로 추정합니다.
따라서 가능한 모든 끝점에 대한 잠재 공간 Z의 평균 지각 경로 길이는 (2)
(2) 여기서 z1, z2 ∼ P (z), t ∼ U (0, 1), G는 생성기 (예 : 스타일 기반 네트워크의 경우 g ◦f)이고 d (·, ·)는 결과 이미지 사이의 거리.
여기서 slerp는 구형 보간 [56]을 나타내며, 이는 정규화 된 입력 잠복 공간 [61]에서 보간하는 가장 적절한 방법입니다.
배경 대신 얼굴 특징에 집중하기 위해 쌍별 이미지 메트릭을 평가하기 전에 얼굴 만 포함하도록 생성 된 이미지를 자릅니다.
메트릭 d가 2 차 [65]이므로 2로 나눕니다.
100,000 개의 샘플을 취하여 기대치를 계산합니다.
W의 평균 지각 경로 길이 계산은 비슷한 방식으로 수행됩니다. (3)
(3)의 유일한 차이점은 보간이 W 공간에서 발생한다는 것입니다.

(3) : $l_w = E[fraction{1}{^2}d(g(lerp(f(z_1),f(z_2);t)),g(lerp(f(z_1),f(z_2);t+))]$

Because vectors in W are not normalized in any fashion, we use linear interpolation (lerp).
Table 3 shows that this full-path length is substantially shorter for our style-based generator with noise inputs, indicating that W is perceptually more linear than Z. 
Yet, this measurement is in fact slightly biased in favor of the input latent space Z. 
If W is indeed a disentangled and “flattened” mapping of Z, it may contain regions that are not on the input manifold— and are thus badly reconstructed by the generator — even between points that are mapped from the input manifold, whereas the input latent space Z has no such regions by definition. 
It is therefore to be expected that if we restrict our measure to path endpoints, i.e., t ∈ {0, 1}, we should obtain a smaller lW while lZ is not affected. 
This is indeed what we observe in Table 3. 
Table 4 shows how path lengths are affected by the mapping network. 
We see that both traditional and style-based generators benefit from having a mapping network, and additional depth generally improves the perceptual path length as well as FIDs. 
It is interesting that while lW improves in the traditional generator, lZ becomes considerably worse, illustrating our claim that the input latent space can indeed be arbitrarily entangled in GAN.
W의 벡터는 어떤 방식으로도 정규화되지 않기 때문에 선형 보간 (lerp)을 사용합니다.
표 3은 노이즈 입력이있는 스타일 기반 생성기의 경우이 전체 경로 길이가 상당히 짧다는 것을 보여줍니다. 이는 W가 Z보다 지각 적으로 더 선형적임을 나타냅니다.
그러나이 측정은 실제로 입력 잠복 공간 Z에 유리하도록 약간 편향되어 있습니다.
W가 실제로 Z의 얽 히지 않고 "평탄화 된"매핑 인 경우 입력 매니 폴드에 있지 않아 생성기에 의해 잘못 재구성 된 영역이 포함될 수 있습니다. 입력 매니 폴드에서 매핑 된 지점 사이에서도 입력 잠재 성은 공간 Z에는 정의에 따라 그러한 영역이 없습니다.
따라서 측정을 경로 끝점 (예 : t ∈ {0, 1})으로 제한하면 lZ가 영향을받지 않는 동안 더 작은 lW를 얻어야합니다.
이것은 실제로 우리가 표 3에서 관찰 한 것입니다.
표 4는 매핑 네트워크가 경로 길이에 미치는 영향을 보여줍니다.
기존 생성기와 스타일 기반 생성기 모두 매핑 네트워크를 통해 이점을 얻고 추가 ​​깊이는 일반적으로 FID뿐만 아니라 지각 경로 길이를 향상시킵니다.
기존 발전기에서 lW가 향상되는 동안 lZ가 상당히 악화되어 입력 잠복 공간이 실제로 GAN에서 임의로 얽힐 수 있다는 우리의 주장을 설명하는 것은 흥미 롭습니다.

4.2. Linear separability 선형 분리성

표 3. 다양한 유형에 대한 지각 경로 길이 및 분리 성 점수 FFHQ의 생성기 아키텍처 (낮을수록 좋습니다). 우리는 기존 네트워크의 경우 Z로, 스타일 기반 네트워크의 경우 W로 측정합니다. 스타일 믹싱에 저항하는 네트워크가 나타납니다. 중간 잠재 공간 W를 다소 왜곡합니다. 우리는 혼합이 W가 효율적으로 인코딩하는 것을 더 어렵게 만든다고 가정합니다. 여러 척도에 걸친 변동 요인.


If a latent space is sufficiently disentangled, it should be possible to find direction vectors that consistently correspond to individual factors of variation. 
We propose another metric that quantifies this effect by measuring how well the latent-space points can be separated into two distinct sets via a linear hyperplane, so that each set corresponds to a specific binary attribute of the image.
In order to label the generated images, we train auxiliary classification networks for a number of binary attributes, e.g., to distinguish male and female faces. In our tests, the classifiers had the same architecture as the discriminator we use (i.e., same as in [30]), and were trained using the CELEBA-HQ dataset that retains the 40 attributes available in the original CelebA dataset.
To measure the separability of one attribute, we generate 200,000 images with z ∼ P(z) and classify them using the auxiliary classification network.
We then sort the samples according to classifier confidence and remove the least confident half, yielding 100,000 labeled latent-space vectors.
For each attribute, we fit a linear SVM to predict the label based on the latent-space point —z for traditional and w for style-based — and classify the points by this plane. 
We then compute the conditional entropy H(Y |X) where X are the classes predicted by the SVM and Y are the classes determined by the pre-trained classifier. 
This tells how much additional information is required to determine the true class of a sample, given that we know on which side of the hyperplane it lies. 
A low value suggests consistent latent space directions for the corresponding factor(s) of variation. 
We calculate the final separability score as exp(Pi H(Yi|Xi)), where i enumerates the 40 attributes.
Similar to the inception score [53], the exponentiation brings the values from logarithmic to linear domain so that they are easier to compare.
Tables 3 and 4 show that W is consistently better separable than Z, suggesting a less entangled representation Furthermore, increasing the depth of the mapping network improves both image quality and separability in W, which is in line with the hypothesis that the synthesis network inherently favors a disentangled input representation. Interestingly, adding a mapping network in front of a traditional generator results in severe loss of separability in Z but improves the situation in the intermediate latent space W, and the FID improves as well. 
This shows that even the traditional generator architecture performs better when we introduce an intermediate latent space that does not have to follow the distribution of the training data.
잠재 공간이 충분히 얽 히지 않으면 개별 변동 요인에 일관되게 대응하는 방향 벡터를 찾을 수 있어야합니다.
우리는 잠재 공간 포인트가 선형 초평면을 통해 두 개의 별개의 세트로 얼마나 잘 분리 될 수 있는지 측정하여이 효과를 정량화하는 또 다른 메트릭을 제안합니다. 따라서 각 세트는 이미지의 특정 이진 속성에 해당합니다.
생성 된 이미지에 레이블을 지정하기 위해 예를 들어 남성과 여성의 얼굴을 구별하기 위해 여러 이진 속성에 대한 보조 분류 네트워크를 훈련합니다. 테스트에서 분류기는 우리가 사용하는 판별 자와 동일한 아키텍처 (즉, [30]에서와 동일)를 가졌으며 원래 CelebA 데이터 세트에서 사용할 수있는 40 개의 속성을 유지하는 CELEBA-HQ 데이터 세트를 사용하여 훈련되었습니다.
한 속성의 분리 성을 측정하기 위해 z ∼ P (z)를 사용하여 200,000 개의 이미지를 생성하고 보조 분류 네트워크를 사용하여 분류합니다.
그런 다음 분류 자 ​​신뢰도에 따라 샘플을 정렬하고 신뢰도가 가장 낮은 절반을 제거하여 100,000 개의 레이블이 지정된 잠재 공간 벡터를 생성합니다.
각 속성에 대해 선형 SVM을 적용하여 잠재 공간 점 (기존의 경우 z, 스타일 기반의 경우 w)을 기반으로 레이블을 예측하고이 평면으로 점을 분류합니다.
그런 다음 조건부 엔트로피 H (Y | X)를 계산합니다. 여기서 X는 SVM에 의해 예측 된 클래스이고 Y는 사전 훈련 된 분류기에 의해 결정된 클래스입니다.
이것은 우리가 초평면의 어느쪽에 놓여 있는지 알고있는 경우 샘플의 실제 클래스를 결정하는 데 필요한 추가 정보의 양을 알려줍니다.
값이 낮 으면 해당 변동 요인에 대해 일관된 잠재 공간 방향을 나타냅니다.
최종 분리 성 점수를 exp (Pi H (Yi | Xi))로 계산합니다. 여기서 i는 40 개의 속성을 열거합니다.
inception score [53]와 유사하게 지수화는 값을 로그에서 선형 도메인으로 가져와 비교하기 쉽도록합니다.
표 3과 4는 W가 Z보다 지속적으로 더 잘 분리되어 있음을 보여줍니다. 이는 덜 얽힌 표현을 의미합니다. 또한 매핑 네트워크의 깊이를 늘리면 W의 이미지 품질과 분리 성이 향상되며, 이는 합성 네트워크가 본질적으로 선호한다는 가설과 일치합니다. 얽 히지 않은 입력 표현. 흥미롭게도 기존 생성기 앞에 매핑 네트워크를 추가하면 Z에서 분리 성이 크게 손실되지만 중간 잠재 공간 W의 상황이 개선되고 FID도 개선됩니다.
이것은 훈련 데이터의 분포를 따를 필요가없는 중간 잠재 공간을 도입 할 때 전통적인 발전기 아키텍처조차도 더 나은 성능을 발휘 함을 보여줍니다.

표 4. FFHQ에서 매핑 네트워크의 효과. 수 in method name은 매핑 네트워크의 깊이를 나타냅니다. 우리 FID, 분리 가능성 및 경로 길이 모두 이는 스타일 기반 및 기존 생성기 아키텍처 모두에 적용됩니다. 또한 더 깊은 매핑 네트워크는 일반적으로 얕은 것보다 더 잘 수행됩니다.


5. Conclusion
Based on both our results and parallel work by Chen et al. [6], it is becoming clear that the traditional GAN generator architecture is in every way inferior to a style-based design. 
This is true in terms of established quality metrics, and we further believe that our investigations to the separation of high-level attributes and stochastic effects, as well as the linearity of the intermediate latent space will prove fruitful in improving the understanding and controllability of GAN synthesis.
We note that our average path length metric could easily be used as a regularizer during training, and perhaps some variant of the linear separability metric could act as one, too. 
In general, we expect that methods for directly shaping the intermediate latent space during training will provide interesting avenues for future work.
우리의 결과와 Chen et al의 병렬 작업을 기반으로합니다. [6], 전통적인 GAN 생성기 아키텍처가 모든면에서 스타일 기반 설계보다 열등하다는 것이 분명 해지고 있습니다.
이것은 확립 된 품질 메트릭 측면에서 사실이며, 우리는 또한 높은 수준의 속성과 확률 적 효과의 분리와 중간 잠재 공간의 선형성에 대한 조사가 GAN의 이해 및 제어 가능성을 개선하는 데 유익한 것으로 입증 될 것이라고 믿습니다. 합성.
평균 경로 길이 메트릭은 훈련 중에 정규화기로 쉽게 사용할 수 있으며 선형 분리 성 메트릭의 일부 변형도 하나로 작동 할 수 있습니다.
일반적으로 우리는 훈련 중에 중간 잠복 공간을 직접 형성하는 방법이 향후 작업을위한 흥미로운 길을 제공 할 것으로 기대합니다.

A. The FFHQ dataset.

그림 7. FFHQ 데이터 세트는 연령, 민족성, 관점, 조명 및 이미지 배경 측면에서 다양한 것을 제공합니다


We have collected a new dataset of human faces, FlickrFaces-HQ (FFHQ), consisting of 70,000 high-quality images at 10242 resolution (Figure 7). 
The dataset includes vastly more variation than CELEBA-HQ [30] in terms of age, ethnicity and image background, and also has much better coverage of accessories such as eyeglasses, sunglasses, hats, etc. The images were crawled from Flickr (thus inheriting all the biases of that website) and automatically aligned [31] and cropped. 
Only images under permissive licenses were collected. 
Various automatic filters were used to prune the set, and finally Mechanical Turk allowed us to remove the occasional statues, paintings, or photos of photos. 
우리는 10242 해상도에서 70,000 개의 고품질 이미지로 구성된 새로운 인간 얼굴 데이터 세트 인 FlickrFaces-HQ (FFHQ)를 수집했습니다 (그림 7).
데이터 세트에는 연령, 민족성 및 이미지 배경면에서 CELEBA-HQ [30]보다 훨씬 더 많은 변형이 포함되어 있으며 안경, 선글라스, 모자 등과 같은 액세서리에 대해 훨씬 더 잘 적용됩니다. 이미지는 Flickr에서 크롤링되었습니다 (따라서 상 속됨). 웹 사이트의 모든 편견)을 자동으로 정렬하고 [31] 잘라냅니다.
허용 라이센스하에있는 이미지 만 수집되었습니다.
다양한 자동 필터를 사용하여 세트를 잘라 내고 마침내 Mechanical Turk를 사용하여 가끔씩 조각상, 그림 또는 사진 사진을 제거 할 수있었습니다.

B. Truncation trick in W W의 잘림 트릭

그림 8. 스타일 스케일의 함수로서 자르기 트릭의 효과 ψ. ψ → 0을 페이드하면 모든 얼굴이 "평균"얼굴로 수렴됩니다. FFHQ의. 이 얼굴은 훈련 된 모든 네트워크에서 비슷하며, 그에 대한 보간은 아티팩트를 유발하지 않는 것 같습니다. 신청함으로써 스타일에 대한 음수 스케일링, 우리는 그에 상응하는 반대 또는 "안티 페이스". 관점, 안경, 나이, 착색, 머리 길이 및 종종 성별.


If we consider the distribution of training data, it is clearthat areas of low density are poorly represented and thus likely to be difficult for the generator to learn. 
This is a significant open problem in all generative modeling techniques. 
However, it is known that drawing latent vectors from a truncated [42, 5] or otherwise shrunk [34] sampling space tends to improve average image quality, although some amount of variation is lost.
We can follow a similar strategy. 
To begin, we compute the center of mass of W as $¯w = Ez∼P (z)[f(z)]$. 
In case of FFHQ this point represents a sort of an average face (Figure 8, ψ = 0). 
We can then scale the deviation of a given w from the center as $w0 = ¯w + ψ(w − ¯w)$, where ψ < 1.
While Brock et al. [5] observe that only a subset of networks is amenable to such truncation even when orthogonal regularization is used, truncation in W space seems to work reliably even without changes to the loss function.
훈련 데이터의 분포를 고려하면 밀도가 낮은 영역이 제대로 표현되지 않아 생성기가 학습하기 어려울 수 있음이 분명합니다.
이것은 모든 생성 모델링 기술에서 중요한 미해결 문제입니다.
그러나 잘린 [42, 5] 또는 축소 된 샘플링 공간에서 잠재 벡터를 그리는 것은 [34] 평균 이미지 품질을 향상시키는 경향이 있지만 약간의 변화는 손실되는 것으로 알려져 있습니다.
비슷한 전략을 따를 수 있습니다.
먼저 W의 질량 중심을 ¯w = Ez∼P (z) [f (z)]로 계산합니다.
FFHQ의 경우이 점은 일종의 평균 얼굴을 나타냅니다 (그림 8, ψ = 0).
그런 다음 중심으로부터 주어진 w의 편차를 $w0 = ¯w + ψ (w − ¯w)$ (여기서 ψ <1)로 조정할 수 있습니다.
Brock et al. [5] 직교 정규화를 사용하는 경우에도 네트워크의 하위 집합 만이 이러한 잘림을 처리 할 수 ​​있으며, W 공간의 잘림은 손실 함수의 변경 없이도 안정적으로 작동하는 것으로 보입니다.

C. Hyperparameters and training details 하이퍼 파라미터 및 교육 세부 정보
We build upon the official TensorFlow [1] implementation of Progressive GANs by Karras et al. [30], from which we inherit most of the training details. 
This original setup corresponds to configuration A in Table 1. 
In particular, we use the same discriminator architecture, resolutiondependent minibatch sizes, Adam [33] hyperparameters, and exponential moving average of the generator. 
We enable mirror augmentation for CelebA-HQ and FFHQ, but disable it for LSUN. Our training time is approximately one week on an NVIDIA DGX-1 with 8 Tesla V100 GPUs.
For our improved baseline (B in Table 1), we make several modifications to improve the overall result quality. 
We replace the nearest-neighbor up/downsampling in both networks with bilinear sampling, which we implement by lowpass filtering the activations with a separable 2nd order binomial filter after each upsampling layer and before each downsampling layer [64]. 
We implement progressive growing the same way as Karras et al. [30], but we start from 82 images instead of 42. 
For the FFHQ dataset, we switch from WGAN-GP to the non-saturating loss [22] with R1 regularization [44] using γ = 10. 
With R1 we found that the FID scores keep decreasing for considerably longer than with WGAN-GP, and we thus increase the training time from 12M to 25M images. 
We use the same learning rates as Karras et al. [30] for FFHQ, but we found that setting the learning rate to 0.002 instead of 0.003 for 5122 and 10242 leads to better stability with CelebA-HQ.
For our style-based generator (F in Table 1), we use leaky ReLU [41] with α = 0.2 and equalized learning rate [30] for all layers. 
We use the same feature map counts in our convolution layers as Karras et al. [30]. 
우리는 Karras 등의 프로그레시브 GAN의 공식 TensorFlow [1] 구현을 기반으로합니다. 여기에서 대부분의 교육 세부 정보를 상속받습니다.
이 원래 설정은 표 1의 구성 A에 해당합니다.
특히, 우리는 동일한 판별 기 아키텍처, 해상도 의존 미니 배치 크기, Adam [33] 하이퍼 파라미터 및 생성기의 지수 이동 평균을 사용합니다.
CelebA-HQ 및 FFHQ에 대해서는 미러 증강을 활성화하지만 LSUN에 대해서는 비활성화합니다. 우리의 교육 시간은 8 개의 Tesla V100 GPU가있는 NVIDIA DGX-1에서 약 1 주일입니다.
개선 된 기준 (표 1의 B)을 위해 전반적인 결과 품질을 개선하기 위해 몇 가지 수정 작업을 수행합니다.
두 네트워크에서 가장 가까운 이웃 업 / 다운 샘플링을 이중 선형 샘플링으로 대체합니다.이 샘플링은 각 업 샘플링 레이어 후와 각 다운 샘플링 레이어 이전에 분리 가능한 2 차 이항 필터로 활성화를 저역 통과 필터링하여 구현합니다 [64].
우리는 Karras et al.과 같은 방식으로 점진적 성장을 구현합니다. [30],하지만 우리는 42 개 대신 82 개의 이미지에서 시작합니다.
FFHQ 데이터 세트의 경우 γ = 10을 사용하는 R1 정규화 [44]를 사용하여 WGAN-GP에서 비 포화 손실 [22]로 전환합니다.
R1을 사용하면 FID 점수가 WGAN-GP보다 훨씬 더 오랫동안 감소하는 것을 발견했으며, 따라서 훈련 시간이 1,200 만에서 2,500 만 이미지로 늘어났습니다.
Karras et al.과 동일한 학습률을 사용합니다. FFHQ의 경우 학습률을 0.003 대신 0.002로 설정하면 CelebA-HQ의 안정성이 향상됩니다.
스타일 기반 생성기 (표 1의 F)의 경우, 모든 계층에 대해 α = 0.2 및 균등화 된 학습률 [30]과 함께 누설 ReLU [41]를 사용합니다.
컨볼 루션 레이어에서 Karras et al. [30].
Our mapping network consists of 8 fully-connected layers, and the dimensionality of all input and output activations— including z and w — is 512. We found that increasing the depth of the mapping network tends to make the training unstable with high learning rates. 
We thus reduce the learning rate by two orders of magnitude for the mapping network, i.e., λ0 = 0.01 ·λ. 
We initialize all weights of the convolutional, fully-connected, and affine transform layers using N (0, 1).
The constant input in synthesis network is initialized to one.
The biases and noise scaling factors are initialized to zero, except for the biases associated with ys that we initialize to one.
The classifiers used by our separability metric (Section 4.2) have the same architecture as our discriminator except that minibatch standard deviation [30] is disabled. 
We use the learning rate of 10−3, minibatch size of 8, Adam optimizer, and training length of 150,000 images. 
The classifiers are trained independently of generators, and the same 40 classifiers, one for each CelebA attribute, are used for measuring the separability metric for all generators. 
We will release the pre-trained classifier networks so that our measurements can be reproduced.
We do not use batch normalization [29], spectral normalization [45], attention mechanisms [63], dropout [59], or pixelwise feature vector normalization [30] in our networks.
우리의 매핑 네트워크는 8 개의 완전히 연결된 레이어로 구성되며 z 및 w를 포함한 모든 입력 및 출력 활성화의 차원은 512입니다. 매핑 네트워크의 깊이를 늘리면 높은 학습률로 인해 훈련이 불안정 해지는 경향이 있음을 발견했습니다.
따라서 우리는 매핑 네트워크에 대해 학습률을 2 배로 감소시킵니다. 즉, λ0 = 0.01 · λ입니다.
N (0, 1)을 사용하여 컨벌루션, 완전 연결 및 아핀 변환 레이어의 모든 가중치를 초기화합니다.
합성 네트워크의 상수 입력은 1로 초기화됩니다.
편향과 잡음 스케일링 인자는 우리가 1로 초기화하는 ys와 관련된 편향을 제외하고는 0으로 초기화됩니다.
분리 성 메트릭 (섹션 4.2)에서 사용하는 분류기는 미니 배치 표준 편차 [30]가 비활성화되어 있다는 점을 제외하고는 판별 자와 동일한 아키텍처를 가지고 있습니다.
학습률 10-3, 미니 배치 크기 8, Adam Optimizer 및 150,000 이미지의 학습 길이를 사용합니다.
분류기는 생성자와 독립적으로 훈련되며 각 CelebA 속성에 대해 하나씩 동일한 40 개의 분류 기가 모든 생성기의 분리 성 메트릭을 측정하는 데 사용됩니다.
측정을 재현 할 수 있도록 사전 훈련 된 분류기 네트워크를 출시 할 것입니다.
우리는 네트워크에서 배치 정규화 [29], 스펙트럼 정규화 [45],주의 메커니즘 [63], 드롭 아웃 [59] 또는 픽셀 단위 특징 벡터 정규화 [30]를 사용하지 않습니다.

D. Training convergence 학습 수렴


Figure 9 shows how the FID and perceptual path length metrics evolve during the training of our configurations B and F with the FFHQ dataset. 
With R1 regularization active in both configurations, FID continues to slowly decrease as the training progresses, motivating our choice to increase the training time from 12M images to 25M images. 
Even when the training has reached the full 10242 resolution, the slowly rising path lengths indicate that the improvements in FID come at the cost of a more entangled representation. 
Considering future work, it is an interesting question whether this is unavoidable, or if it were possible to encourage shorter path lengths without compromising the convergence of FID.
그림 9는 FFHQ 데이터 세트를 사용하여 구성 B 및 F를 학습하는 동안 FID 및 지각 경로 길이 메트릭이 어떻게 진화하는지 보여줍니다.
두 구성 모두에서 R1 정규화가 활성화 된 상태에서 FID는 훈련이 진행됨에 따라 천천히 감소하여 훈련 시간을 1,200 만 이미지에서 2,500 만 이미지로 늘리는 선택에 동기를 부여합니다.
훈련이 전체 10242 해상도에 도달 한 경우에도 서서히 증가하는 경로 길이는 FID의 개선으로 인해 더 얽힌 표현이 필요함을 나타냅니다.
향후 작업을 고려할 때 이것이 불가피한 지 또는 FID의 수렴을 손상시키지 않고 더 짧은 경로 길이를 장려 할 수 있는지 여부는 흥미로운 질문입니다.

E. Other datasets


Figures 10, 11, and 12 show an uncurated set of results for LSUN [62] BEDROOM, CARS, and CATS, respectively. In these images we used the truncation trick from Appendix Bwith ψ = 0.7 for resolutions 42 − 322. 
The accompanying video provides results for style mixing and stochastic variation tests. 
As can be seen therein, in case of BEDROOM the coarse styles basically control the viewpoint of the camera, middle styles select the particular furniture, and fine styles deal with colors and smaller details of materials. 
In CARS the effects are roughly similar. 
Stochastic variation affects primarily the fabrics in BEDROOM, backgrounds and headlamps in CARS, and fur, background, and interestingly, the positioning of paws in CATS. 
Somewhat surprisingly the wheels of a car never seem to rotate based on stochastic inputs.
These datasets were trained using the same setup as FFHQ for the duration of 70M images for BEDROOM and CATS, and 46M for CARS. We suspect that the results for BEDROOM are starting to approach the limits of the training data, as in many images the most objectionable issues are the severe compression artifacts that have been inherited from the low-quality training data. 
CARS has much higher quality training data that also allows higher spatial resolution (512 × 384 instead of 2562), and CATS continues to be a difficult dataset due to the high intrinsic variation in poses,zoom levels, and backgrounds.
그림 10, 11 및 12는 각각 LSUN [62] BEDROOM, CARS 및 CATS에 대한 선별되지 않은 결과 세트를 보여줍니다. 이 이미지에서 우리는 해상도 42 − 322에 대해 ψ = 0.7로 부록 B의 자르기 트릭을 사용했습니다.
함께 제공되는 비디오는 스타일 믹싱 및 확률 적 변형 테스트에 대한 결과를 제공합니다.
여기서 볼 수 있듯이 BEDROOM의 경우 거친 스타일은 기본적으로 카메라의 시점을 제어하고, 중간 스타일은 특정 가구를 선택하고, 미세 스타일은 색상과 재료의 작은 세부 사항을 처리합니다.
CARS에서 효과는 거의 비슷합니다.
확률 적 변화는 주로 BEDROOM의 직물, CARS의 배경 및 헤드 램프, 모피, 배경 및 흥미롭게도 CATS의 발 위치에 영향을 미칩니다.
다소 놀랍게도 자동차의 바퀴는 확률 적 입력에 따라 회전하지 않는 것 같습니다.
이러한 데이터 세트는 BEDROOM 및 CATS의 경우 7 천만 이미지, CARS의 경우 46M의 기간 동안 FFHQ와 동일한 설정을 사용하여 학습되었습니다. 많은 이미지에서 가장 불쾌한 문제는 저품질 훈련 데이터에서 상속 된 심각한 압축 아티팩트이기 때문에 BEDROOM의 결과가 훈련 데이터의 한계에 접근하기 시작했다고 의심합니다.
CARS는 더 높은 공간 해상도 (2562 대신 512 × 384)를 허용하는 훨씬 더 높은 품질의 훈련 데이터를 가지고 있으며, CATS는 포즈, 확대 / 축소 수준 및 배경의 높은 내재적 변화로 인해 계속해서 어려운 데이터 세트입니다.