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

Yusuke Ide, Yuto Nishida, Justin Vasselli, Miyu Oba, Yusuke Sakai +2 more
8/19/2024
cs.CLcs.AI

No official code found. Best implementation: Yusuke196/llm-acceptability (1 star, last commit 2025-03-22).

Abstract

The grammatical knowledge of language models (LMs) is often measured using a benchmark of linguistic minimal pairs, where the LMs are presented with a pair of acceptable and unacceptable sentences and required to judge which is more acceptable. Conventional approaches directly compare sentence probabilities assigned by LMs, but recent large language models (LLMs) are trained to perform tasks via prompting, and thus, the raw probabilities they assign may not fully reflect their grammatical knowledge. In this study, we attempt to derive more accurate acceptability judgments from LLMs using prompts and templates. Through extensive experiments in English and Chinese, we compare nine judgment methods and find two of them, a probability readout method -- in-template LP and a prompt-based method -- Yes/No probability computing, achieve higher accuracy than the conventional ones. Our analysis reveals that these methods excel in different linguistic phenomena, suggesting they access different aspects of LLMs' knowledge. We also find that ensembling the two methods outperforms single methods. Consequently, we recommend these techniques, either individually or ensembled, as more effective alternatives to conventional approaches for assessing grammatical knowledge in LLMs.

View on arXivView PDF

Code Implementations(1)

Repository for the NAACL 2025 paper "How to Make the Most of LLMs' Grammatical Knowledge for Acceptability Judgments"

10Shell, PythonFeb 6, 20251 years ago

Similar Papers

Cite this paper

@article{ide2024make,
  title  = {How to Make the Most of LLMs' Grammatical Knowledge for Acceptability Judgments},
  author = {Yusuke Ide and Yuto Nishida and Justin Vasselli and Miyu Oba and Yusuke Sakai and Hidetaka Kamigaito and Taro Watanabe},
  year   = {2024},
  eprint = {2408.09639},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.09639v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.09639.svg)](https://codeofpaper.com/paper/2408.09639)

Discussion