Introduction
Researchers have developed PEEK (Proxy Embeddings to Estimate Knowledge), a framework that predicts whether a Large Language Model (LLM) knows a specific fact without actually querying the LLM. By training a simple linear layer on top of small, pre-trained embedding models, they can map an LLM's "knowledge landscape" with up to 90% accuracy, offering a massive boost in efficiency for identifying factual gaps and hallucinations.
The Challenge of Factual Probing
Large Language Models are essentially massive, stochastic encyclopedias. However, because they are trained on "the whole internet," it is notoriously difficult to know exactly which facts they have mastered and where they might hallucinate.
Current "probing" methods—asking the model thousands of questions or analyzing its internal activations—are computationally ruinous. If you want to check an LLM's knowledge against a database of millions of facts, the inference costs and time required are prohibitive. Furthermore, for "black-box" models (like GPT-4), researchers often don't have access to the internal weights or activations needed for traditional probing. The authors sought a way to estimate an LLM's knowledge "at scale" using much smaller, more efficient proxy models.
The PEEK Framework
Comparison of PEEK with traditional probing methods. Source, p. 2
The authors introduce PEEK, which treats pre-trained embedding models as "proxies" for the LLM. The process works in three steps:
- Probing for Ground Truth: They first establish a "ground truth" of what the LLM knows by querying it on a small subset of facts using four strategies:
- Binary Generation: Asking "Is this statement true?"
- Binary Logits: Measuring the model's "external confidence" via output token probabilities.
- Binary Activation: Training a probe on the LLM's internal hidden states (for white-box models).
- Fact Generation: Breaking down long-form generated text into atomic facts and verifying them.
- Embedding Facts: They represent these facts using pre-trained Sentence Embedders (which treat facts as natural language) and Graph Neural Networks (which treat facts as structured triples like Subject-Relation-Object).
- Proxy Tuning: They train a tiny, computationally "cheap" linear decoder layer on top of these embeddings. This layer learns to map the embedding of a fact to the LLM's likely response (e.g., "Does the LLM know this? Yes/No").
Experimental Setup and Datasets
The study utilized three primary sources to evaluate knowledge:
- DBP100k: A subset of DBpedia containing nearly 700,000 facts derived from Wikipedia.
- YAGO310: A knowledge graph with over 1 million facts.
- FactScore: A dataset of long-form biographies generated by various LLMs (Alpaca, ChatGPT, etc.), where each sentence is labeled as a supported or unsupported atomic fact.
Key Insights and Results
The researchers uncovered several critical findings regarding how LLMs store and reveal their knowledge:
- Small Models Can "Shadow" Giants: The most striking insight is that a small embedding model (like NVE2 or Linq) can effectively learn the boundaries of a giant model's knowledge. You don't need a billion-parameter model to predict what a trillion-parameter model knows.
- Language Over Structure: Sentence embeddings significantly outperformed graph embeddings (like ULTRA). This suggests that LLMs represent factual knowledge more like natural language sequences than structured, path-based graph nodes.
- Linearity is Enough: The researchers found that "Linear-tuning" (just training the final layer) performed as well as "LoRA" (fine-tuning the embedder itself). This implies that the necessary knowledge is already implicitly encoded in the embeddings; we just need a simple "head" to extract it.
- Performance Metrics: PEEK achieved up to 90% accuracy and 88% AUC in predicting whether GPT-4o-mini would know a specific fact from the Wikipedia datasets. Nvidia’s NVE2 and the Linq embedding models were the overall winners.
Limitations and Future Work
While PEEK is highly efficient, the authors acknowledge that the high performance might be partially due to "leakage"—the fact that the embedding models and the LLMs were likely trained on overlapping slices of the internet (like Wikipedia). Additionally, the current framework focuses on "triplet-style" facts and hasn't yet been tested on complex reasoning or niche domain knowledge. Future work could explore how these proxy embeddings adapt as a model undergoes continuous learning or how LLM-based negative mining could further improve accuracy.
Summary updated