paper-with-me

홈 › Papers

InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees

2020-12-13 · Nghi D. Q. Bui, Yijun Yu, Lingxiao Jiang

Building deep learning models on source code has found many successful software engineering applications, such as code search, code comment generation, bug detection, code migration, and so on. Current learning techniques, however, have a major drawback that these models are mostly trained on datasets labeled for particular downstream tasks, and code representations may not be suitable for other tasks. While some techniques produce representations from unlabeled code, they are far from satisfactory when applied to downstream tasks. Although certain techniques generate representations from unlabeled code when applied to downstream tasks they are far from satisfactory. This paper proposes InferCode to overcome the limitation by adapting the self-supervised learning mechanism to build source code model. The key novelty lies in training code representations by predicting automatically identified subtrees from the context of the ASTs. Subtrees in ASTs are treated with InferCode as the labels for training code representations without any human labeling effort or the overhead of expensive graph construction, and the trained representations are no longer tied to any specific downstream tasks or code units. We trained an InferCode model instance using the Tree-based CNN as the encoder of a large set of Java code and applied it to downstream unsupervised tasks such as code clustering, code clone detection, cross-language code search or reused under a transfer learning scheme to continue training the model weights for supervised tasks such as code classification and method name prediction. Compared to previous code learning techniques applied to the same downstream tasks, such as Code2Vec, Code2Seq, ASTNN, higher performance results are achieved using our pre-trained InferCode model with a significant margin for most tasks including those involving different programming languages.

📄 PDF Abstract BibTeX arXiv:2012.07023

Code (0)

등록된 구현이 없습니다.

Tasks

Clone DetectionCode ClassificationCode Comment GenerationCode SearchComment Generationgraph constructionMethod name predictionSelf-Supervised LearningTransfer Learning

Similar Papers 제목 키워드 기반

Learning Speech Representations from Raw Audio by Joint Audiovisual Self-Supervision

2020-07-08 · Abhinav Shukla, Stavros Petridis, Maja Pantic

The intuitive interaction between the audio and visual modalities is valuable for cross-modal self-supervised learning. This concept has been demonstrated for generic audiovisual tasks like video action recognition and a…

Acoustic Scene ClassificationAction RecognitionScene ClassificationSelf-Supervised Learning+1

Explaining, Analyzing, and Probing Representations of Self-Supervised Learning Models for Sensor-based Human Activity Recognition

2023-04-14 · Bulat Khaertdinov, Stylianos Asteriadis

In recent years, self-supervised learning (SSL) frameworks have been extensively applied to sensor-based Human Activity Recognition (HAR) in order to learn deep representations without data annotations. While SSL framewo…

Activity RecognitionHuman Activity RecognitionSelf-Supervised Learning

An Effective Approach to Embedding Source Code by Combining Large Language and Sentence Embedding Models

2024-09-23 · Zixiang Xian, Chenhui Cui, Rubing Huang, Chunrong Fang 외

The advent of large language models (LLMs) has significantly advanced artificial intelligence (AI) in software engineering (SE), with source code embeddings playing a crucial role in tasks such as source code clone detec…

Clone DetectionDomain AdaptationSentenceSentence Embedding+2

Learning Representations by Predicting Bags of Visual Words

2020-02-27 · CVPR 2020 6 · Spyros Gidaris, Andrei Bursuc, Nikos Komodakis, Patrick Pérez 외

Self-supervised representation learning targets to learn convnet-based image representations from unlabeled data. Inspired by the success of NLP methods in this area, in this work we propose a self-supervised approach ba…

Representation Learning

Contrastive Separative Coding for Self-supervised Representation Learning

2021-03-01 · Jun Wang, Max W. Y. Lam, Dan Su, Dong Yu

To extract robust deep representations from long sequential modeling of speech data, we propose a self-supervised learning approach, namely Contrastive Separative Coding (CSC). Our key finding is to learn such representa…

Representation LearningSelf-Supervised LearningSpeaker Verification