遷移學習(CLDA)《CLDA: Contrastive Learning for Semi-Supervised Domain Adaptation》

VX賬號X466550發表於2023-04-17

論文資訊

論文標題:CLDA: Contrastive Learning for Semi-Supervised Domain Adaptation
論文作者:Ankit Singh
論文來源:NeurIPS 2021
論文地址:download 
論文程式碼:download
視屏講解:click

1 簡介

  提出問題:半監督導致來自標記源和目標樣本的監督只能確保部分跨域特徵對齊,導致目標域的對齊和未對齊子分佈形成域內差異;

  解決辦法:

    • 提出基於質心的對比學習框架;  
    • 提出基於類級的例項對比學習框架;  

  評價:牛馬.................

2 方法

2.1 整體框架

  

2.2 源域監督訓練

  源域監督損失:

    $\mathcal{L}_{\text {sup }}=-\sum_{k=1}^{K}\left(y^{i}\right)_{k} \log \left(\mathcal { F } \left(\mathcal{G}\left(\left(x_{l}^{i}\right)\right)_{k}\right.\right.$

2.3 域間對比對齊

  基於 $\text{mini-batch}$ 的源域質心(類級):

    $C_{k}^{s}=\frac{\sum_{i=1}^{i=B} \mathbb{1}_{\left\{y_{i}^{s}=k\right\}} \mathcal{F}\left(\mathcal{G}\left(x_{i}^{s}\right)\right)}{\sum_{i=1}^{i=B} \mathbb{1}_{\left\{y_{i}^{s}=k\right\}}}$

  動量更新源域質心:

    $C_{k}^{s}=\rho\left(C_{k}^{s}\right)_{s t e p}+(1-\rho)\left(C_{k}^{s}\right)_{s t e p-1}$

  無標籤目標域樣本的偽標籤:

    $\hat{y_{i}^{t}}=\operatorname{argmax}\left(\left(\mathcal{F}\left(\mathcal{G}\left(x_{i}^{t}\right)\right)\right)\right.$

  域間對比對齊(類級):

    $\mathcal{L}_{c l u}\left(C_{i}^{t}, C_{i}^{s}\right)=-\log \frac{h\left(C_{i}^{t}, C_{i}^{s}\right)}{h\left(C_{i}^{t}, C_{i}^{s}\right)+\sum_{\substack{r=1 \\ q \in\{s, t\}}}^{K} \mathbb{1}_{\{r \neq i\}} h\left(C_{i}^{t}, C_{r}^{q}\right)}$

  其中:

    $h(\mathbf{u}, \mathbf{v})=\exp \left(\frac{\mathbf{u}^{\top} \mathbf{v}}{\|\mathbf{u}\|_{2}\|\mathbf{v}\|_{2}} / \tau\right)$

2.4 例項對比對齊

  強資料增強:

    $\tilde{x}_{i}^{t}=\psi\left(x_{i}^{t}\right)$

  例項對比損失:

    $\mathcal{L}_{i n s}\left(\tilde{x}_{i}^{t}, x_{i}^{t}\right)=-\log \frac{h\left(\mathcal{F}\left(\mathcal{G}\left(\tilde{x}_{i}^{t}\right), \mathcal{F}\left(\mathcal{G}\left(x_{i}^{t}\right)\right)\right)\right.}{\sum_{r=1}^{B} h\left(\mathcal{F}\left(\mathcal{G}\left(\tilde{x}_{i}^{t}\right)\right), \mathcal{F}\left(\mathcal{G}\left(x_{r}^{t}\right)\right)\right)+\sum_{r=1}^{B} \mathbb{1}_{\{r \neq i\}} h\left(\mathcal{F}\left(\mathcal{G}\left(\tilde{x}_{i}^{t}\right)\right), \mathcal{F}\left(\mathcal{G}\left(\tilde{x}_{r}^{t}\right)\right)\right)}$

2.5 訓練目標

    $\mathcal{L}_{\text {tot }}=\mathcal{L}_{\text {sup }}+\alpha * \mathcal{L}_{\text {clu }}+\beta * \mathcal{L}_{\text {ins }}$

3 總結

  略

相關文章