论文解读(CDCL)《Cross-domain Contrastive Learning for Unsupervised Domain Adaptation》
论文信息
论文标题:Cross-domain Contrastive Learning for Unsupervised Domain Adaptation
论文作者:Rui Wang, Zuxuan Wu, Zejia Weng, Jingjing Chen, Guo-Jun Qi, Yu-Gang Jiang
论文来源:aRxiv 2022
论文地址:download
论文代码:download
1 Introduction
无监督域自适应(UDA)的目的是将从一个完全标记的源域学习到的知识转移到一个不同的未标记的目标域。 大多数现有的 UDA 方法通过最小化域间的特征距离来学习域不变的特征表示。
UDA 研究方向:
- discrepancy-based methods:最小化不同域之间的差异;
- adversarial-based methods:为域鉴别器设计一个对抗性优化目标,并通过对抗性学习获得域不变表示;
- domain-adaptive dictionary learning;
- multi-modality representation learning;
- feature disentanglement;
我们的目标是通过对比自监督学习来调整源域和目标域之间的特征分布。
2 方法
NT-Xent loss
B. Cross-domain Contrastive Learning
考虑目标域样本$\boldsymbol{x}_{t}^{i}$ 的 $\ell_{2}\text{-normalized}$ 特征 $\boldsymbol{z}_{t}^{i}$ 作为锚,它的正样本为同一类的源域样本,其特征表示为 $\boldsymbol{z}_{s}^{p}$,那么跨域对比损失:
$\mathcal{L}_{C D C}^{t, i}=-\frac{1}{\left|P_{s}\left(\hat{y}_{t}^{i}\right)\right|} \sum\limits _{p \in P_{s}\left(\hat{y}_{t}^{i}\right)} \log \frac{\exp \left(\boldsymbol{z}_{t}^{i^{\top}} \boldsymbol{z}_{s}^{p} / \tau\right)}{\sum\limits_{j \in I_{s}} \exp \left(\boldsymbol{z}_{t}^{i^{\top}} \boldsymbol{z}_{s}^{j} / \tau\right)} \quad\quad\quad(2)$
其中,$I_{S}$ 代表一个 mini-batch 中的源域样本集合,$P_{s}\left(\hat{y}_{t}^{i}\right)=\left\{k \mid y_{s}^{k}=\hat{y}_{t}^{i}\right\}$ 代表源域和目标域样本 $x_{t}^{i}$ 有相同标签;
$\mathcal{L}_{C D C}=\sum\limits _{i=1}^{N_{s}} \mathcal{L}_{C D C}^{s, i}+\sum\limits_{i=1}^{N_{t}} \mathcal{L}_{C D C}^{t, i} \quad\quad\quad(3)$
$\underset{\boldsymbol{\theta}}{\operatorname{minimize}} \quad \mathcal{L}_{C E}\left(\boldsymbol{\theta} ; D_{s}\right)+\lambda \mathcal{L}_{C D C}\left(\boldsymbol{\theta} ; D_{s}, D_{t}\right) \quad\quad\quad(4)$
C. Pseudo Labels for the Target Domain
在训练过程中,没有来自目标域的真实标签,因此利用 k-means 聚类产生伪标签。由于 K-means 对初始化很敏感,因此使用随机生成的集群不能保证与预定义类别相关的相关语义。为缓解这个问题,将簇的数量设置为类 $M$ 的数量,并使用来自源域的类原型作为初始簇。
$O_{t}^{m} \leftarrow O_{s}^{m}=\mathbb{E}_{i \sim D_{s}\;, \; y_{s}^{i}=m} z_{s}^{i} \quad\quad\quad(5)$
D. Source Data-free UDA
Note:预训练模型 $f_{s}$ 是上文提到的通过交叉熵优化得到的。
许多标准的 UDA 设置,假设在源域和目标域上共享相同的特征编码器,然而由于特征编码器不能同时在源域和目标域上训练,所以 Source Data-free UDA 无法实现。本文的 CDCL 在缺少源域数据的情况下面临的挑战是 :(1) form positive and negative pairs and (2) to compute source class prototypes。
本文通过用训练模型 $_$ 的分类器权值替换源样本来解决这个问题。直觉是,预先训练模型的分类器层的权向量可以看作是在源域上学习到的每个类的原型特征。特别地,我们首先消除了全连通层的 bias ,并对分类器进行了归一化处理。假设 $\boldsymbol{w}_{s}^{m}\in \boldsymbol{W}_{s}=\left[\boldsymbol{w}_{s}^{1}, \ldots, \boldsymbol{w}_{s}^{M}\right]$ 代表从源域学到的 $M$ 分类器的权重向量,由于权值是规范化的,所以我们将它们用作类原型。当适应目标域时,冻结分类器层的参数,以保持源原型,并且只训练特征编码器。通过用源原型替换源样本,在源数据自由设置下的跨域对比损失可以写为:
$\mathcal{L}_{S D F-C D C}^{t, i}=-\sum\limits_{m=1}^{M} \mathbf{1}_{\hat{y}_{t}^{i}=m} \log \frac{\exp \left(\boldsymbol{z}_{t}^{i^{\top}} \boldsymbol{w}_{s}^{m} / \tau\right)}{\sum\limits _{j=1}^{M} \exp \left(\boldsymbol{z}_{t}^{i^{\top}} \boldsymbol{w}_{S}^{j} / \tau\right)} \quad\quad\quad(6)$
source data-free UDA 的最终目标是:
$\operatorname{minimize} \sum\limits _{i=1}^{N_{t}} \mathcal{L}_{S D F-C D C}^{t, i} \quad\quad\quad(8)$

