데이터와 AI / NOTE 29

오토인코더와 생성 모델

Autoencoders

표현 학습, 생성 모델, VAE와 관련 추론 구조를 읽습니다.

♫ 이 문서 듣기

개념에서 수식으로

먼저 이해할 내용

관측 데이터를 작은 내부 표현으로 옮겼다가 다시 복원하면 무엇을 남겨야 하는지 배울 수 있다. 이 글은 집합의 순서에 대한 성질에서 시작해 오토인코더, 확률적 잠재변수, 생성 모델의 학습 목적으로 이어진다.

기호를 먼저 읽기

x, x̂
원래 입력과 복원한 입력
z
직접 관측하지 않는 잠재표현
E, D
표현을 만드는 인코더와 복원하는 디코더
qφ(z ∣ x), pθ(x ∣ z)
잠재표현 추정과 데이터 생성의 조건부 분포
μ, σ, ε
평균·표준편차·기본 잡음
D_KL, ELBO
분포 차이 항과 최적화할 로그우도의 하한

이 글의 흐름

순서가 바뀌어도 유지할 성질을 먼저 정하고, 입력→잠재표현→복원의 관계를 읽는다. 확률모델에서는 복원과 분포 제약을 분리하고, 표본추출·미분·조건부 생성으로 확장한다.

주제와 표기

Autoencoder

Permutation Invariance and Equivariance

순서를 바꾸었을 때 무엇이 유지되어야 하는지 정한다

순열 불변은 입력 순서를 바꾸어도 전체 결과가 같다는 뜻이다. 순열 등변은 입력의 순서 변화에 맞춰 출력 위치도 같은 방식으로 바뀐다는 뜻이다. 전체 집합의 요약과 각 원소의 라벨처럼 서로 다른 출력을 구별하는 기준이다.

Consider a function f : X→Y

Wanted

The response of the function f is indifferent to the ordering of the elements in X
Permutation of input instances permutes the output labels

Definition (Permutation invariance)

A function f : XY is permutation invariant iff for any permutation π
f[{x1,,xN}]=f[{xπ(1),,xπ(N)}]

Definition (Permutation equivariance)

A function f : XN→YN is permutation equivariant iff
f[{xπ(1),,xπ(N)}]=(fxπ(1)[X],,fxπ(N)[X])T

Permutation Equivariant Functions

개별 원소와 전체 집합의 정보를 함께 사용한다

λI 항은 자신의 값을, γ11ᵀ 항은 집합 전체를 모은 정보를 연결하는 구조로 읽을 수 있다. 이어지는 pool 표현은 원소의 순서와 무관하게 전체 정보를 모으는 역할이다. 각 위치의 개별 값과 전체 공유 정보가 나뉜다는 점을 확인한다.

fθ:RNRNispermutationequivariantiff
f[x;θ]=σ[Θx]
where
Θ=λI+γ(11T),forλ,γR
수식
That is
fπ(n)=σ[λxπ(n)+γpool[{xπ(1),,xπ(N)}]]

Amortized Clustering

집합을 요약하고 Attention으로 결합한다

클러스터링 구간은 집합에서 혼합모델의 계수를 출력하려는 문제이다. Attention에서는 QKᵀ로 관련도를 구한 뒤 V를 모은다. 여러 head와 투영행렬은 같은 입력을 서로 다른 표현에서 비교하는 방식이다.

Input:X={x1,,xN}(set)
Output : f[X;θ] = {π[X], {μk[X], σk[X]} _ (k = 1)K} (parameters for MoG)

Attention Operaotors

Dot-product attention

Give a query Q∈RN×Dp, a key K∈RN×DK, and a value matrix V∈RN×Dv, an attention function is defined by
Att[Q,K,V;ω]=ω[QKT]V
where ω[] is an activation function (e . g ., softmax function in the standard transformer model)

Multihead attention

