CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Training
Wuhan University(武汉大学);Huawei Noah’s Ark Lab(华为诺亚方舟实验室);Huazhong University of Science and Technology(华中科技大学);Monash University(莫纳什大学);Yunnan University(云南大学)
Xin Wang, Yasheng Wang, Yao Wan, Jiawei Wang, Pingyi Zhou, Li Li, Hao Wu, Jin Liu
Recent years have witnessed increasing interest in code representation learning, which aims to represent the semantics of source code into distributed vectors. Currently, various works have been proposed to represent the complex semantics of source code from different views, including plain text, Abstract Syntax Tree (AST), and several kinds of code graphs (e.g., Control/Data Flow Graph). However, most of them only consider a single view of source code independently, ignoring the correspondences among different views. In this paper, we propose to integrate different views with the natural-language description of source code into a unified framework with Multi-View contrastive Pre-training, and name our model as CODE-MVP. Specifically, we first extract multiple code views using compiler tools, and learn the complementary information among them under a contrastive learning framework. Inspired by the type checking in compilation, we also design a fine-grained type inference objective in the pre-training. Experiments on three downstream tasks over five datasets demonstrate the superiority of CODE-MVP when compared with several state-of-the-art baselines. For example, we achieve 2.4/2.3/1.1 gain in terms of MRR/MAP/Accuracy metrics on natural language code retrieval, code similarity, and code defect detection tasks, respectively.
Improving the Modality Representation with Multi-View Contrastive Learning for Multimodal Sentiment Analysis
University of Chinese Academy of Sciences(中国科学院大学);Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);Henan University(河南大学)
Towards Fine-grained Visual Representations by Combining Contrastive Learning with Image Reconstruction and Attention-weighted Pooling
Bayer AG(拜耳股份公司)
本文介绍了对比重建,ConRec -一种自监督学习算法,通过联合优化对比和自重建损失来获得图像表示。我们展示了最先进的对比学习方法(例如Simplified)在其表示中捕获细粒度视觉特征方面存在缺陷。ConRec通过添加(1)自我重建任务和(2)对比学习任务中的注意力机制扩展了Simplified框架。这是通过应用具有两个头的简单编码器-解码器架构来实现的。我们表明,这两个扩展有助于改善图像的矢量表示与细粒度的视觉特征。结合这些概念,ConRec在细粒度分类数据集上的性能优于Simplified和Simplified with Attention-Pooling。
HCL: Improving Graph Representation with Hierarchical Contrastive Learning
Ping An Healthcare Technology(平安医疗科技);Xidian University(西安电子科技大学);Ping An Health Cloud Company Limited(平安健康云有限公司);Ping An International Smart City Technology Company Limited(平安国际智慧城市科技股份有限公司)
Partitioning Image Representation in Contrastive Learning
Handong Global University(韩东全球大学)
在图像域中的对比学习中,锚样本和正样本被强制具有尽可能接近的表示。然而,强制两个样本具有相同的表示可能会产生误导,因为数据增强技术使两个样本不同。在本文中,我们介绍了一种新的表示,分区表示,它可以学习共同的和独特的特征的锚和积极的样本在对比学习。分区表示由两部分组成:内容部分和样式部分。内容部分表示类的共同特征,样式部分表示每个样本自身的特征,这可以导致数据增强方法的表示。我们可以简单地通过将对比学习的损失函数分解为分别关于两个单独表示的两个项来实现分区表示。为了评估我们的表示与两个部分,我们采取了两个框架模型:变分自编码器(VAE)和BootstrapYour Own Latent(BYOL),以显示内容和风格的可分性,并确认分类的泛化能力,分别。实验结果表明,该方法能够在VAE框架下分离两类信息,在线性可分性和下游少样本学习任务方面优于传统的BYOL方法.