- Incremental Learning 설명 – 정의, 필요성, 데이터셋, 대표 논문
- [arxiv 2016] Less-forgetting Learning in Deep Neural Networks (LFL) 핵심 리뷰
- [NIPS 2017] Continual learning with deep generative replay (DGR) 핵심 정리
- [CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰
- [PNAS 2017] Overcoming catastrophic forgetting in neural networks (EWC) 핵심 리뷰
- [PAML 2017] Learning Without Forgetting (LwF) 핵심 리뷰
- [NIPS 2018] Memory Replay GANs: learning to generate images from new categories without forgetting(MeRGAN) 핵심 리뷰
- [ECCV 2018] Piggyback: Adapting a single network to multiple tasks by learning to mask weights 핵심 리뷰
- [ECCV 2018] End-to-End Incremental Learning (EEIL) 핵심 리뷰
- [CVPR 2018] PackNet: Adding Multiple Tasks to a Single Network by Iterative Pruning
- [ECCV 2018] Memory Aware Synapses: Learning what (not) to forget (MAS) 핵심 리뷰
- [CVPR 2019] Learning to remember:A synaptic plasticity driven framework for continual learning (DGM) 핵심 리뷰
- [NIPS 2019] Compacting, Picking and Growing for Unforgetting Continual Learning (CPG) 핵심 리뷰
- [ICMR 2019] Increasingly packing multiple facial-informatics modules in a unified deep-learning model via lifelong learning (PAE) 핵심 리뷰
- [CVPR 2019] Learning a Unified Classifier Incrementally via Rebalancing (LUCIR) 핵심 리뷰
- [CVPR 2019] Learning without Memorizing (LwM) 핵심 리뷰
- [CVPR 2019] Large Scale Incremental Learning (BiC) 핵심 리뷰
- [CVPR 2020] Conditional Channel Gated Networks for Task-Aware Continual Learning (CCGN) 핵심 리뷰
- [CVPR 2020] Maintaining Discrimination and Fairness in Class Incremental Learning (WA) 핵심 리뷰
- [ECCV 2020] PODNet: Pooled Outputs Distillation for Small-Tasks Incremental Learning 핵심 리뷰
- [WACV 2020] Class-incremental Learning via Deep Model Consolidation (DMC) 핵심 리뷰
- [CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰
내용 요약
Nearest mean of exemplars classification 방식의 Incremental Learning 방법론을 제안합니다. 기존 데이터셋의 exemplar를 구성하여 참조하는 새로운 방법을 제안합니다.
1. 들어가며
이번 글에서는 CVPR 2017에 발표된 iCaRL: Incremental Classifier and Representation Learning 논문을 리뷰합니다. 이 논문은 iCaRL이라고 불리며, 이번 글에서도 iCaRL이라고 지칭하겠습니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 1 img](https://blog.kakaocdn.net/dn/bhEMRS/btrqt0IPs7B/TOu6mzEJqfh8Qk9R45nREk/img.png)
Incremental Learning을 방법론에 따라 크게 구분하면 위의 그림과 같이 구분할 수 있습니다.
- Regularization : 이전 task에서 학습한 네트워크의 파라미터가 최대한 변하지 않으면서 새로운 task를 학습하도록 유도
- Distillation : 이전 task에서 학습한 파라미터를 새로운 task를 위한 네트워크에 distillation
- Distillation + Memory : 이전 task의 데이터를 소량 메모리로 두고 새로운 task학습 때 활용
- Distillation + Memory + Bias correction : 새로운 task에 대한 bias를 주요 문제로 보고, 이에 대한 개선에 집중
- Distillation + Memory + Dynamic structure : task에 따라 가변적으로 적용할 수 있는 네트워크 구조를 사용
- Distillation + Memory + Generative model : 이전 task의 데이터를 generative model을 사용하여 replay 하는 방식을 사용
- Dynamic structure : Pruning / Masking 등을 사용하여 task별로 사용할 파라미터 또는 네트워크 등을 정해줌
iCaRL은 Distillation + Memory에 해당하는 방법 중 하나입니다.
2. 제안 방법
바로 제안하는 방법을 살펴보겠습니다.
2-1. Exemplar management
첫 번째 포인트는 exemplar의 사용입니다.
기존의 incremental learning 방법론에서는 new task를 학습할 때 old class data는 사용하지 않았습니다. iCaRL에서는 기존 지식을 잊어버리는 현상을 방지하기 위해 기존 데이터를 약간씩 sampling 하여 exemplar라는 미니 데이터셋을 구축한 뒤 이를 활용하는 방안을 제시합니다.
이때 exemplar를 제작, 관리하는 포인트는 다음과 같습니다.
첫 번째로, 모든 클래스의 데이터 개수를 동일하게 구성해야 합니다. 개수가 달라지면 class imbalance 현상으로 인해 학습이 어려워질 수 있기 때문입니다.
두 번째로, exemplar에 들어오는 데이터는 해당 클래스를 가장 잘 대표하는 데이터들이어야 합니다. 적은 데이터만으로 학습을 해야 하기 때문입니다.
세 번째로, examplar를 구성할 때는 각 클래스별로 해당 클래스를 잘 대표하는 순서대로 구성되어야 합니다. 새로운 task를 학습할 때 기존 class의 데이터들은 메모리 유지를 위해 exemplar에서 빠져나가야 하는데, 이때 중요도 순서대로 정렬되어 있다면 뒤에서부터 제거하면 쉽기 때문입니다.
이를 구현하기 위해 Herding의 prioritized construction 방식을 사용했습니다.
지금까지의 내용을 요약하면 다음과 같습니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 2 exemplar-management](https://blog.kakaocdn.net/dn/B4BCY/btroT623bue/1goX7ecHMCY7q5BhDFu5k1/img.png)
2-2. Nearest mean of exemplars classification
다음은 classification 방식에 대해 살펴보겠습니다.
iCaRL은 softmax를 사용하지 않고 최종 output을 feature * W(y)에 대한 sigmoid 값으로 출력합니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 3 sigmoid-output](https://blog.kakaocdn.net/dn/bTPd23/btroQGyj2cd/91pJAZpBFrT2fTS9sMciv1/img.png)
또한 nearest mean of exemplars classification 방식을 사용합니다. 그대로 직역해보면 “exemplar의 각 클래스 평균에 대해 가장 가까운 클래스로 구분하겠다”는 의미가 됩니다. 이를 수식으로 쓰면 다음과 같습니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 4 nearest-mean-of-exemplars-classifier](https://blog.kakaocdn.net/dn/00c5u/btroQcxs3Cs/5OKHzqM6AZh2O13rKDVnK0/img.png)
이때 exemplar의 y번째 클래스 feature의 평균 𝜇는 다음과 같습니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 5 exemplar-feature-mean](https://blog.kakaocdn.net/dn/dfVtWP/btroQ5R6axt/MwTPXqcceBYwU2H04VlPR1/img.png)
2-3. Representation learning
다음은 학습 방법을 살펴보겠습니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 6 representation-learning](https://blog.kakaocdn.net/dn/lkp86/btroRZX9cwk/Yipz3Xf2YYCrDKbHZ752Xk/img.png)
우선 기존의 데이터에 새로운 데이터까지 더해진 합 데이터셋을 만듭니다. 새로운 클래스에 대한 output은 classification loss로 학습하고, 기존의 데이터에 대한 output은 distillation loss로 학습합니다. 학습 방식 자체는 기존의 LFL, LwF, LwM등의 Distillation 계열과 크게 다르지 않은 모습입니다.
3. 실험 결과
다음은 이렇게 제안한 방법의 실험 결과를 살펴보겠습니다.
3-1. iCIFAR100, ImageNet 테스트
Incremental learning 테스트를 위한 iCIFAR100 데이터셋과 ImageNet에 대한 테스트 결과를 보겠습니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 7 iCIFAR100-ImageNet-성능](https://blog.kakaocdn.net/dn/4cSZg/btroSVnqAs7/JoKhik0fFcKkqVvqd9kkdK/img.png)
실험은 iCaRL, fine tuning, fixed representation, LwF 네 가지 방식에 대해 진행했습니다.
- Fine tuning : catastrophic forgetting에 대한 대비 없이 그냥 학습을 진행합니다.
- Fixed representation : feature extractor와 다른 클래스의 fcl weight는 고정한 채로 해당 클래스의 fcl weight만 학습합니다.
- LwF : classification + distillation loss를 사용하지만 exemplar를 사용하지 않습니다.
실험 방식은 다음과 같습니다.
- 실험 a : CIFAR100 데이터셋을 각각 2개 클래스 * 50번 / 5개 클래스 * 20번 / 10개 클래스 * 10번 / 20개 클래스 * 5번 / 50개 클래스 * 2번으로 나눠 incremental learning 방식으로 학습한 뒤 모든 클래스의 classification ACC 평균을 측정
- 실험 b : ImageNet 데이터를 100개 클래스(위), 모든 클래스(아래)로 나눈 뒤 마찬가지로 incremental learning 방식으로 학습, classification ACC 측정.
실험 결과를 보면 iCaRL이 다른 모든 방법과 비교했을 때 가장 높은 성능을 내는 모습을 볼 수 있습니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 8 방법별-클래스에대한-성능](https://blog.kakaocdn.net/dn/bmBSmX/btroRGduwfJ/ZZDH2XvddniiX0Fi9417w0/img.png)
위 그림에서 각 방법에 대해 클래스별 성능을 확인할 수 있습니다. Fine tuning 방식은 앞의 클래스에 대한 지식은 다 잊어버리고 마지막으로 학습한 데이터에 대해서만 높은 성능을 내는 모습을 볼 수 있습니다. 반면 iCaRL은 구역별 차이 없이 고른 성능 분포를 보이며 LwF 방식보다 더 고르게 잘하는 모습을 볼 수 있습니다.
4. Ablations
다음은 ablations를 살펴보겠습니다.
4-1. 각 component에 따른 성능 비교
먼저 iCaRL의 주요 component에 대한 비교 성능 실험입니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 9 주요-component에-대한-비교-성능](https://blog.kakaocdn.net/dn/0DAXx/btroSujkOTB/iQTLyGdr4TldhZ1oFO6rvk/img.png)
실험a는 iCaRL, hybrid 3가지, LwF 방식에 대해 진행했습니다.
- hybrid1 : mean of exemplar classifier 대신 direct output classification 사용
- hybrid2 : distillation loss 사용 안 함
- hybrid3 : distillation loss와 exemplar 모두 사용 안 함
- LwF : classification + distillation loss를 사용했지만 exemplar를 사용하지 않은 방식
이에 대한 결과 해석은 다음과 같습니다.
- iCaRL / hybrid1 : mean of exemplar classifier는 smaller batch size에서 더 중요
- iCaRL / hybrid2 : 매우 작은 batch size에서는 distillation loss가 오히려 안 좋음
- hybrid3 / LwF : exemplar는 중요한 역할을 함
실험b는 iCaRL 방식과 NCM 방식의 비교입니다.
iCaRL은 exemplar를 데이터셋의 일부로만 구성하는 반면, NCM은 모든 데이터셋으로 exemplar를 구성하는 방식입니다. 따라서 NCM은 현실적으로 불가능한 방법으로서, upper bound로서의 참조 성능으로 생각할 수 있습니다. 실험 결과를 보면 iCaRL은 데이터를 많이 사용하지 않았음에도 불구하고 NCM 대비 크게 뒤지지 않는 성능을 보이고 있습니다.
4-2. 메모리 사용에 따른 성능
다음은 exemplar의 크기에 따른 성능입니다.
![[CVPR 2017] iCaRL: Incremental Classifier and Representation Learning 핵심 리뷰 10 메모리에-따른-성능](https://blog.kakaocdn.net/dn/cMUAQu/btroVq71Dpy/XkkbDel9q9r7bsAYNyhot0/img.png)
메모리 사용량이 커질수록 NCM에 근접하는 성능을 보여줍니다. 하지만 메모리 사용량을 아무리 늘려도 direct classification 방식인 hybrid1은 성능이 크게 못 미치는 모습을 보입니다.