SlideShare a Scribd company logo
1 of 28
Download to read offline
Convolutional Sequence
to Sequence Learning
임우담
woodam.lim@gmail.com
1. Introduction
2. Related work
3. Explanation
4. Experiment
5. Result
6. Conclusion
Contents
Ⅰ. Introduction
• Seq2Seq 모델은 기계번역 영역에서 매우 성공적인 모델
• 2014년 NIPS에서 Sutskever가 이를 발표. 엄청난 인기를 모음.
= 사실은 조경헌 교수님이 먼저 발표한 모델.(https://arxiv.org/abs/1406.1078)
• 현재 Seq2Seq에서 일반적으로 사용하는 모델은 Bi-directional RNN 모델 그리고 soft
attention mechanism을 쓰는 경우도 있음.
• 반면 CNN으로 시도한 경우도 꽤 있었는데 , 고정된(fixed) Conv 크기를 가져야 한다는 단점이
있긴 하지만 RNN에 비해 CNN 역시 장점을 많이 가지고 있음.
→ RNN보다 더 많은 stack을 쌓을 수 있다.
=이를 통해 모델링 된 dependencies의 최대 길이를 세밀하게 컨트롤 할 수 있음.
→ 이전 step에 영향을 받는 구조가 아니므로 병렬화에 유리하다.
= 시퀀스 내에서 병렬 계산을 방해하는 과거의 숨겨진 상태를 유지하는 RNN과 대조
Ⅰ. Introduction
• Multi-layer CNN은 hierarchical representation 을 갖는다.
= 이런 구조는 RNN 방식보다 정보를 더 오랜 시간동안 유지할 수 있게 만들 수 있음.
Ex ) When we obtain feature representation capturing relationship,
CNN : O(n/k) , RNN : O(n)
*k is kernels of width
• 그 이전의 연구 결과들이 있었지만 굉장히 제한적이고 작은 dataset이였음.
Bradbury et al. (2016)
Kalchbrenner et al. (2016)
Meng et al. (2015)
Gehring et al.(2016)
= It shows strong performance on larger tasks but it’s decoder is still recurrent
• 위 논문에선 GLU와 Residual connection들을 차용하여 CNN만으로 Seq2Seq를 다룰 예정
Ⅱ. Recurrent Seq2Seq
http://yujuwon.tistory.com/entry/TENSORFLOW-seq2seq-기반-챗봇-만들기
Ⅱ. Recurrent Seq2Seq
http://yujuwon.tistory.com/entry/TENSORFLOW-seq2seq-기반-챗봇-만들기
Ⅲ. Convolutional Architecture
A. Position Embedding and Convolutional Block Structure
Ⅲ. Convolutional Architecture
A. Position Embedding and Convolutional Block Structure
• Convolution
• Padding
Convolution을 구성할 때에는 문장의 양 끝에 k−1 개수 만큼 패딩을 추가한다.
=입력과 출력의 길이를 같게 하기 위해서.
Ⅲ. Convolutional Architecture
A. Position Embedding and Convolutional Block Structure
• GLU: v([A B])=A⊗σ(B)
CNN 을 이용한 Seq2Seq 모델에서 사용하는 gate 로 LSTM 내의 gate와 유사 but SIMPLE.
A와 B는 D차원을 가진다. (A,B ∈ 𝑹 𝒅
)
⊗ 는 point-wise multiplication를 의미
∴v([A B]) ∈ 𝑹 𝒅
A, B는 비선형성에 대한 입력. σ(B)는 현재 문맥의 A 입력이 적절한지를 제어합니다.
이전 연구에서 Oord 가 tanh 를 이용하여 이런 모델을 만들 긴 했었다.
Dauphin은 GLU paper에서 tanh보다 σ 가 언어 모델링 쪽에서는 더 성능이 좋다는 걸 보였다.
Ⅲ. Convolutional Architecture
A. Position Embedding and Convolutional Block Structure
• Residual connections :
Deep한 모델을 설계할 때 Residual Connection을 사용하면 성능이 더 좋아진다 그래서 여기서
는 모든 Convolution 레이어마다 Residual connection을 추가한다
= Convolution층이 하나가 아니라 여러 층이라는 뜻
마찬가지로 GLU도 층마다 추가한다.
아래는 Convolution의 일반식
Ⅲ. Convolutional Architecture
B. Multistep Attention
• Attention을 계산하기위해 현재 decoder의 상태인 𝒉𝒊
𝒍
와 target element 𝒈𝒊를 조합합니다.
• Decoder layer 𝒍 마다 state i 와 source j 의 attention 𝒂𝒊𝒋를 Decoder state summary 𝒅𝒊
𝒍
와
encoder의 마지막 출력 𝒛𝒋
𝒖
의 dot-product로 계산합니다.
• 현재 encoder에 대한 conditional input 𝒄𝒊
𝒍
는 encode의 output과 input element
embedding 𝒆𝒋의 합으로 weight 시킵니다.
Ⅲ. Convolutional Architecture
https://norman3.github.io/papers/docs/fairseq.html
Ⅲ. Convolutional Architecture
A. Position Embedding
• Residual connections :
Deep한 모델을 설계할 때 Residual Connection을 사용하면 성능이 더 좋아진다
따라서 여기서는 모든 Convolution 레이어마다 Residual connection을 추가한다.
Ⅲ. Convolutional Architecture
C. Normalization Strategy
• Batch Normalization을 사용하지 않음.
이미지는 BN이 좋은 성능이지만 Text 관련 CNN에선 성능이 좋지 않았음을 확인.
→ 대신 Weight Normalization을 사용.
• Weight Normalization
말 그대로 weight를 정규화. BN에 비해 저비용 연산을 들이면서 근사할 수 있는 모델
• Weight Initialization
Ⅳ. Experiment
A. Dataset
• WMT dataset을 사용함.
2006년부터 시작된 workshop으로 매년 데이터 set을 제공 (ACL 행사 때 함께 진행되는 task)
WMT16은 영어를 불가리아어, 체코어, 독일어, 스페인어, 바스크어, 네덜란드어, 포르투칼어 등
으로 번역
위 논문에선 English-Romanian, English-German, English-French을 적용할 뿐만 아니라 text
summarization task에도 적용했음.
Ⅳ. Experiment
B. Model Parameters and Optimaization
 Parameter
