We gratefully acknowledge support from
the Simons Foundation and member institutions.

Programming Languages

New submissions

[ total of 2 entries: 1-2 ]
[ showing up to 500 entries per page: fewer | more ]

New submissions for Fri, 24 Jun 22

[1]  arXiv:2206.11719 [pdf, other]
Title: AST-Probe: Recovering abstract syntax trees from hidden representations of pre-trained language models
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG); Programming Languages (cs.PL); Software Engineering (cs.SE)

The objective of pre-trained language models is to learn contextual representations of textual data. Pre-trained language models have become mainstream in natural language processing and code modeling. Using probes, a technique to study the linguistic properties of hidden vector spaces, previous works have shown that these pre-trained language models encode simple linguistic properties in their hidden representations. However, none of the previous work assessed whether these models encode the whole grammatical structure of a programming language. In this paper, we prove the existence of a \textit{syntactic subspace}, lying in the hidden representations of pre-trained language models, which contain the syntactic information of the programming language. We show that this subspace can be extracted from the models' representations and define a novel probing method, the AST-Probe, that enables recovering the whole abstract syntax tree (AST) of an input code snippet. In our experimentations, we show that this syntactic subspace exists in five state-of-the-art pre-trained language models. In addition, we highlight that the middle layers of the models are the ones that encode most of the AST information. Finally, we estimate the optimal size of this syntactic subspace and show that its dimension is substantially lower than those of the models' representation spaces. This suggests that pre-trained language models use a small part of their representation spaces to encode syntactic information of the programming languages.

Replacements for Fri, 24 Jun 22

[2]  arXiv:2205.07808 (replaced) [pdf, other]
Title: Switch as a Verifier: Toward Scalable Data Plane Checking via Distributed, On-Device Verification
Subjects: Systems and Control (eess.SY); Networking and Internet Architecture (cs.NI); Programming Languages (cs.PL)
[ total of 2 entries: 1-2 ]
[ showing up to 500 entries per page: fewer | more ]

Disable MathJax (What is MathJax?)

Links to: arXiv, form interface, find, cs, recent, 2206, contact, help  (Access key information)