论文解读(CDCL)《Cross-domain Contrastive Learning for Unsupervised Domain Adaptation》的更多相关文章
- 论文解读(PCL)《Prototypical Contrastive Learning of Unsupervised Representations》
论文标题:Prototypical Contrastive Learning of Unsupervised Representations 论文方向:图像领域,提出原型对比学习,效果远超MoCo和S ...
- 论文解读(LG2AR)《Learning Graph Augmentations to Learn Graph Representations》
论文信息 论文标题:Learning Graph Augmentations to Learn Graph Representations论文作者:Kaveh Hassani, Amir Hosein ...
- 论文解读(MVGRL)Contrastive Multi-View Representation Learning on Graphs
Paper Information 论文标题:Contrastive Multi-View Representation Learning on Graphs论文作者:Kaveh Hassani .A ...
- 论文解读(ARVGA)《Learning Graph Embedding with Adversarial Training Methods》
论文信息 论文标题:Learning Graph Embedding with Adversarial Training Methods论文作者:Shirui Pan, Ruiqi Hu, Sai-f ...
- 论文解读(gCooL)《Graph Communal Contrastive Learning》
论文信息 论文标题:Graph Communal Contrastive Learning论文作者:Bolian Li, Baoyu Jing, Hanghang Tong论文来源:2022, WWW ...
- 论文解读(SimGRACE)《SimGRACE: A Simple Framework for Graph Contrastive Learning without Data Augmentation》
论文信息 论文标题:SimGRACE: A Simple Framework for Graph Contrastive Learning without Data Augmentation论文作者: ...
- 论文解读(SimCLR)《A Simple Framework for Contrastive Learning of Visual Representations》
1 题目 <A Simple Framework for Contrastive Learning of Visual Representations> 作者: Ting Chen, Si ...
- 论文解读(GRACE)《Deep Graph Contrastive Representation Learning》
Paper Information 论文标题:Deep Graph Contrastive Representation Learning论文作者:Yanqiao Zhu, Yichen Xu, Fe ...
- 论文解读(S^3-CL)《Structural and Semantic Contrastive Learning for Self-supervised Node Representation Learning》
论文信息 论文标题:Structural and Semantic Contrastive Learning for Self-supervised Node Representation Learn ...
- 论文解读(MLGCL)《Multi-Level Graph Contrastive Learning》
论文信息 论文标题:Structural and Semantic Contrastive Learning for Self-supervised Node Representation Learn ...
随机推荐
- Memlab,一款分析 JavaScript 堆并查找浏览器和 Node.js 中内存泄漏的开源框架
Memlab 是一款 E2E 测试和分析框架,用于发现 JavaScript 内存泄漏和优化机会. Memlab 是 JavaScript 的内存测试框架.它支持定义一个测试场景(使用 Puppete ...
- fastapi教程进阶
一个简单的栗子 from fastapi import FastAPI app = FastAPI() @app.get("/") async def root(): return ...
- 阿里云下配置keepalive,利用HAVIP实现HA
注:这篇文章参考网络,有些称呼都变了,比如阿里云上的现在是弹性ip 包括阿里云在内的很多云环境,因为不支持浮动IP广受诟病.目前阿里云在VPC网络下发布了HAVIP,能够实现arp宣告IP.这样也就让 ...
- k8s更换网络插件:从flannel更换成calico
卸载flannel 查看已安装的flannel的信息 # 查看CNI插件,可以得知使用的是flannel # cat /etc/cni/net.d/10-flannel.conflist { &quo ...
- 几篇关于MySQL数据同步到Elasticsearch的文章---第五篇:logstash-input-jdbc实现mysql 与elasticsearch实时同步深入详解
文章转载自: https://blog.csdn.net/laoyang360/article/details/51747266 引言: elasticsearch 的出现使得我们的存储.检索数据更快 ...
- 《HelloGitHub》第 78 期
兴趣是最好的老师,HelloGitHub 让你对编程感兴趣! 简介 HelloGitHub 分享 GitHub 上有趣.入门级的开源项目. https://github.com/521xueweiha ...
- 对vue中的data进行数据初始化
this.$data:是表示当前的改变后的this中的数据 this.$options.data():是表示没有赋值前的this中的数据,表示 初始化的data 一般可以使用Object.assign ...
- [s905l3]性价比神机mgv3000全网首拆,刷armbian实现更多价值!
最近花55淘了一台mgv3000,s905l3,2+16G带蓝牙,真的性价比没得说 S905L3 工艺28nm差于s905l3a 主频1.9Ghz,超频可以达到2Ghz,GPU是Mail450,当服务 ...
- ubuntu安装及使用
ubuntu教程 一. Ubuntu简介 Ubuntu(乌班图)是一个基于Debian的以桌面应用为主的Linux操作系统,据说其名称来自非洲南部祖鲁语或科萨语的"ubuntu"一 ...
- 嵌入式-C语言基础:字符串strlen和sizeof的区别
strlen表示的实际的字符串长度,不会把字符串结束符'\0'计算进去,而sizeof则不是实际的字符串长度,它会把字符串的结束标识符'\0'也包含进去. #include<stdio.h> ...