As in the standard transformer model
Multihead[Q,K,V;λ,ω]=concat(O1,,Oh)WO
where
Oj=Att[QWjQ,KWjK,VWjV;ωj]
λ={WjQ,WjK,WjV}j=1h

Set Transformer: Encoder & Decoder

Encoder  ( X → Z )

집합 전체를 고정된 수의 표현으로 모은다

Encoder는 원소 사이의 관계를 반영한 Z를 만든다. PMA는 학습 가능한 seed를 질의로 사용하여 Z를 요약한다. Decoder는 이 요약을 최종 출력으로 바꾸므로, 원소별 표현과 집합 수준의 출력을 단계별로 나누어 읽는다.

Stacks of SABs or ISABs
Encoder[X]=SAB[SAB[X]]or
Encoder[X]=ISAB[ISAB[X]]

Pooling by Multihead Attention (PMA)

Apply MHA on a set of learnable K seed vectors S∈RK×D
PMAK[Z]=MAB[S,rFF[Z]]

Decoder ( Z → y )

Aggregate features Z into a single or a set of vectors that is fed into a FF net to yield the final outputs
Decoder[Z;λ]=rFF[SAB[PMAk[Z]]]

Deep Generative models

입력을 구별하는 모델과 새 입력을 만드는 모델을 나눈다

분류 모델은 주어진 데이터가 어떤 범주인지 판단한다. 생성 모델은 데이터가 나타나는 분포를 표현하고 그 분포에서 새 샘플을 얻으려 한다. P_model과 P_data를 가깝게 하려는 식은 하나의 예측값이 아니라 분포 전체의 관계를 목표로 한다.

ImageDeeoNeuralNetworkP[cybertruck]=0.9
Discriminative Model

Latent Space = Hidden space=Invisible space

⇓ Linear→NN

Observed space

A Powerful model for unsupervised learning

Back - Prop (discriminative) Learning with labeled data
원본 도해
Up - Prop (generative) Learning with unlabeled data
원본 도해

Image Inpainting

eCommerceGAN

Linear Generative Models: Earlier Days

Sparse Coding

Recognizing data (via discriminative models)

Creating data (via generative models)

Pmodel[x;θ]Pdata[x]

Generative model unsupervised learning
Training Data = {x1, x2, …, xN}
Generative model = {x^1, x^2, …, x^N}

Density Estimation

확률을 계산하는 모델과 샘플을 만드는 모델을 구별한다

명시적 모델은 x의 확률 또는 밀도를 정의한다. 암시적 모델은 생성함수 G를 통해 샘플을 만드는 경로를 학습한다. 데이터와 비슷한 샘플이 나온다는 사실과 각 샘플의 밀도를 직접 계산할 수 있다는 사실은 다르다.

A problem of modeling a density function p[x], given a finite number of data points, {xn} _ (n = 1)N drawn from that density function

Prescribed models

Fit model distribution pθ[x] to the empirical distribution pdata[x]
Explicitly assign probability to every x in the data distribution

Deep learning

Tractable density : PixelRNN, PixelCNN
Approximate density : Variational autoencoders

Implicit models

Learn a generator network G[] that generate samples whose distribution is close to that of the data generating distribution

Deep learning

Generative adversarial networks
Z ~ P[z] → Generator P[xz] or G[z] → Generative Image
Generative = Decoder

Variational Autoencoders (VAE)

Autoendoer

오토인코더는 입력을 압축하고 다시 복원한다

E(x)로 z를 만들고 D(z)로 x̂를 얻는다. 복원 손실은 x와 x̂의 차이를 모은 값이다. VAE에서는 하나의 z만 내는 대신 μ·σ로 정한 분포에서 z를 얻으므로, 내부 표현을 만드는 방식이 달라진다.

원본 도해
n|xnx^n|22

Limitation

xencodingz=E[x]decodingx^=D[E[x]]

Variational Autoencoder

원본 도해