Encoder, decoder 에 사용된 hidden layer 크기는 512
Nesterov Gradient Method 사용 (momentum : 0.99, learning rate: 0.25)
Batch size: 64문장 (GPU 크기에 맞춰 사용)
Dropout 사용 (입력 convolution 영역)
 구현
Language: Torch
M40 GPU 장비 (single)
영어-프랑스어(WMT14) 번역에는 Multi-GPU 사용 (single machine)
Ⅳ. Experiment
C. Evaluation
Word-base 방식과 BPE 방식을 사용
Word-base 방식은 Voca 를 구축하고 out of vocabulary가 발생하면 Copy를 한다
BPE (Byte Pair Encodeing)
56개는 복합어, 21개는 이름. 6개는 외래어다.
Ex) lower = low + er
Ⅴ. Result
Reference
Convolutional Sequence to Sequence Learning (Jonas Gehring, 2017, FAIR)
Sequence to Sequence Learning with Neural Networks (Sutskever, 2014, NIPS)
Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation
(Cho, 2014)
Language Modeling with Gated Convolutional Networks(Yann N. Dauphin, 2016, FAIR)
https://norman3.github.io/papers/docs/fairseq.html
http://yujuwon.tistory.com/entry/TENSORFLOW-seq2seq-기반-챗봇-만들기
감사합니다

More Related Content

What's hot

Attention is all you need
Attention is all you needAttention is all you need
Attention is all you needHoon Heo
 
