아이공의 AI 공부 도전기

PR12 - Season 3 201~203 공부 및 정리 

 

 

 

 작성에 앞서 공지!!!

 해당 내용은 개인적인 공부를 위해 기록의 형태로 대충 정리한 내용들입니다. 참조!!!만 해주세요. 혹시 틀린 부분이 있다면 지적해주세요 

 

     

 

PR-201: Bag of Tricks for Image Classification with Convolutional Neural Networks

 

https://youtu.be/D-baIgejA4M

 

https://openaccess.thecvf.com/content_CVPR_2019/html/He_Bag_of_Tricks_for_Image_Classification_with_Convolutional_Neural_Networks_CVPR_2019_paper.html

 

CVPR 2019 Open Access Repository

Tong He, Zhi Zhang, Hang Zhang, Zhongyue Zhang, Junyuan Xie, Mu Li; Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019, pp. 558-567 Much of the recent progress made in image classification research can be credite

openaccess.thecvf.com

 

Hoya님께서 정리해주신 자료

https://hoya012.github.io/blog/Bag-of-Tricks-for-Image-Classification-with-Convolutional-Neural-Networks-Review/

 

Bag of Tricks for Image Classification with Convolutional Neural Networks Review

CVPR 2019에 제출된 “Bag of Tricks for Image Classification with Convolutional Neural Networks” 논문에 대한 리뷰를 수행하였습니다.

hoya012.github.io

 

정리

 

 

 

PR-202: Modeling Task Relationships in Multi-task Learning with Multi-gate Mixture-of-Experts

 

KDD2018 발표

 

https://youtu.be/iR7T3lH20gI

 

https://www.kdd.org/kdd2018/accepted-papers/view/modeling-task-relationships-in-multi-task-learning-with-multi-gate-mixture-

 

Modeling Task Relationships in Multi-task Learning with Multi-gate Mixture-of-Experts

 

www.kdd.org

 

정리

 

2016년 구글 YouTube 추천 알고리즘 70% 딥러닝을 이용

 

유튜브 알고리즘의 선택을 받으려면? – Sciencetimes

화제가 된 유튜브 동영상에는 이런 댓글이 달리고는 한다. “알고리즘이 나를 여기로 이끌었습니다.” 유튜브에는 사용자에게 동영상을 추천하는 알고리즘, 즉 일종의 규칙이 있는데, 이것이

www.sciencetimes.co.kr

 

 

Youtube 추천 시스템 분석

기획을 제대로 공부하려면 서비스를 역기획 해보라는 글을 읽고 겁도 없이 Youtube 추천 시스템을 팠다. (지금 보니 이 글에서 Youtube 추천 기술에 대한 얘기가 나와서 그랬나 보다..) 이미지 1. 시

havefunlearningnewstuff.tistory.com

PR-060, 064 참조

Deep Neural Networks for YouTube Recommendations 논문 Figure 2

대부분의 회사에서 사용하는 추천 시스템 구조

 

Multi-Task Learning을 사용하는 이유 : 다양한 object가 있기 때문

다음 영상 click, watching time, like or dislike 등 현재 영상에 대한 만족도 판단도 진행하는 것을 기준으로 optimize

 

Task similarity가 다른 두 결과를 구분하고자 할 때 Shared Bottom 구조의 단점이 두드러짐

ex) 개 vs 고양이 / 개 vs 자동차

FeedForward Network

 

Mixture-of-Experts (MoE)

일반적으로 데이터 세트는 다양한 특성의 데이터들이 혼합되어 있다.

각각의 cluster를 학습하는 모델을 따로 학습한 후 Ensemble하는 것이 어떤가에 대한 생각에서 출발

Expert는 데이터 세트를 나눠 각각 학습하는 방법

 

Hinton 교수님 youtube 링크

 

참조할만한 MoE 설명 

https://machinelearningmastery.com/mixture-of-experts/

 

A Gentle Introduction to Mixture of Experts Ensembles

Mixture of experts is an ensemble learning technique developed in the field of neural networks. It involves decomposing predictive modeling […]

machinelearningmastery.com

 

점진적인 MoE 발전