무작위성을 평균과 퍼짐으로 분리한다

ε를 표준정규 잡음으로 두고 z=μ+σε를 만든다. μ는 잡음이 놓이는 중심이고 σ는 퍼짐의 크기를 조절한다. 같은 ε를 사용해도 μ와 σ가 바뀌면 z가 달라지므로, 학습할 값과 외부 잡음을 나누어 볼 수 있다.

zN[μ,σ2]
Standard normal
ϵN[0,1]
z=μ+σϵ

Training VAE with Reparameterizaion Trick

원본 도해

Variational Autoencoder

인코더와 디코더의 조건 방향을 구별한다

qφ(z|x)는 관측 x에서 잠재변수 z를 추정하는 분포이고 pθ(x|z)는 z에서 x를 설명하는 분포이다. 조건선 오른쪽은 이미 주어진 정보로 읽는다. 두 분포의 매개변수 φ와 θ도 같은 역할의 하나의 변수가 아니다.

원본 도해
Probabilistic decoder : pθ[xz]
Probabilistic encoder : qϕ[zx]
Probabilistic Inference : P[zx]qϕ[zx]

Probabilistic decoder (generator network)

pθ[xz]=N[xμθ[z],diag[σθ2[z]]]
Dθ[z]=xpθ[xz]

Probabilistic encoder (inference network) for amortized variational inference

qϕ[zx]=N[zμϕ[x],diag[σϕ2[x]]]
Eϕ[x]=zqϕ[zx]
Stochastic gradient variational Bayes
(with reparameterization trick)

Training VAE

Variational lower-bound

로그우도에서 다루기 쉬운 하한을 얻는다

잠재변수 z를 적분해 없애면 x의 밀도를 얻지만 계산이 어려울 수 있다. 원문은 q를 곱하고 나눈 뒤 Jensen 부등식으로 하한을 만든다. 정리하면 데이터를 설명하는 기대 로그우도와 잠재분포의 차이를 나타내는 KL 항으로 분리된다.

log[p[x]]=log[p[x,z]dz]=log[pθ[xz]p[z]dz]=log[qϕ[zx]pθ[xz]p[z]qϕ[zx]dz]
qϕ[zx]log[pθ[xz]p[z]qϕ[zx]]dz(Jensen’s inequality)
=qϕ[zx]log[pθ[xz]]dz+qϕ[zx]log[p[z]qϕ[zx]]dz
=Eqϕ[zx][log[pθ[xz]]]DKL[qϕ[zx]P[z]](KLdivergence)
Reconstruction - Penalty

Reconstruction cost

복원과 분포 제약은 서로 다른 목적이다

복원 항은 선택한 z가 x를 얼마나 잘 설명하는지 측정한다. KL 항은 추정 잠재분포가 기준분포에서 얼마나 벗어나는지를 제한한다. 하한을 크게 하는 식에서는 복원 기여를 더하고 KL을 빼며, 음의 손실을 최소화할 때에는 부호가 함께 바뀐다.

The expected log - likelihood measures how well samples from qϕ[zx] are able to explain the data x

Penalty

The approximation qϕ[zx] to the posterior does not deviate too far from your beliefs p[z]

Maximize the variational lower-bound on the average log-likelihood

argmaxθ,ϕEp~[x][Eqϕ[zx][log[pϕ[xz]]]DKL[qϕ[zx]p[z]]]

Given

A set of N unlabeled examples
D={x1,x2,,xN}xnRd

Goal

Construct a model s . t . the distribution of generated samples is close to the distribution over the training set

Model

VAE:pθ[xz](likelihoodbased)
GAN:Gθ[z](likelihoodfree)

Variational lower-boud

근사분포 선택과 미분 계산을 나누어 다룬다

