Contrastive Learning in Image (CVPR 2023)

1. Open Vocabulary Semantic Segmentation with Patch Aligned Contrastive Learning (图文匹配)

1.目标

train an alignment between the patch tokens of the vision encoder and the CLS token of the text encoder,期望达到的效果是:一个模型可以识别与给定文本输入相对应的图像区域

2.任务类型

open vocabulary semantic segmentation问题,仅仅使用image-text data .

3.解决思路

**评测指标——**分类准确率:提供了一个衡量模型中视觉和文本表征之间的补丁级别的一致性,其中高分类精度表明高一致性,反之亦然。
**选择使用对比学习的依据——**在image中语义相似的regions应该相似度值更大。
semantically similar regions in an image should produce similar patch representations in the vision encoder

使用cosine similarity ** 计算patch representation的相似值,并使用二分类**函数盘算patches 之间是否有相同的taget table。

对比学习的损失函数一般是InfoNCE loss
在这里插入图片描述

image 是x, text 是y.
image 的表示是 有weight patch level的representation得到的。
权重选择上是计算篇patch embedding和text的CLS 的相似度值得到的。
在这里插入图片描述
在最上方的loss函数上,更新之后的φ函数值计算如下:
在这里插入图片描述

4. 总结

patch alignment,是从每个patch计算text的CLS之间的相似值,作为权重,得到的image representation。
然后,使用INfoLOSS 更新模型参数。

2. MaskCLIP: Masked Self-Distillation Advances Contrastive Language-Image Pretraining (图片蒸馏)

核心思想

The core idea of masked self-distillation is to distill representation from a full image to the representation predicted from a masked image

在这里插入图片描述
如上图所示,图d是文中模型,EI是mask的图片,EI—是蒸馏中的teacher model,EI(不带横岗)是student model,ET 是text。

contrastive learning部分,是masked 的图片表征,用来和image做匹配对齐。(contrastive learning )
知识蒸馏部分
,是用teacher model来教masked的student model。
所以,是两部分,共同实现了model蒸馏。

润物细无声
在**Vision language 对比学习中,**图片是由多个pixel考虑的,text是多个token考虑的。

在这里插入图片描述
σ stands for the temperature for the loss functions
在image的distill学习中, 是使用的蒸馏损失函数。
在这里插入图片描述
最终的损失函数为:

在这里插入图片描述

3.Twin Contrastive Learning with Noisy Labels(图分类)

1. 目标

a novel twin contrastive learning model to learn robust representations and handle noisy labels for
classification
解决思路是建模为label noise detection as an out-of-distribution (OOD) problem

2.模型

模型整体分为3个部分:

(i) 在第3.1节中通过GMM (球形高斯混合模型,spherical Gaussian mixture model) 对模型预测和表征的数据分布进行建模;(ii) 在第3.2节中检测具有错误标签的例子作为分布外的样本;(iii) 在第3.3节中通过引导真实目标进行交叉监督;以及(iv) 在第3.4节中通过对比学习和混合学习进行robust representations

在这里插入图片描述

Out-Of-Distribution Label Noise Detection

Our idea is that the samples with clean labels should have the same cluster indices after linking the cluster index and class label
(clean labels的samples应该更加聚集,out-of-distribution 的labels 的分布和clean labels的分布应该不一致)
在这里插入图片描述
** regularization loss :**
在这里插入图片描述

第一个项可以通过最大化平均预测的熵来避免预测坍缩为一个单一的类别。第二项是最小熵正则化,以鼓励模型对预测有较高的信心,这在以前的半监督学习文献中已有研究[9]。

learni robust representation with contrastive loss

在这里插入图片描述

align loss

在这里插入图片描述

train & inference

在这里插入图片描述

4. Align and Attend: Multimodal Summarization with Dual Contrastive Losses

1. 核心思想

two novel contrastive losses to model both inter-sample and intra-sample correlations;两种新的对比性损失来模拟样本间和样本内的关联性
在这里插入图片描述

  1. 首先,为了利用不同模态之间的对齐信息,我们提出了对齐引导的自我注意模块,以对齐视频和文本模态之间的时间对应关系,并以统一的方式融合跨模态信息

  2. 双重对比损失,结合样本间和样本内的对比损失,来模拟不同粒度的跨模式相关性

