Linear representations of grammaticality in neural language models
Not on the map. Why?
Abstract (arXiv)
Whether neural language models (NLMs) possess the ability to distinguish strings on the basis of their grammaticality remains a debated topic in the computational linguistics literature. Existing evidence has largely relied on probability-based measures, testing whether models assign higher probabilities to grammatical than ungrammatical strings. However, probability comparisons have been criticized as a measure for grammatical knowledge based on the assumption that grammaticality is inherently entangled with likelihood. Model-assigned probability is a function of many related sentence properties, such as lexical frequency, plausibility, and world knowledge. In this work, we move beyond probability-based evaluations and investigate whether grammaticality is encoded in the internal representations of NLMs. Using mass-mean probing, we test whether grammatical and ungrammatical sentences are systematically separated in representational space. We further examine the extent to which these representations are independent of sentence properties that are correlated with grammaticality, as well as their generalization across grammatical phenomena and languages. Our results provide evidence that grammaticality is robustly encoded in sentence representations of a wide range of pretrained NLMs, yielding clear representational separation on the dimension of grammaticality that cannot be fully explained by alternative sentence-level factors. Moreover, this encoding generalizes across a broad range of grammatical phenomena and to some degree, across languages, suggesting that grammaticality constitutes a coherent representational dimension in contemporary NLMs. These findings contribute new evidence to debates about the nature of syntactic knowledge in language models and offer a complementary framework for evaluating grammatical competence that is not dependent on string probabilities alone.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 38 of its 64 references that are in the map. First posted on arXiv 16 Jul 2026.
Builds on
38 of 64 references.
References · 38
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,302
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,085
- 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
- 2018Neural Network Acceptability Judgmentscited by 958
- 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 767
- 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 712
- 2023The Internal State of an LLM Knows When It's Lyingcited by 659
- 2019BLiMP: The Benchmark of Linguistic Minimal Pairs for Englishcited by 564
- 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 438
- 2023MEGA: Multilingual Evaluation of Generative AIcited by 293
- 2018Targeted Syntactic Evaluation of Language Modelscited by 242
- 2020A Systematic Assessment of Syntactic Generalization in Neural Language Modelscited by 165
26 more
- 2019Neural Language Models as Psycholinguistic Subjects: Representations of Syntactic Statecited by 138
- 2025MultiBLiMP 1.0: A Massively Multilingual Benchmark of Linguistic Minimal Pairscited by 71
- 2020Cross-Linguistic Syntactic Evaluation of Word Prediction Modelscited by 55
- 2024Elements of World Knowledge (EWoK): A Cognition-Inspired Framework for Evaluating Basic World Knowledge in Language Modelscited by 55
- 2025How Linguistics Learned to Stop Worrying and Love the Language Modelscited by 51
- 2024Language models align with human judgments on key grammatical constructionscited by 49
- 2023Prompting is not a substitute for probability measurements in large language modelscited by 44
- 2023Modeling rapid language learning by distilling Bayesian priors into artificial neural networkscited by 42
- 2025Between Circuits and Chomsky: Pre-pretraining on Formal Languages Imparts Linguistic Biasescited by 37
- 2025Linear Representations of Political Perspective Emerge in Large Language Modelscited by 32
- 2024The Same But Different: Structural Similarities and Differences in Multilingual Language Modelingcited by 28
- 2022Probing for Incremental Parse States in Autoregressive Language Modelscited by 24
- 2024RuBLiMP: Russian Benchmark of Linguistic Minimal Pairscited by 24
- 2025What Can String Probability Tell Us About Grammaticality?cited by 16
- 2022SLING: Sino Linguistic Evaluation of Large Language Modelscited by 15
- 2023Evaluating Neural Language Models as Cognitive Models of Language Acquisitioncited by 15
- 2024A Systematic Assessment of Language Models with Linguistic Minimal Pairs in Chinesecited by 13
- 2025Emergence of Linear Truth Encodings in Language Modelscited by 12
- 2024What Goes Into a LM Acceptability Judgment? Rethinking the Impact of Frequency and Lengthcited by 10
- 2025Different types of syntactic agreement recruit the same units within large language modelscited by 8
- 2025How Syntax Specialization Emerges in Language Modelscited by 7
- 2025Mechanisms vs. Outcomes: Probing for Syntax Fails to Explain Performance on Targeted Syntactic Evaluationscited by 7
- 2025Is This Just Fantasy? Language Model Representations Reflect Human Judgments of Event Plausibilitycited by 3
- 2025Shades of Zero: Distinguishing Impossibility from Inconceivabilitycited by 2
- 2026A Unified Assessment of the Poverty of the Stimulus Argument for Neural Language Modelscited by 1
- 2026Implicit Representations of Grammaticality in Language Modelscited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.