paper-with-me

Papers

VarCLR: Variable Semantic Representation Pre-training via Contrastive Learning

2021-12-05 · Qibin Chen, Jeremy Lacomis, Edward J. Schwartz, Graham Neubig, Bogdan Vasilescu, Claire Le Goues

Variable names are critical for conveying intended program behavior. Machine learning-based program analysis methods use variable name representations for a wide range of tasks, such as suggesting new variable names and bug detection. Ideally, such methods could capture semantic relationships between names beyond syntactic similarity, e.g., the fact that the names average and mean are similar. Unfortunately, previous work has found that even the best of previous representation approaches primarily capture relatedness (whether two variables are linked at all), rather than similarity (whether they actually have the same meaning). We propose VarCLR, a new approach for learning semantic representations of variable names that effectively captures variable similarity in this stricter sense. We observe that this problem is an excellent fit for contrastive learning, which aims to minimize the distance between explicitly similar inputs, while maximizing the distance between dissimilar inputs. This requires labeled training data, and thus we construct a novel, weakly-supervised variable renaming dataset mined from GitHub edits. We show that VarCLR enables the effective application of sophisticated, general-purpose language models like BERT, to variable name representation and thus also to related downstream tasks like variable name similarity search or spelling correction. VarCLR produces models that significantly outperform the state-of-the-art on IdBench, an existing benchmark that explicitly captures variable similarity (as distinct from relatedness). Finally, we contribute a release of all data, code, and pre-trained models, aiming to provide a drop-in replacement for variable representations used in either existing or future program analyses that rely on variable names.

📄 PDF Abstract BibTeX arXiv:2112.02650

Code (1)

squareslab/varclr 공식 구현 pytorch

Tasks

Contrastive LearningLearning Semantic RepresentationsSpelling Correction

Methods 이 논문이 사용한 방법론

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 &…
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…
WordPiece 설명 없음
Weight Decay 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Residual Connection 설명 없음

Similar Papers 제목 키워드 기반

CRADL: Contrastive Representations for Unsupervised Anomaly Detection and Localization

2023-01-05 · Carsten T. Lüth, David Zimmerer, Gregor Koehler, Paul F. Jaeger 외

Unsupervised anomaly detection in medical imaging aims to detect and localize arbitrary anomalies without requiring annotated anomalous data during training. Often, this is achieved by learning a data distribution of nor…

Anomaly DetectionContrastive LearningUnsupervised Anomaly Detection

SLAP: Scalable Language-Audio Pretraining with Variable-Duration Audio and Multi-Objective Training

2026-01-18 · Xinhao Mei, Gael Le Lan, Haohe Liu, Zhaoheng Ni 외 arxiv

Contrastive language-audio pretraining (CLAP) has achieved notable success in learning semantically rich audio representations and is widely adopted for various audio-related tasks. However, current CLAP models face seve…

Audio ClassificationText Retrieval

Soft-Labeled Contrastive Pre-training for Function-level Code Representation

2022-10-18 · Xiaonan Li, Daya Guo, Yeyun Gong, Yun Lin 외

Code contrastive pre-training has recently achieved significant progress on code-related tasks. In this paper, we present \textbf{SCodeR}, a \textbf{S}oft-labeled contrastive pre-training framework with two positive samp…

Cluster-based Contrastive Disentangling for Generalized Zero-Shot Learning

2022-03-05 · Yi Gao, Chenwei Tang, Jiancheng Lv

Generalized Zero-Shot Learning (GZSL) aims to recognize both seen and unseen classes by training only the seen classes, in which the instances of unseen classes tend to be biased towards the seen class. In this paper, we…

Contrastive LearningGeneralized Zero-Shot LearningZero-Shot Learning

Guiding Energy-based Models via Contrastive Latent Variables

2023-03-06 · Hankook Lee, Jongheon Jeong, Sejun Park, Jinwoo Shin

An energy-based model (EBM) is a popular generative framework that offers both explicit density and architectural flexibility, but training them is difficult since it is often unstable and time-consuming. In recent years…

Representation Learning