INSPECT: Intrinsic and Systematic Probing Evaluation for Code Transformers - Archive ouverte HAL
Article Dans Une Revue IEEE Transactions on Software Engineering Année : 2024

INSPECT: Intrinsic and Systematic Probing Evaluation for Code Transformers

Résumé

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 know very little about what these pre-trained models learn about source code. In this article, we use probing--simple diagnostic tasks that do not further train the models--to discover to what extent pre-trained models learn about specific aspects of source code. We use an extensible framework to define 15 probing tasks that exercise surface, syntactic, structural and semantic characteristics of source code. We probe 8 pre-trained source code models, as well as a natural language model (BERT) as our baseline. We find that models that incorporate some structural information (such as GraphCodeBERT) have a better representation of source code characteristics. Surprisingly, we find that for some probing tasks, BERT is competitive with the source code models, indicating that there are ample opportunities to improve source-code specific pre-training on the respective code characteristics. We encourage other researchers to evaluate their models with our probing task suite, so that they may peer into the hidden layers of the models and identify what intrinsic code characteristics are encoded.
Fichier principal
Vignette du fichier
2312.05092v1.pdf (9.31 Mo) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04797531 , version 1 (22-11-2024)

Identifiants

Citer

Anjan Karmakar, Romain Robbes. INSPECT: Intrinsic and Systematic Probing Evaluation for Code Transformers. IEEE Transactions on Software Engineering, 2024, 50 (2), ⟨10.48550/arXiv.2312.05092⟩. ⟨hal-04797531⟩

Collections

CNRS UNIV-BORDEAUX
0 Consultations
0 Téléchargements

Altmetric

Partager

More