원문이 제시한 두 문제는 q를 어떤 형태로 둘지와 기대값의 미분을 어떻게 계산할지이다. 분포를 풍부하게 만드는 선택과 기울기를 효율적으로 추정하는 선택은 같은 문제가 아니다. 다음 SGVB 구간은 두 번째 문제의 계산 흐름과 연결된다.

F[θ,ϕ;x]=Eqϕ[log[pθ[xz]]]DKL[qϕ[zx]p[z]]

Two problems to be addressed

1.Choosingthecomputationallyfeasibleapproximateposteriordistributionqϕ[zx]
(toward the richer distribution)
Mean - field approximation where a factorized form of distribution is assumed
Structured mean - field approximations that incorporate some basic form of dependency within the approximate posterior
Approximate posterior as a mixture model
Normalizing flows
Hierarchical variational models
2. Efficient computation of the derivatives of the expected log - likelihood
Eqϕ[zx][log[pθ[xz]]]
Stochastic gradient variational Bayes

Strochastic Gradient Variational Bayes

기대값을 여러 표본의 평균으로 근사한다

분포 전체를 적분하는 대신 z 표본을 얻고 각 표본의 로그우도를 평균한다. 1/L은 L개 표본의 합을 평균으로 바꾸는 계수이다. 제시된 단일 표본 설명은 특정 계산 전략의 설명이며, 어떤 자료에서도 한 번의 추출로 정확한 기대값을 얻는다는 뜻은 아니다.

SGVB : Monte Carlo estimates + gradient descent
Variational lower - bound
F[θ,ϕ;x]=Eq[log[pθ[xz]]]DKL[qϕ[zx]p[z]]
SGVB - analytically computed
where Monte Carlo estimates are performed with the reparameterization trick (for variance reduction)
Eq[log[pθ[xz]]]1Ll=1Llog[pθ[xzl]]
where z^(l) = m + λϵl and ϵl ~ N[0,1]
A single sample is often sufficient to form this Monte Carlo estimates in practice
qϕ[zx]=N[m[x],λ[x]]
zN[m[x],λ[x]]
ϵN[0,1]
z=m[x]+λ[x]ϵ

Noisy Gradients

분포의 변화율을 이용하는 기울기를 읽는다

score-function 전개는 확률분포의 매개변수 변화가 기대값에 미치는 영향을 로그미분으로 표현하려는 흐름이다. 원문 중간에는 q와 log q의 미분 표기가 일치하지 않는 줄이 있으므로, 이를 모두 검증된 등식으로 이어 설명하지 않는다. 마지막 기대값 식의 역할과 표본 평균의 의미를 중심으로 읽는다.

The log derivative trick yields
ϕEq[log[pθ[xz]]]=ϕqθ[zx]log[pθ[xz]]dz
=log[pθ[xz]]ϕqϕ[zx]qϕ[zx]qϕ[zx]dz
=qϕ[zx]log[pθ[xz]]ϕqϕ[zx]dz
=Eq[log[pθ[xz]]ϕlog[qϕ[zx]]]
Monte Carlo estimates are calculated as
ϕEq[log[pθ[xz]]]1Ll=1Llog[pθ[xzl]ϕlog[qϕ[zlx]]]
where z^(l) ~ qϕ[zx]
This is referred to as score function gradients, which often exhibit very high variance (the quality of the estimate may depend on φ which may be far from the optimum)

Reparameterization Trick

잡음을 고정된 분포에서 뽑고 변환을 학습한다

재매개화의 핵심은 z=fφ(ε,x)로 쓰고 ε의 분포를 학습 매개변수와 분리하는 것이다. 정규분포 예에서는 μφ(x)+σφ(x)⊙ε 형태가 된다. 원문에 함께 적힌 score-function 형태와 재매개화 미분을 자동으로 같은 계산식이라 보지 않고, 미분이 통과하는 경로를 구별한다.

