Confidence over Time: Confidence Calibration with Temporal Logic for Large Language Model Reasoning
Zhenjiang Mao, Anirudhh Venkat, Artem Bisliouk, Akshat Kothiyal, Sindhura Kumbakonam Subramanian, Saithej Singhu, Ivan Ruchkin
TL;DR
We address the mismatch between long-form reasoning in LLMs and confidence estimation by modeling confidence as a stepwise signal $\mathbf S=[s_1,\dots,s_n]$ derived from token probabilities, where $s_j=\frac{1}{L_j}\sum_{k=0}^{L_j-1}P(y_{t_j+k}\mid \mathbf{y}_{<t_j+k},\mathbf{x})$. We mine STL formulas $\varphi_{\boldsymbol{\theta}}$ whose robustness $\rho(\varphi_{\boldsymbol{\theta}},\mathbf{S})$ discriminates correct vs incorrect responses, yielding dual sets $\Phi_{\text{pos}}$ and $\Phi_{\text{neg}}$. To keep interpretability, we fix the STL structure and use a hypernetwork $\mathcal{H}_{\psi}$ to predict $\boldsymbol{\theta}$ from $(\boldsymbol{x},\mathbf{S})$, mapping robustness through $\hat p=\omega(\alpha\rho+\beta)$. Empirically, across GAOKAO-Math, CLadder, SciQ, BBH and backbones $\text{Qwen3-8B}$, $\text{Gemma-3-12B}$, $\text{Llama-3-8B}$, negative-pattern templates transfer across tasks, while in-domain mining with instance-adaptive parameters delivers the most reliable calibration (ECE, BS, AUROC) with single-sample inference around $0.55_{\pm 0.04}$ seconds per example.
Abstract
Large Language Models (LLMs) increasingly rely on long-form, multi-step reasoning to solve complex tasks such as mathematical problem solving and scientific question answering. Despite strong performance, existing confidence estimation methods typically reduce an entire reasoning process to a single scalar score, ignoring how confidence evolves throughout the generation. As a result, these methods are often sensitive to superficial factors such as response length or verbosity, and struggle to distinguish correct reasoning from confidently stated errors. We propose to characterize the stepwise confidence signal using Signal Temporal Logic (STL). Using a discriminative STL mining procedure, we discover temporal formulas that distinguish confidence signals of correct and incorrect responses. Our analysis found that the STL patterns generalize across tasks, and numeric parameters exhibit sensitivity to individual questions. Based on these insights, we develop a confidence estimation approach that informs STL blocks with parameter hypernetworks. Experiments on multiple reasoning tasks show our confidence scores are more calibrated than the baselines.
