Autoregressive Conditional Generation using Transformers
Paritosh Mittal, Yen-Chi Cheng,
Maneesh K. Singh, Shubham Tulsiani
Introduction
2
3
4
*https://unsplash.com/photos/EPy0gBJzzZU
5
an armchair in the shape of an avocado
Image taken from the original paper [1]
Example taken from original Dall-E work [2]
Image is a visualization from ShapeNet [3]
Autoregressive models
6
Autoregressive models
Autoregressive modeling in time-series domain means that observations from past time-steps are used to predict the value at current time
Benefits of likelihood based methods over Generative Adversarial Networks
7
si-4
si-3
si-2
si-1
si
Conditional Image Generation with PixelCNN Decoders
8
Pixel CNN is used as decoders to generate realistic images given latent embeddings as input
*https://arxiv.org/pdf/1606.05328.pdf
Image taken from the original paper*
Image taken from the original paper*
Pixel CNN (Pros v. Cons)
Further modifications, example Gated PixelCNN, PixelCNN++, etc. try to alleviate some of these concerns.
9
Pros
Cons
*https://arxiv.org/pdf/1606.05328.pdf
Discrete - Compact Latent Representations
10
Vector Quantized - Variational AutoEncoders
VAEs regularize the latent space during training. VQ-VAEs propose to use discrete latent variables
We need a codebook or embedding table for Vector Quantization step
11
*https://arxiv.org/pdf/1711.00937.pdf
VQ-VAE / VQ-VAE - 2
12
*https://arxiv.org/pdf/1906.00446.pdf
Image taken from the original paper*
VQ-VAE 2
VAEs regularize the latent space. VQ-VAEs propose to use discrete latent variables
13
*https://arxiv.org/pdf/1906.00446.pdf
Image taken from the original paper*
VQ-VAE - VQ step
14
*https://arxiv.org/pdf/1711.00937.pdf
Image taken from the original paper*
Using Transformers
15
Transformers
Transformers are a form of autoregressive models which can model long-range relationships from its inputs
Why use Transformers?
16
Taming Transformers for High-Resolution Image Synthesis
This method builds on top of VQ-VAE
17
*https://arxiv.org/pdf/2012.09841.pdf
Image taken from the original paper*
Taming Transformers for High-Resolution Image Synthesis
High Resolution image generation:
Further works like Dall-E can generate interesting results with 1.2 B params
18
*https://arxiv.org/pdf/2012.09841.pdf
Image taken from the original paper*
Our Goal
Use the autoregressive ability of Transformers to generate complete high quality representations of visual information from partial inputs
19
Social Motivation
20
Social Motivation
Developing generative models for high quality visual content can:
21
Partial sketch -> complete image
Text -> images/Videos
Frame -> video
Parts -> 3D Shape
Ways to represent content
Work across modalities
Better understanding of image formulation
Realistic Data Augmentation
This project aims to leverage from the learnings of
22
Q/A
23
Problem Formulation
24
Sparse input signal
Full signal
Problem Formulation: Examples
25
Image taken from: alamy1, conceptdraw2, flickr3, this paper4
Model - Learning Vector Quantized Codebook
26
Codebook
34
16
8
15
1
40
1
55
33
43
23
96
0
3
77
2
0
1
k-1
k-2
43
Lookup�Codebook
Quantization
Encoder
Decoder
Input�(HxW)
Recon.
(Hz x Wz)
Model - Generative Models on Quantized Vectors
27
33
?
0
3
77
2
Quantization
Encoder
Decoder
Transformer
0
3
77
2
33
0
3
77
2
33
?
Input
Output
Model - Conditional Generation on Sparse Input
28
Quantization
Encoder
Decoder
Transformer
?
?
?
2
33
0
3
77
2
33
8
33
2
8
?
16
8
15
Complete Quantized Vector
Partial Quantized Vector
Input
Recon.
Learning Vector Quantized Codebook Across Domains
29
MNIST
CIFAR10
Cats
ShapeNet
VQVAE on Images - MNIST
30
Input
Recon.
Resolution: 32x32
k: 10 d: 64 z dimension: 64x8x8
VQVAE on Images - CIFAR10
31
Input
Recon.
Resolution: 64x64
k: 128 d: 256 z dimension: 256x16x16
VQVAE on Images - Cats
32
Input
Recon.
Resolution: 256x256
k: 1024 d: 256 z dimension: 256x16x16
Learning Vector Quantized Codebook for 3D Object with SDF
33
*image taken from this paper
*SDF to the Stanford bunny
Visualization of SDF
34
Model - Learning Vector Quantized Codebook
35
Codebook
0
1
k-1
k-2
43
Lookup�Codebook
Quantization
Encoder
Decoder
Input: SDF (DxHxW)
Recon: SDF�(DxHxW)
34
16
8
15
1
40
1
55
33
43
23
96
0
3
77
2
Dataset: ShapeNet Chair
(Dz x Hz x Wz)
VQVAE on SDF - ShapeNet
36
Input
Recon.
Resolution: 64x64x64
k: 512 d: 256 z dimension: 256x8x8x8
VQVAE on TSDF - ShapeNet
37
Input
Recon.
Resolution: 64x64x64
k: 512 d: 256 z dimension: 256x8x8x8
t: 0.2
Metrics: IoU
38
0.7695
0.3591
0.1186
Future Steps
39
33
?
0
3
77
2
Quantization
Encoder
Decoder
Transformer
0
3
77
2
33
0
3
77
2
33
?
2. Generative Models on Lower Dimension
Future Steps
40
Quantization
Encoder
Decoder
Transformer
?
?
?
2
33
0
3
77
2
33
8
33
2
8
?
16
8
15
Complete Quantized Vector
Partial Quantized Vector
3. Extend to Conditional Generation on Sparse Input
Q/A
41
42
Thanks
43
Appendix