Reparameterize the random variable z ~ qϕ[zx] using a differentiable transformation fϕ[ϵ,x] of an auxiliary noise variable ε
z=fϕ[ϵ,x]
ϵpϵ[ϵ]
Then, Monte Carlo gradient estimates are
ϕEq[log[pθ[xz]]]=Eq[log[pθ[xz]]ϕlog[qϕ[zx]]]
=Eq[log[pθ[xfϕ[ϵ,x]]]ϕlog[qϕ[fϕ[ϵ,x]x]]]
1Ll=1Llog[pθ[xzl]]ϕlog[qϕ[zlx]]
where z^(l) = fϕ[ϵl,x] and ε ~ pϵ[ϵ]
Note that the expectation is over pϵ that does not depend on variational parameters φ
In the case of Gaussian random variables
zl=μϕ[x]+σϕ[x]ϵl
ϵlN[0,I]

Score function gradients

Can be applied to both discrete and continuous random variables
Often have high variance

Reparameterization gradients

Can be applied to only continuous random variables
Often have lower variance than score function gradients

VAE: Revisited

하한 최대화와 손실 최소화를 같은 목표로 읽는다

ELBO를 최대화하는 식에 음수를 붙이면 복원 손실과 KL 손실의 합을 최소화하는 식이 된다. 목표의 방향이 바뀌었으므로 두 항의 부호도 함께 읽어야 한다. 같은 모델을 두 최적화 형식으로 적은 것이다.

Training a VAE involves maximizing the ELBO (Evidence Lower Bound)
argmaxθ,ϕF[θ,ϕ;x]=Eqϕ[zx][log[pθ[xz]]]DKL[qϕ[zx]p[z]]
This is equivalent to minimizing the loss J = JREC + JKL
argminθ,ϕ=Eqϕ[zx][log[pθ[xz]]]+DKL[qϕ[zx]p[z]]
JREC+JKL
Assume that both qϕ[zx] and pθ[xz] are Gaussian
qϕ[zx]=N[zμϕ[x],diag[σϕ2[x]]]
pθ[xz]=N[xμθ[z],diag[σθ2[z]]]

Practice of VAEs

정규분포 가정 아래의 구체적인 손실을 확인한다

디코더 공분산을 고정하면 복원 항이 제곱거리와 연결되는 구조를 볼 수 있다. KL의 닫힌식에서는 잠재분포의 차원, 평균, 분산을 구별한다. 원문 KL 식의 상수 부호와 차원 표기는 별도 확인이 필요하므로, 그대로 모든 정규분포에 적용 가능한 공식이라고 설명하지 않는다.

In practice, the covariance of the decoder is set to the identify matrix for all z, i . e .,
diag[σθ2[z]]=I
수식
z = Eϕ[x] = μϕ[x] + σϕ[x] ⊙ε for ε ~ N[0,I] and JREC = -Log[N[xμθ[Eϕ[x]],1]]
JREC=|xμθ[Eϕ[x]]|22
Assuming the prior p[z] = N[z0,I] yields
DKL[qϕ[zx]p[z]]=12{|μϕ[x]|22+d+i=1d(σϕ2[x]ilog[σϕ2[x]i])}
where x∈Rd

Shortcomings of VAEs

복원과 잠재분포 제약의 균형을 읽는다

KL에 너무 큰 비중을 두면 복원과 다른 방향의 제약이 강해질 수 있다. 원문은 이 균형을 조절하는 학습 전략을 소개한다. 이어지는 noise injection 관점은 z가 평균에 조절된 잡음을 더한 값이라는 앞 식을 다시 해석한 것이다.

Has to carefully balance the trade - off between JREC and JKL during optimization

Over-regularization

A too large weight on the JKL term
Smoothing the latent space too much affect sampling quality in a negative way

Heuristics

Gradual annealing the importance of JKL during training

Practical Implementation of VAEs:Summary

