본문 바로가기

PR113

[3줄 vision] Contrastive Learning based Hybrid Networks for Long-Tailed Image Classification(CVPR'21)

Paper: https://bit.ly/3kKshv2

PR113 Facebook group: https://www.facebook.com/groups/565858127904979

 

1. 기존 long-tail image classification 방법에 태클을 걸어보자!

  - 2-stage model이 fully-supervised scenario에서 optimal하지 않을 수 있음

    - BBN(CVPR'20)처럼 hybrid framework을 사용할건데, 한 쪽 branch는 features, 반대쪽 branch는 classifier를 학습할 것임

  - 과연 imbalanced data에 대해 cross-entropy가 ideal loss인가?

    - Supervised contrastive(SC) loss(NeurIPS'20)가 적합할 것임

    - 이게 memory bottleneck issue가 있는데, 그래서 Prototypical supervised contrastive(PSC) loss 만들어봄

 

Figure 2 from paper

2. Backbone model을 통해 image의 representation $r$을 뽑아냄

  - Feature learning branch

    - Projection head와 $l$-2 norm을 통해 contrastive loss에 사용될 vector representation $z$를 뽑아냄

      - Projection head를 쓰는 건 좋다고 알려짐(SimCLR, ICML'20)

    - SC loss를 사용하여 feature learning branch 학습

      - Contrastive learning이니까 input batch = $\{x_{i}, \{x_{i}^{+}\}, \{x_{i}^{-}\}\}$로 구성되게 sampling 

      - SimCLR에 비해 multiple positive samples(same class with anchor)를 사용함

        - Anchor($x_{i}$) 대해 positive samples($\{x_{i}^{+}\}$)는 잡아당기고, 나머지($\{x_{i}^{-}\}$)는 밀어냄

    - 이 방식이 memory bottleneck issue가 발생해서(3.3절 참고) 본인들이 PSC loss를 만듦

      - $\{x_{i}^{+}\}, \{x_{i}^{-}\}$ 대신 class $y_{i}$마다 prototype representation $p_{y_{i}}$를 만들어서 사용

        - Anchor와 samples 간 learning이 아닌 anchor와 prototype representation 간 밀고 당기도록 학습

 

  - Classifier learning

    - Class-wise balanced data sampling 통해 input batch = $\{\{x_{i}, y_{i}\}\}$로 구성되게 sampling

 

  - Weighting coefficient $\alpha$

    - BBN과 마찬가지로 epoch에 반비례하게 설정, 처음에는 feature 학습, 나중에는 classifier 학습

 

3. 다양한 baseline과의 비교를 수행했는데,

  - Hybrid model 가져온 BBN보다도 성능이 좋음

  - 2-stage model에 SC loss를 사용한 것보다도 성능이 좋음

  - Cross entropy보다 SC, PSC loss 쓰는 게 더 좋음

  - PSC를 쓰는 이유가 있는데 SC와 PSC 간 성능 외 memory issue 관련 실험이 없는 것 같음. 몰라서 그런가...