New paper finds grammaticality is linearly encoded in neural LM representations

najoungkim · x · 2026-09-18

A new arXiv paper by Jane Li and Najoung Kim moves beyond probability-based grammaticality tests. Using mass-mean probing, the authors show that grammatical and ungrammatical sentences are systematically separated in the internal representations of a wide range of pretrained language models. This separation holds even when controlling for correlated factors like lexical frequency and plausibility, and generalizes across grammatical phenomena and languages — evidence that grammaticality is robustly linearly encoded in sentence representations.

Related event: Study Finds Grammaticality Is Linearly Encoded in Language Models(3 posts)→

Original post →

More from Research

Research channel →