- 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 핵심 리뷰
내용 요약
Expandable feature extractor를 사용하는 새로운 incremental learning 방법론 DER을 제안합니다. Channel level masking auxiliary loss, sparsity loss를 사용합니다. 다양한 데이터셋에 대한 실험 결과를 통해 기존 방법들보다 성능이 좋음을 보입니다.
1. 들어가며
이번 글에서는 CVPR 2021에서 발표된 DER: Dynamically Expandable Representation for Class Incremental Learning 논문을 리뷰합니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 1 img](https://blog.kakaocdn.net/dn/rVq0H/btrqvAprywz/Qi51G76uJTzAjcZtZnFBHK/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별로 사용할 파라미터 또는 네트워크 등을 정해줌
DER은 Distillation + Dynamic structure에 해당하는 방법 중 하나입니다.
2. 제안 방법
바로 제안 방법을 살펴보겠습니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 2 DER 제안 방법](https://ffighting.net/wp-content/uploads/2023/06/image-14-1024x351.png)
2-1. Problem setup and method overview
먼저 저자들이 제안하는 방법을 큰 그림에서 살펴보겠습니다.
우선 DER은 이전 task의 memory를 사용하는 rehearsal strategy를 사용합니다. 학습은 2단계로 나눠 진행합니다.
먼저 representation learning 단계에서는 이 전까지의 feature extractor는 fix 한 채로 new task의 feature extractor를 학습합니다. 이때 new task feature extractor에는 auxiliary loss와 channel level mask based pruning을 적용합니다.
두 번째 단계는 classifier learning 단계입니다. 이는 EEIL와 동일한 콘셉트로 진행됩니다.
이제 차례대로 살펴보겠습니다.
2-2. Expandable representation learning
위의 그림에서 보듯 DER의 핵심 방법은 expandable feature extractor입니다. Task가 추가될 때마다 task 전용의 feature extractor를 추가해줍니다. Step t단계에서의 학습을 가정해보겠습니다. 먼저 new extractor F(t)를 만듭니다 .기존의 extractor F(t-1)까지의 parameter는 fix 합니다. Input image에 대해 t개의 feature extractor가 뽑은 feature를 concat 하여 하나의 종합 feature로 만들면 다음과 같습니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 3 concat-feature](https://blog.kakaocdn.net/dn/lFEMU/btrpUMpyEnH/pUqS4XKHmwyYrGUclj0y7K/img.png)
이렇게 나온 종합 feature를 Classifier H가 softmax로 class를 구분하도록 학습합니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 4 softmax](https://blog.kakaocdn.net/dn/bdN4um/btrpUMJOGaK/kEGJQ4iXJTHWspdgbHnitk/img.png)
이때의 Classifier H는 기존 task의 parameter는 고정하고 new task의 parameter만 새로 초기화 하여 학습합니다. 이를 통해 옛 지식은 고정시키고 새로운 지식만 학습할 수 있습니다.
또한 new task에는 auxiliary classifier를 추가하여 줍니다.
여기까지의 loss는 다음과 같습니다.
첫 번째는 Classification loss (total) 입니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 5 classification-loss](https://blog.kakaocdn.net/dn/bBrn7O/btrpRWNj27M/4wxLDif9YQEjKVTRkqzFV0/img.png)
두 번째는 Auxiliary classification loss (new task) 입니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 6 auxiliary-classification-loss](https://blog.kakaocdn.net/dn/tQeWe/btrpU4cqiMK/1BFQvgOLSKVQ6S5ClqnUT0/img.png)
최종 Loss는 위의 두 Loss를 합쳐 구성해줍니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 7 final-loss](https://blog.kakaocdn.net/dn/b5Wdai/btrpW86tWGg/h1aPb2Wc1sjweWXndeaZjk/img.png)
2-3. Dynamical expansion
이때 feature extractor의 모든 channel을 사용하지 않습니다. Channel level masking을 적용하여 feature extractor의 특정 channel들만 선별하면 다음과 같습니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 8 channel-masking](https://blog.kakaocdn.net/dn/cEon0t/btrpULc8UMc/5KazPHvYi6qq3u1gFo00h0/img.png)
이때의 masking은 learnable mask parameter el에 sigmoid를 적용합니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 9 masking-sigmoid](https://blog.kakaocdn.net/dn/BtfCO/btrpSl6PtWn/n5eZkLmBSLz8D7zFEGXbdk/img.png)
이렇게 masking 처리한 feature들을 다 모으면 다음과 같습니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 10 masking-feature](https://blog.kakaocdn.net/dn/b4PjT7/btrpWz4jsmz/c1PDLIt4saud2ViHiiVwmK/img.png)
이때 mask와 kernel size에 sparsity loss를 적용하여 파라미터 개수를 줄이는 방향으로 학습을 유도합니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 11 sparsity-loss](https://blog.kakaocdn.net/dn/dY99QZ/btrpP37bwvD/HgsKkCD1kLYcx0qmQnOCK1/img.png)
- L : number of layers
- K(l) : Kernel size of convolution layer l
최종 loss는 다음과 같습니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 12 final-loss](https://blog.kakaocdn.net/dn/cYSpDm/btrpKDt7z1W/59Y8cBRldibE5j6OSWAsI0/img.png)
2-4. Classifier learning
Representation learning단계와는 별개로 incremental learning의 핵심 문제인 class imbalance를 잡기 위한 단계를 추가했습니다. 이는 EEIL과 핵심 철학을 공유합니다.
먼저 class balanced subset data를 제작합니다. 그리고 classifier만 randomly init 한 뒤 재학습해줍니다.
3. 실험 결과
다음은 이렇게 제안한 방법의 실험 결과를 살펴보겠습니다.
3-1. CIFAR100
먼저 CIFAR100 데이터셋에 대한 결과입니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 13 CIFAR100-결과](https://blog.kakaocdn.net/dn/byDxRi/btrpVQdVAWN/g6ajTJlM6sAgbqOYDa6RVK/img.png)
비교 대상은 다음과 같습니다.
- iCaRL : Distillation loss + exemplar 방식
- UCIR : Cosine normalization + less-forget constraint + inter class separation 방식
- BiC : Bias Correction 방식
- WA : Weight Aligning 방식
- PODNet : Pooled Outputs Distillation 방식
- RPSNet : Random Path Selection 방식
결과를 보면 task가 진행될수록 다른 모델과의 성능 차이가 더 벌어지는 모습을 볼 수 있습니다.
3-2. ImageNet
다음은 ImageNet 데이터셋에 대한 결과입니다.
![[CVPR 2021] DER: Dynamically Expandable Representation for Class Incremental Learning 핵심 리뷰 14 ImageNet-결과](https://blog.kakaocdn.net/dn/kxMmT/btrpQZclV2Z/uQlW7Zl5FqWxpIFKikNqu0/img.png)
비교 대상은 다음과 같습니다.
- iCaRL : Distillation loss + exemplar 방식
- BiC : Bias Correction 방식
- WA : Weight Aligning 방식
- RPSNet : Random Path Selection 방식
결과를 보면 마찬가지로 가장 좋은 성능을 보이지만, PODNet이 빠져있습니다.