SlideShare une entreprise Scribd logo
1  sur  13
Learning to Remember Rare Events
Łukasz Kaiser, Ofir Nachum
Google Brain
자료정리 : 김홍배
논문을 한마디로 정리하면
제목만 보면 도대체 뭔 소리인지 ?
주 내용은
Matching Networks for One Shot
Learning에 메모리 기능을 추가
일반적인 이미지 분류작업
Feature Extractor
Fully Connected Layers
Classifier
일반적인 이미지 분류작업의 경우, 다음과 같이 NN을 구성하여
훈련을 통하여 parameter를 tuning한다.
여기서는
 기존에 아주 잘 훈련된 Feature Extractor와 FCL를 활용
 FCL의 마지막 Layer로부터 이미지에 대한 Feature Vector를 얻는다
 Feature Vector 또는 query, q를 메모리 겸 분류기에 입력
Feature Extractor
Fully Connected Layers
Memory &
Classifier
Feature Vector, q
메모리의 구조
K[1] V[1] A[1]
K[2] V[2] A[2]
.
.
.
.
.
.
K[i] V[i] A[i]
.
.
.
.
.
.
K[n] V[n] A[n]
M[1]
M[2]
.
.
M[i]
.
.
M[n]
=
i번째 메모리 M[i]는 다음과 같이 3개의 요소로 구성
K[i] : i번째 memory feature(key) vector,
normalized one ІІ K[i] ІІ=1, ϵ R1xkey size
V[i] : i번째 memory class indicator, integer
A[i] : i번째 memory cell age, integer
메모리 작동원리
q∙K[1] V[1] A[1]
q∙K[2] V[2] A[2]
.
.
.
.
.
.
q∙K[i] V[i] A[i]
.
.
.
.
.
.
q∙K[n] V[n] A[n]
• 주어진 이미지에 대한 Feature vector를 FCL로부터 받아
이를 Query, q(normalized one, ІІqІІ=1, , ϵ R1xkey size )로 메모리에 전달하면
• 메모리 셀에 있는 Key vector, K[i]와 유사도(Cosine Similarity)를 계산한다.
 q와 K[i]가 유사하면 ~1 이고, 관계없으면 ~0
• 만약 q∙K[i]가 가장 큰 값이면, 주어진 이미지의 class는 V[i]
작동 예
• 만약 0 ~ 9까지의 10 digits을 분류하는 작업을 예로 들면
• “5”를 입력할 경우, class “5”에 해당하는 Key vector, K[6]와 query의
유사도가 가장 큰 값을 나타낼 것이며
ㅂ
K[1] “0” A[1]
K[2] “1” A[2]
K[3] “2” A[3]
K[4] “3” A[4]
K[5] “4” A[5]
K[6] “5” A[6]
K[7] “6” A[7]
K[8] “7” A[8]
K[9] “8” A[9]
K[10] “9” A[10]
5 q
작동 예
• 만약 0 ~ 9까지의 10 digits을 분류하는 작업을 예로 들면
• “7”를 입력할 경우, class “7”에 해당하는 Key vector, K[8]와 query의
유사도가 가장 큰 값을 나타낼 것
K[1] “0” A[1]
K[2] “1” A[2]
K[3] “2” A[3]
K[4] “3” A[4]
K[5] “4” A[5]
K[6] “5” A[6]
K[7] “6” A[7]
K[8] “7” A[8]
K[9] “8” A[9]
K[10] “9” A[10]
7 q
메모리 Tuning
• 앞과 같이 작동되기 위해서는 메모리가 Tuning이 잘 된 경우
• 메모리 Tuning은 어찌해야 하나 ?
• 우선 주어진 이미지에 따라 계산된 query, q와의 유사도에 따라
다음과 같이 메모리의 key vector간 k개의 Nearest Neighbors를
계산한다.
(n1, n2, ….., nk)= NNk(q,M)
n1> n2> …..> nk
메모리 Tuning
즉 주어진 이미지가 class V[n1]에 해당하는 경우이다.
• query, q가 주어질 경우, 다음과 같은 2경우가 존재한다.
Case 1) 메모리 내에 q와 유사한 key vector가 존재하는 경우
이 경우, n1에 해당하는 메모리의 key vector만 update한다.
두 벡터의 normalized 평균값으로 대체
또한 갱신되었으므로 age를 reset시켜준다.
메모리 Tuning
• query, q가 주어질 경우, 다음과 같은 2경우가 존재한다.
Case 2) 메모리 내에 q와 유사한 key vector가 존재하는지 않는 경우
이 경우, 메모리에 새로운 key vector와 class 를 저장하여야 함.
어디에 저장하여야 하나 ?
 가장 오래된(즉 사용빈도가 가장 낮은) 메모리에 저장