Gate를 통과시킨 input의 종류에 따라 어떤 Expert를 사용해야할지를 선택적으로 사용 가능. 이 때문에 MoE 속도가 빨라졌다고 이야기함

lower computation cost

 

본 논문 Figure 1

(a) -> (b)

Shared-Bottom 대신 MoE 사용

MoE는 계산이 빠르고 성능이 좋다는 장점을 활용함

(b)->(c)

각 위치별 종속된 gate 사용

 

2개의 regression task를 합쳐 correlation을 조율

본 논문 Figure 4

OMoE와 달리 Correlation이 달라져도 MMoE는 성능이 유지됨을 확인할 수 있음

 

 

Training에 있어 Robustness를 확인하기 위한 그림

x축은 빈도 y축은 loss

Hist 해석 : 낮은 빈도만 높은 loss를 보일 때 좋은 그림, 위 그림에서는 MMoE와 같이 되는 것이 이상적

추측 : Shared-Bottom과 같은 parameter가 많은 상황에서 Randomness를 줬을 때 좋은 모델을 찾기 어려울것이다.

 

인구통계학 데이터를 활용한 실험 MMoE가 좋다

 

YouTube

~25:50 강연

25:50~ : Q&A

 

Shared-Bottom의 파라미터와 OMoE의 parameter의 숫자가 같게 맞춤

 

AUC metric에 대한 설명

https://developers.google.com/machine-learning/crash-course/classification/roc-and-auc?hl=ko 

 

Classification: ROC Curve and AUC  |  Machine Learning Crash Course

Google is committed to advancing racial equity for Black communities. See how. Send feedback Classification: ROC Curve and AUC Estimated Time: 8 minutes ROC curve An ROC curve (receiver operating characteristic curve) is a graph showing the performance of

developers.google.com

 

PR-203 : Class-Balanced Loss Based on Effective Number of Samples

 

 

https://youtu.be/3hL0uVtJrXM

 

 

Data 분포에 대한 이야기

Visual recognition task에서 long-tail data distribution 문제 해결이 중요해지고 있다.

샘플 수가 적은 클래스에 대해 상대적으로 안 좋은 성능을 나타냄

 

https://en.wikipedia.org/wiki/Long_tail

 

Long tail - Wikipedia

An example of a power law graph showing popularity ranking. To the right (yellow) is the long tail; to the left (green) are the few that dominate. In this example, the cutoff is chosen so that areas of both regions are equal. In statistics and business, a

en.wikipedia.org

 

성능을 높이기 위한 시도 

1) Re-sampling (Under sampling - 성능 저하, Over-sampling - 모델의 overfitting 유발)

2) 소수 클래스를 위한 합성 (SMOTE, ADASYN) - 생성된 샘플의 노이즈로 인한 모델 성능 저하

 

https://machinelearningmastery.com/smote-oversampling-for-imbalanced-classification/

 

SMOTE for Imbalanced Classification with Python

Imbalanced classification involves developing predictive models on classification datasets that have a severe class imbalance. The challenge of working with […]

machinelearningmastery.com

https://mkjjo.github.io/python/2019/01/04/smote_duplicate.html

 

[Python] SMOTE를 통한 데이터 불균형 처리

* 본 포스트는 개인연구/학습 기록 용도로 작성되고 있습니다. 데이터 분석시 쉽게 마주하게 되는 문제 중 하나가 데이터의 불균형이다. 우리가 찾고자하는 데이터의 타겟의 수가 매우 극소수인

mkjjo.github.io

 

Cost-sensitive re-weighting : 작은 클래스에 대한 예측결과가 더 큰 영향을 미치도록 weighting factor를 곱하여 사용

 

$$L = -\sum_{i=1}^n \alpha_i y_i log (S(f_{\theta} (x_i)))$$

 

장단점이 존재하고 대다수 Under-sampling을 사용함

 

Data overlap이 발생하는 Effective number를 고려하여 space를 구성하고 이를 통한 loss function 디자인

 

Method

 

feature space에서 많은 데이터를 샘플링 할수록 샘플링한 데이터들은 S를 더 잘 나타낸다.

 