TheprobabilisticencoderEϕ[x]=zN[zμϕ[x],diag[σ2[x]]]
That is, the output of encoder is given by
Eϕ[x]=μϕ[x]+σ[x]ϵ
which can be viewed as the mean μϕ[x] augmented with the Gaussian noise scaled by σϕ[x]

Noise Injection

In this light, a VAE can be seen as a deterministic autoencoder where Gaussian noise is added to the decoder ' s input

Regularization

수식

Regulaized Autoencoder (RAE)

Deterministic Reqularized Autoencoders

No noise injection

명시적인 정규화로 잠재표현과 디코더를 제한한다

RAE의 손실은 복원, 잠재벡터 크기, 디코더 정규화의 세 부분으로 나뉜다. 각 계수는 서로 다른 제약의 비중을 조절한다. 잠재벡터의 노름을 제한하는 것과 디코더 가중치 또는 미분을 제한하는 것은 서로 다른 대상이다.

substitutes noise injection with an explicit reqularization for the decoder

RAE

RAE = deterministic autoencoder + explicit regularization for the decoder

The loss for RAE is given by

JRAE=JREC+βJzRAE+λJRAG
where

JREG

Explicit regularizer for the decoder

JzRAE=12|z22

Constraining the size of the latent space to avoid unbounded optimization

정규화가 적용되는 대상을 구별한다

가중치 제곱합은 매개변수 크기를, 기울기 패널티는 입력 변화에 대한 출력의 민감도를, 스펙트럼 정규화는 행렬의 확대 정도와 관련된 값을 다룬다. 어떤 항도 이름만으로 모든 조건의 성질을 보장한다고 읽지 않는다. 원문에서 각 항이 어디에 적용되는지를 먼저 확인한다.

Examples of JREG

Tikhonov regularization

JREG = | θ | _2^2 (weight decay on the decoder parameters θ)

Gradient penalty

JREG=|Dθ[Eϕ[x]]|22(enforcingLipschitzcontinuity)

Spectal normalization

Normalizes each weight matrix θl in the decoder by an estimate of its largest singular value
θl=θls[θl]
where s[θl] is the current estimate obtained through the power method

Ex-Post Density Estimation

No KL divergence term in RAE

생성에 사용할 잠재분포를 나중에 맞출 수 있다

RAE에 KL 항이 없으면 잠재점들이 미리 정한 단순 분포를 따른다는 보장이 없다. 원문은 인코더가 만든 잠재점들에 별도의 밀도모델을 맞춘 뒤 그 분포에서 새 z를 뽑는 절차를 제시한다. 복원용 z와 생성용 z를 얻는 경로를 구별한다.

Cannot ensure that the latent space Z is distributed according to a simple distribution
Lose the simple mechanism provided by p[z] to sample from Z
xnewpθ[xznew]
znewp[z]

Ex-post density estimation

Fitadensityestimatorqδ[z]to{z=Eϕ[x]xX}
Place a dirac distribution on each latent point ⇒ high quality reconstruction but poor generalization
Mixture of Gaussians
For random sample generation, z ~ qδ[z] is fed into the decoder in RAE
This technique can be used even for VAEs

ES-CVAE

Echo-State Conditional Variational Autoencoder

고정된 순환 상태와 학습할 출력 계수를 나눈다

Echo State 구간은 A와 B를 고정하고, 입력과 이전 reservoir 상태로 새 r을 계산하는 구조이다. 학습할 출력 연결 C는 x와 r을 모아 y를 만든다. 모든 가중치를 같은 방식으로 학습하는 일반 신경망과 구별되는 지점이다.

MNIST

Echo State Networks

An approach to recurrent neural network training
Consists of a large, fixed, recurrent "reservoir" network
ri=αri1+(1α)f[Ari1+B[1;Λxxi]]
where A and B are NOT trained but only properly initialized
The network output y^(i) is computed by training suitable output connection weight C
yi=C[1;xi;ri]

Our Model: ES-CVAE