* 메모리 갱신이 끝나면 모든 메모리의 age를 +1시켜준다.
메모리 Loss의 정의
• 여기서 Loss는 단지 Performance Indicator 역할
• 메모리의 성능은 분류대상 이미지가 메모리에 저장된 class에 되도록
많이 포함될 수록 좋게 나타나도록
 즉 분류대상에 대한 정보를 많이 가질 수록 성능이 좋다 !
V[np] : 기존의 class에 포함된 경우, positive neighbor
V[nb] : 기존의 class에 포함되지않은 경우, negative neighbor
Query와 negative neighbor사이의 유사도
 되도록 작게
Query와 positive neighbor사이의 유사도
 되도록 크게
실험결과 : Omniglot dataset
• 기존의 메모리를 사용한 onse-shot learning 에 비하여 우수한 성능을 나타냄.

Contenu connexe

Tendances

Image Deep Learning 실무적용
Image Deep Learning 실무적용Image Deep Learning 실무적용
Image Deep Learning 실무적용Youngjae Kim
 
Workshop 210417 dhlee
Workshop 210417 dhleeWorkshop 210417 dhlee
Workshop 210417 dhleeDongheon Lee
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)홍배 김
 
A neural image caption generator
A neural image caption generatorA neural image caption generator
A neural image caption generator홍배 김
 
Anomaly Detection with GANs
Anomaly Detection with GANsAnomaly Detection with GANs
Anomaly Detection with GANs홍배 김
 
keras 빨리 훑어보기(intro)
keras 빨리 훑어보기(intro)keras 빨리 훑어보기(intro)
keras 빨리 훑어보기(intro)beom kyun choi
 
Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명홍배 김
 
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016Taehoon Kim
 
Lecture 3: Unsupervised Learning
Lecture 3: Unsupervised LearningLecture 3: Unsupervised Learning
Lecture 3: Unsupervised LearningSang Jun Lee
 
Reinforcement learning v0.5
Reinforcement learning v0.5Reinforcement learning v0.5
Reinforcement learning v0.5SANG WON PARK
 
One-Shot Learning
One-Shot LearningOne-Shot Learning
One-Shot LearningJisung Kim
 
Lecture 2: Supervised Learning
Lecture 2: Supervised LearningLecture 2: Supervised Learning
Lecture 2: Supervised LearningSang Jun Lee
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장Sunggon Song
 
딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해Hee Won Park
 
[264] large scale deep-learning_on_spark
[264] large scale deep-learning_on_spark[264] large scale deep-learning_on_spark
[264] large scale deep-learning_on_sparkNAVER D2
 
neural network 기초
neural network 기초neural network 기초
neural network 기초Dea-hwan Ki
 
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)WON JOON YOO
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural NetworksSanghoon Yoon
 
개발자를 위한 공감세미나 tensor-flow
개발자를 위한 공감세미나 tensor-flow개발자를 위한 공감세미나 tensor-flow
개발자를 위한 공감세미나 tensor-flow양 한빛
 

Tendances (20)

Image Deep Learning 실무적용
Image Deep Learning 실무적용Image Deep Learning 실무적용
Image Deep Learning 실무적용
 
Workshop 210417 dhlee
Workshop 210417 dhleeWorkshop 210417 dhlee
Workshop 210417 dhlee
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)
 
A neural image caption generator
A neural image caption generatorA neural image caption generator
A neural image caption generator
 
Anomaly Detection with GANs
Anomaly Detection with GANsAnomaly Detection with GANs
Anomaly Detection with GANs
 
Digit recognizer
Digit recognizerDigit recognizer
Digit recognizer
 
keras 빨리 훑어보기(intro)
keras 빨리 훑어보기(intro)keras 빨리 훑어보기(intro)
keras 빨리 훑어보기(intro)
 
Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명
 
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
 
Lecture 3: Unsupervised Learning
Lecture 3: Unsupervised LearningLecture 3: Unsupervised Learning
Lecture 3: Unsupervised Learning
 
Reinforcement learning v0.5
Reinforcement learning v0.5Reinforcement learning v0.5
Reinforcement learning v0.5
 
One-Shot Learning
One-Shot LearningOne-Shot Learning
One-Shot Learning
 
