【論文閱讀】Domain Adaptation & Domain Generalization (持續(xù)更新中)

Domain Generalization是Domain Adaptation的一種特殊問題,在DA的基礎(chǔ)上,DG的目的為對于任意不可見的目標(biāo)域都有很強(qiáng)的魯棒性。

Domain Adaptation

Moment Matching for Multi-Source Domain Adaptation


多個(gè)源域,一個(gè)目標(biāo)域。
code and data

方法分為三部分:

  • Feature Extractor共享權(quán)重,將不同源域的數(shù)據(jù)映射到同一個(gè)特征空間
  • Moment Matching Component試圖將不同源域的特征分布拉到一起
  • Classifier融合多個(gè)源域的分類器加權(quán)輸出

各源域 \mathcal{D}_{S} 及目標(biāo)域 \mathcal{D}_{T} 之間的Momment距離定義為源域與目標(biāo)域的距離及各源域之間的距離。公式如下:

\begin{aligned} M D^{2}(\mathcal{D}_{S}, \mathcal{D}_{T})=\sum_{k=1}^{2}\left(\frac{1}{N} \sum_{i=1}^{N}||\mathbb{E}(\mathbf{X}_{i}^{k})-\mathbb{E}(\mathbf{X}_{T}^{k})||_2 +(\begin{array}{c}{N}\\{2}\end{array})^{-1}\sum_{i=1}^{N-1} \sum_{j=i+1}^{N}\left\|\mathbb{E}(\mathbf{X}_{i}^{k})-\mathbb{E}(\mathbf{X}_{j}^{k})\right\|_2\right) \end{aligned}

目標(biāo)函數(shù)表示為 N 個(gè)源域的分類損失加上前述 M D^{2}(\mathcal{D}_{S}, \mathcal{D}_{T})
\min _{G, \mathcal{C}} \sum_{i=1}^{N} \mathcal{L}_{\mathcal{D}_{i}}+\lambda \min _{G} M D^{2}\left(\mathcal{D}_{S}, \mathcal{D}_{T}\right)


S-T的對齊比較有效。

Semi-Supervised Learning by Augmented Distribution Alignment


這是一篇ICCV2019的論文。
實(shí)際中,標(biāo)注數(shù)據(jù)和非標(biāo)注數(shù)據(jù)往往存在數(shù)量級的差距,標(biāo)注數(shù)據(jù)的分布和非標(biāo)注數(shù)據(jù)差距(可認(rèn)為是真實(shí)分布)也很大。本文通過對抗學(xué)習(xí)拉齊標(biāo)注數(shù)據(jù)和非標(biāo)注數(shù)據(jù)的分布,此外參考mixup方法利用非標(biāo)注數(shù)據(jù)嘗試解決標(biāo)注數(shù)據(jù)較少的問題。

如下,是本文的loss公式,公式分為兩部分, 第一部分表示分類任務(wù),第二部分表示對抗學(xué)習(xí)。
\min _{f, g, h} \sum_{\tilde{\mathbf{x}}} \ell(f(g(\tilde{\mathbf{x}})), \tilde{y})+\gamma \ell(h(g(\tilde{\mathbf{x}})), \tilde{z})

具體地,對抗損失如下, h 為樣本屬于標(biāo)注樣本 \mathcal{D}_l 還是非標(biāo)注樣本 \mathcal{D}_u 的分類函數(shù)。通過對抗學(xué)習(xí),可以將標(biāo)注樣本和非標(biāo)注樣本的特征 g 拉到同一空間。
\min _{g} d_{\mathcal{H}}\left(\mathcal{D}_{l}, \mathcal{D}_{u}\right)=\max _{g} \min _{h \in \mathcal{H}}\left[\operatorname{err}\left(h, g, \mathcal{D}_{l}\right)+\operatorname{err}\left(h, g, \mathcal{D}_{u}\right)\right]

