MAE [Kor]
Kaiming He, Xinlei Chen / Masked Autoencoders Are Scalable Vision Learners / Facebook AI Research(FAIR) 2021
Kaiming He, Xinlei Chen / Masked Autoencoders Are Scalable Vision Learners / Facebook AI Research(FAIR) 2021
1. Problem definition
์ปดํจํฐ ๋น์ ๋ถ์ผ์์ label์ด ์๋ ์๋ง์ฅ์ ๋ฐ์ดํฐ๋ฅผ ์ป๊ธฐ๋ ์ด๋ ค์ด ์ผ์ด๋ค. ๊ทธ๋ฐ๋ฐ ํ๋์จ์ด ๋ฑ์ ๋ฐ์ ์ผ๋ก ํฐ ๋ชจ๋ธ์ ํ์ตํ ์ ์๊ฒ ๋๋ฉด์ self-supervised learning์ ํตํด ์ด๋ฏธ์ง๋ฅผ ๋ผ๋ฒจ ์์ด ํ๋ณํ๋ ๊ฒ์ ๋ํ ๊ด์ฌ์ด ๋์์ก๋ค. ์ด๋ฐ self-supervised learning์ด NLP ๋ถ์ผ์์๋ ํ๋ฐํ ์ฐ๊ตฌ๋๊ณ ์๋ค. ๊ทธ ์ค์์ ๊ฐ์ฅ ์ ๋ช ํ GPT[1]์ BERT[2]๋ ๋ฐ์ดํฐ์ ์ผ๋ถ๋ฅผ ์ง์ฐ๊ณ ๊ทธ๊ฒ์ ์์ธกํ๋ ๋ฐฉ์์ผ๋ก ์ด๋ฃจ์ด์ก๋ค. ์ด ๋ ผ๋ฌธ์์๋ NLP์๋ง ์ ์ฉ๋๋ ์ด๋ฐ masked modeling ๋ฐฉ์์ ์ปดํจํฐ๋น์ ์๋ ์ ์ฉํ๊ณ ์ ํ์๋ค.
2. Motivation
Related work
Masked language modeling
NLP ๋ถ์ผ์ ์์ด์ BERT[2]์ GPT[1]๋ masked lanugage modeling์ ์ฌ์ฉํ๋ ๋ํ์ ์ธ model์ด๋ค. ์ด๋ค์ input sequence์ ์ผ๋ถ๋ฅผ ์ ๊ฑฐํ๊ณ ๊ทธ ์์ด์ง ๋ถ๋ถ์ ์์ธกํ๋ ๋ฐฉ์์ผ๋ก pre-training์ด ์ด๋ฃจ์ด์ง๋ค. ์ด pretraining๋ ๊ฒ์ downstream task์ ์ ์ฉํ์ฌ ์ข์ ๊ฒฐ๊ณผ๊ฐ ๋์ค๋ ๊ฒ์ ํ์ธํ ์ ์์๋ค.
Autoencoding
Autoencoding[3]์ learning representations์ ๋ํ์ ์ธ ๋ฐฉ๋ฒ์ด๋ค. ์ด๊ฒ์ input์ latent representation์ mappingํ๋ encoder์ input์ ๋ณต์ํ๋ decoder๋ก ์ด๋ฃจ์ด์ ธ ์๋ค. Denosing autodencoders(DAE)[4]๋ input signal์ ๋ถ๊ดด์ํค๊ณ original signal๋ก ๋ณต์ํ๋ autodencoder์ด๋ค. ์ด ๋ ผ๋ฌธ์ MAE๋ DAE์๋ ๋ค๋ฅธ ๋ฐฉ์์ ์ทจํ๊ณ ์๋ค.
Masked image encoding
์ด ๋ฐฉ์์ image๊ฐ masking์ ์ํด ๋ถ๊ดด๋์์ ๋ ์ด์ ๋ํ representation์ ๋ฐฐ์ฐ๋ ๊ฒ์ด๋ค. DAE์์๋ masking์ noise type์ผ๋ก ๋ณด์ฌ์ก๋ค. Context Encoder์์๋ CNN์ ํตํด ์ฌ๋ผ์ง ๋ถ๋ถ์ ์ฐพ๊ณ ์ ํ์๋ค. ์ต๊ทผ์ NLP ๋ถ์ผ์์๋ Transformers[5]๋ฅผ ๊ธฐ๋ฐ์ผ๋ก encodingํ ๊ฒ์์ ์ฐฉ์ํ์ฌ, iGPT[6]๋ unknown pixel์ transformer๋ก ์์ธกํ๊ณ ์ ํ์๋ค. ๋ ์ต๊ทผ์๋ BEiT๋ discrete tokens์ ์์ธกํ๋ ๊ฒ์ ์ ์ํ์๋ค.
Self-supervised learning
์ด ๋ฐฉ์์ ์ต๊ทผ์ ์ปดํจํฐ๋น์ ์์ ๋ง์ด ์ฐ๊ตฌ๋๊ณ ์์ผ๋ฉฐ pre-training์ ๋ํด ๋ค๋ฅธ pretext tasks๋ค์ ์ฐ๊ตฌํ๊ณ ์๋ค. ๊ทธ ์ค์๋ image์ ์ ์ฌ์ฑ๊ณผ ๋น์ ์ฌ์ฑ์ ํ์ตํ๋ contrastive learning[7],[8],[9]๊ฐ ์๋ค. ์ด๋ data augmentation์ ์์กดํ๊ณ ์๋ค.
Idea
์ด ๋ ผ๋ฌธ์ MAE๋ masked๋ input image๋ฅผ encoder๋ฅผ ํตํด latent representation์ mappingํ๊ณ decoder๋ฅผ ํตํด ์๋์ ์ ํธ๋ก ๋ณต์ํ๊ณ ์ ํ๋ค. NLP์๋ง ์ฌ์ฉ๋ masked autoencoding์ vision์๋ ์ฌ์ฉํ๊ธฐ ์ํด language์ vision์ ์ง๋ฌธ๋ค์ ํด๊ฒฐํ์๋ค.
vision ๋ถ์ผ์์๋ CNN์ด ๋๋ฆฌ ์ฌ์ฉ๋๊ณ ์๋ค. ๊ทธ๋ฌ๋ ์ด๊ฒ์ masked tokens๊ณผ positional embedding์ ์ฌ์ฉํ๋ ๋ฐ ํ๊ณ๊ฐ ์์๋ค. ๊ทธ๋ฌ๋ ์ด๊ฒ์ Vision Transformer(ViT)[10]๋ฅผ ํตํด ํด๊ฒฐํ ์ ์์๋ค.
information density๊ฐ vision๊ณผ language๋ ๋ค๋ฅด๋ค. language์ ๊ฒฝ์ฐ์๋ ์ธ๊ฐ์ด ๋ง๋ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ highly semanticํ๊ณ information-denseํ๋ค. ๊ทธ๋์ ์ฌ๋ผ์ง ๋ช๊ฐ์ ๋จ์ด๋ฅผ ์์ธกํ๊ธฐ ์ํด์๋ language ์ ์ฒด์ ๋ํ ์ดํด๊ฐ ํ์ํ๋ค. ๊ทธ๋ฌ๋ image์ ๊ฒฝ์ฐ์๋ nature-made์ด๊ธฐ ๋๋ฌธ์ ๋ช ๊ฐ์ information์ด ์ฌ๋ผ์ง๋๋ผ๋ ์ ์ฒด์ ๋ํ ์ดํด ์์ด๋ ์ด์ํ patch๋ก๋ถํฐ ์์ธก์ด ๊ฐ๋ฅํ๋ค. ์ด๋ฐ low-level image semantic์ ํด๊ฒฐํ๊ธฐ ์ํด์ image์ ๋ง์ ๋น์จ์ random patch๋ฅผ ๋ฝ์๋ด๊ณ ์ ํ์๋ค. ์ด๋ self-supervised task๋ฅผ ๋ ์ด๋ ต๊ฒ ๋ง๋ ๋ค.
text์ image์ decoder์ ๋ชฉ์ ์ด ๋ค๋ฅด๋ค. text์ ๊ฒฝ์ฐ์๋ decoder๊ฐ missing words๋ฅผ ์์ธกํด์ผ ํ๊ณ ์ด๋ rich semantic information์ ํฌํจํ๊ณ ์๋ค. ๊ทธ๋ฌ๋ image decoder์ ๊ฒฝ์ฐ์๋ pixel๋ฅผ ๋ณต์ํ๋ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ text decoder์ recognition task ๋ณด๋ค๋ lower semantic level์ ์ง๋๋ค. ๊ทธ๋์ decoder๊ฐ semantic level๋ฅผ ๊ฒฐ์ ํ๋๋ฐ ์ค์ํ ์ญํ ์ ํ๋ค.
์ด ์ธ๊ฐ์ง ์ง๋ฌธ์ ํด๊ฒฐํ๊ธฐ ์ํด ๊ฐ๋จํ๊ณ ํจ์จ์ ์ธ masked autoencoder(MAE)์ ๋ํด ์ฐ๊ตฌํ์๋ค. ์ด ๋ชจ๋ธ์ input image์ random patches ๋ค์ maskingํ๊ณ missing๋ ๋ถ๋ถ์ decoder๋ฅผ ํตํด ๋ณต์ํ๊ณ ์ ํ์๋ค. MAE์ encoder์ decoder๋ ๋น๋์นญ์ ์ธ ๋์์ธ์ ๊ฐ์ง๊ณ ์๋ค.(Figure1)
Figure1. Masked Autoencoder architecture
75%๊ฐ masked๋ image์ ๋ํด์ visible patch๋ง encoder์ ๋ฃ๊ณ , latent representation์ ๋์ถํ๋ค. ๊ทธ ํ mask tokens๊ณผ ํจ๊ป latent representation์ small decoder์ ๋ฃ์ด ์ฌ๋ผ์ง ๋ถ๋ถ์ ๋ณต์ํ๊ณ ์ ํ๋ค. ์ด ๋, encoder์์ small portion๋ง ์งํ๋๊ธฐ ๋๋ฌธ์ pre-training time๊ณผ memory consumption์ ์ค์ผ ์ ์์๋ค.
3. Method
MAE๋ ๋น๋์นญ์ ์ธ design์ ๊ฐ์ง encoder์ ecoder๋ฅผ ์ฌ์ฉํ์๋ค.(Figure 1) encoder๋ masked๋ input์์ visible patches๋ง ๋ณด๊ณ lightweight deocder๋ฅผ ์ด์ฉํ์ฌ ์ฌ๋ผ์ง ๋ถ๋ถ์ ์์ธกํ์๋ค.
Masking
input image๋ฅผ maskingํ๊ธฐ ์ํด ๊ฒน์น์ง ์๊ฒ patch๋ฅผ ๋๋๊ณ , uniform distribution์ ๋ฐ๋ผ random patches๋ฅผ ์ํ๋งํ์๋ค. ์ด ๋, ์ด์ํ patch๋ก ๋ถํฐ ์์ธก(extrapolation)ํ๋ ๊ฒ์ ๋ฐฉ์งํ๊ธฐ ์ํด์ uniform distributin์ผ๋ก ์ํ๋งํ์๋ค. ๋ํ, ์ด๋ center๋ง ์น์คํ์ฌ masking๋๋ ๊ฒ์ ๋ฐฉ์งํ๊ณ , ํจ์จ์ ์ธ encoder๋ฅผ ๋ง๋ค๋๋ก ํ์๋ค.
MAE encoder
standard ViT์ ๊ฒฝ์ฐ์๋ patch๋ค์ linear projectionํ์ง๋ง ์ด ๋ ผ๋ฌธ์์๋ masked patches๋ค์ ์ ๊ฑฐํ๊ณ visible patches์๋ง ์๋ํ๋๋ก ํ์๋ค. ์ด๋ฅผ ํตํด ์ผ๋ถ์๋ง encoder๊ฐ ์ ์ฉ๋๋๋ก ํ์ฌ time๊ณผ memory์ ์ฌ์ฉ์ ์ค์๋ค.
MAE decoder
Figure 1์์ ๋ณผ ์ ์๋ฏ์ด decoder์ ๋ค์ด๊ฐ๋ input์ encoded visible patches์ mask tokens๋ก ์ด๋ฃจ์ด์ ธ ์๋ค. ๊ทธ ํ ๊ฐ token์ positional embedding์ ๋ํ์ฌ image์ ์์น ์ ๋ณด๋ฅผ ๋ํ๋๋ก ํ์๋ค. MAE decoder์ ๊ฒฝ์ฐ์๋ recognition task๋ฅผ ํ๋ text decoder์ ๋ฌ๋ฆฌ reconstruction task์๋ง ์ฌ์ฉ๋๊ธฐ ๋๋ฌธ์ encoder design๊ณผ ๋ ๋ฆฝ์ ์ผ๋ก design ๋ ์ ์๋ค. ์ด๋ encoder์ ๋นํด ๋ ์๊ณ narrowerํ decoder์ ์ฌ์ฉ์ ๊ฐ๋ฅํ๊ฒ ํ๋ค.
Reconstruction target
decoder๋ each masked patch์ pixel ๊ฐ๋ค์ ์์ธกํ๋ค. ๊ทธ๋์ decoder output์ channel์๋ ๊ฐ patch์ pixel ๊ฐฏ์์ ๊ฐ๋ค. ๊ทธ ํ reshape๋ฅผ ํตํด ๋ณต์๋ image๋ก ๋ง๋ ๋ค. ์ด ๋, reconstucted image์ original image๋ฅผ ๋น๊ตํ๊ธฐ ์ํด the mean squared error (MSE)๋ฅผ ์ฌ์ฉํ๋ค. ์ด ๋ ผ๋ฌธ์์๋ ์ฌ๊ธฐ์์ ๋ ๋์๊ฐ ๊ฐ patch์ ๊ฐ์ normalization ํ์ฌ์ ํ์ต์ด ์ด๋ฃจ์ด์ง๋๋ก ํ์๋ค. ์ด normalization์ด ๊ฒฐ๊ณผ๋ฅผ ํฅ์์ํจ๋ค๋ ์ฌ์ค์ ์คํ์ ํตํด ๋ฐํ๊ณ ์๋ค.
imple implementation
MAE pre-training ์ ๋ค์์ ๋ฐฉ์์ ์ฌ์ฉํ์๋ค. ๋จผ์ ๋ชจ๋ input patch์ token์ ํ์ฑํ์๋ค. ๊ทธ ํ, tokens๋ค์ ๋๋คํ๊ฒ ์๊ณ masking ratio์ ๋ฐ๋ผ ์ผ๋ถ patch๋ค์ ์ ๊ฑฐํ์๋ค. ์ด ์ผ๋ถ์ tokens๋ค์ encoder์ ๋ฃ์ด ๊ณผ์ ์ด ์งํ๋๋๋ก ํ ๊ฒ์ input์ maskingํ ๊ฒ๊ณผ ๊ฐ๋ค. encoding ํ์๋ mask token์ ๋ํ์ฌ ์์ง ์์ ์ฑ๋ก positional embedding์ ๋ํ์ฌ decoder์ ๋ฃ์ด์ง๋๋ก ๊ณ์ฐ๋์๋ค. ์ด๋ฐ ๋ฐฉ์์ sparse operation ์์ด ๋น ๋ฅด๊ฒ ์๋๋๋๋ก ํ์๋ค.
4. Experiment & Result
Experimental setup
Dataset
์ด ๋ ผ๋ฌธ์์๋ self-supervised pre-training์ ์ํด ImageNet-1K(IN1K) training set์ ์ฌ์ฉํ์๋ค.
Evaluation
Pre-trained๋ model์ ๋ํด supervised training์ ํ์ฌ (1)end-to-end fine tuning (2)linear probing์ ๋ํด evaluation์ ํ์๋ค. ์ด ๋, 224*224 crop๋ image์ ๋ํด top-1 validation accuracy๋ฅผ ๋์ถํ์๋ค.
baseline
์ด ๋ ผ๋ฌธ์์๋ ViT-Large (ViT-L/16)์ backbone์ผ๋ก ์ฌ์ฉํ์๋ค. ์ด ๋ ผ๋ฌธ์์๋ scratch๋ถํฐ ViT-Large๋ฅผ ์ฌ์ฉํ์ ๋์ ๋นํด baseline MAE๋ก๋ถํฐ fine-tuned ํ์์ ๋ ๋ ๋์ accuracy๋ฅผ ์ป์ ์ ์์์ ๋ฐํ๋๋ค.
Result
Main Properties
Table1. Experiment Result
Masking ratio
Figure2. Masking ratio์ ๋ฐ๋ฅธ Accuracy ๋ณํ
Figure2๋ masking ratio์ ์ํฅ์ ๋ณด์ฌ์ฃผ๊ณ ์๋ค. masking ratio์ 15%๋ก ์ค์ ํ๋ BERT์ ๋ฌ๋ฆฌ MAE๋ 75%์ masking ratio๊ฐ ์ข์ ๊ฒฐ๊ณผ๋ฅผ ๋์ถํจ์ ์ ์ ์์๋ค. ๋ํ, Figure2์์๋ fine-tuning๊ณผ linear probing์์ ๋ค๋ฅธ ๊ฒฝํฅ์ฑ์ ๋ํ๋ด๋ ๊ฒ์ ๋ณด์ฌ์ค๋ค. fine-tuning์ ๊ฒฝ์ฐ์๋ 40-80%์ masking ratio์์ ๋น์ทํ ๊ฒฐ๊ณผ๋ฅผ ๋ด์ง๋ง, line-probing์ ๊ฒฝ์ฐ์๋ 75%์ masking ratio์ ๊ฒฝ์ฐ์ 10%์ masking ratio์ ๊ฒฝ์ฐ์ ๋นํด ์ฝ 20%์ ๋ ๋์ accuracy๋ฅผ ๋์ถํ์๋ค. ์ด ํ ์คํ์์๋ 75%์ masking์ ํตํด pre-training์ ์งํํ์๋ค.
Decoder design
์ด์ ์๋ ๋งํ๋ฏ์ด decoder๋ reconstuction task์๋ง ์ฌ์ฉ๋๊ธฐ ๋๋ฌธ์ ์์ ๋กญ๊ฒ design ๋ ์ ์๋ค. Table1-(a)์์๋ decoder depth์ ๋ฐ๋ฅธ ์ ํ๋์ ๋ณํ๋ฅผ ๋ณด์ฌ์ฃผ๊ณ ์๋ค. ์ด๋ deep decoder๋ linear probing์ ๋ ๋ง์ ์ํฅ์ ๋ผ์น๋ ๊ฒ์ ๋ณผ ์ ์๋ค. ๊ทธ ์ด์ ๋ autoencoder์์์ ๋ง์ง๋ง ๋ถ๋ถ์ ์๋ layer๋ค์ recognition๋ณด๋ค๋ reconstuction์ ๋ ํนํ๋์ด ์๊ธฐ ๋๋ฌธ์ด๋ค. ์ด๋ deep decoder๋ฅผ ์ฌ์ฉํ ์๋ก reconstuction์ ๋ ํนํ๋ ๋ค๋ ๊ฒ์ ์๋ฏธํ๋ค. ๊ทธ๋์ deep decoder๋ฅผ ์ฌ์ฉํ ์๋ก ์ค๊ฐ์ layer๋ค์ด recognition์ ๋ ํนํ๋๊ธฐ ๋๋ฌธ์ linear probing์ ๊ฒฝ์ฐ ๋ ์ข์ accuracy๋ฅผ ์ป์ ์ ์๋ค. ์ด๋ Table1์ (a)์์ 8%์ ์ ํ๋ ํฅ์์ด ๋์ถ๋๋ ๊ฒ์ ํตํด ํ์ธํ ์ ์๋ค. ๊ทธ๋ฌ๋ fine-tuning์ ๊ฒฝ์ฐ์๋ ๋ง์ง๋ง layer๊น์ง ๋ชจ๋ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ๋ง์ง๋ง layer๋ฅผ recognition์ ๋ง๊ฒ fine-tuning ํ ์ ์๋ค. ๊ทธ๋์ fine-tuning์ ๊ฒฝ์ฐ decoder depth์ ๊ด๊ณ์์ด accuracy๊ฐ ๊ฐ๊ฒ ๋์ถ๋๋ ๊ฒ์ ๋ณผ ์ ์๋ค. ์ด๋, fine-tuning์ ์ฌ์ฉํ๋ค๋ฉด 1๊ฐ์ decoder block์ผ๋ก๋ 84.8%์ ์ ํ๋๋ฅผ ์ป์ ์ ์๊ธฐ ๋๋ฌธ์ 1๊ฐ์ decoder block์ speed-up pre-training์ ์ฌ์ฉํ ์ ์๋ค.
Table1-(b)์์๋ decoder์ width์ ๋ฐ๋ฅธ accuracy๋ฅผ ๋ณด์ฌ์ฃผ๊ณ ์๋ค. ๊ทธ๋์ fine-tuning๊ณผ linear probing์์ ๋ชจ๋ ์ข์ accuracy๋ฅผ ๋์ถํ๋ 512 width๋ฅผ ์ฌ์ฉํ๊ธฐ๋ก ํ๋ค. ์ดํ ์คํ์์๋ 512 width๋ฅผ ๊ฐ์ง 8๊ฐ์ block์ decoder๋ฅผ ์ฌ์ฉํ๊ธฐ๋ก ํ๋ค.
Mask token
Method์์๋ mask token์ encoder์ ๋ฃ์ง ์๊ณ decoder์๋ง ๋ฃ๊ธฐ๋ก ํ์๋ค. Table1-(c)์์๋ ๊ทธ๊ฒ์ ๊ดํ ์คํ์ ํด๋ณด๊ธฐ๋ก ํ์๋ค. mask token์ encoder์ ๋ฃ์ด์ ์คํํด๋ณด๋ฉด linear probing์ ๊ฒฝ์ฐ 14%์ accuracy๊ฐ ๋จ์ด์ง๋ ๊ฒ์ผ ๋ณผ ์ ์๋ค. ์ด๋ฐ accuracy์ ๊ฐ์๋ pre-training๊ณผ deployment์ฌ์ด์ ์ฐจ์ด๋ก ์ธํด ๋ฐ์ํ๋ค. pre-training ์์๋ mask token์ด ๋ํด์ง์ง๋ง deployment๋ input image์์ ๋ถ๊ดด๋ ๋ถ๋ถ์ด ์๊ธฐ ๋๋ฌธ์ ๊ทธ ์ฐจ์ด๋ก ์ธํด accuracy๊ฐ ๊ฐ์ํ๋ค. ๊ทธ๋์ ๋ถ๊ดด๋ ๋ถ๋ถ์ ๋ํ mask token์ decoder์์๋ง ์ฌ์ฉํ๊ธฐ๋ก ํ๋ค.
Table2. baseline model์ ๋ฐ๋ฅธ MAE training ์๊ฐ
๋ํ, Table2์์๋ encoder์์ visibleํ input patch๋ง ์ฌ์ฉํจ์ผ๋ก์จ training ์๊ฐ์ ์ค์ด๋ ๊ฒ์ ํ์ธํ ์ ์๋ค. large encoder(ViT-H)๋ฅผ ์ฌ์ฉํ ์๋ก, decoder depth๋ฅผ ์ค์ผ์๋ก pre-training ์๊ฐ์ด ์ค์ด๋๋ ๊ฒ์ ํ์ธํ ์ ์๋ค. ๊ทธ ์๊ฐ์ ์ค์ด๋ฆ์ self-attention complexity์ ์ฆ๊ฐ๋ก ์ธํด ์ด์ฐจํจ์์ ์ผ๋ก ๊ฐ์ํ๋ ๊ฒ์ ๋ณผ ์ ์๋ค.
Reconstruction target
Table1-(d)์์๋ input์ ๋ฐ๋ฅธ accuracy์ ์ฐจ์ด๋ฅผ ๋ณด์ฌ์ฃผ๊ณ ์๋ค. ๊ฐ patch์ normalization์ ์ ์ฉํ์ ๋ ์ ์ฉํ์ง ์์ ๋๋ณด๋ค ๋ ๋์ accuracy๋ฅผ ์ป๋ ๊ฒ์ ๋ณผ ์ ์๋ค. ๋ํ, PCA๋ฅผ ์ ์ฉํ์ ๋์๋ accuracy๊ฐ ๊ฐ์ํ๋ ๊ฒ์ ๋ณผ ์ ์๋ค. ์ด๊ฒ์ high frequency component๊ฐ patch์์ ์ ์ง๋ ๋ ๋ ์ข์ ๊ฒฐ๊ณผ๋ฅผ ์ป์ ์ ์์์ ์ ์ ์๋ค.
๋ํ, normalization ๋์ tokenization์ ์ฌ์ฉํ ๋์ accuracy ์ฐจ์ด๋ ์ธก์ ํ์๋ค. DALLE pre-trained dVAE[11]๋ฅผ tokenizer๋ก ์ฌ์ฉํ์ฌ decoder์์ token์ ์์ธกํ๊ณ ์ ํ์๋ค. ๊ทธ๋ฌ๋ unnormalized์ ๋นํด ์กฐ๊ธ์ accuracy๊ฐ ์ฆ๊ฐ ํ๊ฑฐ๋ ์คํ๋ ค ๊ฐ์ํ๊ธฐ๋ ํ์๋ค. ๋ํ, tokenization์ ์ฌ์ฉํ๋ฉด dVAE์ pre-training์ด ํ์ํ์ฌ ์๊ฐ์ด ๋ ๊ฑธ๋ฆฐ๋ค. ์ด๋ patch๋จ์์ normalization์ด ๋ ํจ์จ์ ์์ ์ ์ ์๋ค.
Data augmentation
Table1-(e)์์๋ data augmentation์ ๋ฐ๋ฅธ accuracy์ ๋ณํ๋ฅผ ๋ณด์ฌ์ฃผ๊ณ ์๋ค. cropping์ ๋ ์ข์ accuracy๋ฅผ ๋ณด์ฌ์ฃผ๊ณ ์์ง๋ง, color jittering์ ์คํ๋ ค accuracy๋ฅผ ๊ฐ์์ํค๊ณ ์๋ค. ์ฌ๊ธฐ์์ ์ฃผ๋ชฉํ ์ ์ data augmentation์ ์ ์ฉํ์ง ์์๋ ์ข์ accuracy๋ฅผ ๋์ถํ ์ ์๋ค๋ ์ ์ด๋ค. ์ด๋ ๋ค์ํ data augmentaion์ ์ฌ์ฉํ๋ contrastive learning์ด๋ BYOL[12], SimCLR[13]๊ณผ ๊ฐ์ ๋ฐฉ์๊ณผ ํฐ ์ฐจ์ด๋ฅผ ๋ณด์ด๊ณ ์๋ค. ๋ํ, MAE๋ data augmentation ๋์ ์ randomness๋ฅผ random masking์ ํตํด ๋ํ๊ณ ์๋ค.
Mask sampling strategy
Figure3. Masking sampling strategy
Figure3์์๋ ๋ค๋ฅธ mask sampling ์ ๋ต์ ๋ณด์ฌ์ฃผ๊ณ , ์ด์ ๋ํ accuracy ์ฐจ์ด๋ฅผ Table1-(f)์์ ๋ณด์ฌ์ฃผ๊ณ ์๋ค. Figure5์ ์ค๊ฐ ๊ทธ๋ฆผ์ฒ๋ผ block-wise๋ก masking์ ํ์ ๋ 50%๋ง degrading ํ์์๋ random sampling์ ๋นํด ๋ ๋์ training loss์ blurringํ ๊ฒฐ๊ณผ๋ฅผ ์ป์๋ค. ๋ํ, Figure5์ ์ค๋ฅธ์ชฝ ๊ทธ๋ฆผ์ฒ๋ผ grid masking์ ํ์ ๋์๋ ๋ ๋ฎ์ training loss์ sharperํ reconstuction ๊ทธ๋ฆผ์ ์ป์์ง๋ง, ์ค๊ฐ์ค๊ฐ grid ํํ๊ฐ ๋ณด์ด๋ ์ข์ง ๋ชปํ ๊ทธ๋ฆผ์ ๋์ถํจ์ ๋ณผ ์ ์๋ค. ์ด๋ฅผ ํตํด higher masking ratio๋ฅผ ๊ฐ์ง random sampling์ด ๊ฐ์ฅ ์ข์ reconstruction๊ณผ accuracy๋ฅผ ์ป์ ์ ์์์ ์ ์ ์๋ค.
Training schedule
Figure4. Epoch์ ๋ฐ๋ฅธ accuracy ๋ณํ
Figure4์์๋ Epcoh์ ๋ฐ๋ฅธ accuracy์ ๋ณํ๋ฅผ ๋ณผ ์ ์๋ค. ๋ ๊ฒฝ์ฐ์ ๋ชจ๋ epoch์ ๋ฐ๋ผ accuracy๊ฐ steadilyํ๊ฒ ์ฆ๊ฐํ๋ ๊ฒ์ ๋ณผ ์ ์๋ค. ์ด๋ 300epoch ์ดํ์๋ ๋์ด์ accuracy๊ฐ ์ฆ๊ฐํ์ง ์๋ contrastive learning๊ณผ๋ ๋ค๋ฅด๋ค. ์ด๋ ํ epoch๋น ๋ณด๋ patch์ ์๊ฐ MAE์ ๋นํด contrasitve learning์ ๊ฒฝ์ฐ ํจ์ฌ ๋ง๊ธฐ ๋๋ฌธ์ด๋ค. ๋ํ, MAE์ ๊ฒฝ์ฐ ์ ์ ์์ patch๊ฐ randomํ๊ฒ ๋ค์ด์ค๊ธฐ ๋๋ฌธ์ accuracy๊ฐ ๊ณ์ ์ฆ๊ฐํ ์ ์๋ค.
Comparisons with Previous Results
Table3. ImageNet-1K์ ๋ํ method์ ๋ฐ๋ฅธ results
Table3์์๋ ImageNet-1K์ ๋ํ self-supervised method์ MAE๋ฅผ ๋น๊ตํ ๊ฒฐ๊ณผ์ ๋ํด ์ ์ํ๊ณ ์๋ค. Figure6์์ ์ ์ ์๋ฏ์ด ๋ค๋ฅธ self-supervised learning์ ๋นํด MSE๊ฐ ๋ ๋์ accuracy๋ฅผ ๋์ถํจ์ ์ ์ ์๋ค. ๊ทธ๋ฆฌ๊ณ ๋ ํฐ ๋ชจ๋ธ์ธ ViT-H๋ฅผ ์ฌ์ฉํ ์๋ก ๋ ๋์ accuracy๋ฅผ ๋์ถํ๋ค. ๋ํ, BEiT[2]์ ๋น๊ตํด๋ดค์ ๋์๋ MAE๊ฐ ๋ ๋์ accuracy๋ฅผ ๋์ถํ๋ค. ์ฌ๊ธฐ์์ ์ค์ํ ์ ์ MAE๊ฐ ๋ ๋น ๋ฅด๊ณ ๊ฐ๋จํ๊ฒ pre-training ๋๋ค๋ ์ ์ด๋ค. ๋ง์ง๋ง์ผ๋ก MAE๋ ๋น ๋ฅด๊ฒ pre-trained๋๊ธฐ ๋๋ฌธ์ 1600 epoch์ผ๋ก ํ์ตํ ๋์ ์๊ฐ์ด MoCo v3๋ฅผ 300 epcoh์ผ๋ก ํ์ตํ์ ๋ ์๊ฐ๋ณด๋ค ๋ ์ ๋ค.
Partial Fine-tuning
Figure5. Partial Fine-tuning
Figure5์์๋ Fine-tuningํ๋ block์ ๊ฐฏ์์ ๋ฐ๋ฅธ accuracy์ ๋ณํ๋ฅผ ๋ณด์ฌ์ฃผ๊ณ ์๋ค. ์ด ๋, 0 block fine-tuning์ linear probing, 24 block fine-tuning์ full fine-tuning์ ์๋ฏธํ๋ค. linear probing์ ๊ฒฝ์ฐ feature layer๋ฅผ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ๋ค๋ฅธ feature๋ค์ ์ฌ์ฉํ ๊ธฐํ๋ฅผ ์๊ฒ ๋๋ค. ๊ทธ๋์ partial fine-tuning์ ์ ์ฉํ๊ณ ์ ํ์๊ณ , 1๊ฐ์ partial fine-tuning์ ์ ์ฉํ์์ ๋ 73.5%์์ 81%๋ก accuracy๊ฐ ํฌ๊ฒ ์ฆ๊ฐํ๋ ๊ฒ์ ๋ณผ ์ ์๋ค. ๋ํ, ์ฝ๊ฐ์ fine-tuning๋ง ์ ์ฉํด๋ full fine-tuning๋งํผ ์ข์ accuracy๋ฅผ ์ป์ ์ ์๋ ๊ฒ์ผ๋ก ๋ณด์ partial fine-tuning์ด MAE์ ํจ์จ์ ์์ ์ ์ ์๋ค.
๋ํ, Figure5์์ contrastive learning์ ์ฌ์ฉํ MoCo v3[14]์์ ๊ฒฐ๊ณผ๋ฅผ ๋น๊ตํ๊ณ ์๋๋ฐ, partial fine-tuning์ ์ ์ฉํ MAE์ ๊ฒฝ์ฐ ํจ์ฌ ๋์ accuracy๋ฅผ ๋์ถํจ์ ์ ์ ์๋ค.
Transfer Learning Experiments
Table4. COCO object detection and segmentation
Table4๋ pre-trained model์ ์ด์ฉํ์ฌ downstream task๋ฅผ ํ๊ฐ ํ ๊ฒ์ด๋ค. COCO datset์ ์ด์ฉํ์ฌ object detection๊ณผ segmentation์ ํ์์ ๋ label์ด ์๋ supervised learning์ ๋นํด ๋ ๋์ point๋ฅผ ๋์ถํ๋ ๊ฒ์ ๋ณผ ์ ์๋ค.(50.3 vs 47.9 / 53.3 vs 49.3) ๋น์ทํ๊ฒ, ๋ค๋ฅธ task์ธ semantic segmentation๊ณผ classification tasks๋ MSE๋ก pre-trainedํ ๋ชจ๋ธ์ด supervised learning๋ณด๋ค ๋ ๋์ accuracy๋ฅผ ๋์ถํ๋ค.
5. Conclusion
์ด ๋ ผ๋ฌธ์์๋ self-supervised learning์ computer vision์ ์ ์ฉํ๋ ๋ฐฉ๋ฒ์ ๋ํด์ ์ค๋ช ํ๊ณ ์๋ค. Masked Autoencoder ๋ฐฉ์์ ํ์ฉํ์ฌ label์ ์ด์ฉํ supervised learning์ด ์๋, input์ ์ฌ๋ผ์ง ๋ถ๋ถ์ ๋ณต์ํ๋ฉด์ self-supervised learning์ ํ๊ณ ์๋ค. ์ด ๋, object๋ฅผ ์ ๊ฑฐํ๋ ๋ฑ์ semantic ํ๊ฒ ์ง์ฐ๋ ๊ฒ์ด ์๋๋ผ pixel์ randomํ๊ฒ ์ ๊ฑฐํ์ฌ ์ด๋ฅผ ๋ณต์ํ๋๋ก ํ๊ณ ์๋ค. ์ด๋ฅผ ํตํด supervised learning๋ณด๋ค ๋ ๋์ accuracy๋ฅผ ๋์ถํ ์ ์์์ ๋ณด์ฌ์ฃผ๊ณ ์๋ค.
์ด๋ ๊ฒ computer vision์์ self-supervised learning ๋ฐฉ์์ ์ ์ฉํ์๋ค๋ ๊ฒ์ด ํฅ๋ฏธ๋ก์ ๋ค. ๊ทธ๋ฆฌ๊ณ Masked Autoencoder์ ํ์ฉํ์ฌ pre-training์ ์๊ฐ๊ณผ memory ์ฌ์ฉ์ ์ค์ธ ๊ฒ๋ ํฐ contribution์ด๋ผ๊ณ ์๊ฐ๋๋ค. ์ด ๋ฐฉ์์ ๋ฐ์ดํฐ๊ฐ ๋ง์ด ์๋ task๋ ๋ฐ์ดํฐ๊ฐ ์ผ๋ถ ์์ค๋ image์ ๋ํด์ ์ ์ฉํด ๋ณผ ์ ์์ ๊ฒ ๊ฐ๋ค.
์์ฌ์ด ์ ์ ์ด ๋ ผ๋ฌธ์์ ์ฃผ๋ก fine-tuning, linear probing์ ์ด์ฉํ accuracy์ ๋ํ ๊ฒฐ๊ณผ๋ง ์ ์ํ ๋ฟ ๋ณต์๋ ์ด๋ฏธ์ง ์์ฒด์ ๋ํ ์ด์ผ๊ธฐ๋ ์ ์ ๊ฒ ๊ฐ๋ค. ๋ ผ๋ฌธ์ ๋ฐ๋ฅด๋ฉด ๋ณต์๋ ์ด๋ฏธ์ง๊ฐ original ์ด๋ฏธ์ง์ ๋น๊ตํด ๋ณด์์ ๋ blurring ํ ๊ฒ์ ์ ์ธํ๋ฉด ๋๋ถ๋ถ ์ ๋ณต์ ํ๋ ๊ฒ์ผ๋ก ๋ณด์ฌ์ง๋ค. ๊ทธ๋ฌ๋ ์ ๋๋ก ๋ณต์๋์ง ๋ชปํ ์ด๋ฏธ์ง์ ๋ํด์๋ ์ ์ํ๊ณ ์์ง ์๋ค. ๊ทธ๋ฐ ๊ฒฝ์ฐ๋ฅผ ์ ์ํ์ฌ ๋ชจ๋ธ์ด ๋ฌด์๊ณผ ํผ๋์ ํ๊ณ ์ ๊ทธ๋ฐ ๊ฒฐ๊ณผ๊ฐ ๋์๋์ง์ ๋ํ ๋ถ์์ด ์กฐ๊ธ ๋ ์์์ผ๋ฉด ์ข์์ ๊ฒ ๊ฐ๋ค. ๋ํ, original image์ reconstuction image๋ฅผ ๋น๊ตํ ๋ MSE Loss๋ฅผ ์ฌ์ฉํ๋ค๊ณ ๋งํ๊ณ ์๋ค. MSE Loss ์ด์ธ์๋ ๋ค๋ฅธ Loss๋ฅผ ์ฌ์ฉํ์ฌ reconstuction image์ resolution์ ๋ํ๋ ๊ฒ์ ๋ํ ์ฐ๊ตฌ๊ฐ ๋ ์์๋ค๋ฉด ์ข์์ ๊ฒ ๊ฐ๋ค.
Take home message (์ค๋์ ๊ตํ)
Self-supervised learning์ MAE๋ผ๋ ๋ฐฉ์์ผ๋ก ์ด๋ฏธ์ง์ ์ ์ฉํ์ฌ ๊ทธ ์ ํ๋๋ฅผ ๋ํ๊ณ ์๋ค
์ด๋ฅผ ํตํด ์ธ์ด์ ์ด๋ฏธ์ง์ ๊ฒฝ๊ณ๋ ์๋ ๊ฒ์ ์ ์ ์๋ค.
์์ผ๋ก ๊ทธ๋ฐ ๋ ์ฐฝ์ ์ธ ๋ฐฉ์์ ๋ํ ์ฐ๊ตฌ๊ฐ ๋ ํ์ํ ๊ฒ์ผ๋ก ์๊ฐ๋๋ค.
Author / Reviewer information
Author
๊น์ธํฌ (Sehui Kim)
Affiliation (KAIST AI)
Contact information (sae0919@kaist.ac.kr)
Reviewer
Korean name (English name): Affiliation / Contact information
Korean name (English name): Affiliation / Contact information
...
Reference & Additional materials
[1] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Ben- jamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language mod- els are few-shot learners. In NeurIPS, 2020.
[2] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019.
[3] Geoffrey E Hinton and Richard S Zemel. Autoencoders, minimum description length, and helmholtz free energy. In NeurIPS, 1994.
[4] Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre- Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In ICML, 2008.
[5] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017.
[6] Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, and Ilya Sutskever. Generative pretraining from pix- els. In ICML, 2020.
[7] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual rep- resentations. In ICML, 2020.
[8] Xinlei Chen and Kaiming He. Exploring simple Siamese represen- tation learning. In CVPR, 2021.
[9] Jean-Bastien Grill, Florian Strub, Florent Altche ฬ, Corentin Tallec, Pierre Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, Bilal Piot, Koray Kavukcuoglu, Remi Munos, and Michal Valko. Boot- strap your own latent - a new approach to self-supervised learning. In NeurIPS, 2020.
[10] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa De- hghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021.
[11] AdityaRamesh,MikhailPavlov,GabrielGoh,ScottGray,Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. In ICML, 2021.
[12] Jean-Bastien Grill, Florian Strub, Florent Altche ฬ, Corentin Tallec, Pierre Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, Bilal Piot, Koray Kavukcuoglu, Remi Munos, and Michal Valko. Boot- strap your own latent - a new approach to self-supervised learning. In NeurIPS, 2020.
[13] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual rep- resentations. In ICML, 2020.
[14] Xinlei Chen, Saining Xie, and Kaiming He. An empirical study of training self-supervised Vision Transformers. In ICCV, 2021.
Last updated
Was this helpful?