<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Post-Training and Alignment on Synaptic Radio</title><link>https://synapticradio.com/categories/post-training-and-alignment/</link><description>Recent content in Post-Training and Alignment on Synaptic Radio</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><managingEditor>anshuman264@gmail.com (Anshuman Sahoo)</managingEditor><webMaster>anshuman264@gmail.com (Anshuman Sahoo)</webMaster><copyright>Anshuman Sahoo</copyright><lastBuildDate>Wed, 02 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://synapticradio.com/categories/post-training-and-alignment/index.xml" rel="self" type="application/rss+xml"/><item><title>Model Calibration in Large Language Models</title><link>https://synapticradio.com/post/model-calibration-in-llms/</link><pubDate>Wed, 02 Sep 2026 00:00:00 +0000</pubDate><author>anshuman264@gmail.com (Anshuman Sahoo)</author><guid>https://synapticradio.com/post/model-calibration-in-llms/</guid><description>&lt;img src="https://synapticradio.com/post/model-calibration-in-llms/cover.svg" alt="Featured image of post Model Calibration in Large Language Models" />&lt;h2 id="accuracy-vs-calibration">Accuracy vs calibration
&lt;/h2>&lt;p>The core idea behind model calibration is simple:&lt;/p>
&lt;blockquote>
&lt;p>When a model says &amp;ldquo;70% probability,&amp;rdquo; the event should actually happen about
70% of the time.&lt;/p>&lt;/blockquote>
&lt;p>It answers one question:&lt;/p>
&lt;blockquote>
&lt;p>Do predicted probabilities correspond to observed frequencies?&lt;/p>&lt;/blockquote>
&lt;p>Accuracy counts how often the final decision is correct. Calibration asks whether
the probabilities attached to those decisions have the right numerical meaning.
A model can therefore be accurate while still assigning unjustified confidence.&lt;/p>
&lt;p>That distinction becomes consequential when an LLM output drives a decision.
Here are a few illustrative cases:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>LLM-assisted case&lt;/th>
&lt;th>If the system reports&amp;hellip;&lt;/th>
&lt;th>Calibration requires&amp;hellip;&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Chest X-ray interpretation&lt;/td>
&lt;td>&amp;ldquo;75% probability that this image shows a pneumothorax&amp;rdquo;&lt;/td>
&lt;td>Among comparable studies assigned 75%, the finding is confirmed by the reference standard about three times out of four.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Clinical decision support&lt;/td>
&lt;td>&amp;ldquo;60% probability that the proposed diagnosis is correct&amp;rdquo;&lt;/td>
&lt;td>About 60 of 100 comparable cases receive that diagnosis after the defined clinical work-up.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Drug discovery&lt;/td>
&lt;td>&amp;ldquo;65% probability that this candidate crosses the activity threshold&amp;rdquo;&lt;/td>
&lt;td>About 65 of 100 similarly scored candidates succeed under the same assay protocol.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Retrieval and citation&lt;/td>
&lt;td>&amp;ldquo;90% probability that this source supports the generated claim&amp;rdquo;&lt;/td>
&lt;td>Human review finds entailment in about 90 of 100 claims assigned that probability.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Tool-using software agent&lt;/td>
&lt;td>&amp;ldquo;99.5% probability that this database migration preserves the required constraints&amp;rdquo;&lt;/td>
&lt;td>Comparable migrations at that confidence fail about 5 times per 1,000 executions.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>These percentages are hypothetical. Each becomes meaningful only after the
event, reference standard, population, and operating conditions are specified.
In high-stakes settings such as medicine, calibrated confidence should support
triage and verification rather than replace clinical review.&lt;/p>
&lt;p>Imagine a binary classifier predicts whether an object belongs in a room.&lt;/p>
&lt;p>For 1,000 predictions where the model outputs approximately:&lt;/p>
$$ P(y=1)=0.8 $$&lt;p>If the model is perfectly calibrated, the object should truly belong in the room
in roughly 800 of those 1,000 cases.&lt;/p>
&lt;p>A model can make every decision correctly while still being poorly calibrated.&lt;/p>
&lt;p>Suppose two models make exactly the same classification decisions:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Example&lt;/th>
&lt;th>True label&lt;/th>
&lt;th style="text-align: right">Model A $P(Y=1)$&lt;/th>
&lt;th style="text-align: right">Model B $P(Y=1)$&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>1&lt;/td>
&lt;td style="text-align: right">0.60&lt;/td>
&lt;td style="text-align: right">0.99&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2&lt;/td>
&lt;td>1&lt;/td>
&lt;td style="text-align: right">0.65&lt;/td>
&lt;td style="text-align: right">0.98&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3&lt;/td>
&lt;td>0&lt;/td>
&lt;td style="text-align: right">0.40&lt;/td>
&lt;td style="text-align: right">0.01&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>4&lt;/td>
&lt;td>0&lt;/td>
&lt;td style="text-align: right">0.35&lt;/td>
&lt;td style="text-align: right">0.02&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Both get 100% accuracy at threshold 0.5.&lt;/p>
&lt;p>Model B assigns 0.98-0.99 probability to its chosen label on every example. If
it makes even occasional mistakes, those implied confidence levels are
unjustified.&lt;/p>
&lt;p>Calibration asks:&lt;/p>
$$ P(Y=1 \mid \hat P = p) = p $$&lt;p>rather than simply asking whether $\arg\max \hat P = Y$.&lt;/p>
&lt;h2 id="reliability-diagrams">Reliability diagrams
&lt;/h2>&lt;p>The most intuitive calibration diagnostic is a &lt;strong>reliability diagram&lt;/strong>.&lt;/p>
&lt;p>A diagram can target any binary event. For a classifier or LLM confidence score,
let the event be &amp;ldquo;this prediction is correct.&amp;rdquo; Then $\hat p_i$ is the confidence
assigned to the chosen label and $y_i$ records whether that choice was correct.&lt;/p>
&lt;p>Take predictions and place them into confidence bins:&lt;/p>
&lt;ul>
&lt;li>0-10%&lt;/li>
&lt;li>10-20%&lt;/li>
&lt;li>&amp;hellip;&lt;/li>
&lt;li>90-100%&lt;/li>
&lt;/ul>
&lt;p>For every bin $B_m$, calculate its mean predicted confidence:&lt;/p>
$$
\operatorname{confidence}(B_m)
= \frac{1}{|B_m|}\sum_{i \in B_m}\hat{p}_i
$$&lt;p>and its observed accuracy:&lt;/p>
$$
\operatorname{accuracy}(B_m)
= \frac{1}{|B_m|}\sum_{i \in B_m} y_i
$$&lt;p>Then plot mean predicted confidence on the x-axis against observed accuracy on
the y-axis. A perfectly calibrated model lies on the diagonal:&lt;/p>
$$
y=x
$$&lt;p>Consider these five bins:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: right">Mean confidence&lt;/th>
&lt;th style="text-align: right">Actual success rate&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: right">0.15&lt;/td>
&lt;td style="text-align: right">0.17&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.35&lt;/td>
&lt;td style="text-align: right">0.31&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.55&lt;/td>
&lt;td style="text-align: right">0.43&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.75&lt;/td>
&lt;td style="text-align: right">0.58&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.95&lt;/td>
&lt;td style="text-align: right">0.72&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;img src="https://synapticradio.com/post/model-calibration-in-llms/figures/reliability-diagram.svg"
loading="lazy"
alt="A reliability diagram in which observed accuracy falls increasingly below predicted confidence at higher confidence levels"
>&lt;/p>
&lt;p>The model is increasingly &lt;strong>overconfident&lt;/strong> at high probabilities. In the last
bin, &amp;ldquo;95% sure&amp;rdquo; actually means &amp;ldquo;correct about 72% of the time.&amp;rdquo; That 23-point gap
is a serious problem if a downstream system treats 0.95 as near-certainty.&lt;/p>
&lt;h2 id="expected-calibration-error">Expected calibration error
&lt;/h2>&lt;p>A reliability diagram shows &lt;em>where&lt;/em> confidence and accuracy diverge. &lt;strong>Expected
calibration error (ECE)&lt;/strong> compresses those gaps into one number.&lt;/p>
&lt;p>For bins $B_1,\ldots,B_M$ containing $n$ predictions in total:&lt;/p>
$$
\boxed{\operatorname{ECE}=\sum_{m=1}^{M}\frac{|B_m|}{n}\left|\operatorname{accuracy}(B_m)-\operatorname{confidence}(B_m)\right|}
$$&lt;p>Each bin&amp;rsquo;s absolute calibration gap is weighted by the fraction of predictions
that landed in that bin. Perfect calibration gives $\operatorname{ECE}=0$; larger
values indicate a greater mismatch between stated confidence and observed
accuracy.&lt;/p>
&lt;h3 id="example">Example
&lt;/h3>&lt;p>Suppose three bins contain:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: right">Samples&lt;/th>
&lt;th style="text-align: right">Confidence&lt;/th>
&lt;th style="text-align: right">Actual accuracy&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: right">500&lt;/td>
&lt;td style="text-align: right">0.90&lt;/td>
&lt;td style="text-align: right">0.80&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">300&lt;/td>
&lt;td style="text-align: right">0.70&lt;/td>
&lt;td style="text-align: right">0.60&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">200&lt;/td>
&lt;td style="text-align: right">0.50&lt;/td>
&lt;td style="text-align: right">0.50&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Then:&lt;/p>
$$
\begin{aligned}
\operatorname{ECE}
&amp;=0.5|0.8-0.9| \\
&amp;\quad+0.3|0.6-0.7| \\
&amp;\quad+0.2|0.5-0.5| \\
&amp;=0.08
\end{aligned}
$$&lt;p>So:&lt;/p>
$$
\boxed{\operatorname{ECE}=8\%}
$$&lt;p>Informally, the model&amp;rsquo;s confidence is misaligned with empirical correctness by
about 8 percentage points under this binning.&lt;/p>
&lt;h2 id="limitations-of-ece">Limitations of ECE
&lt;/h2>&lt;p>ECE is useful, but it should not be treated as a definitive calibration score.
Its value depends substantially on how it is calculated.&lt;/p>
&lt;h3 id="number-of-bins">Number of bins
&lt;/h3>&lt;p>With 10 bins:&lt;/p>
$$
[0,0.1), [0.1,0.2), \ldots
$$&lt;p>a model might have $\operatorname{ECE}=0.03$. With 50 bins, the same predictions
might produce $\operatorname{ECE}=0.07$ because the finer partition exposes more
local calibration errors.&lt;/p>
&lt;h3 id="sample-count">Sample count
&lt;/h3>&lt;p>Small bins have noisy estimates. A bin containing 12 predictions might have mean
confidence:&lt;/p>
$$
\hat p=0.8
$$&lt;p>but only 7 successes:&lt;/p>
$$
\operatorname{accuracy}=\frac{7}{12}\approx0.583
$$&lt;p>That gap does not necessarily mean the model is dramatically miscalibrated. With
so few observations, sampling noise is large.&lt;/p>
&lt;h3 id="aggregation-effects">Aggregation effects
&lt;/h3>&lt;p>Coarse grouping can hide local errors. Consider predictions with probabilities:&lt;/p>
$$
0.51,\quad0.69
$$&lt;p>that fall into the same broad bin with a mean of $0.60$. The bin as a whole might
appear calibrated even when the probability function is not.&lt;/p>
&lt;p>ECE is useful for comparing model versions, but it is not a complete calibration
report. Its value changes with the number of bins and the binning strategy, and
large errors in sparse bins can disappear inside the weighted average. A useful
ECE report should therefore include:&lt;/p>
&lt;ul>
&lt;li>a reliability diagram&lt;/li>
&lt;li>the number of predictions in each bin&lt;/li>
&lt;li>equal-mass bins, which place similar numbers of predictions in each bin&lt;/li>
&lt;li>uncertainty intervals&lt;/li>
&lt;/ul>
&lt;h2 id="brier-score">Brier score
&lt;/h2>&lt;p>The &lt;strong>Brier score&lt;/strong> avoids binning entirely. For $N$ binary predictions:&lt;/p>
$$
\boxed{
\operatorname{BS}
= \frac{1}{N}\sum_{i=1}^{N}(\hat p_i-y_i)^2
}
$$&lt;p>where $y_i\in\{0,1\}$. It is simply mean squared error for probabilities.&lt;/p>
&lt;h3 id="example-1">Example
&lt;/h3>&lt;p>Suppose the model predicts:&lt;/p>
$$
[0.9,0.7,0.4,0.2]
$$&lt;p>and the outcomes are:&lt;/p>
$$
[1,1,0,0]
$$&lt;p>The squared errors are:&lt;/p>
$$
\begin{aligned}
(0.9-1)^2&amp;=0.01,\qquad (0.7-1)^2=0.09, \\
(0.4-0)^2&amp;=0.16,\qquad (0.2-0)^2=0.04.
\end{aligned}
$$&lt;p>Therefore:&lt;/p>
$$
\operatorname{BS}
= \frac{0.01+0.09+0.16+0.04}{4}
= 0.075
$$&lt;p>Lower is better, and $\operatorname{BS}=0$ means perfect probabilistic prediction.&lt;/p>
&lt;h2 id="calibration-and-sharpness">Calibration and sharpness
&lt;/h2>&lt;p>A useful probabilistic model needs both &lt;strong>calibration&lt;/strong> and &lt;strong>sharpness&lt;/strong>.
Calibration means that predictions reported at 80% are correct about 80% of the
time. Sharpness means that the model moves probabilities away from the base rate,
the overall event frequency, when the evidence supports doing so. Predictions such as
$0.02,0.97,0.93$ are sharper than $0.49,0.53,0.51$.&lt;/p>
&lt;p>ECE focuses on calibration. Brier score measures overall probabilistic quality,
so it rewards both calibration and sharpness.&lt;/p>
&lt;p>Consider two calibrated models. Model A always predicts:&lt;/p>
$$
P(y=1)=0.5
$$&lt;p>Suppose the dataset really is 50% positive. Model A is calibrated, but it is not
useful for distinguishing positives from negatives.&lt;/p>
&lt;p>Model B predicts 0.9 for many positives and 0.1 for many negatives, and those
probabilities match the observed frequencies. It is also calibrated, but much
more useful.&lt;/p>
&lt;p>ECE could say:&lt;/p>
$$
\operatorname{ECE}_A
\approx \operatorname{ECE}_B
\approx 0
$$&lt;p>while Brier score strongly prefers Model B. Calibration alone is not enough.&lt;/p>
&lt;p>The goal is:&lt;/p>
$$
\boxed{\text{calibrated + sharp}}
$$&lt;p>not merely calibrated. Brier score captures both requirements.&lt;/p>
&lt;p>&lt;img src="https://synapticradio.com/post/model-calibration-in-llms/figures/calibration-vs-sharpness.svg"
loading="lazy"
alt="Two equally calibrated models: one predicts only the base rate while the other separates low- and high-probability cases"
>&lt;/p>
&lt;h2 id="brier-score-decomposition">Brier score decomposition
&lt;/h2>&lt;p>A single Brier score tells us whether the probabilities were good overall. Its
decomposition explains &lt;em>why&lt;/em> the score is good or bad.&lt;/p>
&lt;p>First define the event. For a correctness forecast, let $y_i=1$ when the answer
is correct and $y_i=0$ when it is wrong. For a drug-discovery forecast, the event
might instead be whether a candidate crosses a prespecified assay threshold.&lt;/p>
&lt;p>Now divide the predictions into forecast groups $B_m$. Each group has:&lt;/p>
&lt;ul>
&lt;li>$n_m$: the number of predictions in the group;&lt;/li>
&lt;li>$\bar p_m$: the probability assigned to that group;&lt;/li>
&lt;li>$\bar y_m$: the observed event rate in that group;&lt;/li>
&lt;li>$\bar y$: the event rate across the entire dataset.&lt;/li>
&lt;/ul>
&lt;p>The group event rate is:&lt;/p>
$$
\bar y_m=\frac{1}{n_m}\sum_{i\in B_m}y_i.
$$&lt;p>It is an observed frequency, not another model prediction. If three of four
answers in a group are correct, then $\bar y_m=3/4=0.75$. When the event is
&amp;ldquo;the answer is correct,&amp;rdquo; the event rate is simply the accuracy within that
group.&lt;/p>
&lt;p>The Brier decomposition is:&lt;/p>
$$
\boxed{\operatorname{BS}=\text{Reliability}-\text{Resolution}+\text{Uncertainty}}
$$&lt;p>or, written in terms of the forecast groups:&lt;/p>
$$
\begin{aligned}
\operatorname{BS}
&amp;=\underbrace{\sum_m\frac{n_m}{N}(\bar p_m-\bar y_m)^2}_{\text{Reliability}} \\
&amp;\quad-\underbrace{\sum_m\frac{n_m}{N}(\bar y_m-\bar y)^2}_{\text{Resolution}} \\
&amp;\quad+\underbrace{\bar y(1-\bar y)}_{\text{Uncertainty}}.
\end{aligned}
$$&lt;p>Each term answers a different question:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Term&lt;/th>
&lt;th>What it measures&lt;/th>
&lt;th>Better direction&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Reliability&lt;/td>
&lt;td>How far each forecast $\bar p_m$ is from its observed event rate $\bar y_m$&lt;/td>
&lt;td>Lower&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Resolution&lt;/td>
&lt;td>How much the group event rates differ from the overall event rate $\bar y$&lt;/td>
&lt;td>Higher&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Uncertainty&lt;/td>
&lt;td>How variable the outcomes are at the overall base rate&lt;/td>
&lt;td>Fixed by the data&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Reliability is a calibration penalty. Resolution is subtracted because separating
low-event-rate groups from high-event-rate groups improves the forecast.
Uncertainty is the baseline difficulty of the dataset and does not depend on the
model.&lt;/p>
&lt;p>This form is exact when every prediction in a group has the same forecast value.
If an interval bin contains different probabilities and $\bar p_m$ replaces them
all, the result is a binned approximation unless within-bin variation is
included.&lt;/p>
&lt;h3 id="worked-example">Worked example
&lt;/h3>&lt;p>Suppose eight predictions fall into two groups, and the event is a positive
outcome:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Group&lt;/th>
&lt;th style="text-align: right">$n_m$&lt;/th>
&lt;th style="text-align: right">Forecast $\bar p_m$&lt;/th>
&lt;th>Outcomes&lt;/th>
&lt;th style="text-align: right">Event rate $\bar y_m$&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Low&lt;/td>
&lt;td style="text-align: right">4&lt;/td>
&lt;td style="text-align: right">0.20&lt;/td>
&lt;td>$[0,0,0,1]$&lt;/td>
&lt;td style="text-align: right">$1/4=0.25$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>High&lt;/td>
&lt;td style="text-align: right">4&lt;/td>
&lt;td style="text-align: right">0.80&lt;/td>
&lt;td>$[1,1,1,0]$&lt;/td>
&lt;td style="text-align: right">$3/4=0.75$&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The low group has a 25% event rate because the event occurred once in four
cases. The high group has a 75% event rate because it occurred three times in
four cases. Across the full dataset, it occurred four times in eight cases, so:&lt;/p>
$$
\bar y=\frac{4}{8}=0.50.
$$&lt;p>Both groups contain half of the samples, so each has weight $n_m/N=0.5$.
The reliability penalty compares each forecast with what happened in its group:&lt;/p>
$$
\begin{aligned}
\text{Reliability}
&amp;=0.5(0.20-0.25)^2+0.5(0.80-0.75)^2 \\
&amp;=0.0025.
\end{aligned}
$$&lt;p>The resolution reward compares each group&amp;rsquo;s event rate with the overall 50%
event rate:&lt;/p>
$$
\begin{aligned}
\text{Resolution}
&amp;=0.5(0.25-0.50)^2+0.5(0.75-0.50)^2 \\
&amp;=0.0625.
\end{aligned}
$$&lt;p>The uncertainty is determined only by the overall event rate:&lt;/p>
$$
\text{Uncertainty}=0.5(1-0.5)=0.25.
$$&lt;p>Putting the three pieces together gives:&lt;/p>
$$
\operatorname{BS}=0.0025-0.0625+0.25=0.19.
$$&lt;p>The interpretation is now visible. Predicting the 50% base rate for every case
would produce the uncertainty baseline of $0.25$. Separating the cases into 25%
and 75% event-rate groups improves the score by $0.0625$. Slightly missing those
group rates with forecasts of 20% and 80% adds back a small calibration penalty
of $0.0025$. The final Brier score is therefore $0.19$.&lt;/p>
&lt;p>This is why Brier score captures more than calibration alone. It rewards both
probabilities that match observed frequencies and predictions that separate
cases with meaningfully different outcomes.&lt;/p>
&lt;h2 id="brier-score-vs-log-loss">Brier score vs log loss
&lt;/h2>&lt;p>Another important metric is &lt;strong>negative log-likelihood&lt;/strong>, also called log loss or
binary cross-entropy:&lt;/p>
$$
\operatorname{NLL}=-\frac{1}{N}\sum_{i=1}^{N}\left[y_i\log p_i+(1-y_i)\log(1-p_i)\right].
$$&lt;p>Both Brier score and NLL are &lt;strong>proper scoring rules&lt;/strong>: in expectation, the best
strategy is to report the probability you actually believe. But they punish
errors differently.&lt;/p>
&lt;p>Suppose $y=0$ and the model predicts $p=0.999999$. The Brier penalty is:&lt;/p>
$$
(0.999999-0)^2\approx1
$$&lt;p>while the log-loss penalty is:&lt;/p>
$$
{}-\log(1-0.999999)\approx13.8.
$$&lt;p>Log loss therefore punishes a confidently wrong prediction much more severely.
That is useful when unjustified certainty is especially costly.&lt;/p>
&lt;p>&lt;img src="https://synapticradio.com/post/model-calibration-in-llms/figures/brier-vs-log-loss.svg"
loading="lazy"
alt="Brier and log-loss penalties as the probability assigned to a wrong outcome approaches one"
>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Metric&lt;/th>
&lt;th>Primarily asks&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Accuracy&lt;/td>
&lt;td>Was the final decision correct?&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>AUROC&lt;/td>
&lt;td>Did positives rank above negatives?&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>ECE&lt;/td>
&lt;td>Does confidence match empirical accuracy?&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Brier score&lt;/td>
&lt;td>Are the probabilities good overall?&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>NLL&lt;/td>
&lt;td>How much probability did the model assign to what happened?&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="multiclass-calibration-gets-trickier">Multiclass calibration gets trickier
&lt;/h2>&lt;p>For a multiclass model, &lt;strong>top-label calibration&lt;/strong> reduces the full probability
vector to the highest predicted probability:&lt;/p>
$$
\operatorname{confidence}=\max_k P(y=k).
$$&lt;p>It then checks whether predictions at that confidence are correct at the same
rate. Suppose a model outputs:&lt;/p>
$$
P(y)=[0.6,0.3,0.1].
$$&lt;p>The top-label confidence is 0.6, and the other two probabilities are discarded.
That loss of information can hide differences between distributions.&lt;/p>
&lt;p>For example:&lt;/p>
$$
[0.6,0.39,0.01]
$$&lt;p>and:&lt;/p>
$$
[0.6,0.20,0.20]
$$&lt;p>look identical to top-label ECE even though their uncertainty structures are
different.&lt;/p>
&lt;p>One alternative is &lt;strong>classwise calibration&lt;/strong>:&lt;/p>
$$
P(Y=k\mid\hat P_k=p)=p
$$&lt;p>for every class $k$. Multiclass Brier score naturally uses the whole probability
vector:&lt;/p>
$$
\operatorname{BS}
= \frac{1}{N}\sum_i\sum_k(p_{ik}-y_{ik})^2,
$$&lt;p>where $y_{ik}$ is 1 for the true class and 0 for every other class, a representation
called one-hot encoding. Some libraries also divide this quantity by the number
of classes, so the convention should be recorded when results are compared.&lt;/p>
&lt;h2 id="calibration-can-be-conditional">Calibration can be conditional
&lt;/h2>&lt;p>An aggregate score can look calibrated even when it fails for important
subgroups. Suppose the full dataset shows:&lt;/p>
$$
P(\text{correct}\mid\text{confidence}=0.8)=0.8.
$$&lt;p>Now split the same predictions by context:&lt;/p>
$$
P(\text{correct}\mid\text{confidence}=0.8,\text{bedroom})=0.95
$$&lt;p>while:&lt;/p>
$$
P(\text{correct}\mid\text{confidence}=0.8,\text{kitchen})=0.60.
$$&lt;p>The subgroup errors cancel in aggregate, but the 0.8 score has different
meanings in bedrooms and kitchens. Operationally, the model is not calibrated
where it matters.&lt;/p>
&lt;p>Calibration should therefore be inspected across relevant slices such as:&lt;/p>
&lt;ul>
&lt;li>classes&lt;/li>
&lt;li>spatial regions&lt;/li>
&lt;li>input complexity&lt;/li>
&lt;li>rare vs frequent objects&lt;/li>
&lt;li>in-distribution vs shifted data&lt;/li>
&lt;li>document types&lt;/li>
&lt;li>model versions&lt;/li>
&lt;li>confidence ranges&lt;/li>
&lt;/ul>
&lt;p>A single global ECE can hide all of these failures.&lt;/p>
&lt;h2 id="why-neural-networks-tend-to-be-overconfident">Why neural networks tend to be overconfident
&lt;/h2>&lt;p>Cross-entropy training does not guarantee finite-sample or out-of-distribution
calibration. In an overparameterized network, training can continue increasing
the margin between the raw class scores, called logits, even after the
classification decision is already correct.&lt;/p>
&lt;p>Suppose the logits are:&lt;/p>
$$
[12,4,1].
$$&lt;p>Softmax converts those scores to probabilities by exponentiating and normalizing
them. Here it produces a distribution close to:&lt;/p>
$$
[0.9997,0.0003,0].
$$&lt;p>But perhaps the evidence only justifies:&lt;/p>
$$
[0.85,0.10,0.05].
$$&lt;p>The predicted class is identical; only the claimed confidence is wrong. The
probabilities are too extreme even though the class selection need not change.&lt;/p>
&lt;h2 id="post-hoc-calibration-methods">Post-hoc calibration methods
&lt;/h2>&lt;p>Post-hoc calibration fits a mapping from a model&amp;rsquo;s existing scores to
probabilities using a held-out calibration set. Three common methods form a
rough spectrum of flexibility:&lt;/p>
$$
\text{Temperature scaling}
\lt \text{Platt scaling}
\lt \text{Isotonic regression}.
$$&lt;h3 id="temperature-scaling">Temperature scaling
&lt;/h3>&lt;p>Given logits $z_1,\ldots,z_K$, ordinary softmax uses:&lt;/p>
$$
p_k=\frac{e^{z_k}}{\sum_j e^{z_j}}.
$$&lt;p>Temperature scaling instead uses:&lt;/p>
$$
\boxed{
p_k=\frac{e^{z_k/T}}{\sum_j e^{z_j/T}}
}
$$&lt;p>A single positive scalar $T$ is fitted on a held-out calibration set, usually by
minimizing NLL. Because it learns only one scalar for all logits, temperature
scaling has low capacity and a correspondingly low risk of overfitting. When
$T\gt1$, the distribution becomes softer.&lt;/p>
&lt;p>For example, logits $[10,5,1]$ produce approximately:&lt;/p>
$$
[0.9932,0.0067,0.0001].
$$&lt;p>With $T=2$, they become approximately:&lt;/p>
$$
[0.9148,0.0751,0.0101].
$$&lt;p>&lt;img src="https://synapticradio.com/post/model-calibration-in-llms/figures/temperature-scaling.svg"
loading="lazy"
alt="Temperature scaling softens a probability distribution without changing its highest-ranked class"
>&lt;/p>
&lt;p>Dividing every logit by the same positive temperature does not change their
ordering, so the highest-probability class stays the same. Classification
accuracy therefore stays the same.
The reported probabilities can nevertheless become much better calibrated.&lt;/p>
&lt;h3 id="platt-scaling">Platt scaling
&lt;/h3>&lt;p>Platt scaling learns a logistic transformation such as:&lt;/p>
$$
p=\sigma(as+b)
=\frac{1}{1+e^{-(as+b)}},
$$&lt;p>where $s$ is the model&amp;rsquo;s uncalibrated scalar score. The parameters $a$ and $b$
are fitted on a held-out calibration set, typically by minimizing binary NLL. The
slope $a$ changes the scale, while the intercept $b$ corrects a systematic bias.&lt;/p>
&lt;p>For example, suppose calibration fitting gives:&lt;/p>
$$
a=0.8,\qquad b=-0.4.
$$&lt;p>A raw score of $s=2$ would give $\sigma(2)\approx0.881$ if treated directly as a
logit. Platt scaling instead gives:&lt;/p>
$$
p=\sigma(0.8\cdot2-0.4)
=\sigma(1.2)
\approx0.769.
$$&lt;p>The same mapping transforms several scores as follows:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: right">Raw score $s$&lt;/th>
&lt;th style="text-align: right">Raw sigmoid $\sigma(s)$&lt;/th>
&lt;th style="text-align: right">Platt-scaled probability $\sigma(0.8s-0.4)$&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: right">-1.0&lt;/td>
&lt;td style="text-align: right">0.269&lt;/td>
&lt;td style="text-align: right">0.231&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.0&lt;/td>
&lt;td style="text-align: right">0.500&lt;/td>
&lt;td style="text-align: right">0.401&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">2.0&lt;/td>
&lt;td style="text-align: right">0.881&lt;/td>
&lt;td style="text-align: right">0.769&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Here, the fitted mapping says the original scores were both too large in scale
and too optimistic around zero. Because $a\gt0$, the transformation preserves the
ranking of examples even though their reported probabilities change.&lt;/p>
&lt;h3 id="isotonic-regression">Isotonic regression
&lt;/h3>&lt;p>Isotonic regression learns a flexible monotonic mapping $f(p)$ so that higher
original scores still produce higher calibrated probabilities. It can fit more
complex distortions, but it needs more calibration data and can overfit small
samples. The standard pool-adjacent-violators algorithm enforces monotonicity by
merging neighboring buckets whenever their observed rates are out of order.&lt;/p>
&lt;p>Suppose four equally sized score buckets have these observed success rates:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: right">Original score&lt;/th>
&lt;th style="text-align: right">Observed success rate&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: right">0.20&lt;/td>
&lt;td style="text-align: right">0.10&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.40&lt;/td>
&lt;td style="text-align: right">0.50&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.60&lt;/td>
&lt;td style="text-align: right">0.40&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.80&lt;/td>
&lt;td style="text-align: right">0.90&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The middle two buckets violate monotonicity: the higher score, 0.60, succeeds
less often than 0.40. The algorithm therefore merges those buckets. Because they
contain the same number of samples, their pooled rate is:&lt;/p>
$$
\frac{0.50+0.40}{2}=0.45.
$$&lt;p>The fitted mapping becomes:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: right">Original score&lt;/th>
&lt;th style="text-align: right">Isotonic probability&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: right">0.20&lt;/td>
&lt;td style="text-align: right">0.10&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.40&lt;/td>
&lt;td style="text-align: right">0.45&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.60&lt;/td>
&lt;td style="text-align: right">0.45&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.80&lt;/td>
&lt;td style="text-align: right">0.90&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>A new score on the pooled plateau, such as 0.50, maps to 0.45. The method
learns this shape directly from the calibration data rather than assuming a
sigmoid. With unequal bucket sizes, the pooled value would be the
sample-count-weighted average instead.&lt;/p>
&lt;p>The right choice depends on the score being calibrated, the number of classes,
and how much held-out data is available.&lt;/p>
&lt;h2 id="llm-calibration-starts-with-choosing-the-event">LLM calibration starts with choosing the event
&lt;/h2>&lt;p>Calibration is harder for LLMs than for ordinary classifiers because the model
produces a sequence of tokens while the event we care about is usually semantic:&lt;/p>
&lt;blockquote>
&lt;p>What is the probability that this answer is correct?&lt;/p>&lt;/blockquote>
&lt;p>An autoregressive LLM generates one token at a time. The probability of a
complete sequence is the product of its conditional next-token probabilities:&lt;/p>
$$
P(t_1,\ldots,t_n\mid x)
=\prod_i P(t_i\mid x,t_{\lt i}).
$$&lt;p>When it generates:&lt;/p>
&lt;blockquote>
&lt;p>Ottawa is the capital of Canada.&lt;/p>&lt;/blockquote>
&lt;p>the model assigns probabilities to &lt;code>Ottawa&lt;/code>, &lt;code> is&lt;/code>, &lt;code> the&lt;/code>, &lt;code> capital&lt;/code>, and every
subsequent token. The operational quantity is different:&lt;/p>
$$
P(\text{the proposition "Ottawa is Canada's capital" is correct}\mid x).
$$&lt;p>There is no reason for sequence likelihood and proposition correctness to be
equal. That distinction is the foundation of LLM calibration.&lt;/p>
&lt;p>Several calibration targets are possible:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Level&lt;/th>
&lt;th>Probability being calibrated&lt;/th>
&lt;th>Operational question&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Token&lt;/td>
&lt;td>$P(t_i\mid t_{\lt i})$&lt;/td>
&lt;td>Will this be the next token?&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Choice&lt;/td>
&lt;td>$P(A),P(B),P(C),P(D)$&lt;/td>
&lt;td>Which constrained answer is correct?&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Answer&lt;/td>
&lt;td>$P(\text{answer correct})$&lt;/td>
&lt;td>Is the generated answer right?&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Claim&lt;/td>
&lt;td>$P(\text{claim true})$&lt;/td>
&lt;td>Is this particular factual claim right?&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Action&lt;/td>
&lt;td>$P(\text{action succeeds})$&lt;/td>
&lt;td>Should an agent execute this action?&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Answer-, claim-, and action-level probabilities are usually the ones that matter
in production.&lt;/p>
&lt;h2 id="multiple-choice-is-the-easy-llm-case">Multiple choice is the easy LLM case
&lt;/h2>&lt;p>When an LLM must choose from a fixed set of answers, the choice probabilities
directly match the event being scored. The task can therefore be evaluated like
an ordinary multiclass classifier.&lt;/p>
&lt;p>Suppose we ask:&lt;/p>
&lt;blockquote>
&lt;p>What is the capital of Canada?&lt;/p>
&lt;p>A. Toronto&lt;/p>
&lt;p>B. Ottawa&lt;/p>
&lt;p>C. Vancouver&lt;/p>
&lt;p>D. Montreal&lt;/p>&lt;/blockquote>
&lt;p>Restrict the output to the four choices and renormalize their scores so the
probabilities sum to one. The LLM then gives:&lt;/p>
$$
P=[0.05,0.80,0.10,0.05].
$$&lt;p>We can apply ECE, Brier score, NLL, and reliability diagrams directly. If
questions chosen with confidence near 0.80 are correct only 60% of the time, the
model is overconfident by roughly 20 percentage points.&lt;/p>
&lt;p>&lt;a class="link" href="https://arxiv.org/abs/2207.05221" target="_blank" rel="noopener"
>Kadavath et al.&lt;/a> found that sufficiently large language models could
show useful calibration on multiple-choice and true/false questions when the
probability was elicited in the right format. The result is encouraging, but it
is specific to the model, task, and elicitation method.&lt;/p>
&lt;h2 id="why-sequence-probability-fails-for-free-form-answers">Why sequence probability fails for free-form answers
&lt;/h2>&lt;p>Free-form sequence probability measures the likelihood of one exact token
string, while answer correctness is a property of its meaning. Paraphrases can
therefore express the same fact while receiving very different probabilities.&lt;/p>
&lt;p>Consider two answers:&lt;/p>
&lt;blockquote>
&lt;p>Paris.&lt;/p>&lt;/blockquote>
&lt;p>and:&lt;/p>
&lt;blockquote>
&lt;p>The capital of France is Paris.&lt;/p>&lt;/blockquote>
&lt;p>They express the same proposition, but their sequence probabilities can differ
dramatically. Every extra token introduces another factor:&lt;/p>
$$
P(y)=\prod_i P(y_i\mid y_{\lt i},x),
$$&lt;p>so longer strings tend to have smaller probabilities. Length-normalized log
probability reduces that bias but does not solve the deeper problem: a model can
be uncertain about &lt;strong>phrasing&lt;/strong> while being certain about &lt;strong>meaning&lt;/strong>.&lt;/p>
&lt;p>For free-form generation, raw sequence probability and entropy over token
strings are therefore weak substitutes for answer-level confidence. Early
generative QA experiments likewise found model probabilities to be poorly calibrated
(&lt;a class="link" href="https://aclanthology.org/2021.tacl-1.57/" target="_blank" rel="noopener"
>Jiang et al.&lt;/a>).&lt;/p>
&lt;h2 id="where-answer-level-confidence-can-come-from">Where answer-level confidence can come from
&lt;/h2>&lt;p>There is no single built-in $P(\text{answer correct})$. A system has to construct
an estimator from observable signals.&lt;/p>
&lt;h3 id="constrained-token-or-choice-probability">Constrained token or choice probability
&lt;/h3>&lt;p>For an answer constrained to &lt;code>yes&lt;/code> or &lt;code>no&lt;/code>, $P(\text{yes})$ is a natural score.
The same applies to normalized multiple-choice probabilities. This is the
cleanest case because the output space already matches the event being scored.&lt;/p>
&lt;h3 id="verbalized-confidence">Verbalized confidence
&lt;/h3>&lt;p>Another option is to ask the model directly:&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Answer:&lt;/strong> Ottawa&lt;/p>
&lt;p>&lt;strong>Confidence:&lt;/strong> 97%&lt;/p>&lt;/blockquote>
&lt;p>This produces:&lt;/p>
$$
c_i=\text{model's reported confidence},
$$&lt;p>which can be evaluated with ECE and Brier score. Another elicitation method,
$P(\mathrm{True})$, asks the model to judge a proposed answer and uses the
normalized probability it assigns to &lt;code>True&lt;/code>. Experiments in &lt;a class="link" href="https://arxiv.org/abs/2207.05221" target="_blank" rel="noopener"
>Language Models
(Mostly) Know What They Know&lt;/a> show that models can contain genuine
self-evaluation signal.&lt;/p>
&lt;p>But &amp;ldquo;I am 95% confident&amp;rdquo; is itself generated text. It does not necessarily expose
an internal posterior of 0.95; it is a learned linguistic behavior influenced by
pretraining, prompting, instruction tuning, and preference optimization. In one
study, reinforcement learning from human feedback (RLHF) increased verbalized
overconfidence under the evaluated setups
(&lt;a class="link" href="https://arxiv.org/abs/2410.09724" target="_blank" rel="noopener"
>Leng et al.&lt;/a>).&lt;/p>
&lt;p>The distinction is:&lt;/p>
$$
\text{latent or internal uncertainty}
\neq
\text{expressed confidence}.
$$&lt;h3 id="semantic-uncertainty">Semantic uncertainty
&lt;/h3>&lt;p>Semantic uncertainty groups sampled answers by meaning before measuring how
spread out the answers are. Paraphrases count as the same outcome, so wording
variation does not masquerade as uncertainty about the underlying answer.&lt;/p>
&lt;p>Suppose five samples answer &amp;ldquo;What caused the failure?&amp;rdquo; with:&lt;/p>
&lt;ol>
&lt;li>&amp;ldquo;A memory leak in the worker.&amp;rdquo;&lt;/li>
&lt;li>&amp;ldquo;The worker exhausted memory.&amp;rdquo;&lt;/li>
&lt;li>&amp;ldquo;OOM in the worker process.&amp;rdquo;&lt;/li>
&lt;li>&amp;ldquo;A networking timeout.&amp;rdquo;&lt;/li>
&lt;li>&amp;ldquo;Worker memory exhaustion.&amp;rdquo;&lt;/li>
&lt;/ol>
&lt;p>There are five strings but only two meanings:&lt;/p>
$$
P(\text{memory failure})=0.8,\qquad
P(\text{network failure})=0.2.
$$&lt;p>Rather than compute entropy over strings, cluster semantically equivalent answers
and compute entropy over meanings:&lt;/p>
$$
\boxed{
H(\text{meaning})=-\sum_s P(s)\log P(s)
}
$$&lt;p>Here, $s$ indexes the distinct semantic answer clusters rather than the original
token strings.&lt;/p>
&lt;p>&lt;a class="link" href="https://www.nature.com/articles/s41586-024-07421-0" target="_blank" rel="noopener"
>Farquhar et al.&lt;/a> use this idea to detect confabulations:
generations that vary in meaning across samples. Nine paraphrases plus one
alternative signal something very different from three answers naming Alice,
three naming Bob, two naming Carol, and two naming Dave.&lt;/p>
&lt;p>Semantic agreement is still not proof of correctness. Every sample can reproduce
the same systematic misconception.&lt;/p>
&lt;h2 id="evaluate-uncertainty-ranking-and-calibration-separately">Evaluate uncertainty ranking and calibration separately
&lt;/h2>&lt;p>Any answer-level confidence score should be tested on two distinct properties:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Uncertainty discrimination:&lt;/strong> can the score rank likely-correct answers above
likely-wrong ones? Measure AUROC, AUPRC, and risk-coverage, which tracks error
as the system answers a larger fraction of requests.&lt;/li>
&lt;li>&lt;strong>Calibration:&lt;/strong> does $c=0.8$ actually mean an 80% correctness rate? Measure
reliability diagrams, ECE, Brier score, and NLL.&lt;/li>
&lt;/ul>
&lt;p>Suppose an LLM produces this relationship:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: right">Raw confidence&lt;/th>
&lt;th style="text-align: right">Accuracy&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: right">0.50&lt;/td>
&lt;td style="text-align: right">35%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.60&lt;/td>
&lt;td style="text-align: right">45%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.70&lt;/td>
&lt;td style="text-align: right">55%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.80&lt;/td>
&lt;td style="text-align: right">65%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">0.90&lt;/td>
&lt;td style="text-align: right">75%&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>It is miscalibrated everywhere, yet its ranking is excellent. A monotonic
calibrator could learn $f(0.9)=0.75$, $f(0.8)=0.65$, and so on.&lt;/p>
&lt;p>A useful system needs both discrimination and calibration.&lt;/p>
&lt;h2 id="ece-and-brier-at-the-answer-level">ECE and Brier at the answer level
&lt;/h2>&lt;p>Once each answer has a confidence $c_i$ and a correctness label $y_i$, the general
metrics apply without modification:&lt;/p>
$$
y_i=
\begin{cases}
1 &amp; \text{answer correct}\\
0 &amp; \text{answer incorrect}.
\end{cases}
$$&lt;p>For example:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Question&lt;/th>
&lt;th style="text-align: right">Confidence&lt;/th>
&lt;th style="text-align: right">Correct?&lt;/th>
&lt;th style="text-align: right">Brier contribution&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Q1&lt;/td>
&lt;td style="text-align: right">0.95&lt;/td>
&lt;td style="text-align: right">1&lt;/td>
&lt;td style="text-align: right">0.0025&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Q2&lt;/td>
&lt;td style="text-align: right">0.90&lt;/td>
&lt;td style="text-align: right">0&lt;/td>
&lt;td style="text-align: right">&lt;strong>0.81&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Q3&lt;/td>
&lt;td style="text-align: right">0.60&lt;/td>
&lt;td style="text-align: right">1&lt;/td>
&lt;td style="text-align: right">0.16&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Q4&lt;/td>
&lt;td style="text-align: right">0.55&lt;/td>
&lt;td style="text-align: right">0&lt;/td>
&lt;td style="text-align: right">0.3025&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Q2 receives a large penalty because the model was 90% confident and wrong. The
mean Brier score for the four answers is:&lt;/p>
$$
\frac{0.0025+0.81+0.16+0.3025}{4}=0.31875.
$$&lt;p>This is also the evaluation pattern used by &lt;a class="link" href="https://arxiv.org/abs/2607.20526" target="_blank" rel="noopener"
>ConfidenceBench&lt;/a>,
which elicits verbalized probabilities and scores them with Brier score. Its
reported results reinforce that accuracy and calibration need not rank models in
the same order.&lt;/p>
&lt;p>At larger scale, an answer-level reliability table might look like:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Reported confidence&lt;/th>
&lt;th style="text-align: right">Questions&lt;/th>
&lt;th style="text-align: right">Observed accuracy&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>50-60%&lt;/td>
&lt;td style="text-align: right">1,200&lt;/td>
&lt;td style="text-align: right">54%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>60-70%&lt;/td>
&lt;td style="text-align: right">1,600&lt;/td>
&lt;td style="text-align: right">59%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>70-80%&lt;/td>
&lt;td style="text-align: right">2,300&lt;/td>
&lt;td style="text-align: right">64%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>80-90%&lt;/td>
&lt;td style="text-align: right">2,600&lt;/td>
&lt;td style="text-align: right">71%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>90-100%&lt;/td>
&lt;td style="text-align: right">2,300&lt;/td>
&lt;td style="text-align: right">78%&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The rising accuracy shows useful discrimination, while every upper bin remains
overconfident. The score knows something, but it is not yet a probability.&lt;/p>
&lt;h2 id="risk-coverage-connects-confidence-to-abstention">Risk-coverage connects confidence to abstention
&lt;/h2>&lt;p>&lt;strong>Coverage&lt;/strong> is the fraction of requests the model answers, and &lt;strong>risk&lt;/strong> is the
error rate on those answered requests. Sorting requests by confidence and
abstaining on the lowest scores traces a risk-coverage curve.&lt;/p>
&lt;p>Suppose the model answers every request at 82% accuracy. If it abstains on its
least-confident requests, the operating points might be:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: right">Coverage&lt;/th>
&lt;th style="text-align: right">Accuracy&lt;/th>
&lt;th style="text-align: right">Risk (error rate)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: right">100%&lt;/td>
&lt;td style="text-align: right">82%&lt;/td>
&lt;td style="text-align: right">18%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">80%&lt;/td>
&lt;td style="text-align: right">90%&lt;/td>
&lt;td style="text-align: right">10%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">50%&lt;/td>
&lt;td style="text-align: right">96%&lt;/td>
&lt;td style="text-align: right">4%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: right">20%&lt;/td>
&lt;td style="text-align: right">99%&lt;/td>
&lt;td style="text-align: right">1%&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;img src="https://synapticradio.com/post/model-calibration-in-llms/figures/risk-coverage.svg"
loading="lazy"
alt="A risk-coverage curve showing error falling as the model abstains on more low-confidence requests"
>&lt;/p>
&lt;p>The curve answers a production question more directly than ECE:&lt;/p>
&lt;blockquote>
&lt;p>What fraction of requests can the LLM handle while staying below a specified
error rate?&lt;/p>&lt;/blockquote>
&lt;p>For deployed systems, this can matter more than whether confidence values are
perfectly calibrated. The two evaluations remain complementary: risk-coverage
tests ranking and selective prediction, while ECE tests probability semantics.&lt;/p>
&lt;h2 id="long-answers-need-claim-level-calibration">Long answers need claim-level calibration
&lt;/h2>&lt;p>For long-form generation, define correctness at the level of individual factual
claims rather than assigning one probability to an entire paragraph. Decompose a
response into claims $C_1,\ldots,C_j$ and estimate:&lt;/p>
$$
P(C_j\text{ is true})
$$&lt;p>for each claim. This is &lt;strong>claim-level calibration&lt;/strong>.&lt;/p>
&lt;p>Consider a response containing four factual statements:&lt;/p>
&lt;blockquote>
&lt;p>Toronto is Canada&amp;rsquo;s capital, Canada has ten provinces, Ottawa is in Ontario,
and the prime minister is X.&lt;/p>&lt;/blockquote>
&lt;p>A single $P(\text{response correct})=0.8$ hides which parts are trustworthy.
Claim-level probabilities can distinguish the supported statements from the
incorrect or time-sensitive ones.&lt;/p>
&lt;p>It also separates hallucination detection from calibration. An uncertainty model
might rank a claim with score 8.7 above one with score 4.2, yet neither number is a
probability. A calibrator can turn the first score into a statement such as:&lt;/p>
$$
P(\text{claim true})=0.93.
$$&lt;p>The detector asks whether one claim looks more trustworthy than another. The
calibrator asks whether claims reported at 0.93 are actually true about 93% of
the time.&lt;/p>
&lt;h2 id="reasoning-models-need-trajectory-level-signals">Reasoning models need trajectory-level signals
&lt;/h2>&lt;p>A reasoning model can produce hundreds of intermediate tokens before a final
answer. Token-level probabilities do not directly estimate:&lt;/p>
$$
P(\text{final answer correct}\mid\text{reasoning trajectory}).
$$&lt;p>Useful estimator features can include:&lt;/p>
&lt;ul>
&lt;li>self-evaluation&lt;/li>
&lt;li>verifier or reward-model scores&lt;/li>
&lt;li>process-reward signals&lt;/li>
&lt;li>multiple reasoning samples&lt;/li>
&lt;li>agreement or self-consistency&lt;/li>
&lt;li>hidden-state probes&lt;/li>
&lt;li>execution results&lt;/li>
&lt;li>tool-based verification&lt;/li>
&lt;/ul>
&lt;p>Internal signals can help. For example, &lt;a class="link" href="https://aclanthology.org/2025.emnlp-main.530/" target="_blank" rel="noopener"
>Khanmohammadi et al.&lt;/a>
perturb hidden representations, measure their stability, and train a lightweight
correctness classifier; their reported experiments improve both ECE and Brier
score relative to the evaluated baselines.&lt;/p>
&lt;h3 id="agreement-is-not-calibration">Agreement is not calibration
&lt;/h3>&lt;p>Agreement measures how often multiple reasoning paths reach the same answer. It
can be a useful uncertainty score, but it becomes a probability only after its
relationship to correctness is measured on labeled data.&lt;/p>
&lt;p>Suppose 100 reasoning samples produce:&lt;/p>
$$
A:82,\qquad B:13,\qquad C:5.
$$&lt;p>The agreement score $c(A)=0.82$ is useful, but it does not imply:&lt;/p>
$$
P(A\text{ is correct})=0.82.
$$&lt;p>All 82 trajectories could share the same misconception. The mapping has to be
measured empirically. If answers with 82% agreement have historically been
correct 94% of the time, then the calibrator should learn:&lt;/p>
$$
f(0.82)=0.94.
$$&lt;h2 id="rag-needs-several-calibrated-events">RAG needs several calibrated events
&lt;/h2>&lt;p>A retrieval-augmented system has more than one place to be uncertain. Instead of
one generic confidence score, it can estimate:&lt;/p>
$$
\begin{aligned}
&amp;P(\text{retrieved evidence is sufficient}),\\
&amp;P(\text{answer is supported by the evidence}),\\
&amp;P(\text{claim is factually correct}),\\
&amp;P(\text{citation entails the claim}).
\end{aligned}
$$&lt;p>For example:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">document relevance 0.93
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">evidence sufficiency 0.71
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">answer correctness 0.76
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">citation faithfulness 0.98
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>The low evidence-sufficiency probability suggests searching again rather than
simply generating harder. Event-specific calibration can therefore drive agent
policy, not just annotate an answer after the fact.&lt;/p>
&lt;h2 id="drug-discovery-agents-turn-calibration-into-a-chain-of-gates">Drug-discovery agents turn calibration into a chain of gates
&lt;/h2>&lt;p>Scientific agents make the event-definition problem concrete. They do not make
one prediction; they search literature, form a hypothesis, rank candidates,
call chemistry or biology tools, propose an experiment, and interpret the
result. A single &amp;ldquo;agent confidence&amp;rdquo; number collapses failure modes with very
different meanings and costs.&lt;/p>
&lt;p>The probability that a candidate becomes a safe, effective drug is not a
sensible one-step target. Attrition occurs at a sequence of gates: evidence,
candidate selection, synthesis, assay, and replication. Each probability should
name the gate and the population reaching it. For example, assay success is
measured among synthesized candidates sent to that assay, while replication is
measured among results selected for confirmation.&lt;/p>
&lt;p>&lt;img src="https://synapticradio.com/post/model-calibration-in-llms/figures/drug-discovery-calibration-gates.svg"
loading="lazy"
alt="A drug-discovery agent workflow with separate calibration gates for evidence, candidates, synthesis, assays, and replication"
>&lt;/p>
&lt;p>A useful confidence interface would expose measurable events such as:&lt;/p>
$$
\begin{aligned}
c_{\text{evidence}}
&amp;=P(\text{retrieved evidence supports the target and disease link}),\\
c_{\text{candidate}}
&amp;=P(\text{candidate meets the stated molecular constraints}),\\
c_{\text{synthesis}}
&amp;=P(\text{proposed synthesis succeeds under the specified protocol}),\\
c_{\text{assay}}
&amp;=P(\text{candidate crosses the prespecified assay threshold}),\\
c_{\text{replication}}
&amp;=P(\text{effect replicates in a new batch or laboratory}).
\end{aligned}
$$&lt;p>These are not interchangeable. A candidate can be well supported by literature
and easy to synthesize yet fail the assay. A strong assay result can also fail
to replicate or translate to a different model system. The outcome definition
must therefore include the assay, threshold, experimental population, and time
horizon, rather than simply whether the candidate works.&lt;/p>
&lt;h3 id="examples-from-scientific-agents">Examples from scientific agents
&lt;/h3>&lt;p>Recent systems show how much of this loop can already be automated. They also
show why a rank, model score, or agent agreement is only a proxy until it is
calibrated against a named outcome:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>System&lt;/th>
&lt;th>What was demonstrated&lt;/th>
&lt;th>Calibration lesson&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;a class="link" href="https://www.nature.com/articles/s42256-024-00832-8" target="_blank" rel="noopener"
>ChemCrow&lt;/a>&lt;/td>
&lt;td>A GPT-4 agent used 18 expert-designed chemistry tools for synthesis and drug-discovery tasks, and autonomously planned and executed four syntheses.&lt;/td>
&lt;td>Citation support, chemical identity, synthesis feasibility, tool-call validity, and safety are separate events.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a class="link" href="https://www.nature.com/articles/s41586-023-06792-0" target="_blank" rel="noopener"
>Coscientist&lt;/a>&lt;/td>
&lt;td>A multi-LLM system searched documentation, wrote code, controlled laboratory hardware, and optimized palladium-catalysed cross-coupling reactions.&lt;/td>
&lt;td>A plausible protocol, a valid robot command, and a successful reaction need different confidence estimates.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a class="link" href="https://www.nature.com/articles/s41586-025-09442-9" target="_blank" rel="noopener"
>Virtual Lab&lt;/a>&lt;/td>
&lt;td>An LLM principal investigator coordinated specialist agents and a computational pipeline to design 92 nanobodies; experiments identified functional candidates, including two with improved binding to the JN.1 or KP.3 variants.&lt;/td>
&lt;td>Sequence, structure, and energy scores are proxies until a physical assay supplies the outcome.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a class="link" href="https://www.nature.com/articles/s41586-026-10652-y" target="_blank" rel="noopener"
>Robin&lt;/a>&lt;/td>
&lt;td>Literature and data-analysis agents proposed and iteratively refined therapeutic candidates for dry age-related macular degeneration; ripasudil and KL001 were confirmed in vitro.&lt;/td>
&lt;td>An LLM tournament rank or agreement across analysis trajectories is not the probability of assay success.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a class="link" href="https://www.nature.com/articles/s41586-026-10644-y" target="_blank" rel="noopener"
>Co-Scientist&lt;/a>&lt;/td>
&lt;td>Specialized agents generated and ranked biomedical hypotheses that were followed by experimental validation, including drug-repurposing work in acute myeloid leukaemia and target discovery in liver fibrosis.&lt;/td>
&lt;td>Hypothesis rankings become actionable probabilities only after calibration against comparable experiments.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>ChemCrow and Coscientist are broad chemistry systems. Virtual Lab, Robin, and
Co-Scientist close parts of a drug-discovery loop with experimental validation.&lt;/p>
&lt;h3 id="proxy-scores-are-not-probabilities">Proxy scores are not probabilities
&lt;/h3>&lt;p>Drug-discovery agents combine signals on incompatible scales: an LLM judge&amp;rsquo;s
rank, agreement among agents, language-model likelihood, structure-model
confidence, molecular-simulation energy, and an experimental measurement. A
high value can mean &amp;ldquo;preferred relative to this batch&amp;rdquo; without saying how often
similarly scored candidates succeed.&lt;/p>
&lt;p>&lt;img src="https://synapticradio.com/post/model-calibration-in-llms/figures/proxy-to-assay-confidence.svg"
loading="lazy"
alt="Raw scientific-agent scores must be calibrated against a named experimental outcome before a policy uses them"
>&lt;/p>
&lt;p>For the Virtual Lab workflow, for example, an uncertainty estimator could
combine signals from ESM, AlphaFold-Multimer, Rosetta, and agent agreement into a
raw candidate score $s_i$. A held-out set of physically tested designs would
then fit a mapping:&lt;/p>
$$
\hat c_i=f_\phi(s_i)
\approx
P(Y_{\text{binding assay}}=1\mid s_i,\text{assay protocol}).
$$&lt;p>The reliability question is whether designs assigned $\hat c_i\approx0.7$ cross
that assay&amp;rsquo;s binding threshold about 70% of the time. Even perfect calibration
for this event would say nothing directly about toxicity, in vivo efficacy, or
clinical success.&lt;/p>
&lt;p>Robin provides another instructive case. Its candidates were ranked by an
LLM-judged tournament, and its data-analysis agent ran eight trajectories before
forming a consensus. Those mechanisms can improve ranking and robustness, but
neither the tournament position nor an eight-of-eight agreement is automatically
a calibrated probability. The mapping has to be learned from subsequent assay
outcomes and checked again when the disease area, assay, model, prompts, or tools
change.&lt;/p>
&lt;p>There is also a selection-bias trap. If only the top-ranked molecules are tested,
the resulting reliability diagram estimates calibration &lt;strong>among shortlisted
candidates&lt;/strong>, not across everything the agent generated. Randomly testing a
small exploration set helps reveal performance outside the shortlist.
Propensity-aware evaluation can also reweight tested candidates by their
selection probabilities to estimate the broader score-to-success relationship.&lt;/p>
&lt;h3 id="calibration-should-control-the-next-action">Calibration should control the next action
&lt;/h3>&lt;p>Once each probability names an observable event, it can drive a gate in the
workflow:&lt;/p>
&lt;ul>
&lt;li>low evidence sufficiency triggers another literature search;&lt;/li>
&lt;li>uncertain synthesis feasibility triggers chemist review or route generation;&lt;/li>
&lt;li>high predicted assay value but high uncertainty can justify an informative
experiment rather than automatic rejection;&lt;/li>
&lt;li>a positive result with low replication confidence triggers confirmation before
the agent updates its hypothesis.&lt;/li>
&lt;/ul>
&lt;p>This is the same selective-prediction idea as abstention, but with a richer action
space. The agent can search, simulate, ask for review, run a cheap assay, or stop.
Calibration makes those choices auditable because every threshold refers to a
frequency that can be measured.&lt;/p>
&lt;h2 id="structured-actions-need-event-specific-confidence">Structured actions need event-specific confidence
&lt;/h2>&lt;p>Event-specific calibration also applies outside scientific discovery. Suppose
an LLM proposes an element placement:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;span class="lnt">7
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-json" data-lang="json">&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;element&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;desk&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;room&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;office_31&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;x&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="mf">4.23&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;y&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="mf">2.71&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;rotation&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="mi">90&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>The sequence probability of the entire JSON document has little operational
meaning. The system should define the events it cares about:&lt;/p>
$$
\begin{aligned}
C_{\text{element}}&amp;=P(\text{correct element selected}),\\
C_{\text{room}}&amp;=P(\text{correct room selected}),\\
C_{\text{placement}}&amp;=P(\text{placement is geometrically valid}),\\
C_{\text{constraints}}&amp;=P(\text{all constraints are satisfied}),\\
C_{\text{overall}}&amp;=P(\text{proposal is accepted by the evaluator}).
\end{aligned}
$$&lt;p>Then it can expose where uncertainty comes from:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">element selection 0.99
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">room selection 0.96
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">geometric validity 0.72
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">constraint validity 0.61
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">overall acceptance 0.65
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h3 id="continuous-outputs-need-coverage-not-class-confidence">Continuous outputs need coverage, not class confidence
&lt;/h3>&lt;p>Coordinates such as $x,y,\theta$ are not categorical events. They can instead be
evaluated with prediction intervals or with threshold events. A prediction
interval gives a range intended to contain the true value at a stated frequency.
For example, a model might report:&lt;/p>
$$
x=4.2\pm0.3\,\mathrm{m}.
$$&lt;p>A calibrated 90% prediction interval means:&lt;/p>
$$
P(x_{\text{true}}\in I_{90}(x))=0.90
$$&lt;p>over the deployment population. For spatial placement, the event could instead
be task-specific:&lt;/p>
$$
P(\|\hat{\mathbf{x}}-\mathbf{x}^*\|\lt20\,\mathrm{cm})=0.87
$$&lt;p>or:&lt;/p>
$$
P(\operatorname{IoU}(\hat B,B^*)\gt0.8)=0.92.
$$&lt;p>Quantile regression estimates interval endpoints directly. Conformal methods use
errors on a calibration set to construct intervals or prediction sets with a
target coverage rate, assuming the calibration and deployment examples are
exchangeable, or comparable draws from the same distribution. &lt;a class="link" href="https://aclanthology.org/2025.acl-long.934/" target="_blank" rel="noopener"
>SConU&lt;/a> is
one recent LLM-specific example of selective conformal uncertainty that checks
for samples that may violate this assumption.&lt;/p>
&lt;h2 id="treat-llm-confidence-as-a-subsystem">Treat LLM confidence as a subsystem
&lt;/h2>&lt;p>A robust architecture should not equate confidence with
&lt;code>average_token_probability&lt;/code>. It separates generation, uncertainty estimation,
calibration, and policy:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;span class="lnt">7
&lt;/span>&lt;span class="lnt">8
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">flowchart LR
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> A[LLM] --&amp;gt; B[Candidate answer or action]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> B --&amp;gt; C[Uncertainty estimator]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> C --&amp;gt; D[Calibrator]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> D --&amp;gt; E{Decision policy}
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> E --&amp;gt;|high confidence| F[Execute]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> E --&amp;gt;|medium confidence| G[Suggest or verify]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> E --&amp;gt;|low confidence| H[Retrieve, regenerate, or defer]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>The uncertainty estimator can combine token log-probabilities, entropy,
self-consistency, hidden representations, constraint violations, geometric
margins, verifier scores, and tool results. It emits a raw score. The calibrator
maps that score to an event probability such as:&lt;/p>
$$
P(\text{valid placement})=0.91.
$$&lt;p>Only then should a decision policy apply thresholds. For example:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">confidence &amp;gt; 0.98 auto-place
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">0.80-0.98 present suggestion
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">confidence &amp;lt; 0.80 retrieve, regenerate, or defer
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>The exact thresholds should come from error costs and risk-coverage analysis, not
from round numbers chosen in advance.&lt;/p>
&lt;h2 id="a-calibrated-llm-can-still-be-bad">A calibrated LLM can still be bad
&lt;/h2>&lt;p>Calibration is only one part of model quality. Three properties have to be
evaluated separately:&lt;/p>
$$
\boxed{
\text{capability}
\times
\text{uncertainty discrimination}
\times
\text{calibration}
}.
$$&lt;p>Accuracy, task metrics, and execution success measure capability. AUROC, AUPRC,
and risk-coverage measure uncertainty ranking. Reliability diagrams, ECE, Brier
score, and NLL measure probability quality.&lt;/p>
&lt;p>These properties can fail independently. Suppose an LLM knows almost nothing,
always reports $P(\text{correct})=0.30$, and is correct 30% of the time. It is
perfectly calibrated and still a terrible model.&lt;/p>
&lt;p>Conversely, a model could be 95% accurate while reporting
$P(\text{correct})=0.999$ for every answer. It is capable but miscalibrated.&lt;/p>
&lt;h2 id="the-deepest-conceptual-shift">The deepest conceptual shift
&lt;/h2>&lt;p>For a classic classifier, the model naturally exposes $P(y=k\mid x)$, so
calibration starts by repairing that probability. For an LLM, the first problem
is deciding which random variable deserves a probability at all.&lt;/p>
&lt;p>In a production system, I would rarely choose:&lt;/p>
$$
P(\text{next token})
$$&lt;p>and would usually choose something closer to:&lt;/p>
$$
\boxed{
P(\text{this semantic claim, structured action, or tool call is correct})
}.
$$&lt;p>Once that event is explicit, reliability diagrams, ECE, Brier score, post-hoc
calibration, selective prediction, and conformal methods become useful again.
The operational goal is not merely to make an LLM sound less certain. It is to
make confidence correspond to an event that a system can measure and act on.&lt;/p>
&lt;h2 id="references">References
&lt;/h2>&lt;ul>
&lt;li>Kadavath et al., &lt;a class="link" href="https://arxiv.org/abs/2207.05221" target="_blank" rel="noopener"
>&lt;em>Language Models (Mostly) Know What They Know&lt;/em>&lt;/a> (2022).&lt;/li>
&lt;li>ffrench-Constant et al., &lt;a class="link" href="https://arxiv.org/abs/2607.20526" target="_blank" rel="noopener"
>&lt;em>ConfidenceBench: Evaluating Confidence Calibration in Large Language Models&lt;/em>&lt;/a> (2026).&lt;/li>
&lt;li>Farquhar et al., &lt;a class="link" href="https://www.nature.com/articles/s41586-024-07421-0" target="_blank" rel="noopener"
>&lt;em>Detecting Hallucinations in Large Language Models Using Semantic Entropy&lt;/em>&lt;/a> (Nature, 2024).&lt;/li>
&lt;li>Leng et al., &lt;a class="link" href="https://arxiv.org/abs/2410.09724" target="_blank" rel="noopener"
>&lt;em>Taming Overconfidence in LLMs: Reward Calibration in RLHF&lt;/em>&lt;/a> (2024, revised 2025).&lt;/li>
&lt;li>Khanmohammadi et al., &lt;a class="link" href="https://aclanthology.org/2025.emnlp-main.530/" target="_blank" rel="noopener"
>&lt;em>Calibrating LLM Confidence by Probing Perturbed Representation Stability&lt;/em>&lt;/a> (EMNLP 2025).&lt;/li>
&lt;li>Wang et al., &lt;a class="link" href="https://aclanthology.org/2025.acl-long.934/" target="_blank" rel="noopener"
>&lt;em>SConU: Selective Conformal Uncertainty in Large Language Models&lt;/em>&lt;/a> (ACL 2025).&lt;/li>
&lt;li>Jiang et al., &lt;a class="link" href="https://aclanthology.org/2021.tacl-1.57/" target="_blank" rel="noopener"
>&lt;em>How Can We Know When Language Models Know?&lt;/em>&lt;/a> (TACL 2021).&lt;/li>
&lt;li>Bran et al., &lt;a class="link" href="https://www.nature.com/articles/s42256-024-00832-8" target="_blank" rel="noopener"
>&lt;em>Augmenting Large Language Models with Chemistry Tools&lt;/em>&lt;/a> (Nature Machine Intelligence, 2024).&lt;/li>
&lt;li>Boiko et al., &lt;a class="link" href="https://www.nature.com/articles/s41586-023-06792-0" target="_blank" rel="noopener"
>&lt;em>Autonomous Chemical Research with Large Language Models&lt;/em>&lt;/a> (Nature, 2023).&lt;/li>
&lt;li>Swanson et al., &lt;a class="link" href="https://www.nature.com/articles/s41586-025-09442-9" target="_blank" rel="noopener"
>&lt;em>The Virtual Lab of AI Agents Designs New SARS-CoV-2 Nanobodies&lt;/em>&lt;/a> (Nature, 2025).&lt;/li>
&lt;li>Ghareeb et al., &lt;a class="link" href="https://www.nature.com/articles/s41586-026-10652-y" target="_blank" rel="noopener"
>&lt;em>A Multi-Agent System for Automating Scientific Discovery&lt;/em>&lt;/a> (Nature, 2026).&lt;/li>
&lt;li>Gottweis et al., &lt;a class="link" href="https://www.nature.com/articles/s41586-026-10644-y" target="_blank" rel="noopener"
>&lt;em>Accelerating Scientific Discovery with Co-Scientist&lt;/em>&lt;/a> (Nature, 2026).&lt;/li>
&lt;/ul></description></item></channel></rss>