论文阅读 | Dual Contrastive Prediction for Incomplete Multi-view Representation Learning

文章介绍

在这里插入图片描述
彭玺团队的一篇发表于PAMI上的文章,附源码github-TPAMI-DCP

文章主要贡献

  • We provide a novel insight to the community that the cross-view consistency learning and data recovery are with intrinsic connections in the framework of information theory. Such a theoretical framework is remarkably different from existing MvRL studies which treat the consistency learning and data recovery as two separate problems. (把consistency 和 data recovery 联系到了一块)
  • Under our information theoretical framework, we propose DCP which achieves the information consistency and data recoverability through a dual contrastive loss and a dualprediction loss, respectively.(基于信息论框架,实现了infomation consistency 和data recovery)
  • To utilize available label information, DCP designs and utilizes the instance- and category-level contrastive loss to enhance the separability of representations. (该框架利用了实现了不同表示之间的区分程度(separability of representations) 利用实例间的对比和类别之间的对比)
  • We theoretically and experimentally prove that DCP could learn a sufficient and minimal representation for three tasks, i.e., clustering, classification, and human action recognition. (可以具体实现三个任务,聚类、分类、人类行为的辨别

文章框架

在这里插入图片描述
分三个主要模块:
1、Whin-view Reconstruction : 每个视图的数据分别投影到一个低维的子空间,从而学习每个视图的特定表示。
2、Dual Prediction : 作用是数据恢复作用。
3、Contrastive Learning : 分两个子模块,一个是Instance-Level Contrastive Learning(作用是通过最大化不同视图表示之间的互信息,该损失函数旨在增强跨视图的一致性),一个是Category-level Contrastive Learing(作用是使来自同一类别的样本在表示空间中更接近,而来自不同类别的样本更远)

损失函数

1、总损失函数
在这里插入图片描述

2、对比学习损失
contrastive loss
在这里插入图片描述
instance-contrastive-learning loss
在这里插入图片描述
category-contrastive-learning loss
在这里插入图片描述

3、对比预测损失
在这里插入图片描述

实验

Table 1 是聚类性能,Table 2 是分类性能
在这里插入图片描述

总结

### 基于类原型对比学习在多标签和细粒度教育视频分类中的应用 #### 类原型对比学习的核心概念 类原型对比学习是一种通过构建类别级别的代表性向量(即类原型),并利用这些原型之间的关系来进行特征学习的方法。这种方法能够有效捕捉类间差异以及类内一致性,从而提升模型的泛化能力[^1]。 具体而言,在多标签场景下,每个类别的原型可以通过该类别下的所有样本嵌入向量计算得到。通常采用均值池化的方式生成类原型 \( C_k \),其中 \( k \) 表示第 \( k \) 个类别: \[ C_k = \frac{1}{N_k} \sum_{i=1}^{N_k} f(x_i), \] 这里 \( N_k \) 是属于类别 \( k \) 的样本数量,\( f(x_i) \) 则是输入样本 \( x_i \) 经过编码器提取后的特征向量[^2]。 #### 对比损失函数的设计 为了实现更有效的特征表示学习,对比学习框架引入了一种特殊的损失函数——InfoNCE Loss (Information Noise Contrastive Estimation)。这种损失函数旨在最大化正样本对之间的相似性,同时最小化负样本对之间的相似性。对于给定查询样本 \( q \),其对应的正样本集合记作 \( P(q) \),而负样本集合则为 \( N(q) \),那么 InfoNCE Loss 可定义如下: \[ L_{contrastive}(q) = -\log \left( \frac{\exp(\text{sim}(q, p)/\tau)}{\sum_{n \in N(q)} \exp(\text{sim}(q,n)/\tau)+\sum_{p' \in P(q)} \exp(\text{sim}(q,p')/\tau)} \right). \] 这里的 \( \text{sim}() \) 函数通常是余弦相似度或者欧氏距离,参数 \( \tau \) 称为温度超参,控制分布的锐利程度。 #### 多标签与细粒度教育视频分类的应用挑战 当应用于多标签和细粒度教育视频分类时,主要面临以下几个方面的挑战: - **标签不平衡**:某些细粒度类别可能拥有远少于其他类别的标注数据,这会使得训练过程中难以形成可靠的类原型。 - **语义重叠**:不同类别之间可能存在较高的语义关联性,增加了区分难度。 - **时间依赖特性**:相比于静态图片,动态视频还包含了帧间的时间序列信息,这对建模提出了更高要求。 针对上述问题,可以考虑以下改进措施: 1. 引入自适应权重机制调整各类别的重要性; 2. 设计专门的模块捕获跨帧间的长期依赖关系,比如使用 LSTM 或 Transformer 结构; 3. 融合外部知识源辅助优化决策边界。 #### 实验验证与效果分析 实验表明,在多个公开基准数据集上,基于类原型对比学习的方法显著优于传统监督方法以及其他无监督预训练方案。特别是在低资源环境下,由于充分利用了有限样例内部的信息结构,性能优势更加明显。 ```python import torch.nn.functional as F def info_nce_loss(query_embeddings, positive_embeddings, negative_embeddings, temperature=0.5): """ Compute the contrastive loss using InfoNCE formulation. Args: query_embeddings (Tensor): Query embeddings of shape [batch_size, embedding_dim]. positive_embeddings (Tensor): Positive sample embeddings of same shape. negative_embeddings (Tensor): Negative samples with shape [num_negatives * batch_size, embedding_dim]. temperature (float): Temperature parameter controlling sharpness. Returns: Tensor: Scalar value representing computed loss. """ # Normalize all vectors to unit length queries_norm = F.normalize(query_embeddings, dim=-1) positives_norm = F.normalize(positive_embeddings, dim=-1) negatives_norm = F.normalize(negative_embeddings, dim=-1) logits_pos = torch.sum(queries_norm * positives_norm, dim=-1).unsqueeze(-1) / temperature logits_neg = torch.matmul(queries_norm.unsqueeze(1), negatives_norm.T.permute(0, 2, 1)) / temperature full_logits = torch.cat([logits_pos, logits_neg], dim=-1) labels = torch.zeros(full_logits.shape[:2]).to(logits_pos.device).long() return F.cross_entropy(full_logits.view(-1, full_logits.size(-1)), labels.view(-1)) ```
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值