Probing for Constituency Structure in Neural Language Models

David Arps, Younes Samih, Laura Kallmeyer, Hassan Sajjad
4/13/2022
cs.CL

Official code: davidarps/constptbprobing (1 star, Python, last commit 2023-04-06).

Abstract

In this paper, we investigate to which extent contextual neural language models (LMs) implicitly learn syntactic structure. More concretely, we focus on constituent structure as represented in the Penn Treebank (PTB).

Show full abstract

Using standard probing techniques based on diagnostic classifiers, we assess the accuracy of representing constituents of different categories within the neuron activations of a LM such as RoBERTa. In order to make sure that our probe focuses on syntactic knowledge and not on implicit semantic generalizations, we also experiment on a PTB version that is obtained by randomly replacing constituents with each other while keeping syntactic structure, i.e., a semantically ill-formed but syntactically well-formed version of the PTB. We find that 4 pretrained transfomer LMs obtain high performance on our probing tasks even on manipulated data, suggesting that semantic and syntactic knowledge in their representations can be separated and that constituency information is in fact learned by the LM. Moreover, we show that a complete constituency tree can be linearly separated from LM representations.

View on arXivView PDF

Code Implementations(1)

11Python, ShellApr 12, 20223 years ago

Similar Papers

Cite this paper

@article{arps2022probing,
  title  = {Probing for Constituency Structure in Neural Language Models},
  author = {David Arps and Younes Samih and Laura Kallmeyer and Hassan Sajjad},
  year   = {2022},
  eprint = {2204.06201},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2204.06201}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2204.06201.svg)](https://codeofpaper.com/paper/2204.06201)

Discussion