Large Language Models (LLMs) frequently exhibit erratic behavior, sometimes failing to output the correct answer to a multiple-choice question (MCQ) even when they demonstrate knowledge of the answer in other contexts. While this is often attributed to surface-level factors like option bias, recent research suggests a deeper structural issue.
This paper investigates the knowledge-prediction gap: the discrepancy between the information linearly encoded in a model’s internal hidden states and the final predictions it generates. Essentially, an LLM may have the correct answer accessible within its internal representations, but fails to translate that signal into its output tokens. To address this, the authors provide a geometric interpretation of the model's residual stream and introduce KAPPA (Knowledge-Aligned Prediction through Projection-based Adjustment), a lightweight inference-time intervention that aligns internal knowledge with output behavior.
The Geometry of the Residual Stream
To understand why models fail to use their internal knowledge, the researchers employed a three-step geometric approach focusing on the residual stream at every layer of the network:
- Linear Probing: The authors trained two distinct linear classifiers (probes) on the model's hidden states. The Knowledge Probe was trained to predict the ground-truth answer, while the Prediction Probe was trained to predict the model's actual output, regardless of whether it was correct.
- Subspace Analysis: The weight vectors of these probes define two low-dimensional subspaces within the model: a "knowledge subspace" and a "prediction subspace."
- Geometric Divergence: By measuring the mean principal angle between these subspaces across layers, a striking structural feature emerged. In early layers, the knowledge and prediction signals heavily overlap. However, in the final layers—where the model ultimately "decides" its output—these subspaces become nearly orthogonal (90 degrees apart). The internal truth and the predicted output are routed along geometrically distinct directions.
Interestingly, this gap is relatively small for pure knowledge retrieval tasks (like MMLU) but massive for tasks requiring reasoning or truthfulness. This suggests that models often override their own internal facts with faulty reasoning traces or hasty biases.
KAPPA: Aligning Knowledge and Prediction
To bridge this gap, the authors introduce KAPPA. Unlike traditional methods that simply shift the logits to boost the probability of specific tokens (e.g., favoring "A" over "B"), KAPPA operates directly on the abstract intermediate representations.
KAPPA is an inference-time intervention that applies a closed-form affine transformation to the hidden states. It minimally nudges the representation so that its coordinates in the prediction subspace align with its coordinates in the knowledge subspace. In simpler terms, it structurally forces the model's output mechanism to "listen" to its internal knowledge.
Because KAPPA intervenes at a higher level of abstraction, it is highly efficient. It requires no retraining of the base LLM and can be effectively calibrated using as little as 10% of the available probe training data.
Experimental Setup and Key Findings
The researchers evaluated KAPPA across a broad suite of benchmarks—spanning reasoning (GSM8k, BBH), knowledge (MMLU, ARC-Challenge, PubMedQA), and truthfulness/bias (TruthfulQA, BBQ)—using models including Llama 3.1 (8B), Qwen 2.5 (7B/14B/32B), and Mistral (7B).
Key results include:
- Significant Accuracy Boosts: On Llama 3.1 8B, KAPPA improved accuracy on TruthfulQA by 16.9 percentage points and on BBQ-Age by 16.9 points compared to the base model.
- Outperforming Baselines: KAPPA consistently outperformed other popular intervention methods, such as Activation Steering (CAA) and Contrastive Decoding (DoLA).
- Cross-Task Transfer: Subspaces learned on one task (e.g., NLP reasoning) often improved performance on related tasks (e.g., math word problems). This indicates that LLMs organize similar cognitive "skills" along similar geometric directions.
- Generalization to Free-Form Text: Although the probes are trained on multiple-choice data, the resulting abstract representations generalize. When applied to free-form generation (without multiple-choice options), KAPPA still improved TruthfulQA accuracy from 41.7% to 44.2%.
Limitations and Future Directions
While KAPPA offers a powerful and interpretable way to improve LLM reliability, the study relies on a linearity assumption. It focuses exclusively on "linearly accessible" knowledge; if a model encodes truth in a complex, non-linear manner, KAPPA’s linear probes may fail to capture it. Additionally, the current methodology requires multiple-choice data to train the probes and define the initial subspaces.
Future work will explore higher-dimensional interventions and techniques to align non-linearly encoded knowledge. The authors also plan to test KAPPA in broader, more complex prompting scenarios beyond standard question-answering, further bridging the gap between what LLMs know and what they actually say.
Summary updated