Lune

EMNLP Findings2022

Probing for Constituency Structure in Neural Language Models

David Arps, Younes Samih, Laura Kallmeyer, Hassan Sajjad

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). 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. 1

Ask Lune

Ask anything. The answer quotes the paper.

Lune reads all of it and the papers around it, then shows you the passages behind every answer.

Questions to start from

Lune answers from

the full paper · 4 top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Cited by top-tier papers4

  1. Evaluating Neuron Interpretation Methods of NLP ModelsYimin Fan, Fahim Dalvi, Nadir Durrani, Hassan SajjadNeurIPS 2023 · 11 citations
  2. Do Transformers Parse while Predicting the Masked Word?Haoyu Zhao, Abhishek Panigrahi, Rong Ge, Sanjeev AroraEMNLP 2023 · 5 citations
  3. Context-free Recognition with TransformersSelim Jerad, Anej Svete, Sophie Hao, Ryan Cotterell et al.ICML 2026 · 3 citations
  4. Information Integration in Large Language Models is Gated by Linguistic Structural MarkersWei Liu, Nai DingEMNLP 2025

Builds on5

  1. Perturbed Masking: Parameter-free Probing for Analyzing and Interpreting BERTZhiyong Wu, Yun Chen, Ben Kao, Qun LiuACL 2020 · 158 citations
  2. Discovering Latent Concepts Learned in BERTFahim Dalvi, Abdul Rafae Khan, Firoj Alam, Nadir Durrani et al.ICLR 2022 · 74 citations
  3. Parsing as PretrainingDavid Vilares, Michalina Strzyz, Anders Søgaard, Carlos Gómez-RodríguezAAAI 2020 · 33 citations
  4. Analyzing Individual Neurons in Pre-trained Language ModelsNadir Durrani, Hassan Sajjad, Fahim Dalvi, Yonatan BelinkovEMNLP 2020 · 5 citations
  5. On the Branching Bias of Syntax Extracted from Pre-trained Language ModelsHuayang Li, Lemao Liu, Guoping Huang, Shuming ShiEMNLP Findings 2020 · 5 citations

Related papers

  1. Are Pre-trained Language Models Aware of Phrases? Simple but Strong Baselines for Grammar InductionTaeuk Kim, Jihun Choi, Daniel Edmiston, Sang-goo LeeICLR 2020 · 92 citations
  2. Contextual Distortion Reveals Constituency: Masked Language Models are Implicit ParsersJiaxi Li, Wei LuACL 2023 · 3 citations
  3. Context Analysis for Pre-trained Masked Language ModelsYi-An Lai, Garima Lalwani, Yi ZhangEMNLP Findings 2020 · 11 citations
  4. On the Interplay Between Fine-tuning and Sentence-Level Probing for Linguistic Knowledge in Pre-Trained TransformersMarius Mosbach, Anna Khokhlova, Michael A. Hedderich, Dietrich KlakowEMNLP Findings 2020 · 16 citations
  5. Mechanisms vs. Outcomes: Probing for Syntax Fails to Explain Performance on Targeted Syntactic EvaluationsAnanth Agarwal, Jasper Jian, Christopher D. Manning, Shikhar MurtyEMNLP 2025 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines