Autoencoder
- Label 되지 않은 데이터의 효율적인 코딩을 학습하기 위한 neural network
- output이 입력과 동일한 feedforward network이기 때문에 label이 필요 없다.
- 데이터로부터 자동으로 label을 학습한다.
- x → autoencoder → x′
- Self-supervised learning: 입력으로 output 스스로 배울 수 있다.(빈칸 채우기와 동일)
- Unsupervised learning
- Priciple Component Analysis의 비선형적인 일반화라고 할 수 있다.
- input을 낮은 차원의 code(기계가 이해할 수 있는representation)으로 표현하고 code로부터 재구조화한다.
- x → encoder → z →decoder → x′
- x: input
- z: x에 대한 representation or code(latent)
- 옳은 representation인지 판단하기 위해 x==x′인지 확인해야 한다.
- x′: z로부터 복원 된 output
Encoder
- Encoder는 input을 받아 상응하는 latent code로 encoding 한다.
- z=Eθ(x)
- E: neural network로 구현된 function, encoding model
- θ: network parameter
- x: input tensor
- z: output tensor
Decoder
- Decoder는 latent code를 받아 output으로 decoding 한다.
- x′=Dϕ(z)
- D: neural network로 구현된 function, decoding model
- ϕ: network parameter
- z: input tensor
- x′: output tensor
End-to-End Learning
- Autoencoder는 입력으로 출력이 지도되기 때문에 self-supervised이다.
- x′=Dϕ(Eθ(x))=Dϕ∘Eθ(x)
- Dϕ∘Eθ(x): neural network로 구현된 autoencoder
- θ, ϕ: network parameter
- x: input
- x′: output prediction
- Performance measurement
l(x,x′)=∥x−x′∥
- Learning objective
mink∑l(xk,x′k)
- 최적의 parameter를 찾는 방법
θ,ϕargmink∑l(xk,x′k) x′에 parameter θ, ϕ가 포함되어 있다.l(x,x′)=∥x−x′∥ =∥x−Dϕ∘Eθ(x)∥
- gradient ∇θ,ϕl back propagation을 통해 최적의 θ, ϕ를 찾을 수 있다.
Example
28 * 28 image가 있을 때 256차원으로 linear operation
numpy는 row major
- 입력 x784: 784×1
- 출력 y256: 256×1
y=W×x
- parameter W: 256×784
WT: 784×256