ACL 2024 · Main ConferenceEvaluating accessible knowledge

Benchmarking Knowledge Boundary for Large Language Models: A Different Perspective on Model Evaluation

Xunjian Yin1*, Xu Zhang1*, Jie Ruan1, Xiaojun Wan1

1 Peking University · * Equal contribution

A wrong answer may reflect the prompt rather than missing knowledge; searching for alternative wording reveals facts a model can answer but a fixed benchmark misses.

Result
On PaRaRel with LLaMA2, PGDC elicits 71.36% of facts vs 66.95% for the strongest baseline (P-few); on counterfactual CFACT it elicits 3.41% vs AutoPrompt's 88.35%.
New vs prior
LAMA queries facts with fixed cloze prompts, ParaRel and KAssess with a few paraphrases, and AutoPrompt optimizes trigger tokens toward a target; this work optimizes prompts under a semantic constraint.
Limitation
PGDC needs the known answer and white-box gradients, and human raters judge only 83.3% of LLaMA2's optimized prompts to preserve the original meaning.
Scroll sideways to read the figure. PGDC optimizes a prompt in embedding space within the semantic space of the original question, projecting embeddings back to tokens where possible (left); each step combines a semantic loss against the original representation, a target loss over answer logits, and a regularization term (right). Original Figure 2 from the paper. Full size ↗

A failed question does not prove ignorance

A factual question can fail because the model lacks the fact or because that wording does not elicit it. Conversely, a prompt can produce the target string without asking the original question. The paper defines a model's knowledge boundary as the facts it answers correctly under at least one expression; estimating it needs a probe that searches wordings while preserving what was asked.

If “Canberra is located in which country?” fails but “Which country contains Canberra?” succeeds, a single template underestimates the model. An instruction to print the target country, however, would show no knowledge at all. The search must go beyond a fixed template without redefining success.

Closest prior work

LAMA (Petroni et al., 2019) probes each fact with a fixed cloze prompt, and ParaRel (Elazar et al., 2021) and KAssess (Dong et al., 2023) measure consistency across a limited set of paraphrases; the paper argues that all such evaluations still rest on fixed prompts. AutoPrompt (Shin et al., 2020) optimizes discrete trigger tokens to produce a target output, which the paper finds behaves more like an adversarial attack because it also elicits counterfactual targets. PGDC instead searches for the best wording within the semantic neighborhood of the original question.

Gradient search stays close to the original question

PGDC (projected gradient descent with semantic constraints) searches the continuous space of token embeddings, where gradients point toward changes that make an accepted answer more likely. The target loss lets the answer appear after some generated text, not only at the first output position, and uses whichever valid answer alias is most probable.

Two further terms keep the probe from being gamed. A semantic loss penalizes the L2 distance between the candidate's last-layer representation and the original question's, and a regularizer keeps embeddings near real vocabulary items. After each step, embeddings close enough to a token are projected back to it, so the result stays a readable question.

  1. 01

    Define accessible knowledge

    Treat a fact as inside the estimated boundary when at least one meaning-preserving formulation elicits an accepted answer.

  2. 02

    Search constrained prompts

    PGDC optimizes prompt embeddings toward known answers, adds a semantic constraint, and projects suitable embeddings back into discrete text.

  3. 03

    Check the search

    Compare against prompting baselines, test fabricated facts, and have human annotators assess whether optimized questions preserve their meaning.

PGDC finds more true facts without forcing false ones

Measured · Table 1, all four backbones · Table 3 · inputs from Tables 2 and 4

Which probes find true facts without forcing false ones?

Pick a true-fact set and a negative control. Each panel shows one backbone: how often a probe elicits the target answer of a true fact (higher is better) and of a counterfactual or fabricated one (lower is better). Select a probe to see the exact input the paper sends and to compare it across backbones.

GPT-2 (774M)PGDC prompts judged meaning-preserving: 80.5%

ProbePaRaRel ↑CFACT ↓
zero9.27%1.10%
few12.61%1.77%
dis3.13%3.28%
P-zero18.18%3.00%
P-few20.46%3.92%
P-dis9.01%9.32%
PGDC47.68%2.81%
AutoPromptnot reported92.38%

GPT-J (6B)PGDC prompts judged meaning-preserving: 85.1%

ProbePaRaRel ↑CFACT ↓
zero23.23%1.39%
few44.84%3.18%
dis2.40%2.30%
P-zero40.78%3.75%
P-few54.06%6.12%
P-dis7.25%6.74%
PGDC55.95%4.82%
AutoPromptnot reported85.67%

LLaMA2 (7B)PGDC prompts judged meaning-preserving: 83.3%

