paper-with-me

홈 › Papers

Contrastive Code Representation Learning

2020-07-09 · EMNLP 2021 11 · Paras Jain, Ajay Jain, Tianjun Zhang, Pieter Abbeel, Joseph E. Gonzalez, Ion Stoica

Recent work learns contextual representations of source code by reconstructing tokens from their context. For downstream semantic understanding tasks like summarizing code in English, these representations should ideally capture program functionality. However, we show that the popular reconstruction-based BERT model is sensitive to source code edits, even when the edits preserve semantics. We propose ContraCode: a contrastive pre-training task that learns code functionality, not form. ContraCode pre-trains a neural network to identify functionally similar variants of a program among many non-equivalent distractors. We scalably generate these variants using an automated source-to-source compiler as a form of data augmentation. Contrastive pre-training improves JavaScript summarization and TypeScript type inference accuracy by 2% to 13%. We also propose a new zero-shot JavaScript code clone detection dataset, showing that ContraCode is both more robust and semantically meaningful. On it, we outperform RoBERTa by 39% AUROC in an adversarial setting and up to 5% on natural code.

📄 PDF Abstract BibTeX arXiv:2007.04973

Code (1)

parasj/contracode 공식 구현 pytorch

Tasks

Clone DetectionContrastive LearningData AugmentationMethod name predictionRepresentation LearningSource Code SummarizationType prediction

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Adam 설명 없음
Linear Warmup With Linear Decay Linear Warmup With Linear Decay is a learning rate schedule in which we increase the learning rate linearly for $n$ updates and then linearly decay afterwards.
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Multi-Head Attention 설명 없음
Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Residual Connection 설명 없음

Similar Papers 제목 키워드 기반

Multi-Level Contrastive Learning for Few-Shot Problems

2021-07-15 · Qing Chen, Jian Zhang

Contrastive learning is a discriminative approach that aims at grouping similar samples closer and diverse samples far from each other. It it an efficient technique to train an encoder generating distinguishable and info…

Contrastive LearningFew-Shot Learning

Representation Disentanglement in Generative Models with Contrastive Learning

2021-09-29 · Shentong Mo, Zhun Sun, Shumin Han

Contrastive learning has shown its effectiveness in image classification and generation. Recent works apply the contrastive learning on the discriminator of the Generative Adversarial Networks, and there exists little wo…

Contrastive LearningDisentanglementimage-classificationImage Classification

Masked Contrastive Representation Learning

2022-11-11 · Yuchong Yao, Nandakishor Desai, Marimuthu Palaniswami

Masked image modelling (e.g., Masked AutoEncoder) and contrastive learning (e.g., Momentum Contrast) have shown impressive performance on unsupervised visual representation learning. This work presents Masked Contrastive…

Contrastive LearningData AugmentationDecoderRepresentation Learning

Generative-Contrastive Learning for Self-Supervised Latent Representations of 3D Shapes from Multi-Modal Euclidean Input

2023-01-11 · Chengzhi Wu, Julius Pfrommer, Mingyuan Zhou, Jürgen Beyerer

We propose a combined generative and contrastive neural architecture for learning latent representations of 3D volumetric shapes. The architecture uses two encoder branches for voxel grids and multi-view images from the …

Contrastive LearningDecoder

Towards Fine-grained Visual Representations by Combining Contrastive Learning with Image Reconstruction and Attention-weighted Pooling

2021-04-09 · Jonas Dippel, Steffen Vogler, Johannes Höhne

This paper presents Contrastive Reconstruction, ConRec - a self-supervised learning algorithm that obtains image representations by jointly optimizing a contrastive and a self-reconstruction loss. We showcase that state-…

Contrastive LearningDecoderImage ReconstructionSelf-Supervised Learning