Abstract
Autoregressive Language Models output text by sequentially predicting the next token to generate, with modern methods like Chain-of-Thought (CoT) prompting achieving state-of-the-art reasoning capabilities by scaling the number of generated tokens. However, are there times when we can infer how the model will behave (e.g. abstain from answering a question) early in the computation, making generation unnecessary? We show that internal representation of input tokens alone can often precisely predict, not just the next token, but eventual behavior over the entire output sequence. We leverage this capacity and learn probes on internal states to create early warning (and exit) systems. Specifically, if the probes can confidently estimate the way the LM is going to behave, then the system will avoid generating tokens altogether and return the estimated behavior instead. On 27 text classification datasets spanning five different tasks, we apply this method to estimate the eventual answer of an LM under CoT prompting, reducing inference costs by 65% (average) while suffering an accuracy loss of no more than 1.4% (worst case). We demonstrate the potential of this method to pre-emptively identify when a model will abstain from answering a question, fail to follow output format specifications, or give a low-confidence response. We explore the limits of this capability, showing that probes generalize to unseen datasets, but perform worse when LM outputs are longer and struggle to predict properties that require access to knowledge that the models themselves lack. Encouragingly, performance scales with model size, suggesting applicability to the largest of models
Abstract (translated)
这项研究探讨了自动回归语言模型的行为预测能力。这类模型通过顺序地预测下一个标记来生成文本,现代方法如链式思维(CoT)提示法通过增加生成的标记数量来实现最先进的推理能力。然而,有时候我们可以在计算早期就推断出模型如何行为(例如,放弃回答一个问题),从而使得生成过程变得不必要。 研究人员发现,仅凭输入标记的内部表示就可以准确地预测下一个标记以及整个输出序列的行为。他们利用这一点开发了在内部状态上的探测器来创建预警系统,并且如果这些探测器能够自信地估计出语言模型(LM)将如何行为,则该系统可以完全避免生成标记并直接返回预计的结果。 这项研究在一个包含五个不同任务的27个文本分类数据集上进行了应用,通过这种方法,在CoT提示法下预测LM最终答案时,推理成本减少了65%(平均),而准确率损失不超过1.4%(最坏情况)。研究表明,该方法能够预先识别模型将何时放弃回答问题、无法遵循输出格式规范或给出低置信度响应。 研究人员还探讨了这种方法的能力极限。探测器可以泛化到未见过的数据集上,但在LM输出较长时性能下降,并且难以预测需要访问模型自身缺乏的知识的属性。令人鼓舞的是,该方法的表现随着模型规模的增长而提高,表明它适用于最大的模型。 总的来说,这项研究提供了一种新的途径来优化大型语言模型的计算效率和资源利用,同时保持高准确率。这种方法不仅可以降低推理成本,还可以改进模型在特定任务上的表现,并且预示着未来可能有更多关于如何更有效地使用大规模语言模型的研究方向。
URL
https://arxiv.org/abs/2502.13329