Implicit Representations of Grammaticality in Language Models
Not on the map. Why?
Abstract (arXiv)
Grammaticality and likelihood are distinct notions in human language. Pretrained language models (LMs), which are probabilistic models of language fitted to maximize corpus likelihood, generate grammatically well-formed text and discriminate well between grammatical and ungrammatical sentences in tightly controlled minimal pairs. However, their string probabilities do not sharply discriminate between grammatical and ungrammatical sentences overall. But do LMs implicitly acquire a grammaticality distinction distinct from string probability? We explore this question through studying internal representations of LMs, by training a linear probe on a dataset of grammatical and (synthetic) ungrammatical sentences obtained by applying perturbations to a naturalistic text corpus. We find that this simple grammaticality probe generalizes to human-curated grammaticality judgment benchmarks and outperforms LM probability-based grammaticality judgments. When applied to semantic plausibility benchmarks, in which both members of a minimal pair are grammatical and differ in only plausibility, the probe however performs worse than string probability. The English-trained probe also exhibits nontrivial cross-lingual generalization, outperforming string probabilities on grammaticality benchmarks in numerous other languages. Additionally, probe scores correlate only weakly with string probabilities. These results collectively suggest that LMs acquire to some extent an implicit grammaticality distinction within their hidden layers.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 31 of its 64 references that are in the map. First posted on arXiv 6 May 2026.
Builds on
31 of 64 references.
References · 31
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
- 2016Understanding intermediate layers using linear classifier probescited by 1,353
- 2018Neural Network Acceptability Judgmentscited by 958
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 876
- 2019BLiMP: The Benchmark of Linguistic Minimal Pairs for Englishcited by 564
- 2024Do Llamas Work in English? On the Latent Language of Multilingual Transformerscited by 281
- 2020Inductive Biases for Deep Learning of Higher-Level Cognitioncited by 275
- 2018Targeted Syntactic Evaluation of Language Modelscited by 242
- 2020A Systematic Assessment of Syntactic Generalization in Neural Language Modelscited by 165
- 2019Neural Language Models as Psycholinguistic Subjects: Representations of Syntactic Statecited by 138
- 2018What do RNN Language Models Learn about Filler-Gap Dependencies?cited by 86
- 2025MultiBLiMP 1.0: A Massively Multilingual Benchmark of Linguistic Minimal Pairscited by 71
19 more
- 2018Evaluating Layers of Representation in Neural Machine Translation on Part-of-Speech and Semantic Tagging Taskscited by 56
- 2018Are All Languages Equally Hard to Language-Model?cited by 53
- 2025How Linguistics Learned to Stop Worrying and Love the Language Modelscited by 51
- 2021Probing BERT in Hyperbolic Spacescited by 50
- 2022Event knowledge in large language models: the gap between the impossible and the unlikelycited by 45
- 2021A Non-Linear Structural Probecited by 31
- 2022RuCoLA: Russian Corpus of Linguistic Acceptabilitycited by 26
- 2022Probing for Incremental Parse States in Autoregressive Language Modelscited by 24
- 2024Log Probabilities Are a Reliable Estimate of Semantic Plausibility in Base and Instruction-Tuned Language Modelscited by 24
- 2024Language Models as Models of Languagecited by 24
- 2020Unsupervised Parsing via Constituency Testscited by 23
- 2022Language model acceptability judgements are not always robust to contextcited by 22
- 2020Picking BERT's Brain: Probing for Linguistic Dependencies in Contextualized Embeddings Using Representational Similarity Analysiscited by 18
- 2021Monolingual and Cross-Lingual Acceptability Judgments with the Italian CoLA corpuscited by 18
- 2025What Can String Probability Tell Us About Grammaticality?cited by 16
- 2022SLING: Sino Linguistic Evaluation of Large Language Modelscited by 15
- 2023JCoLA: Japanese Corpus of Linguistic Acceptabilitycited by 11
- 2024What Goes Into a LM Acceptability Judgment? Rethinking the Impact of Frequency and Lengthcited by 10
- 2025Large Language Model probabilities cannot distinguish between possible and impossible languagecited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2024Language models align with human judgments on key grammatical constructions
- 2026Deep networks learn to parse uniform-depth context-free languages from local statistics
- 2026Do Language Models Encode Knowledge of Linguistic Constraint Violations?
- 2021Syntactic Perturbations Reveal Representational Correlates of Hierarchical Phrase Structure in Pretrained Language Models
- 2026Is my model perplexed for the right reason? Contrasting LLMs' Benchmark Behavior with Token-Level Perplexity
- 2025Towards Corpus-Grounded Agentic LLMs for Multilingual Grammatical Analysis
- 2023Evaluating statistical language models as pragmatic reasoners
- 2026Exposure is Optional: Learning Unlike Coordination in Language Models