paper-with-me

홈 › Papers

What do pre-trained code models know about code?

2021-08-25 · IEEE/ACM International Conference on Automated Software Engineering (ASE) 2021 8 · Anjan Karmakar, Romain Robbes

Pre-trained models of code built on the transformer architecture have performed well on software engineering (SE) tasks such as predictive code generation, code summarization, among others. However, whether the vector representations from these pre-trained models comprehensively encode characteristics of source code well enough to be applicable to a broad spectrum of downstream tasks remains an open question. One way to investigate this is with diagnostic tasks called probes. In this paper, we construct four probing tasks (probing for surface-level, syntactic, structural, and semantic information) for pre-trained code models. We show how probes can be used to identify whether models are deficient in (understanding) certain code properties, characterize different model layers, and get insight into the model sample-efficiency. We probe four models that vary in their expected knowledge of code properties: BERT (pre-trained on English), CodeBERT and CodeBERTa (pre-trained on source code, and natural language documentation), and GraphCodeBERT (pre-trained on source code with dataflow). While GraphCodeBERT performs more consistently overall, we find that BERT performs surprisingly well on some code tasks, which calls for further investigation.

📄 PDF Abstract BibTeX arXiv:2108.11308

Code (1)

giganticode/probes 공식 구현 pytorch

Tasks

DiagnosticOpen-Ended Question Answering

Methods 이 논문이 사용한 방법론

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…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
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…
Weight Decay 설명 없음
Residual Connection 설명 없음
Multi-Head Attention 설명 없음

Similar Papers 제목 키워드 기반

INSPECT: Intrinsic and Systematic Probing Evaluation for Code Transformers

2023-12-08 · Anjan Karmakar, Romain Robbes

Pre-trained models of source code have recently been successfully applied to a wide variety of Software Engineering tasks; they have also seen some practical adoption in practice, e.g. for code completion. Yet, we still …

Code CompletionDiagnosticLanguage Modelling

What do Transformers Know about Government?

2024-04-22 · Jue Hou, Anisia Katinskaia, Lari Kotilainen, Sathianpong Trangcasanchai 외

This paper investigates what insights about linguistic features and what knowledge about the structure of natural language can be obtained from the encodings in transformer language models.In particular, we explore how B…

Sentence

“Politeness, you simpleton!” retorted [MASK]: Masked prediction of literary characters

2021-06-01 · IWCS (ACL) 2021 6 · Eric Holgate, Katrin Erk

What is the best way to learn embeddings for entities, and what can be learned from them? We consider this question for the case of literary characters. We address the highly challenging task of guessing, from a sentence…

Entity EmbeddingsSentence

What do tokens know about their characters and how do they know it?

2022-01-16 · ACL ARR January 2022 1 · Anonymous

Pre-trained language models (PLMs) that use subword tokenization schemes can succeed at a variety of language tasks that require character-level information, despite lacking explicit access to the character composition o…

SocioProbe: What, When, and Where Language Models Learn about Sociodemographics

2022-11-08 · Anne Lauscher, Federico Bianchi, Samuel Bowman, Dirk Hovy

Pre-trained language models (PLMs) have outperformed other NLP models on a wide range of tasks. Opting for a more thorough understanding of their capabilities and inner workings, researchers have established the extend t…

GPU