Deep generative neural networks (DGNNs) have achieved realistic and high-quality data generation. In particular, the adversarial training scheme has been applied to many DGNNs and has exhibited powerful performance. Despite of recent advances in generative networks, identifying the image generation mechanism still remains challenging. In this paper, we present an explorative sampling algorithm to analyze generation mechanism of DGNNs. Our method efficiently obtains samples with identical attributes from a query image in a perspective of the trained model. We define generative boundaries which determine the activation of nodes in the internal layer and probe inside the model with this information. To handle a large number of boundaries, we obtain the essential set of boundaries using optimization. By gathering samples within the region surrounded by generative boundaries, we can empirically reveal the characteristics of the internal layers of DGNNs. We also demonstrate that our algorithm can find more homogeneous, the model specific samples compared to the variations of ε-based sampling method.
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
Efficient Explorative Sampling of Deep Generative Models
1. An Efficient Explorative Sampling
Considering the Generative Boundaries
of Deep Generative Neural Networks
Giyoung Jeon1*, Haedong Jeong1* and Jaesik Choi2
Statistical Artificial Intelligence Laboratory of
1Ulsan National Institute of Science and Technology (UNIST) and
2Korea Advanced Institute of Science and Technology (KAIST)
*Equal contribution
2. Motivation
• Generative Adversarial Networks (GANs) make high-quality and
various images in many domains.
𝑍
4x4
1024x1024
LSUN dataset
CelebA dataset
Generator
𝐺(𝑍)
Discriminator
𝐷(𝐺(𝑍))
T/F
Latent
Vector
𝑍 ∼ 𝑁(0, 𝐼)
Discriminative
value
T. Karras, et al., "Progressive growing of GANs for improved quality, stability, and variation”, ICLR, 2018.
1024x1024
3. Motivation
• The generative process is not well understood yet.
• We wish to give example-based explanation on the generative process.
Latent
Vector
𝑍
ℓ-th layer LSUN dataset
CelebA dataset
ℎℓ ∈ ℝ16×16×512
4x4
1024x1024
4. Previous work: analyzing the inside of deep neural networks
Google Deep Dream (Mordvintsev et al., 2015)
GAN dissection (Bau et al., 2019)
D. Bau et al., "Network Dissection: Quantifying Interpretability of Deep Visual Representations." CVPR, 2017.
D. Bau et al., "GAN Dissection: Visualizing and Understanding Generative Adversarial Networks”, ICLR, 2019.
A. Mordvintsev et al., "Inceptionism: Going deeper into neural networks”, 2015.
K. Dvijotham et al., "A Dual Approach to Scalable Verification of Deep Networks." UAI, 2018.
Lagrangian relaxed decision boundary
(Dvijotham et al., 2018)
Network dissection (Bau et al., 2017)
Interpretation: lamp
Interpretation: car
Unit 1
Unit 4
Interpretation: lamp
Interpretation: car
Unit 1
Unit 4
Interval bound
propagation
𝑥0 ∈ 𝑆
Input
perturbations
Propagated
regions
Refinement using
cutting planes
from dual 𝝀
Decision boundary
𝒄 𝑻
𝒙 𝑲 + 𝒅
Naïve bounds would fail to
certify robustness
5. Definitions
• Generator 𝐺 𝑍 : a generated image from 𝑍
• Hidden nodes ℎℓ: a neural representation of ℓ-th layer
• Partial generation 𝑔j:i: ℝ|hi| → ℝ|hj|
: a generative function from layer 𝑖
to layer 𝑗
𝑔4:1 𝑔 𝐿:5𝑍
4-th layer
ℎ4 ∈ ℝ16×16×512
𝐺 𝑍
6. Generative Boundary
– A value of ℎℓ is determined by the linear hyperplane in the space of the previous layer, ℎℓ−1
– Stacking of layers toward input makes highly non-linear and non-convex shape
• We want to see only feasible regions which constructed from the input to the target.
– Trained to fool the discriminator in GANs
𝑔ℓ:1 𝑔 𝐿:ℓ+1𝑍
ℎℓ
+
-
𝑔ℓ
𝑖
(ℎ𝑙−1) = 0 𝑔ℓ
𝑖
(ℎ𝑙−1) = ℎ𝑙
𝑖
ℎ𝑙
𝑖
nonlinearnonlinear
A space of previous layer
𝐵ℓ
𝑖
= {𝑍|𝑔ℓ:1
𝑖
(𝑧) = 0, 𝑍 ∈ ℝ|𝑍|
}
7. – In the ℓ-th layer, a space (Sℓ) which is surrounded by a set of generative boundaries.
– In the input space, a set of equivalent class of Z w.r.t 𝑺ℓ.
– In the image space, a set of equivalent class of image w.r.t. 𝑺ℓ.
Generative Region
𝑔ℓ:1 𝑔 𝐿:ℓ+1𝑍
T
T
ℎℓ
+
-
-
+
-
+
+
-
-
+
+ - - + - + + - -+
+ + - + - + + - -+
A space of previous layer
A
B
8. Problem Definition: Explorative sampling in a generative region
• Given: A GAN model (𝐺), a target layer (ℓ), and an input query (𝑧0)
• Goal: find a set of equivalent class of images generated from
the same generative region (𝑺ℓ).
𝑔ℓ:1 𝑔 𝐿:ℓ+1𝑧0
A space of previous layer
T
Query
ℎℓ
+
-
-
+
-
+
+
-
-
+
+ - - + - + + - -+
9. • The dimension of latent space and a lot of hyperplanes are hard
to handle in practice. (E.g., 4th layer in PGGAN: ℝ512 → ℝ8192)
• Typically generative region is nonconvex in higher layer due to
nonlinear activations.
Challenges of Sampling in a Generative Region
Small 𝜖-based sampling
• Every samples inside the region
• Exists blind regions
Large 𝜖-based spherical sampling
• Cover the region
• Might have out-of-region samples
Latent Space Latent Space
10. Reduction to the Robot Planning Problem
• Searching a path in non-convex space
• High degree of freedom of robot joint
• Searching samples in non-convex space
• High dimensional explorative space
𝑍 ∈ ℝ512
𝑆ℓ
Exploring a Generative Region Problem Robot Planning Problem
We reduce our sampling problem into robot-planning problem.
Reduction
11. Generative Boundary constrained
Rapidly-exploring Random Tree (RRT)
• Given generative boundary as constraints,
RRT is gives solution to search over the generative region.
• This explorative sampling always guarantee acceptance inside the region
LaValle, Steven M. “Rapidly-exploring random trees: A new tool for path planning”. Technical Report. Computer Science Department, Iowa State University. 1998.
Illustrative example Example in nonconvex regionAlgorithm of RRT
12. Smallest Supporting Generative Boundary Set
• Using all the boundaries, constraints get too tight and
computationally expensive.
• We observe not all the boundaries affects equally on the output.
𝑔 𝐿:ℓ+1𝑔ℓ:1𝑧0
Latent Space
Latent
Vector
Disregard values of relaxed boundaries
ℎℓ ℎℓ𝑚⊙ =
+
-
-
+
-
+
+
-
-
+
-
+
+
-
-
13. Smallest Supporting Generative Boundary Set
• Apply Bernoulli mask optimization to relax boundaries but
maintain the output.
Entire boundaries Using 10% Using 5%
Chang, Chun-Hao, et al. "Explaining image classifiers by adaptive dropout and generative in-filling." International Conference on Learning Representations (ICLR). 2018.
𝜃∗ = argmin
𝜃
ℒ(𝑧0, ℓ, 𝜃)
= argmin
𝜃
𝑔 𝐿:ℓ+1 𝑔𝑙:1 𝑧0 ⊙ 𝑚 − 𝐺 𝑧0 + 𝜆 𝜃 1 where 𝑚 ∼ 𝐵𝑒𝑟 𝜃
Masked image reconstruction error Mask l1 regularizer
22. Conclusion
• We propose a new interpretable method to analyze the inside of
deep generative neural networks.
• Our explorative sampling method demonstrate the better
performance compared to existing method (e.g., 𝜖-based sampling)
when investigating decision regions.
• Our algorithm can be extended to different types of deep
neural networks models (e.g., classification model).
23. Thank you!
Explainable Artificial Intelligent Center of Korea
https://xai.kaist.ac.kr
This work was supported by the Institute for Information & communications Technology Planning & Evaluation
(IITP) grant funded by the Ministry of Science and ICT (MSIT), Korea (No. 2017-0-01779, XAI)
Editor's Notes
Hi everyone. As introduced I’m Giyoung Jeon.
This work was jointly done with Haedong Jeong and my advisor Jaesik Choi.
Generative Adversarial Networks, GANs, has shown high performance in generating realistic and various images.
For example, Progressive GAN has shown its performance in LSUN to generate architectural buildings and celebA dataset to generate face of celebrities, whose resolution is up to 1024 by 1024.
To generate such realistic images, a lot of nodes are involved in the generation.
However, understanding the roles of those nodes in the generation process is not well studied yet.
So given a trained GAN, we wish to explain the generation process by sampling images which passes similar generation process with respect to a query image.
There exist previous work to solve similar problem.
Network dissection tries to combine the feature map and the segmentation model to explain the role of each unit in CNN based classifiers.
This method considers only single unit at once and requires segmentation model as a supervision.
They also applied same method to GAN models, and they have shown some of units are tied and cooperate to generate attributions.
Google Deep dream tries to explain the internal unit of the neural network by generating example which maximally activates the unit.
However, this generates not real but synthetic image.
Langrangian relaxed decision boundary approximates complex decision boundary to linear space using Lagrangian multiplier.
However, this method have blind spots where Lagrangian cannot fit exactly.
In this paper, we define G(Z) as a generator to generate an image from random input Z
h_l is a node (neural) representation of l-th layer of GAN
Little g represents a partial generation of image. As an example g_j:I presents a generative function from layer I to layer j
___________________
In the generator, a lot of nodes are involved in the generation of theses images.
However, studies to understand the roles of those nodes in the generation process is not well done yet.
Before we formally define a problem, here, we will define a generative boundary and a generative region, which are main difference with previous methods.
Given a layer h_l, a node define a generative boundary which is an output applied to a linear hyperplane to the space of the previous layer h_l-1.
Of course, the boundary is highly non-linear, non-convex with respect to the input space, where the linear transformation and nonlinearity combines.
The hyperplane is learned and trained to fool the discriminator in a GAN.
A generative region is a space surrounded or closed by a set of generative boundaries.
classifier
Similarly, a generative region can be defied as the combination of sign of node values. As an example the second node is changed from positive to negative (or vise versa), the generated image will be in different region and have different functionality.
In this paper, we wish to search the generatvie region in a way that we could extract/generate images which are in the same generative region efficiently.
However it is non trivial to generate samples from a generative region in two reasons.
One is that the conventional GAN has a lot of base dimensions and numerous hyperplanes.
As an example, for a Progressive GAN model, the 4th layer include 512 base dimensions and 8192 hyperplanes.
Another reason is that the generative region of our interest is non-convex. Of course, one can generate sample in the (l-1)-th layer directly. However, this does not reflect the distribution of sample generation procedure of GAN.
Not all the regions in l-1-th layer is approachable from the input.
Thus, when we generate sample from the input space Z (where the actual sample generation procedure is took), the linear hyperplanes in the l-th layer become highly non-linear in the input space.
So here we introduce RRT, which is originally used in path-planning problems.
The algorithm of this method is first, uniform randomly sample new points, and find the nearest que. To step forward, it takes unit vector with direction from the nearest que to the random sample. The new point moving from the nearest query with unit step, does not collide any obstacle, then the sample is merged into the queue.
For our objective, we will give the generative boundary conditions as obstacle in RRT. This explorative sampling enables us to collect samples in high-dimensional, nonconvex region, guaranteeing inside of the region.
So here we introduce RRT, which is originally used in path-planning problems.
The algorithm of this method is first, uniform randomly sample new points, and find the nearest que. To step forward, it takes unit vector with direction from the nearest que to the random sample. The new point moving from the nearest query with unit step, does not collide any obstacle, then the sample is merged into the queue.
For our objective, we will give the generative boundary conditions as obstacle in RRT. This explorative sampling enables us to collect samples in high-dimensional, nonconvex region, guaranteeing inside of the region.
When we use all the boundaries, the constraints are too tight to explore and numerous boundaries make it costly. So we tried to take associated boundaries, which affect more than negligible ones.
We take element-wise multiplication on the hidden value, which will disregard some of nodes.
Then how can we choose the mask? We appley Bernoulli mask optimization.
Our objective function aims to reduce the masked image reconstruction error while theta to be sparse as possible.
Below figures are examples when all the boundaries are used, 10% are used and 5%are used.You may notice that we can reduce the burdon of computation while maintaining the quality of the output.
We define a set of boundary which maintains the original output with minimal number of boundaries, as Smallest Supporting Generative Boundary Set.
Finally our algorithm is shown as following step. First, we optimize the mask to reduce the burdon of large number of boundaries. Actually, this step is optional if you want to fully use the boundaries. Then we apply RRT to the obtained region and gather samples which shares the attributions.