2.损失函数

分类损失函数在这里插入图片描述
Inter-Sample Contrastive Loss :we maximize the cosine similarity of the video embedding [CLSV] and
the text embedding [CLST] from B real pairs in the batch while minimizing the cosine similarity of embeddings from
the B2 − B incorrect pairs
在这里插入图片描述
在这里插入图片描述
Intra-Sample Contrastive Loss
these keyframes and key-sentences should be deeply correlated with each other and share similar high-level semantic meanings. Motivated by this observation, we propose the intra-sample contrastive loss which is calculated within each video and text pair sample rather than across different sample pairs

在这里插入图片描述
total loss
在这里插入图片描述

Revisiting Multimodal Representation in Contrastive Learning: From Patch and Token Embeddings to Finite Discrete Tokens

1核心思想

unifying the information granularities of images and texts can help generate better multimodal representations

对于一个图像,它的patch embedding首先由一个图像编码器提取。然后,通过对所有patches中的FDT(Finite Discrete Tokens)的注意力权重进行最大集合来测量FDT和图像之间的对应关系。最后,基于FDT的图像表示被计算为FDT的注意力加权和。输入文本的基于FDT的嵌入可以用同样的方法构建。**The encoders and FDT are trained to pull close the FDT-based representations of matched image-text pairs while pushing away those of unmatched pairs by using **编码器和FDT被训练为拉近匹配的图像-文本对的基于FDT的表示,同时通过使用InfoNCE损失推开那些不匹配的对。

在这里插入图片描述

2 损失函数

在这里插入图片描述

MaskCon: Masked Contrastive Learning for Coarse-Labelled Dataset

Dynamic Conceptional Contrastive Learning for Generalized Category Discovery

主要的挑战是,未标记的数据所包含的实例不仅来自标记数据的已知类别,也来自新的类别。这导致传统的新类别发现(NCD)方法不能用于GCD,因为它们假设未标记的数据只来自新类别。GCD的一个有效方法是应用自我监督学习来学习无标签数据的区分性表示。然而,这种方式在很大程度上忽略了同一概念的实例之间的潜在关系(例如,类、超类和子类),这导致了较差的表示学习。在本文中,我们提出了一个动态概念对比学习(DCCL)框架,它可以通过交替估计潜在的视觉概念和学习概念表征来有效提高聚类的准确性。 此外,我们还设计了一个动态的概念生成和更新机制,它能够保证概念学习的一致性,从而进一步促进DCCL的优化。

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
对比学习是一种自监督的、与任务无关的深度学习技术,它允许模型学习数据,即使没有标签。该方法通过学习哪些类型的图像相似,哪些不同,来学习数据集的一般特征。对比学习的目标是使相似的图像具有相似的表示,从而允许模型学习如何区分图像。这种方法在标签稀缺的情况下尤为有用,因为预训练模型可以通过对数据有一般理解来提高标签效率,并在特定任务上进行微调,例如图像分类。对比学习方法的一个例子是SimCLRv2,它学习如何表示图像,使得相似的图像具有相似的表示。通过对比学习,模型可以更好地理解数据集的特征,并在特定任务上取得更好的性能。\[1\] \[2\] 生成式方法和对比式学习是两种不同的方法。生成式方法主要关注像素级别的重构,通过自编码器等模型将数据样本编码成特征再解码重构,通过衡量重构的效果来评估模型学习到的特征表达的好坏。而对比式学习则着重于学习同类实例之间的共同特征,区分非同类实例之间的不同之处。对比式学习不需要关注实例上的细节,只需要在抽象语义级别的特征空间上学会对数据进行区分,因此模型的优化变得更加简单,且具有更强的泛化能力。\[3\] #### 引用[.reference_title] - *1* *2* [对比学习(contrastive learning)](https://blog.csdn.net/cziun/article/details/119118768)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [对比学习介绍Contrastive Learning](https://blog.csdn.net/weijie_home/article/details/119600296)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

YingJingh

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值