여러 컨볼루션 레이어 테크닉과 경량화 기법들
여러 컨볼루션 레이어 테크닉과 경량화 기법들여러 컨볼루션 레이어 테크닉과 경량화 기법들
여러 컨볼루션 레이어 테크닉과 경량화 기법들Dongyi Kim
 
딥러닝 논문읽기 efficient netv2 논문리뷰
딥러닝 논문읽기 efficient netv2  논문리뷰딥러닝 논문읽기 efficient netv2  논문리뷰
딥러닝 논문읽기 efficient netv2 논문리뷰taeseon ryu
 
Encoding in Style: a Style Encoder for Image-to-Image Translation
Encoding in Style: a Style Encoder for Image-to-Image TranslationEncoding in Style: a Style Encoder for Image-to-Image Translation
Encoding in Style: a Style Encoder for Image-to-Image Translationtaeseon ryu
 
DeBERTA : Decoding-Enhanced BERT with Disentangled Attention
DeBERTA : Decoding-Enhanced BERT with Disentangled AttentionDeBERTA : Decoding-Enhanced BERT with Disentangled Attention
DeBERTA : Decoding-Enhanced BERT with Disentangled Attentiontaeseon ryu
 
A Beginner's guide to understanding Autoencoder
A Beginner's guide to understanding AutoencoderA Beginner's guide to understanding Autoencoder
A Beginner's guide to understanding AutoencoderLee Seungeun
 
Graph neural network #2-2 (heterogeneous graph transformer)
Graph neural network #2-2 (heterogeneous graph transformer)Graph neural network #2-2 (heterogeneous graph transformer)
Graph neural network #2-2 (heterogeneous graph transformer)seungwoo kim
 
딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...
딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...
딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...keunbong kwak
 
Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...
Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...
Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...홍배 김
 
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...Haezoom Inc.
 
LSTM 네트워크 이해하기
LSTM 네트워크 이해하기LSTM 네트워크 이해하기
LSTM 네트워크 이해하기Mad Scientists
 
I3D and Kinetics datasets (Action Recognition)
I3D and Kinetics datasets (Action Recognition)I3D and Kinetics datasets (Action Recognition)
I3D and Kinetics datasets (Action Recognition)Susang Kim
 
Denoising auto encoders(d a)
Denoising auto encoders(d a)Denoising auto encoders(d a)
Denoising auto encoders(d a)Tae Young Lee
 
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...홍배 김
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural NetworksSanghoon Yoon
 
딥러닝 기반의 자연어처리 최근 연구 동향
딥러닝 기반의 자연어처리 최근 연구 동향딥러닝 기반의 자연어처리 최근 연구 동향
딥러닝 기반의 자연어처리 최근 연구 동향LGCNSairesearch
 
A neural image caption generator
A neural image caption generatorA neural image caption generator
A neural image caption generator홍배 김
 
Designing more efficient convolution neural network
Designing more efficient convolution neural networkDesigning more efficient convolution neural network
Designing more efficient convolution neural networkDongyi Kim
 
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...Mad Scientists
 
스마트폰 위의 딥러닝
스마트폰 위의 딥러닝스마트폰 위의 딥러닝
스마트폰 위의 딥러닝NAVER Engineering
 

What's hot (20)

Attention is all you need
Attention is all you needAttention is all you need
Attention is all you need
 
여러 컨볼루션 레이어 테크닉과 경량화 기법들
여러 컨볼루션 레이어 테크닉과 경량화 기법들여러 컨볼루션 레이어 테크닉과 경량화 기법들
여러 컨볼루션 레이어 테크닉과 경량화 기법들
 
딥러닝 논문읽기 efficient netv2 논문리뷰
딥러닝 논문읽기 efficient netv2  논문리뷰딥러닝 논문읽기 efficient netv2  논문리뷰
딥러닝 논문읽기 efficient netv2 논문리뷰
 