Lecture 2: Supervised Learning
Lecture 2: Supervised LearningLecture 2: Supervised Learning
Lecture 2: Supervised Learning
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장
 
딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해
 
[264] large scale deep-learning_on_spark
[264] large scale deep-learning_on_spark[264] large scale deep-learning_on_spark
[264] large scale deep-learning_on_spark
 
neural network 기초
neural network 기초neural network 기초
neural network 기초
 
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
 
개발자를 위한 공감세미나 tensor-flow
개발자를 위한 공감세미나 tensor-flow개발자를 위한 공감세미나 tensor-flow
개발자를 위한 공감세미나 tensor-flow
 

En vedette

Meta-Learning with Memory Augmented Neural Networks
Meta-Learning with Memory Augmented Neural NetworksMeta-Learning with Memory Augmented Neural Networks
Meta-Learning with Memory Augmented Neural Networks홍배 김
 
Visualizing data using t-SNE
Visualizing data using t-SNEVisualizing data using t-SNE
Visualizing data using t-SNE홍배 김
 
Learning by association
Learning by associationLearning by association
Learning by association홍배 김
 
알기쉬운 Variational autoencoder
알기쉬운 Variational autoencoder알기쉬운 Variational autoencoder
알기쉬운 Variational autoencoder홍배 김
 
Explanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expertExplanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expert홍배 김
 
Normalization 방법
Normalization 방법 Normalization 방법
Normalization 방법 홍배 김
 
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...홍배 김
 
Convolution 종류 설명
Convolution 종류 설명Convolution 종류 설명
Convolution 종류 설명홍배 김
 
Binarized CNN on FPGA
Binarized CNN on FPGABinarized CNN on FPGA
Binarized CNN on FPGA홍배 김
 
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...홍배 김
 
Single Shot MultiBox Detector와 Recurrent Instance Segmentation
Single Shot MultiBox Detector와 Recurrent Instance SegmentationSingle Shot MultiBox Detector와 Recurrent Instance Segmentation
Single Shot MultiBox Detector와 Recurrent Instance Segmentation홍배 김
 
머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)홍배 김
 
딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향홍배 김
 
Q Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object LocalizationQ Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object Localization홍배 김
 

En vedette (14)

Meta-Learning with Memory Augmented Neural Networks
Meta-Learning with Memory Augmented Neural NetworksMeta-Learning with Memory Augmented Neural Networks
Meta-Learning with Memory Augmented Neural Networks
 
Visualizing data using t-SNE
Visualizing data using t-SNEVisualizing data using t-SNE
Visualizing data using t-SNE
 
Learning by association
Learning by associationLearning by association
Learning by association
 
알기쉬운 Variational autoencoder
알기쉬운 Variational autoencoder알기쉬운 Variational autoencoder
알기쉬운 Variational autoencoder
 
Explanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expertExplanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expert
 
Normalization 방법
Normalization 방법 Normalization 방법
Normalization 방법
 
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...
 
Convolution 종류 설명
Convolution 종류 설명Convolution 종류 설명
Convolution 종류 설명
 
Binarized CNN on FPGA
Binarized CNN on FPGABinarized CNN on FPGA
Binarized CNN on FPGA
 
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...
 
Single Shot MultiBox Detector와 Recurrent Instance Segmentation
Single Shot MultiBox Detector와 Recurrent Instance SegmentationSingle Shot MultiBox Detector와 Recurrent Instance Segmentation
Single Shot MultiBox Detector와 Recurrent Instance Segmentation
 
머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)머신러닝의 자연어 처리기술(I)
머신러닝의 자연어 처리기술(I)
 
딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향딥러닝을 이용한 자연어처리의 연구동향
딥러닝을 이용한 자연어처리의 연구동향
 
Q Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object LocalizationQ Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object Localization
 

Plus de 홍배 김

Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...홍배 김
 
Gaussian processing
Gaussian processingGaussian processing
Gaussian processing홍배 김
 
Lecture Summary : Camera Projection
Lecture Summary : Camera Projection Lecture Summary : Camera Projection
Lecture Summary : Camera Projection 홍배 김
 
Learning agile and dynamic motor skills for legged robots
Learning agile and dynamic motor skills for legged robotsLearning agile and dynamic motor skills for legged robots
Learning agile and dynamic motor skills for legged robots홍배 김
 
Robotics of Quadruped Robot
Robotics of Quadruped RobotRobotics of Quadruped Robot
Robotics of Quadruped Robot홍배 김
 
