Language models encode grammaticality as a distinct representational dimension in their internal states, separate from surface-level factors like word frequency—suggesting they have genuine grammatical knowledge beyond just assigning higher probabilities to common sentences.
This paper investigates whether language models understand grammar by examining their internal representations rather than just probability scores.