How to Make the Most of LLMs' Grammatical Knowledge for Acceptability Judgments

Yusuke Ide, Yuto Nishida, Justin Vasselli, Miyu Oba, Yusuke Sakai, Hidetaka Kamigaito, Taro Watanabe

Abstract: The grammatical knowledge of language models (LMs) is often measured using a benchmark of linguistic minimal pairs, where LMs are presented with a pair of acceptable and unacceptable sentences and required to judge which is more acceptable. Conventional approaches compare sentence probabilities directly, but large language models (LLMs) provide nuanced evaluation methods using prompts and templates. We therefore investigate how to derive the most accurate acceptability judgments from LLMs to comprehensively evaluate their grammatical knowledge. Through extensive experiments in both English and Chinese, we compare nine judgment methods and demonstrate that two of them, in-template LP (a probability readout method) and Yes/No probability computing (a prompting-based method), achieve higher accuracy than the conventional approach. Our analysis reveals that the top two methods excel in different linguistic phenomena, suggesting they access different aspects of the LLMs’ grammatical knowledge. We find that ensembling the two methods achieves even higher accuracy. Consequently, we recommend these techniques, either individually or ensembled, as more effective alternatives to conventional approaches for assessing grammatical knowledge in LLMs.

Introduction

How do we determine if an Artificial Intelligence truly "understands" the rules of human language? Traditionally, researchers have relied on acceptability judgments. In this paradigm, a model is shown a "minimal pair"—two sentences that differ by only one word or feature (e.g., "The cat sits" vs. "The cat sit")—and must identify which is grammatically correct.

Historically, this was measured by calculating the raw probability of each sentence; the one with the higher score was considered the model's choice. However, modern Large Language Models (LLMs) are instruction-tuned and optimized for dialogue, meaning their raw internal probabilities may no longer be the most accurate reflection of their underlying linguistic knowledge. This study investigates nine different "readout" methods to elicit the most accurate grammatical judgments from state-of-the-art LLMs.

Methodology and Novel Readout Techniques

The researchers categorized judgment methods into three main types:

  1. Sentence Probability Readout (Conventional): Calculating the log probability (LP) of the sentence alone.
  2. In-template Probability Readout (Novel): Instead of evaluating the sentence in isolation, it is wrapped in a guiding template (e.g., "This sentence is acceptable. [Sentence]"). The model then calculates the probability of the entire string. This method "primes" the model to focus specifically on grammatical acceptability.
The In-template LP method compares the log probabilities of minimal pairs within a grammatical prefix.
  1. Prompt-based Methods: These involve asking the model a direct question. The most effective variation found was Yes/No Probability Computing, where the model is asked "Is this sentence acceptable?" and the researchers calculate the normalized probability of the model generating the token "Yes" versus "No."
The Yes/No probability computing method derives a judgment by comparing the likelihood of 'Yes' and 'No' tokens following a direct prompt.

Experimental Setup

The study evaluated eight leading LLMs, including Llama-3, Mixtral, Qwen2, and Yi-1.5, across two major benchmarks:

  • BLiMP (Benchmark of Linguistic Minimal Pairs): 67,000 English sentence pairs covering 67 linguistic phenomena.
  • CLiMP (Chinese Linguistic Minimal Pairs): 16,000 Chinese sentence pairs across 16 phenomena.

Key Insights

Overcoming Length Bias

LLMs naturally assign lower probabilities to longer sentences, a bias that often plagues traditional readout methods. The "Yes/No" method proved remarkably robust against this, maintaining accuracy even when the correct sentence was significantly longer than its incorrect counterpart.

Complementary Strengths and Ensembling

Different methods appear to access different "pockets" of a model's knowledge. The "In-template LP" method excelled at identifying errors in quantifiers and ellipsis, while the "Yes/No" method was superior for subject-verb agreement. By ensembling these two methods, the researchers achieved even higher accuracy, suggesting they provide complementary views of the model's internal grammar.

Surpassing Human Performance

On the English BLiMP benchmark, an ensemble of the top methods using the Qwen2 model achieved an accuracy of 90.2%, surpassing the human baseline of 88.6%. This indicates that modern LLMs possess a vast amount of grammatical knowledge that simply requires the right elicitation technique to reveal.

Conclusion

This research demonstrates that conventional methods for measuring grammatical knowledge are no longer sufficient for instruction-tuned models. By using in-template probability readouts and Yes/No probability computing, researchers can more accurately assess the linguistic capabilities of LLMs. While models still struggle with specific challenges like "word-shuffling" (scrambled word order), these new methods provide a more robust framework for future linguistic evaluation.

Summary updated

BibTeX
@inproceedings{ide2025how,
  author = {Yusuke Ide and Yuto Nishida and Justin Vasselli and Miyu Oba and Yusuke Sakai and Hidetaka Kamigaito and Taro Watanabe},
  title = {{How to Make the Most of LLMs' Grammatical Knowledge for Acceptability Judgments}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=P7OZzHFx0n},
}
Figure