Basics of Robotics
Basics of RoboticsBasics of Robotics
Basics of Robotics홍배 김
 
Convolutional neural networks 이론과 응용
Convolutional neural networks 이론과 응용Convolutional neural networks 이론과 응용
Convolutional neural networks 이론과 응용홍배 김
 
Anomaly detection using deep one class classifier
Anomaly detection using deep one class classifierAnomaly detection using deep one class classifier
Anomaly detection using deep one class classifier홍배 김
 
Optimal real-time landing using DNN
Optimal real-time landing using DNNOptimal real-time landing using DNN
Optimal real-time landing using DNN홍배 김
 
The world of loss function
The world of loss functionThe world of loss function
The world of loss function홍배 김
 
Machine learning applications in aerospace domain
Machine learning applications in aerospace domainMachine learning applications in aerospace domain
Machine learning applications in aerospace domain홍배 김
 
Anomaly Detection and Localization Using GAN and One-Class Classifier
Anomaly Detection and Localization  Using GAN and One-Class ClassifierAnomaly Detection and Localization  Using GAN and One-Class Classifier
Anomaly Detection and Localization Using GAN and One-Class Classifier홍배 김
 
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...홍배 김
 
Brief intro : Invariance and Equivariance
Brief intro : Invariance and EquivarianceBrief intro : Invariance and Equivariance
Brief intro : Invariance and Equivariance홍배 김
 

Plus de 홍배 김 (14)

Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
 
Gaussian processing
Gaussian processingGaussian processing
Gaussian processing
 
Lecture Summary : Camera Projection
Lecture Summary : Camera Projection Lecture Summary : Camera Projection
Lecture Summary : Camera Projection
 
Learning agile and dynamic motor skills for legged robots
Learning agile and dynamic motor skills for legged robotsLearning agile and dynamic motor skills for legged robots
Learning agile and dynamic motor skills for legged robots
 
Robotics of Quadruped Robot
Robotics of Quadruped RobotRobotics of Quadruped Robot
Robotics of Quadruped Robot
 
Basics of Robotics
Basics of RoboticsBasics of Robotics
Basics of Robotics
 
Convolutional neural networks 이론과 응용
Convolutional neural networks 이론과 응용Convolutional neural networks 이론과 응용
Convolutional neural networks 이론과 응용
 
Anomaly detection using deep one class classifier
Anomaly detection using deep one class classifierAnomaly detection using deep one class classifier
Anomaly detection using deep one class classifier
 
Optimal real-time landing using DNN
Optimal real-time landing using DNNOptimal real-time landing using DNN
Optimal real-time landing using DNN
 
The world of loss function
The world of loss functionThe world of loss function
The world of loss function
 
Machine learning applications in aerospace domain
Machine learning applications in aerospace domainMachine learning applications in aerospace domain
Machine learning applications in aerospace domain
 
Anomaly Detection and Localization Using GAN and One-Class Classifier
Anomaly Detection and Localization  Using GAN and One-Class ClassifierAnomaly Detection and Localization  Using GAN and One-Class Classifier
Anomaly Detection and Localization Using GAN and One-Class Classifier
 
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
 
Brief intro : Invariance and Equivariance
Brief intro : Invariance and EquivarianceBrief intro : Invariance and Equivariance
Brief intro : Invariance and Equivariance
 

Dernier

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
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
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월호 목차캐드앤그래픽스
 
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
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 