此外,為了解決標(biāo)注樣本數(shù)量較少的問題,本文采用mixup方法利用非標(biāo)注樣本,公式如下,非標(biāo)注樣本的類別標(biāo)簽 \hat{y}^u 由分類器生成。鑒別器的標(biāo)簽 \tilde{z} 也進(jìn)行mixup。
\begin{aligned} \tilde{\mathbf{x}} &=\lambda \mathbf{x}^{l}+(1-\lambda) \mathbf{x}^{u} \\ \tilde{y} &=\lambda y^{l}+(1-\lambda) \hat{y}^{u} \\ \tilde{z} &=\lambda \cdot 0+(1-\lambda) \cdot 1 \end{aligned}

下圖是在SVHN數(shù)據(jù)集上的表現(xiàn)及跟STOA方法的對比。



Domain Generalization

Episodic Training for Domain Generalization

  • Vanilla Aggregation Method: 直接將各源域 \mathcal{D}_i \sim \mathcal{D} 的數(shù)據(jù)送入特征提取器 \theta 和分類器 \psi 中進(jìn)行訓(xùn)練。
    \underset{\theta, \psi}{\operatorname{argmin}} \mathbb{E}_{\mathcal{D}_{i} \sim \mathcal{D}}\left[\mathbb{E}_{\left(\mathbf{x}_{i}, y_{i}\right) \sim \mathcal{D}_{i}}\left[\ell\left(y_{i}, \psi\left(\theta\left(\mathbf{x}_{i}\right)\right)\right]\right]\right.

  • Domain Specific Models: 每個(gè)domain的數(shù)據(jù)獨(dú)立訓(xùn)練。
    \underset{\left[\theta_{1}, \ldots, \theta_{n}\right],\left[\psi_{1}, \ldots, \psi_{n}\right]}{\operatorname{argmin}} \mathbb{E}_{\mathcal{D}_{i} \sim \mathcal{D}}\left[\mathbb{E}_{\left(\mathbf{x}_{i}, y_{i}\right) \sim \mathcal{D}_{i}}\left[\ell\left(y_{i}, \psi_{i}\left(\theta_{i}\left(\mathbf{x}_{i}\right)\right)\right]\right]\right.

  • Episodic Training of Feature Extractor: 不同domain使用相同的特征提取器,但用不同的分類器。強(qiáng)化特征提取器的訓(xùn)練。
    \underset{\theta}{\operatorname{argmin}} \mathbb{E}_{i, j \sim[1, n], i \neq j}\left[\mathbb{E}_{\left(\mathbf{x}_{i}, y_{i}\right) \sim \mathcal{D}_{i}}\left[\ell\left(y_{i}, \overline{\psi}_{j}\left(\theta\left(\mathbf{x}_{i}\right)\right)\right]\right]\right.

  • Episodic Training of Classifier: 上同,不同的特征提取器,相同的分類器。強(qiáng)化分類器。
    \underset{\psi}{\operatorname{argmin}} \mathbb{E}_{i, j \sim[1, n], i \neq j}\left[\mathbb{E}_{\left(\mathbf{x}_{i}, y_{i}\right) \sim \mathcal{D}_{i}}\left[\ell\left(y_{i}, \psi\left(\overline{\theta}_{j}\left(\mathbf{x}_{i}\right)\right)\right]\right]\right.

  • Episodic Training by Random Classifier: 更加極端的特征提取器的強(qiáng)化,完全使用一個(gè)隨機(jī)初始化且不更新參數(shù)的分類器訓(xùn)練。

\underset{\theta}{\operatorname{argmin}} \mathbb{E}_{\mathcal{D}_{i} \sim \mathcal{D}}\left[\mathbb{E}_{\left(\mathbf{x}_{i}, y_{i}\right) \sim \mathcal{D}_{i}}\left[\ell\left(y_{i}, \overline{\psi}_{r}\left(\theta\left(\mathbf{x}_{i}\right)\right)\right]\right]\right.

整體流程如下:


Episodic的效果



領(lǐng)域大佬們

李文 http://www.vision.ee.ethz.ch/~liwenw/

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容