ProbePaRaRel ↑CFACT ↓
zero34.43%1.32%
few58.23%4.56%
dis17.96%13.88%
P-zero54.78%3.30%
P-few66.95%9.31%
P-dis44.16%36.46%
PGDC71.36%3.41%
AutoPromptnot reported88.35%

Vicuna (7B)PGDC prompts judged meaning-preserving: 86.2%

ProbePaRaRel ↑CFACT ↓
zero34.19%1.40%
few59.56%3.08%
dis8.40%4.95%
P-zero54.97%3.36%
P-few69.69%6.91%
P-dis23.06%14.28%
PGDC69.63%3.50%
AutoPromptnot reported33.09%

True-fact successFalse-target successBars run from 0 to 100%.

Selected probe

PGDC · PaRaRel ↑ / CFACT ↓: GPT-2 47.68% / 2.81%, GPT-J 55.95% / 4.82%, LLaMA2 71.36% / 3.41%, Vicuna 69.63% / 3.50%. Across the four backbones, false-target success equals 5–9% of true-fact success. Highest PaRaRel success of all seven probes for GPT-2, GPT-J, LLaMA2. Backbone order on PaRaRel: LLaMA2 > Vicuna > GPT-J > GPT-2.

What the probe sends: PGDC Projected gradient descent with semantic constraints

PGDC starts from the original cloze prompt and edits its embeddings; the paper's Table 2 prints three prompts it changed successfully (dataset and backbone not stated). The target answer may appear after generated tokens, not only first.

Original promptPGDC promptAnswerTable 2 category
The associated item of source code isThe early item of source code is a simpleprogramOptimal Paraphrase
Isatis tinctoria is a source ofIsatis tinctoria, a source of the natural dyeindigoReasoning and Inference
The host country of Australian Capital Territory is<s> host country of Australian Capital Territory isAustraliaFormat and Stop Words

Measured: Table 1 (success rate of eliciting the target answer, four backbones), Table 3 (AutoPrompt on CFACT), and Section 4.5 (human judgment of 200 PaRaRel samples per backbone). Inputs: Table 4 (Appendix A.2) and Table 2. PaRaRel and KAssess hold true facts; CFACT and ALCUNA hold counterfactual or fabricated ones, so a sound probe should rarely succeed on them.

Baselines follow common evaluation practice: zero-shot (zero) and few-shot (few) prompting, and a discriminator format (dis) that asks whether a statement is true; the P- prefix counts a fact as known if any listed paraphrase succeeds. PGDC is highest on both true-fact datasets, PaRaRel and KAssess, for every backbone except Vicuna on PaRaRel. On the fabricated facts of CFACT (CounterFact) and ALCUNA, a sound probe should rarely elicit the false target; the discriminator baselines fail this test, which the paper links to models' preference for answering “true”.

Semantic preservation is imperfect: three annotators judging 200 PaRaRel samples find that 83.3% of LLaMA2's optimized prompts keep the original meaning, from 80.5% for GPT-2 to 86.2% for Vicuna. A representation-level constraint therefore cannot certify every rewrite.

Scope. This estimates accessible knowledge under a particular search procedure. It needs target answers and model gradients, and semantic constraints do not guarantee meaning preservation or exhaustive coverage. Read the study ↗

Further reading in the paperACL 2024 paper · PGDC objective; Tables 1, 3, and human evaluation ↗
Read the abstract

In recent years, substantial advancements have been made in the development of large language models, achieving remarkable performance across diverse tasks. To evaluate the knowledge ability of language models, previous studies have proposed lots of benchmarks based on question-answering pairs. We argue that it is not reliable and comprehensive to evaluate language models with a fixed question or limited paraphrases as the query, since language models are sensitive to prompt. Therefore, we introduce a novel concept named knowledge boundary to encompass both prompt-agnostic and prompt-sensitive knowledge within language models. Knowledge boundary avoids prompt sensitivity in language model evaluations, rendering them more dependable and robust. To explore the knowledge boundary for a given model, we propose a projected gradient descent method with semantic constraints, a new algorithm designed to identify the optimal prompt for each piece of knowledge. Experiments demonstrate a superior performance of our algorithm in computing the knowledge boundary compared to existing methods. Furthermore, we evaluate the ability of multiple language models in several domains with knowledge boundary.

Full paper ↗
Citation BibTeX
@inproceedings{yin-etal-2024-benchmarking,
    title = "Benchmarking Knowledge Boundary for Large Language Models: A Different Perspective on Model Evaluation",
    author = "Yin, Xunjian and Zhang, Xu and Ruan, Jie and Wan, Xiaojun",
    booktitle = "Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics",
    year = "2024",
    url = "https://aclanthology.org/2024.acl-long.124/",
    pages = "2270--2286"
}