Dernier (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
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
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월호 목차
 
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 ...
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 

Learning to remember rare events

  • 1. Learning to Remember Rare Events Łukasz Kaiser, Ofir Nachum Google Brain 자료정리 : 김홍배
  • 2. 논문을 한마디로 정리하면 제목만 보면 도대체 뭔 소리인지 ? 주 내용은 Matching Networks for One Shot Learning에 메모리 기능을 추가
  • 3. 일반적인 이미지 분류작업 Feature Extractor Fully Connected Layers Classifier 일반적인 이미지 분류작업의 경우, 다음과 같이 NN을 구성하여 훈련을 통하여 parameter를 tuning한다.
  • 4. 여기서는  기존에 아주 잘 훈련된 Feature Extractor와 FCL를 활용  FCL의 마지막 Layer로부터 이미지에 대한 Feature Vector를 얻는다  Feature Vector 또는 query, q를 메모리 겸 분류기에 입력 Feature Extractor Fully Connected Layers Memory & Classifier Feature Vector, q
  • 5. 메모리의 구조 K[1] V[1] A[1] K[2] V[2] A[2] . . . . . . K[i] V[i] A[i] . . . . . . K[n] V[n] A[n] M[1] M[2] . . M[i] . . M[n] = i번째 메모리 M[i]는 다음과 같이 3개의 요소로 구성 K[i] : i번째 memory feature(key) vector, normalized one ІІ K[i] ІІ=1, ϵ R1xkey size V[i] : i번째 memory class indicator, integer A[i] : i번째 memory cell age, integer
  • 6. 메모리 작동원리 q∙K[1] V[1] A[1] q∙K[2] V[2] A[2] . . . . . . q∙K[i] V[i] A[i] . . . . . . q∙K[n] V[n] A[n] • 주어진 이미지에 대한 Feature vector를 FCL로부터 받아 이를 Query, q(normalized one, ІІqІІ=1, , ϵ R1xkey size )로 메모리에 전달하면 • 메모리 셀에 있는 Key vector, K[i]와 유사도(Cosine Similarity)를 계산한다.  q와 K[i]가 유사하면 ~1 이고, 관계없으면 ~0 • 만약 q∙K[i]가 가장 큰 값이면, 주어진 이미지의 class는 V[i]
  • 7. 작동 예 • 만약 0 ~ 9까지의 10 digits을 분류하는 작업을 예로 들면 • “5”를 입력할 경우, class “5”에 해당하는 Key vector, K[6]와 query의 유사도가 가장 큰 값을 나타낼 것이며 ㅂ K[1] “0” A[1] K[2] “1” A[2] K[3] “2” A[3] K[4] “3” A[4] K[5] “4” A[5] K[6] “5” A[6] K[7] “6” A[7] K[8] “7” A[8] K[9] “8” A[9] K[10] “9” A[10] 5 q
  • 8. 작동 예 • 만약 0 ~ 9까지의 10 digits을 분류하는 작업을 예로 들면 • “7”를 입력할 경우, class “7”에 해당하는 Key vector, K[8]와 query의 유사도가 가장 큰 값을 나타낼 것 K[1] “0” A[1] K[2] “1” A[2] K[3] “2” A[3] K[4] “3” A[4] K[5] “4” A[5] K[6] “5” A[6] K[7] “6” A[7] K[8] “7” A[8] K[9] “8” A[9] K[10] “9” A[10] 7 q
  • 9. 메모리 Tuning • 앞과 같이 작동되기 위해서는 메모리가 Tuning이 잘 된 경우 • 메모리 Tuning은 어찌해야 하나 ? • 우선 주어진 이미지에 따라 계산된 query, q와의 유사도에 따라 다음과 같이 메모리의 key vector간 k개의 Nearest Neighbors를 계산한다. (n1, n2, ….., nk)= NNk(q,M) n1> n2> …..> nk
  • 10. 메모리 Tuning 즉 주어진 이미지가 class V[n1]에 해당하는 경우이다. • query, q가 주어질 경우, 다음과 같은 2경우가 존재한다. Case 1) 메모리 내에 q와 유사한 key vector가 존재하는 경우 이 경우, n1에 해당하는 메모리의 key vector만 update한다. 두 벡터의 normalized 평균값으로 대체 또한 갱신되었으므로 age를 reset시켜준다.
  • 11. 메모리 Tuning • query, q가 주어질 경우, 다음과 같은 2경우가 존재한다. Case 2) 메모리 내에 q와 유사한 key vector가 존재하는지 않는 경우 이 경우, 메모리에 새로운 key vector와 class 를 저장하여야 함. 어디에 저장하여야 하나 ?  가장 오래된(즉 사용빈도가 가장 낮은) 메모리에 저장 * 메모리 갱신이 끝나면 모든 메모리의 age를 +1시켜준다.
  • 12. 메모리 Loss의 정의 • 여기서 Loss는 단지 Performance Indicator 역할 • 메모리의 성능은 분류대상 이미지가 메모리에 저장된 class에 되도록 많이 포함될 수록 좋게 나타나도록  즉 분류대상에 대한 정보를 많이 가질 수록 성능이 좋다 ! V[np] : 기존의 class에 포함된 경우, positive neighbor V[nb] : 기존의 class에 포함되지않은 경우, negative neighbor Query와 negative neighbor사이의 유사도  되도록 작게 Query와 positive neighbor사이의 유사도  되도록 크게
  • 13. 실험결과 : Omniglot dataset • 기존의 메모리를 사용한 onse-shot learning 에 비하여 우수한 성능을 나타냄.