Encoding in Style: a Style Encoder for Image-to-Image Translation
Encoding in Style: a Style Encoder for Image-to-Image TranslationEncoding in Style: a Style Encoder for Image-to-Image Translation
Encoding in Style: a Style Encoder for Image-to-Image Translation
 
DeBERTA : Decoding-Enhanced BERT with Disentangled Attention
DeBERTA : Decoding-Enhanced BERT with Disentangled AttentionDeBERTA : Decoding-Enhanced BERT with Disentangled Attention
DeBERTA : Decoding-Enhanced BERT with Disentangled Attention
 
A Beginner's guide to understanding Autoencoder
A Beginner's guide to understanding AutoencoderA Beginner's guide to understanding Autoencoder
A Beginner's guide to understanding Autoencoder
 
Graph neural network #2-2 (heterogeneous graph transformer)
Graph neural network #2-2 (heterogeneous graph transformer)Graph neural network #2-2 (heterogeneous graph transformer)
Graph neural network #2-2 (heterogeneous graph transformer)
 
딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...
딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...
딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...
 
Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...
Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...
Knowing when to look : Adaptive Attention via A Visual Sentinel for Image Cap...
 
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
 
LSTM 네트워크 이해하기
LSTM 네트워크 이해하기LSTM 네트워크 이해하기
LSTM 네트워크 이해하기
 
I3D and Kinetics datasets (Action Recognition)
I3D and Kinetics datasets (Action Recognition)I3D and Kinetics datasets (Action Recognition)
I3D and Kinetics datasets (Action Recognition)
 
Denoising auto encoders(d a)
Denoising auto encoders(d a)Denoising auto encoders(d a)
Denoising auto encoders(d a)
 
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
 
딥러닝 기반의 자연어처리 최근 연구 동향
딥러닝 기반의 자연어처리 최근 연구 동향딥러닝 기반의 자연어처리 최근 연구 동향
딥러닝 기반의 자연어처리 최근 연구 동향
 
A neural image caption generator
A neural image caption generatorA neural image caption generator
A neural image caption generator
 
Designing more efficient convolution neural network
Designing more efficient convolution neural networkDesigning more efficient convolution neural network
Designing more efficient convolution neural network
 
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
 
스마트폰 위의 딥러닝
스마트폰 위의 딥러닝스마트폰 위의 딥러닝
스마트폰 위의 딥러닝
 

Similar to Convoutional sequence to sequence

Designing more efficient convolution neural network
Designing more efficient convolution neural networkDesigning more efficient convolution neural network
Designing more efficient convolution neural networkNAVER Engineering
 
(Papers Review)CNN for sentence classification
(Papers Review)CNN for sentence classification(Papers Review)CNN for sentence classification
(Papers Review)CNN for sentence classificationMYEONGGYU LEE
 
History of Vision AI
History of Vision AIHistory of Vision AI
History of Vision AITae Young Lee
 
Xception mhkim
Xception mhkimXception mhkim
Xception mhkimKIMMINHA3
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Othersjdo
 
[한국어] Neural Architecture Search with Reinforcement Learning
[한국어] Neural Architecture Search with Reinforcement Learning[한국어] Neural Architecture Search with Reinforcement Learning
[한국어] Neural Architecture Search with Reinforcement LearningKiho Suh
 
Densely Connected Convolutional Networks
Densely Connected Convolutional NetworksDensely Connected Convolutional Networks
Densely Connected Convolutional NetworksOh Yoojin
 
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksFaster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksOh Yoojin
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장Sunggon Song
 
Image Deep Learning 실무적용
Image Deep Learning 실무적용Image Deep Learning 실무적용
Image Deep Learning 실무적용Youngjae Kim
 
PR-203: Class-Balanced Loss Based on Effective Number of Samples
PR-203: Class-Balanced Loss Based on Effective Number of SamplesPR-203: Class-Balanced Loss Based on Effective Number of Samples
PR-203: Class-Balanced Loss Based on Effective Number of SamplesSunghoon Joo
 