Overlap이 되는지 아닌지만 구분

 

$p=\frac{E_{n-1}}{N}$

overlap이 된다면 $E_{n-1}$만 고려 overlap이 아니라면 새로운 데이터에 대한 (1-p) 고려하기 때문에 $E_{n-1}+1$를 계산.

가정 자체에 대한 의문점은 있음 그러나 정리하면 Eq (2)와 같이 나옴

 

Class Balanced Loss $CB(p,y)$

본 논문에서는 각 class weighting factor $\alpha_i \propto \frac{1}{E_{n_i}}$

$\beta$가 1에 가까워짐은 inverse class frequency에 의한 re-weighting과 같게 됨

 

다양한 형식의 Class-Balanced Loss 구성이 가능함을 보임

 

CIFAR10, CIFAR 100은 long tailed dataset이 아니기 때문에 임의로 training sample의 수를 줄여 long-tailed로 구성.

iNaturalist 2017, 2018, ILSVRC 2012 사용하여 실험.

 

Model - ResNet-32(CIFAR-10, CIFAR-100), ResNet-50, 101, 152 (iNaturalist, Imagenet)

 

CIFAR - 128 batch size, one NVIDIA Titan X GPU for 200 epochs

iNaturalist, Imagenet - 1024 batch size, one TPU for 90 epochs

Optimizer : SGD with momentum

Initial learning rate: 0.1 (CIFAR), 0.2 (Imagenet), 0.4 (iNaturalist)

 

결과

 

Imbalance가 클수록 Long-Tailed dataset

 

CIFAR-10 : beta가 클수록 더 좋은 성능을 보임

CIFAR-10 : beta가 높다고 좋지 않고 오히려 더 나쁜 성능을 보임

Class 수가 상대적으로 적은 CIFAR-10 대비 클래스 수가 많은 CIFAR-100은 Effective number를 활용한 Class-Balanced Loss가 잘 먹힌다.

Epoch 60이후로 CB Focal Loss의 성능이 좋아짐

 

결론

1. Training data의 Long-Tail Distriibution문제 해결을 위한 새로운 이론적 프레임워크를 제안

2. 각 Class에 해당하는 data가 feature space가 겹친다는 것을 고려해 Effective number of sample를 제안하고 Class-Balanced Loss를 제안

3. 다양한 Imbalanced Dataset에 대한 실험을 진행했고 더 좋은 성능을 확인함.

 

 

PR-04: Learning deep representations by mutual information estimation and maximization

 

 

ICLR 2019 

Learning deep representations by mutual information estimation and maximization

https://openreview.net/forum?id=Bklr3j0cKX 

 

Learning deep representations by mutual information estimation and...

We learn deep representation by maximizing mutual information, leveraging structure in the objective, and are able to compute with fully supervised classifiers with comparable architectures

openreview.net

https://arxiv.org/abs/1808.06670

 

영상 : https://youtu.be/YNicvevmByo

 

(Yoshua Bengio 교수님 성함이 뜨니까 느낌이 조금 다르네요....)

 

Research trends in self-supervised learning 

 

Yann LeCun, 2019 동영상

 

Self-supervised learning의 예

BERT: masked language Modeling (MLM)

Contrastive predictive coding: 데이터가 적은 곳에서 좋은 성능

 

참조 자료 : MINE, CPC, Deep InfoMax, BERT, WDM, VBMI, CPC-vision, MI-critic, MI-limit

 

Deep InfoMax

 

X: input images와 Z:vector representations 간의 Mutual Information을 maximize하는 것이 원리

$$max_{\theta \in \Theta} I_{\theta} (X;Z)$$

 

intractable -> tractable 가능하도록 lower bound 사용

 

representation learning시 의미 있는 부분과 의미 없는 부분이 있음.

Information Theory 성질을 이용하여 local feature vector와 global feature vector 간 mutual information maximize하는 방법론 제안

 

1) Deep InfoMax에서는 local representation과 global representation간 mutual information을 추정하고 최대화하는 것을 동시에 진행하는 것을 제안

2) 다양한 lower bound 제안

 

 

공유하기

facebook twitter kakaoTalk kakaostory naver band
loading