用隐藏状态几何偏差预测大模型能否答对,无需标注失败数据。
Geometric Deviation as an Unsupervised Pre-Generation Reliability Signal: Probing LLM Representations for Answerability

- 通过隐藏状态偏离可回答中心点的距离,判断问题是否可答。
- 数学题中未回答问题的偏差显著,AUC达0.78-0.84。
- 适合结构化任务如数学、代码,不适用于开放事实类问题。
可靠的语言模型应在生成前就识别出超出自身知识范围的问题。我们探究隐藏表示的几何结构是否可作为此类预生成信号,仅需测量隐藏状态与可回答参考集之间的偏差,无需标签化的失败数据,也无需访问模型输出。在三个指令微调模型(Llama 3.1-8B、Qwen 2.5-7B、Mistral-7B-Instruct)和三种提示形式(数学、事实、代码)上,发现几何结构主要编码任务形式。在数学提示中,不可回答输入始终显著偏离可回答中心,分离效果强(ROC-AUC 0.78–0.84)。该单次预生成信号优于简单拒绝基线,并媲美自一致性方法;还能捕捉模型未明确拒绝的情况。而在事实类提示中未发现可靠几何信号,表明该效应具有任务形式依赖性而非普遍适用。代码提示虽效果显著但方差较大,暗示其部分泛化能力超越数学形式。层分析显示该信号始于早期层,随生成过程逐渐减弱。结果表明,答案可回答性相关的几何结构在生成末期前已建立。综上,几何偏差可作为轻量级预生成信号,在具形式化答案约束的结构化领域中表现可靠,且其泛化边界清晰。
原文摘要 · Abstract (English)
A reliable language model should be able to signal, prior to generation, when a query falls outside its knowledge. We investigate whether representation geometry can provide such a pre-generation signal by measuring the deviation of hidden states from an answerable reference set, requiring no labeled failure data and no access to model outputs. Across three instruction-tuned models (Llama 3.1-8B, Qwen 2.5-7B, and Mistral-7B-Instruct) and three prompt forms (Math, Fact, Code), we find that geometry primarily encodes task form. Within mathematical prompts, unanswerable inputs consistently deviate from the answerable centroid, yielding strong separation (ROC-AUC 0.78-0.84). This single-pass pre-generation signal outperforms a simple refusal baseline and compares favorably to self-consistency. It also captures cases where models do not explicitly refuse. In contrast, no reliable geometric signal emerges for factual prompts, indicating that the effect is form-conditional rather than universal. Code prompts show large effect sizes with higher variance, suggesting partial generalization beyond mathematical form. A layer-wise analysis reveals that the signal arises in early layers and gradually attenuates toward the output. These results suggest that answerability-related geometry is established before the final stages of generation. Together, these findings indicate that geometric deviation can serve as a lightweight pre-generation signal that is reliable in structured domains with formal answerability constraints, with clear boundaries on where it generalizes.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。