Reference material
The calculations, one step at a time
Definitions, derivations, and proofs explain the measurements. They do not add empirical claims to the paper.
Start the guided walkthrough →
Companion addition. The paper is an empirical study, not a theorem paper. The definitions, propositions, lemmas, theorem, and proofs below unpack its measurements. They do not insert new claims into the manuscript. Equations here use the paper’s conventions unless explicitly identified as a teaching example. See original §§III.B–C and V, and the guided lessons on validity, accuracy, timing, probability and paired comparisons.
D.1 A notation key before any arithmetic
Definition D.1 · Cases, outputs, and eligible sets
Let be the assigned cases. Let be the frozen reference, a recognized model decision, and indicate decision validity. Define only when the output is decision-valid and ; otherwise . Thus .
Write for a distribution-valid reported vector, and for the one-hot reference vector. The probability-eligible set is . Decision validity, distribution validity, and full compliance are different concepts even though their counts coincide for each tested arm.
An indicator, written , is 1 when its condition is true and 0 otherwise. A sum adds observations. A mean divides a sum by the number of eligible observations. Always ask which observations are eligible before dividing.
The letters A/H/D are labels, not an ordering of goodness. An invalid output is not a fourth semantic policy label and is never silently converted to hold.
D.2 Accuracy and the denominator identity
Let and . Then
Proposition D.2 · Coverage multiplies conditional accuracy
For , .
Proof. Substitute the fractions: . The valid count cancels; the assigned count does not. If , primary accuracy is zero but valid-only accuracy is undefined, not zero by convention.
GLM, line by line. Start with 300 assigned cases. Remove nothing from primary scoring. Count 267 valid responses, including 260 correct and seven incorrect. The other 33 responses are invalid. Therefore , , and after display rounding. Multiply the unrounded last two fractions to recover primary accuracy. The 97.38% rate answers a conditional question and cannot replace the primary result.
D.3 Balanced accuracy and the always-hold baseline
Let count reference class predicted as decision . Include invalid outputs in the relevant reference row’s total, if present. With assigned cases in reference class ,
For JEV the recalls are , , and . Their unweighted mean is 91.37% after rounding. For KEV replace only by ; the result is 91.67%.
Proposition D.3 · Always hold has one-third balanced accuracy here
When all three reference classes are present, always returning hold gives recalls and balanced accuracy . Its ordinary accuracy is the hold prevalence, here .
This is a statement about selected decisions. It does not imply CLM’s probability vectors were constant. Also, original Table II is not : its rows are JEV decisions and its columns KEV decisions, not references versus predictions.
D.4 Wilson intervals without a black box
For correct answers out of , write and , the standard-normal 97.5th percentile. Define
The interval is . Each line has a job: is the observed proportion; adjusts the scale; is the adjusted center; is the half-width. Convert the final endpoints to percentages, not the intermediate fractions. For KEV, gives 87.22–93.74% after rounding, matching Table I.
The formula elaborates the paper’s cited Wilson method [7]. It is not a statement that deployment accuracy lies in that interval with a demonstrated frequency. The paper’s authored case bank, single reviewer, and one execution session remain limitations. Overlapping Wilson intervals do not by themselves answer a paired superiority question.
D.5 Brier loss is a full-vector score
Definition D.5 · Unscaled multiclass Brier score
For one eligible case, . The study score is . There is no division by three. Lower is better.
For C207 the frozen reference is hold. The one-hot target is . Table IV gives JEV , so
KEV’s displayed percentages give , yielding approximately . This second calculation uses rounded table values, rather than original response lexemes. It illustrates loss, not an exact reconstruction of the deposited calculation. A 92.03% selected probability on an incorrect allow can have larger loss than a 53% selected probability on the correct hold.
Lemma D.5 · Ideal simplex range is zero to two
For nonnegative summing exactly to one, .
Proof. Squares are nonnegative. Expand the sum as . Since and , the expression is at most 2. A correct one-hot vector attains 0; a wrong one-hot vector attains 2.
The exact-simplex assumption matters. The study permitted tiny nonexact sums under a declared tolerance and did not normalize them. This idealized bound is not a license to change recorded probabilities.
D.6 Why Brier loss rewards truthful distributions
Theorem D.6 · Strict propriety of ideal Brier loss
Mathematical teaching addition, not an empirical theorem claimed by the paper. Suppose a categorical outcome has true probability vector and a forecaster reports probability vector , both on the same simplex. Then expected Brier loss is uniquely minimized at .
Proof, line by line.
- Expand the squared error: .
- Substitute and the fact that exactly one outcome occurs. This gives .
- Add and subtract : the expression becomes .
- The last two terms do not depend on . The first term is nonnegative and equals zero exactly when .
This proof explains the mathematical scoring rule. It does not establish that any tested model knows a true , that the reviewed key is independent ground truth, or that a reported probability is calibrated deployment risk. Native classifier probabilities and GLM’s generated estimates retain their different origins.
D.7 The fixed-frequency baseline and skill
Set once, using full-bank reference frequencies. For an eligible subset with class proportions , evaluate the same forecast on that subset:
On the full bank, , so . On GLM’s completed subset, . Do not replace the forecast with that subset’s proportions; that would change the specified baseline.
A score of zero matches this baseline, a positive score improves on it, and a negative score is worse. This is neither accuracy nor AUROC. Calculating skill from the paper’s rounded Brier value will not necessarily reproduce the last printed digit: the original calculation uses unrounded losses.
D.8 Correctness AUROC and ties
Let be the reported probability attached to the chosen answer. Among eligible decisions, split the cases into correct set and incorrect set . Then
Read the equation in order. Pick one correct and one incorrect response. Give one point if the correct response has higher selected probability, half a point if tied, and zero otherwise. Average over all such pairs. If either group is empty, this pairwise statistic is undefined.
A toy example with correct scores and incorrect scores receives points over four pairs, giving 0.625. It is a ranking calculation, not a probability-calibration test. Strictly increasing score transformations preserve ranks and ties, so AUROC can stay unchanged while numerical probabilities change.
Removing the eleven changed-reference cases changes the pair set as well as its size. The reversal of JEV/KEV AUROC ordering on the remaining 289 cases cannot be interpreted as subtracting eleven additive AUROC losses. The source labels this selected-subset analysis post hoc.
D.9 Reliability bins and what Figure 3 does not provide
Use ten intervals . In bin , count eligible cases and calculate
Plot and display . Empty bins have no point. The last interval includes probability 1. The diagonal marks equal reported probability and observed correctness in the bin. There is no fitted calibration model here.
The manuscript prints bin counts, not each numeric bin mean and accuracy. The companion preserves the original Figure 3 and transcribes its counts, but does not invent exact coordinates or regenerate an observed reliability curve from counts alone. The probability lesson uses a clearly labelled synthetic example to teach the calculation.
D.10 Paired contrasts and bootstrap mechanics
For models A and B evaluated on aligned case IDs, let . Their accuracy difference is . A paired resample draws indices with replacement from , then uses those same indices for both models. Duplicate indices must stay duplicated.
For each of 10,000 resamples, calculate a new . A percentile interval takes the desired lower and upper empirical quantiles. The paper records seed 20260927 and a case-level paired procedure. A seed alone does not identify the random-number implementation, case ordering, or every percentile convention in the separately deposited code.
Lemma D.10 · Shared correctness cancels in the point difference
For the JEV–KEV follow-up, 264 shared successes and 19 shared failures contribute zero to KEV-minus-JEV. Nine KEV-only successes contribute , and eight JEV-only successes contribute . Therefore the net difference is , or 0.33 percentage points.
The paired-comparisons lesson constructs a grouped correctness illustration, without inventing case IDs, and bootstraps it with a documented deterministic teaching generator. This is a teaching exercise on the reported joint counts, not a reconstruction of the prespecified model-versus-GLM intervals and not a new superiority claim.
D.11 HTTP timing and the p95 convention
Primary timing is , using a monotonic clock. It includes applicable connection, network, service waiting, and required generation. Parsing, scoring, payload preparation, disk writes, and startup are outside this interval.
For sorted eligible times , a common explicit form of the stated linear percentile rule is , , , and
Set for p95. The timing lesson demonstrates this with synthetic times. The manuscript itself gives summary quantiles but not the individual transfer times, so an illustration using only those summaries cannot recompute the original p95. The reader’s separate deposited-record audit independently verified the reported quantiles.
The reported median ratio compares local KEV with hosted JEV under their tested configurations. It is not an isolated architectural speedup. Summing request intervals, measuring scored-loop wall time, and measuring the full session answer different questions.
D.12 Decimal tolerance, without repair
The paper’s explicit numerical rule is
Take the larger value; do not add them. At , the tolerance is 0.015; at , it is 0.00015; at , the floor makes it . Probability values must still be finite and individually within .
Use decimal lexemes—original numeric spellings—to avoid silently replacing a decimal record with binary-floating-point arithmetic. The teaching helper takes explicitly. Recovering every original precision-selection decision requires the deposited parser and original response bytes; this helper does not pretend to reconstruct them from Table IV percentages.
A selected decision must be at a maximum for distribution validity. GLM’s first-in-order exact-tie instruction is an additional compliance requirement. A selected maximum alone does not establish valid identity, complete transport, correct case ID, unambiguous JSON, or full response compliance.
D.13 Consequences without invented severity
Write for reference hold/deny predicted allow, for reference allow/hold predicted deny, for reference allow/deny predicted hold, and for invalid output. The original counts are unweighted and hypothetical.
For an explicitly new sensitivity exercise, choose nonnegative weights and compute . Since JEV and KEV have equal and , their JEV-minus-KEV weighted difference is . JEV has the lower illustrative total when ; KEV has the lower total when the inequality reverses. This algebra introduces no measured harm severity and recommends no deployment policy.
Check your understanding
Why is invalid not simply another hold?
Hold is a valid semantic determination about prerequisites. Invalid means the response failed the contract. Replacing invalid with hold would change the recorded decision and error consequences, violating the no-repair protocol.
Can a model be more accurate but less attractive under a consequence weighting?
Yes. Accuracy counts each incorrect or invalid assigned case equally. A separately declared weighting can value different consequences differently. In this study the weights were not measured, so weighted results must remain an illustrative sensitivity exercise.