Verbal confidence -- prompting LLMs to state their confidence as a number or category -- is widely used to extract uncertainty estimates from black-box models. However, how LLMs internally generate such scores remains unknown. We address two questions: first, when confidence is computed - just-in-time when requested, or automatically during answer generation and cached for later retrieval; and second, what verbal confidence represents - token log-probabilities, or a richer evaluation of answer quality? Focusing on Gemma 3 27B and Qwen 2.5 7B, we provide convergent evidence for cached retrieval. Activation steering, patching, noising, and swap experiments reveal that confidence representations emerge at answer-adjacent positions before appearing at the verbalization site. Attention blocking pinpoints the information flow: confidence is gathered from answer tokens, cached at the first post-answer position, then retrieved for output. Critically, linear probing and variance partitioning reveal that these cached representations explain substantial variance in verbal confidence beyond token log-probabilities, suggesting a richer answer-quality evaluation rather than a simple fluency readout. These findings demonstrate that verbal confidence reflects automatic, sophisticated self-evaluation -- not post-hoc reconstruction -- with implications for understanding metacognition in LLMs and improving calibration.
翻译:口头置信度——即提示大语言模型以数字或类别形式陈述其置信度——已被广泛用于从黑盒模型中提取不确定性估计。然而,模型内部如何生成此类分数仍不清楚。我们聚焦两个问题:第一,置信度何时被计算——是在被要求时即时生成,还是在答案生成过程中自动产生并缓存以备后续检索;第二,口头置信度表达的是什么——是词元对数概率,还是对答案质量的更丰富评估?以Gemma 3 27B和Qwen 2.5 7B为研究对象,我们提供了支持缓存检索的汇聚证据。激活引导、修补、噪声注入及交换实验表明,置信度表征在口头化输出位置之前,先于答案相邻位置出现。注意力阻断揭示了信息流路径:置信度从答案词元中收集,缓存在首个后答案位置,随后被检索用于输出。关键的是,线性探针与方差分解表明,这些缓存表征能够解释口头置信度中超出词元对数概率的显著方差,暗示这是一种对答案质量的更丰富评估,而非简单的流畅度读取。这些发现证明,口头置信度反映的是自动、复杂的自我评估(而非事后重构),对理解大语言模型中的元认知及改进校准具有启示意义。