180624 mobile visionnet_baeksucon_jwkang_pub
180624 mobile visionnet_baeksucon_jwkang_pub180624 mobile visionnet_baeksucon_jwkang_pub
180624 mobile visionnet_baeksucon_jwkang_pubJaewook. Kang
 
SAGAN_2024seminar announce_seoultech.pptx
SAGAN_2024seminar announce_seoultech.pptxSAGAN_2024seminar announce_seoultech.pptx
SAGAN_2024seminar announce_seoultech.pptxssuser4b2fe7
 
Dense sparse-dense training for dnn and Other Models
Dense sparse-dense training for dnn and Other ModelsDense sparse-dense training for dnn and Other Models
Dense sparse-dense training for dnn and Other ModelsDong Heon Cho
 
Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...
Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...
Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...changedaeoh
 
The fastalgorithmfordeepbeliefnets
The fastalgorithmfordeepbeliefnetsThe fastalgorithmfordeepbeliefnets
The fastalgorithmfordeepbeliefnetsLee Gyeong Hoon
 
Where to Apply Dropout in Recurrent Neural Networks for Handwriting Recognition?
Where to Apply Dropout in Recurrent Neural Networks for Handwriting Recognition?Where to Apply Dropout in Recurrent Neural Networks for Handwriting Recognition?
Where to Apply Dropout in Recurrent Neural Networks for Handwriting Recognition?Lee Gyeong Hoon
 
Guided policy search
Guided policy searchGuided policy search
Guided policy searchJaehyeon Park
 

Similar to Convoutional sequence to sequence (20)

Designing more efficient convolution neural network
Designing more efficient convolution neural networkDesigning more efficient convolution neural network
Designing more efficient convolution neural network
 
(Papers Review)CNN for sentence classification
(Papers Review)CNN for sentence classification(Papers Review)CNN for sentence classification
(Papers Review)CNN for sentence classification
 
History of Vision AI
History of Vision AIHistory of Vision AI
History of Vision AI
 
Xception mhkim
Xception mhkimXception mhkim
Xception mhkim
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
 
[한국어] Neural Architecture Search with Reinforcement Learning
[한국어] Neural Architecture Search with Reinforcement Learning[한국어] Neural Architecture Search with Reinforcement Learning
[한국어] Neural Architecture Search with Reinforcement Learning
 
Densely Connected Convolutional Networks
Densely Connected Convolutional NetworksDensely Connected Convolutional Networks
Densely Connected Convolutional Networks
 
Review MLP Mixer
Review MLP MixerReview MLP Mixer
Review MLP Mixer
 
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksFaster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장
 
Image Deep Learning 실무적용
Image Deep Learning 실무적용Image Deep Learning 실무적용
Image Deep Learning 실무적용
 
PR-203: Class-Balanced Loss Based on Effective Number of Samples
PR-203: Class-Balanced Loss Based on Effective Number of SamplesPR-203: Class-Balanced Loss Based on Effective Number of Samples
PR-203: Class-Balanced Loss Based on Effective Number of Samples
 
180624 mobile visionnet_baeksucon_jwkang_pub
180624 mobile visionnet_baeksucon_jwkang_pub180624 mobile visionnet_baeksucon_jwkang_pub
180624 mobile visionnet_baeksucon_jwkang_pub
 
SAGAN_2024seminar announce_seoultech.pptx
SAGAN_2024seminar announce_seoultech.pptxSAGAN_2024seminar announce_seoultech.pptx
SAGAN_2024seminar announce_seoultech.pptx
 
Dense sparse-dense training for dnn and Other Models
Dense sparse-dense training for dnn and Other ModelsDense sparse-dense training for dnn and Other Models
Dense sparse-dense training for dnn and Other Models
 
Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...
Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...
Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...
 
HistoryOfCNN
HistoryOfCNNHistoryOfCNN
HistoryOfCNN
 
