論文解讀(BYOL)《Bootstrap Your Own Latent A New Approach to Self-Supervised Learning》


  論文標題:Bootstrap Your Own Latent A New Approach to Self-Supervised Learning
  論文方向:圖像領域
  論文來源:NIPS2020
  論文鏈接:https://arxiv.org/abs/2006.07733
  論文代碼:https://github.com/deepmind/deepmind-research/tree/master/byol


1 介紹

  BYOL,全稱叫Bootstrap Your Own Latent,它在迭代的過程中引導網絡的輸出作為目標,訓練過程中不需要negative pairs。它的特點就是:(1)不需要negative pairs;(2)對不同的batch size大小和數據增強方法適應性強。

  使用BYOL的效果:使用標准的 ResNet 達到 74.3% top-1 的准確率和使用large ResNet 達到 79.6% top-1的准確率。

      

  貢獻:

  1.  引入了一種自監督的表示學習方法BYOL,在不使用負對的情況下,在ImageNet上的線性評估協議下獲得最先進的結果。
  2.  在 半監督 和 transfer基准測試中,我們所學的表現優於最先進的水平。  
  3.  BYOL對批量和圖像增強集的變化更有彈性。當僅使用隨機裁剪作為圖像增強時,BYOL的性能下降比強對比基線SimCLR小得多。

  Q: linear evaluation protocol?

  Q: frozen representation


2 BYOL框架

  BYOL框架圖:

      

  如下圖 2 所示,BYOL 由兩個網絡組成,一個稱為online network,另一個稱為 target network 。online network由三部分構成:encoder  $f_{\theta}$, projector  $g_{\theta} $ 和 predictor  $q_{\theta}$;target network 和 online network 有相似的結構,唯一的不同就是它少了一個 predictor,它的 encoder 和 projector 分別用  $f_{\xi}$  和  $ g_{\xi }$  表示。

  兩個網絡訓練方式:

    • online network 的參數 $\theta$ 用一般的梯度下降更新;
    • target network 的參數 $\xi$ 不通過梯度下降來更新,而是由 $\theta$ 的指數移動平均($\xi \leftarrow \tau \xi+(1-\tau) \theta$)來更新。
    • 即 $\begin{array}{l} \theta \leftarrow \text { optimizer }\left(\theta, \nabla_{\theta} \mathcal{L}_{\theta, \xi}^{\mathrm{BYOL}}, \eta\right) \\ \xi \leftarrow \tau \xi+(1-\tau) \theta \end{array}$

  online network 在執行梯度下降更新時, 計算 loss:

    $\mathcal{L}_{\theta, \xi}^{B Y O L}=\mathcal{L}_{\theta, \xi}+\widetilde{\mathcal{L}}_{\theta, \xi} $

  其中 $ \mathcal{L}_{\theta, \xi}=2-2 \cdot \frac{\left\langle q_{\theta}\left(z_{\theta}\right), z_{\xi}^{\prime}\right\rangle}{\left\|q_{\theta}\left(z_{\theta}\right)\right\|_{2} \cdot\left\|z_{\xi}^{\prime}\right\|_{2}}$ 。 $\widetilde{\mathcal{L}}_{\theta, \xi}$ 是 $ \mathcal{L}_{\theta, \xi}$ 的對稱形式:$ \mathcal{L}$ 的輸入是 $ t$ 的 prediction 和 $ t^{\prime}$ 的 projection; $\widetilde{\mathcal{L}}$ 的輸入是 $ t^{\prime} $  的prediction 和 $ t$ 的 projection,相當於交叉預測對方的 projection 。

  為什么加入了一個 target network ?

  contrastive learning 會陷入 collapse(所有圖像的表征向量都一樣),這在負樣本不足的情況下很容易產生。

  BYOL

    • 借鑒了 Mean Teacher 中的指數移動平均策略;
    • 交叉預測 projection。target network可以看作是對 online network 學習的總結,歷史經驗往往能使模型更加穩定。交叉預測 projection 就是使 online netork 與歷史經驗保持一定的聯系,從而得到更平穩的訓練過程。

  算法流程:

      


3 啟發

      

  聯系GAN,兩個網絡學到的表示要盡可能相同,但總互相干擾(動量法)。


4 實驗

4.1 Linear evaluation on ImageNet

      

   對比之前的自監督方法,BYOL(采用 ResNet encoder (1 $\times$))效果更好,在 Top-1 上達74.3的准確率,在 Top-5 上達 91.6 的准確率。更換 encoder 框架后效果依然很好。

      

  顯然無監督方法 BYOL 的效果要比自監督的 BYOL 效果要差,但是比大部分其他監督方法要好。

4.2 Semi-supervised training on ImageNet

      

  在獲得表示后,使用訓練集上的 label 對BYOL's representation 進行微調。

  (a) 可以看到 BYOL 在 Top-1 和 Top-5上的效果比InstDisc、PIRL、SimCLR效果要好。

  (b) 可以看到采用不同的 Encoder Architecture 效果依然顯著。

      

  圖 4 采用不同的微調率(1% and 10%),使用 ResNet-50(1 $\times$ ) 在不同 ImageNet traininjg data 上的表現。

  從圖 4 可以看出有監督方法在 training data少的情況下表現是很糟糕的,使用全部 training data 的效果還是比較好的,但是無監督方法仍然可以通過微調達到一個可以媲美有監督方法的實驗結果。

4.3 Transfer to other classification tasks

      

       

4.4 Ablation Study

      

  這里采用不同的 Batch size 和SimCLR做消融實驗。

  從圖中可以看出SumCLR對Batch size 的變化更加敏感,因為它需要更多的負樣本。BYOL對樣本數不是很敏感,這是它的優勢。


5  總結

  • + BYOL learns it's representation by predicting previous versions of its outputs, without using negative pairs.
  • + BYOL bridges most of the remaining gapbetween self-supervised methods and the supervised learning baseline.
  • - Sensitive to batch size & opimizer choices

6 參考


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM