Abstract
Large Language Models (LLMs) often possess the correct internal knowledge to solve a problem but fail to select the right answer in multiple-choice formats. This discrepancy, termed the knowledge-prediction gap, arises from misalignments between the model's internal representations and its final output logic. We introduce KAPPA (Knowledge-Aligned Prediction through Projection-based Adjustment), a lightweight inference-time intervention that geometrically aligns these internal states. KAPPA significantly improves accuracy and faithfulness across reasoning, truthfulness, and bias benchmarks without requiring expensive retraining.
The Knowledge-Prediction Gap
While LLMs frequently hallucinate or fail at logic, recent evidence suggests the correct information often exists within their internal hidden states (the residual stream). This "knowledge-prediction gap" is particularly evident in Multiple-Choice Questions (MCQs), where superficial cues or option biases can lead a model to select an incorrect answer despite "knowing" the truth. This paper provides a unified geometric explanation for this gap and proposes a method to bridge it.
Methodology: Probing and Alignment
The researchers employ a three-step geometric analysis to understand and fix this misalignment:
- Linear Probing: Two separate linear classifiers are trained on the model's hidden representations. The Knowledge Probe predicts the ground-truth answer, while the Prediction Probe predicts the model's actual output.
- Geometric Interpretation: The weights of these probes define two distinct low-dimensional subspaces: the knowledge subspace and the prediction subspace. In underperforming models, these subspaces are systematically misaligned.
- KAPPA Intervention: KAPPA applies a small affine transformation to the hidden states during inference. It "nudges" the representation so its coordinates in the prediction subspace align with those in the knowledge subspace, preserving other essential information by minimizing the overall perturbation.
Key Insights: Visualizing Internal Dissonance
The study reveals several critical aspects of how LLMs process information:
- Task-Dependent Gaps: The gap is most pronounced in reasoning, truthfulness, and bias tasks. Factual, "knowledge-intensive" tasks (like MMLU) show smaller gaps, suggesting models are already relatively efficient at utilizing stored facts.
- Geometric Misalignment: Scatter plots of probe logits provide a visual confirmation of this dissonance. In tasks with large gaps, the signals for knowledge and prediction are often off-diagonal, indicating they point in different directions.
- Hasty Preferences: In bias and truthfulness benchmarks, models often override internal knowledge in favor of "hasty" preferences, such as failing to select "undetermined" in biased contexts.
Experimental Results
KAPPA was evaluated on models including Llama 3.1 8B, Qwen 2.5 7B, and Mistral v0.3 7B across benchmarks like GSM8k, TruthfulQA, and BBQ.
- Faithfulness and Accuracy: KAPPA increased the agreement between internal knowledge and final output by up to 17.5 percentage points. On TruthfulQA, accuracy improved by 11.1 points for Llama 3.1 8B.
- Bias Reduction: Significant gains were seen in bias benchmarks, with a 16.9-point improvement on BBQ-Age.
- Generalization: Although designed for MCQs, KAPPA improved free-form generation accuracy (e.g., +2.5% on TruthfulQA), indicating it addresses fundamental logical alignment.
Conclusion and Future Directions
KAPPA demonstrates that many LLM failures are not due to a lack of knowledge, but a failure to retrieve and apply it correctly. While currently limited to linearly accessible information and requiring labeled data for probe training, KAPPA offers a powerful, lightweight path toward more faithful and accurate AI. Future work will focus on unsupervised subspace identification and dynamic alignment strategies.
Summary updated