The fastalgorithmfordeepbeliefnets
The fastalgorithmfordeepbeliefnetsThe fastalgorithmfordeepbeliefnets
The fastalgorithmfordeepbeliefnets
 
Where to Apply Dropout in Recurrent Neural Networks for Handwriting Recognition?
Where to Apply Dropout in Recurrent Neural Networks for Handwriting Recognition?Where to Apply Dropout in Recurrent Neural Networks for Handwriting Recognition?
Where to Apply Dropout in Recurrent Neural Networks for Handwriting Recognition?
 
Guided policy search
Guided policy searchGuided policy search
Guided policy search
 

Recently uploaded

MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 

Recently uploaded (6)

MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 

Convoutional sequence to sequence

  • 1. Convolutional Sequence to Sequence Learning 임우담 woodam.lim@gmail.com
  • 2. 1. Introduction 2. Related work 3. Explanation 4. Experiment 5. Result 6. Conclusion Contents
  • 3. Ⅰ. Introduction • Seq2Seq 모델은 기계번역 영역에서 매우 성공적인 모델 • 2014년 NIPS에서 Sutskever가 이를 발표. 엄청난 인기를 모음. = 사실은 조경헌 교수님이 먼저 발표한 모델.(https://arxiv.org/abs/1406.1078) • 현재 Seq2Seq에서 일반적으로 사용하는 모델은 Bi-directional RNN 모델 그리고 soft attention mechanism을 쓰는 경우도 있음. • 반면 CNN으로 시도한 경우도 꽤 있었는데 , 고정된(fixed) Conv 크기를 가져야 한다는 단점이 있긴 하지만 RNN에 비해 CNN 역시 장점을 많이 가지고 있음. → RNN보다 더 많은 stack을 쌓을 수 있다. =이를 통해 모델링 된 dependencies의 최대 길이를 세밀하게 컨트롤 할 수 있음. → 이전 step에 영향을 받는 구조가 아니므로 병렬화에 유리하다. = 시퀀스 내에서 병렬 계산을 방해하는 과거의 숨겨진 상태를 유지하는 RNN과 대조
  • 4. Ⅰ. Introduction • Multi-layer CNN은 hierarchical representation 을 갖는다. = 이런 구조는 RNN 방식보다 정보를 더 오랜 시간동안 유지할 수 있게 만들 수 있음. Ex ) When we obtain feature representation capturing relationship, CNN : O(n/k) , RNN : O(n) *k is kernels of width • 그 이전의 연구 결과들이 있었지만 굉장히 제한적이고 작은 dataset이였음. Bradbury et al. (2016) Kalchbrenner et al. (2016) Meng et al. (2015) Gehring et al.(2016) = It shows strong performance on larger tasks but it’s decoder is still recurrent • 위 논문에선 GLU와 Residual connection들을 차용하여 CNN만으로 Seq2Seq를 다룰 예정
  • 7. Ⅲ. Convolutional Architecture A. Position Embedding and Convolutional Block Structure
  • 8.
  • 9. Ⅲ. Convolutional Architecture A. Position Embedding and Convolutional Block Structure • Convolution • Padding Convolution을 구성할 때에는 문장의 양 끝에 k−1 개수 만큼 패딩을 추가한다. =입력과 출력의 길이를 같게 하기 위해서.
  • 10. Ⅲ. Convolutional Architecture A. Position Embedding and Convolutional Block Structure • GLU: v([A B])=A⊗σ(B) CNN 을 이용한 Seq2Seq 모델에서 사용하는 gate 로 LSTM 내의 gate와 유사 but SIMPLE. A와 B는 D차원을 가진다. (A,B ∈ 𝑹 𝒅 ) ⊗ 는 point-wise multiplication를 의미 ∴v([A B]) ∈ 𝑹 𝒅 A, B는 비선형성에 대한 입력. σ(B)는 현재 문맥의 A 입력이 적절한지를 제어합니다. 이전 연구에서 Oord 가 tanh 를 이용하여 이런 모델을 만들 긴 했었다. Dauphin은 GLU paper에서 tanh보다 σ 가 언어 모델링 쪽에서는 더 성능이 좋다는 걸 보였다.
  • 11. Ⅲ. Convolutional Architecture A. Position Embedding and Convolutional Block Structure • Residual connections : Deep한 모델을 설계할 때 Residual Connection을 사용하면 성능이 더 좋아진다 그래서 여기서 는 모든 Convolution 레이어마다 Residual connection을 추가한다 = Convolution층이 하나가 아니라 여러 층이라는 뜻 마찬가지로 GLU도 층마다 추가한다. 아래는 Convolution의 일반식
  • 12. Ⅲ. Convolutional Architecture B. Multistep Attention • Attention을 계산하기위해 현재 decoder의 상태인 𝒉𝒊 𝒍 와 target element 𝒈𝒊를 조합합니다. • Decoder layer 𝒍 마다 state i 와 source j 의 attention 𝒂𝒊𝒋를 Decoder state summary 𝒅𝒊 𝒍 와 encoder의 마지막 출력 𝒛𝒋 𝒖 의 dot-product로 계산합니다. • 현재 encoder에 대한 conditional input 𝒄𝒊 𝒍 는 encode의 output과 input element embedding 𝒆𝒋의 합으로 weight 시킵니다.
  • 14. Ⅲ. Convolutional Architecture A. Position Embedding • Residual connections : Deep한 모델을 설계할 때 Residual Connection을 사용하면 성능이 더 좋아진다 따라서 여기서는 모든 Convolution 레이어마다 Residual connection을 추가한다.
  • 15.
  • 16. Ⅲ. Convolutional Architecture C. Normalization Strategy • Batch Normalization을 사용하지 않음. 이미지는 BN이 좋은 성능이지만 Text 관련 CNN에선 성능이 좋지 않았음을 확인. → 대신 Weight Normalization을 사용. • Weight Normalization 말 그대로 weight를 정규화. BN에 비해 저비용 연산을 들이면서 근사할 수 있는 모델 • Weight Initialization
  • 17. Ⅳ. Experiment A. Dataset • WMT dataset을 사용함. 2006년부터 시작된 workshop으로 매년 데이터 set을 제공 (ACL 행사 때 함께 진행되는 task) WMT16은 영어를 불가리아어, 체코어, 독일어, 스페인어, 바스크어, 네덜란드어, 포르투칼어 등 으로 번역 위 논문에선 English-Romanian, English-German, English-French을 적용할 뿐만 아니라 text summarization task에도 적용했음.
  • 18. Ⅳ. Experiment B. Model Parameters and Optimaization  Parameter Encoder, decoder 에 사용된 hidden layer 크기는 512 Nesterov Gradient Method 사용 (momentum : 0.99, learning rate: 0.25) Batch size: 64문장 (GPU 크기에 맞춰 사용) Dropout 사용 (입력 convolution 영역)  구현 Language: Torch M40 GPU 장비 (single) 영어-프랑스어(WMT14) 번역에는 Multi-GPU 사용 (single machine)
  • 19. Ⅳ. Experiment C. Evaluation Word-base 방식과 BPE 방식을 사용 Word-base 방식은 Voca 를 구축하고 out of vocabulary가 발생하면 Copy를 한다 BPE (Byte Pair Encodeing) 56개는 복합어, 21개는 이름. 6개는 외래어다. Ex) lower = low + er
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Reference Convolutional Sequence to Sequence Learning (Jonas Gehring, 2017, FAIR) Sequence to Sequence Learning with Neural Networks (Sutskever, 2014, NIPS) Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation (Cho, 2014) Language Modeling with Gated Convolutional Networks(Yann N. Dauphin, 2016, FAIR) https://norman3.github.io/papers/docs/fairseq.html http://yujuwon.tistory.com/entry/TENSORFLOW-seq2seq-기반-챗봇-만들기