이전 상태를 조건으로 다음 데이터의 확률을 만든다

순서 전체의 확률을 이전 reservoir 상태에 조건을 둔 확률의 곱으로 표현한다. 각 단계에서는 잠재변수 z를 적분해 x의 조건부 밀도를 얻는다. 음의 로그밀도로 적은 anomaly score는 모델이 현재 샘플을 얼마나 예상하기 어려운지에 관한 지표로 읽고, 실제 판정의 정답이라고 단정하지 않는다.

원본 도해
The joint distribution over a sequence of N
instances, p[x1,x2,,xN]=p[x1]n=2Np[xnx1:n1], is modeled as
p[x1,x2,,xN]=p[x1]n=2Np[xnrn1]
where
p[xnrn1]=p[xnzn,rn1]p[znrn1]dzn
and reservoir states rn1 are computed by
rn1=αrn2+(1α)f[Arn2+B[1;ΛxXn1]]
Anomalyscore,a[xn]=log[p[xnrn1]]

조건부 생성에서도 복원과 KL로 나눈다

이번 하한은 이전 상태 r을 조건으로 유지하면서 현재 x의 확률을 다룬다. 마지막에는 기대 로그우도와 조건부 잠재분포의 KL 차이로 나뉜다. 원문 중간의 q 조건부 표기와 마지막 줄의 정의가 같은 대상인지 확인해야 하므로, 표시되지 않은 가정을 추가하지 않는다.

Variational Lower-Bound F on Log[p[xn|rn1]]

log[p[xnrn1]]=log[p[xn,znrn1]dzn]
q[xnzn,rn1]log[p[xn,znrn1]q[xnzn,rn1]]dzn
=q[xnzn,rn1]log[p[xnzn,rn1]p[znrn1]q[xnzn,rn1]]dzn
=Eqn[log[p[xnzn,rn1]]]DKL[q[znxn,rn1]p[znrn1]]
where Eqn[] denotes the expectation w . r . t . q[znxn,rn1]

Neural Statistician

샘플 하나의 잠재변수와 집합 전체의 잠재변수를 구별한다

Neural Statistician 구간의 c는 집합 전체를 설명하는 변수이고 z는 개별 샘플에 연결된 변수이다. 집합 안의 각 x에 대한 항을 곱한 뒤 z와 c를 적분하면 집합의 밀도 표현이 된다. 변수별로 어떤 수준의 정보를 공유하는지 확인한다.

VAEznxn

Amortized inference

Inference using a deep net
qϕ[zx]

Variational inference = per-sample inference

Neural Statistician: A Bayesian Hierarchincal Model

원본 도해
The likelihood of a particular data set D
p[D]=p[c](xDpθ[xz]pθ[zc]dz)dc
1. Same as before
2. permutation invariant model

Neural Statistician = VAE for sets

집합을 요약하는 추정과 개별 샘플의 추정을 연결한다

qφ(c|집합)는 입력 순서에 영향을 받지 않는 집합 수준의 추정이다. qφ(z|c,x)는 집합 정보와 해당 샘플을 함께 사용한다. 마지막 소량 샘플 분류 항목은 이 표현의 응용 주제이며, 원문에 없는 성능 수치나 새 실험 결과를 포함하지 않는다.

원본 도해
수식
Multiple stochastic layers
Static network (permutation - invariant model) + Standard inference network (as in VAE)
The log - likelihood of a particular dataset D is given by
log[p[D]]=log[p[c](xDpθ[xz]pθ[zc]dz)dc]
수식
where
qϕ[zc,x] : standard inference network as in VAE
qϕ[cD]:staticnetwork(permutationinvariantmodel)

5-way 1-shot

Few - shot classification

정리하면

좋은 복원과 적절한 생성 분포는 같은 목표가 아니다. 각 손실 항이 무엇을 맞추려는지 구별해야 잠재공간과 생성 결과의 의미를 이해할 수 있다.