AI Papers Reader

Personalized digests of latest AI research

View on GitHub

New Technique Estimates LLM Knowledge Instantly, Before Generating a Single Word

A team of researchers has introduced a pioneering method that allows developers to instantly gauge a large language model’s (LLM) knowledge about any specific entity—such as a historical figure, location, or concept—without the computational cost of running queries or generating text.

The technique, called KEEN (Knowledge Estimation of ENtities), uses lightweight probes trained on the LLM’s internal computation, treating the language model’s hidden state as a reliable proxy for its stored knowledge. This innovation bypasses the standard, resource-intensive evaluation process, which typically requires generating and grading numerous responses.

Probing the Model’s Internal State

Traditional evaluation methods rely on asking an LLM a question—say, “Tell me about Napoleon”—and then scoring the generated paragraph for factual accuracy. KEEN, developed by Daniela Gottesman and Mor Geva of Tel Aviv University, flips this process.

KEEN intercepts the model’s processing immediately after it reads the subject entity (e.g., “Napoleon”). Based solely on the internal numerical representations activated by that name, a simple linear probe forecasts two key metrics:

  1. Question Answering (QA) Accuracy: How likely the model is to answer a range of common questions about Napoleon correctly.
  2. Open-Ended Generation (OEG) Factuality: How truthful the claims in a generated paragraph about Napoleon will be (measured via FActScore).

Across a variety of LLMs, including LLaMA2 and Pythia, KEEN demonstrated powerful predictive capability, correlating with QA accuracy scores between 0.60–0.68 and OEG factuality scores up to 0.77. This correlation confirms that a model’s knowledge is centralized in the hidden representations corresponding to the entity name during inference.

Aligning with Model Behavior

Crucially, KEEN scores align with observable model behaviors, offering a powerful tool for diagnosing performance.

First, the research found that KEEN faithfully reflects hedging behavior. If a KEEN probe predicts a low knowledge score for an entity like “The Deep,” the model is statistically more likely to hedge its answers for questions about that entity, generating cautious phrases like “I don’t know” or “I’m not entirely sure.”

Second, KEEN serves as a rapid diagnostic tool for knowledge updates following fine-tuning. When LLaMA2 was fine-tuned on new Wikipedia paragraphs about a target entity, the KEEN score for that entity immediately rose, accurately reflecting the acquired knowledge. Conversely, scores for non-target entities slightly decreased, mirroring catastrophic forgetting.

The researchers also introduced an interpretable variant of KEEN that projects the internal hidden state onto the vocabulary tokens. This allowed them to identify tokens that strongly correlate with knowledge clusters or gaps. For instance, the presence of terms like “Senator,” “Player,” or “Movie” in the entity representation signaled high, clustered knowledge, while random strings or abbreviations often indicated knowledge “holes” and low predicted accuracy.

As a lightweight and fast alternative to query-based evaluation, KEEN offers immense practical value for LLM deployment. Developers can leverage KEEN to efficiently decide when to augment an LLM’s response with external retrieval systems, when to apply further training to address specific knowledge gaps, or whether to prompt the model to abstain from answering uncertain queries.