Model Calibration: From CTR/CVR to Calibrated Decisions
Calibration asks whether predicted probabilities agree with observed frequencies. A model assigning 0.02 to many ad impressions should see clicks on about 2% of them. A model reporting 0.8 probability that its answer is correct should be right on about 80% of comparable predictions.
This note covers post-hoc calibration, advertising-specific data problems, and calibration-oriented language-model training. The recent-work discussion was checked on October 5, 2026. Jev’s RLCD is treated as a publicly stated objective; its undisclosed implementation is not reconstructed from related papers.
Define the Probability Before Calibrating It
For a binary outcome \(Y\) and prediction \(p(X)\), population calibration means
\[ \mathbb E[Y\mid p(X)=s]=s. \]
In finite data, estimate this using groups of nearby predictions. Calibration is a property of a predictor on a distribution, not a certificate that an individual prediction is correct.
| Setting | Probability being estimated | Relevant evaluation population |
|---|---|---|
| CTR | \(P(C=1\mid X)\) | Served impressions |
| Post-click CVR | \(P(V_H=1\mid C=1,X)\) | Clicked impressions, with conversion horizon \(H\) |
| Click-through conversion rate | \(P(C=1,V_H=1\mid X)\) | Served impressions |
| Multiclass prediction | \(P(Y=k\mid X)\) for each class | Labeled examples from the target population |
| Answer confidence | \(P(\text{answer is correct}\mid X,\text{answer},\text{available evidence})\) | Answers generated by the deployed model and decoding procedure |
A constant predictor equal to the population base rate can be calibrated but useless for ranking. Conversely, a strictly increasing transformation can preserve ranking while damaging probabilities. Calibration, discrimination, and decision quality therefore need separate evaluation.
For multiclass models, top-label calibration checks confidence in the selected class. Classwise calibration checks each class probability. Neither should be silently substituted for calibration of the entire probability vector.
Proper Scoring Rules: Why CE and Brier Are Natural Baselines
A loss is strictly proper if its expected value is uniquely minimized by the true outcome distribution. Two binary examples are
\[ \ell_{\log}(p,y)=-y\log p-(1-y)\log(1-p), \qquad \ell_{\mathrm{Brier}}(p,y)=(p-y)^2. \]
If \(Y\sim\operatorname{Bernoulli}(q)\), then
\[ \mathbb E[(p-Y)^2]=(p-q)^2+q(1-q), \]
so the optimum is \(p=q\). For log loss, the excess expected loss above the optimum is \(\operatorname{KL}(\operatorname{Bern}(q)\|\operatorname{Bern}(p))\). This connects calibration to cross-entropy and distillation. See Gneiting and Raftery (2007), Strictly Proper Scoring Rules.
Training with CE already has the right population target. Finite data, restricted model capacity, regularization, optimization, and train/serve mismatch can still produce miscalibration. A proper objective is an incentive, not a finite-sample guarantee. Brier and NLL also measure predictive quality beyond calibration, so neither is a pure calibration-error metric.
Classical Post-Hoc Methods
Freeze the base predictor. Fit a small mapping on a separate calibration set, then evaluate it on untouched test data. Here \(z\) is a raw binary score or logit, \(p\) is an existing probability, and \(\sigma\) is the sigmoid.
| Method | Mapping or fit | Useful regime and limitation |
|---|---|---|
| Intercept correction | \(\sigma(z+b)\) | Correct a probability-level offset under an appropriate shift model; cannot fix arbitrary shape errors |
| Platt/logistic scaling | \(\sigma(az+b)\) | Low-variance baseline; \(a>0\) preserves ranking, but a sigmoid may be too restrictive |
| Temperature scaling | \(\operatorname{softmax}(z/T)\), \(T>0\) | One parameter for multiclass logits; preserves the selected class, cannot correct class-specific biases |
| Histogram binning | Replace each bin by its empirical positive rate | Simple diagnostic and baseline; sensitive to bins and sparse counts, not necessarily monotone |
| Isotonic regression | Fit a nondecreasing map minimizing squared error | Flexible scalar correction; needs sufficient data and introduces ties |
| Beta calibration | \(\sigma(a\log p-b\log(1-p)+c)\) | Flexible correction for asymmetric probability distortion; \(a,b\geq0\) ensure monotonicity |
Platt scaling and isotonic regression are compared in Niculescu-Mizil and Caruana (ICML 2005). Fit their parameters using held-out predictions, not the predictions on which the base model was trained.
Guo et al. (ICML 2017) find temperature scaling effective on their neural-network benchmarks. It fits \(T\) by minimizing calibration-set NLL. For a binary logit this becomes \(\sigma(z/T)\); the missing intercept matters when the problem is a changed base rate rather than excessive sharpness.
Beta calibration (AISTATS 2017) includes the identity mapping at \(a=b=1,c=0\). This distinguishes it from fitting \(\sigma(ap+b)\) directly to probabilities. Clip inputs away from 0 and 1 for numerical stability. A multiclass extension is Dirichlet calibration (NeurIPS 2019), which transforms log probabilities with a learned linear map followed by softmax; its extra parameters require regularization and more calibration data.
CTR/CVR: Correct the Data-Generating Problem First
Negative downsampling and weighted BCE
Suppose all positive examples are kept, while negatives are retained with probability \(s\). Let \(p_s\) be the posterior in the sampled population. Bayes’ rule gives the production posterior
\[ p=\frac{s p_s}{1-p_s+s p_s}, \qquad \operatorname{logit}(p)=\operatorname{logit}(p_s)+\log s. \]
For \(s=0.1\) and \(p_s=0.2\), the corrected probability is about \(0.0244\), not \(0.02\): multiplying by \(s\) is only a small-probability approximation. He et al., Practical Lessons from Predicting Clicks on Ads at Facebook (ADKDD 2014), §6.3 describes this recalibration after negative downsampling.
The formula assumes class-dependent sampling with the stated retention rates and an accurate sampled posterior. Feature-dependent sampling requires the corresponding conditional rates. Do not apply the correction twice if loss weights or an existing calibrator already restore the target population.
A related derivation: weighted BCE with positive and negative weights \(w_1,w_0\) has pointwise optimum
\[ p_w=\frac{w_1q}{w_1q+w_0(1-q)}, \qquad \operatorname{logit}(q)=\operatorname{logit}(p_w)-\log\frac{w_1}{w_0}. \]
Thus class weighting changes what the raw output estimates. Record sampling and weighting choices before interpreting a score as CTR or CVR.
Delayed conversions and label maturity
Define conversion within a particular horizon \(H\). A click from one hour ago with no conversion is not yet a known negative for seven-day conversion. Fitting a calibrator on such provisional zeros calibrates toward the wrong observed target.
Use fully matured labels for the chosen horizon, or explicitly model delay and censoring when freshness requires partially observed data. Chapelle, Modeling Delayed Feedback in Display Advertising (KDD 2014) models both conversion probability and conversion delay. A downstream sigmoid cannot by itself repair incorrect labels.
CVR selection and the probability product
For click-attributed conversions,
\[ P(C=1,V_H=1\mid X) =P(C=1\mid X)P(V_H=1\mid C=1,X). \]
ESMM (SIGIR 2018) uses this structure to jointly learn CTR and click-through conversion on the impression space, addressing clicked-only training and sparse conversion data. It is a modeling approach, not a post-hoc calibration guarantee.
Evaluate CVR on the relevant clicked population and the joint probability on impressions. Even if two component scores each pass marginal reliability checks, their product need not be calibrated: those checks do not establish that both scores equal the required conditional probabilities. Avoid treating logged CVR as a causal conversion probability under an arbitrary new serving policy.
Field-aware calibration
Overall bias can hide opposite errors across campaigns, placements, devices, or countries. For a slice \(g\), a useful aggregate diagnostic is
\[ \mathrm{P/O}_g=\frac{\sum_{i\in g}p_i}{\sum_{i\in g}y_i}. \]
Here values above one mean overprediction. This ratio is undefined with no observed positives and unstable with very few; report counts and uncertainty. A ratio near one does not imply calibration within the slice’s score bins.
Pan et al., Field-aware Calibration (WWW 2020) introduces field-level calibration metrics and a neural calibrator of the form
\[ p_{\mathrm{cal}}(x)=\sigma\big(\eta(z(x))+g(x)\big), \]
combining a scalar logit transformation with a feature-dependent correction, fitted by log loss on development data. Because features affect the mapping, it can change ranking across examples. Check both ranking and calibration; regularize sparse fields instead of fitting an unconstrained map per tiny segment.
Evaluation and a Practical Fitting Workflow
For bins \(B_b\), binary expected calibration error is commonly estimated as
\[ \widehat{\mathrm{ECE}} =\sum_b\frac{|B_b|}{n}\left| \frac{1}{|B_b|}\sum_{i\in B_b}p_i -\frac{1}{|B_b|}\sum_{i\in B_b}y_i \right|. \]
For top-label ECE, replace \(p_i\) with maximum class probability and \(y_i\) with the indicator that the selected class is correct. State which definition you use. Bin choices and whether all classes are evaluated can change conclusions; see Nixon et al., Measuring Calibration in Deep Learning (2019).
Report reliability plots with bin counts, NLL, Brier score, ranking quality, and domain-specific aggregate bias together. For rare events, a small absolute ECE can conceal a large relative error; inspect the low-probability region and important slices. Bootstrap by the relevant independent unit, such as user or time block, when observations are correlated.
A recommended workflow, synthesizing the methods above:
- Define the event, horizon, population, and any selection or weighting.
- Train the predictor; collect predictions on a later calibration window with mature labels. Reserve a still-later test window. Keep tuning separate from final evaluation, using additional splits or cross-validation.
- Compare uncalibrated outputs with a simple logistic/temperature baseline, then isotonic or beta calibration. Add feature-aware calibration only when slice-level evidence and sample size justify it.
- Select using probability quality and the downstream decision objective, not one ECE number. Check rare slices and distribution shifts.
- Version the predictor and calibrator together. Monitor fresh outcomes and refit when their relationship changes; a calibrator fitted before a model update need not remain valid afterwards.
For binary actions with false-positive cost \(c_{FP}\) and false-negative cost \(c_{FN}\), and zero cost for correct decisions, expected-cost minimization acts positive when
\[ p>\frac{c_{FP}}{c_{FP}+c_{FN}}. \]
This explains why calibrated probabilities matter beyond AUC. For selective answering, also measure risk–coverage: error rate among accepted answers versus fraction accepted. Choose an acceptance threshold on validation data, then report test performance at that fixed threshold. Finding the best threshold after observing test labels is not a deployment guarantee.
Language Models: What Exactly Is Being Calibrated?
Token likelihood is the probability of a particular string under the language model. It is not automatically the probability that the string’s claim is true. Multiple equivalent answers, prompt format, length, and decoding all complicate that interpretation.
| Approach | Confidence signal | Relevant work |
|---|---|---|
| Train explicit confidence expression | A generated numeric or verbal estimate | Lin, Hilton, and Evans (2022) show supervised learning of verbalized uncertainty |
| Ask the model to assess an answer | Probability of a correctness judgment, such as \(P(\mathrm{True})\) | Kadavath et al. (2022) study self-evaluation and knowledge prediction |
| Calibrate a fixed score | Map an answer score to empirical correctness | Apply held-out logistic/isotonic calibration to the deployed answer-generation pipeline |
| Change training incentives | Reward both answering and honest probability reporting | Rewarding Doubt, RLCR, and newer methods below |
Keep the answer generator, prompt, tools, and sampling procedure fixed when fitting a post-hoc confidence model. Otherwise the correctness event being predicted changes. A monotone binary calibrator adjusts the numeric scale; it cannot turn an uninformative ordering of confidence into a useful ranking of correct versus incorrect answers.
Jev and RLCD: Public Objective Versus Disclosed Methods
TypeSafe introduced Reinforcement Learning for Calibrated Decisions (RLCD) as the training approach behind Jev in its September 15, 2026 launch post. The public material describes typed probabilistic decisions but does not provide a reproducible reward, optimizer, or complete training recipe. Its workflow comparisons use reference-model probabilities; agreement with those references is different from calibration against observed outcomes.
The product’s confidence field also deserves care: TypeSafe’s documentation defines it as a statistic derived from the returned distribution, with zero at a uniform distribution and one at complete concentration. It is not itself automatically the probability that the chosen answer is correct. Evaluate the relevant returned probabilities against labels, and validate any routing threshold on your own target tasks.
The proper-score objectives below are published related methods, not a claim about Jev’s internal implementation. Also, the earlier RLCD: Reinforcement Learning from Contrastive Distillation (2023) is a different method with the same acronym.
Rewarding Doubt: a proper score for reported confidence
Rewarding Doubt (2025) trains a model to express confidence alongside its answer using a logarithmic reward. Let \(Z\in\{0,1\}\) indicate whether that answer is correct and let \(c\) be the reported probability:
\[ R_{\log}(c,Z)=Z\log c+(1-Z)\log(1-c). \]
For a fixed answer whose correctness probability is \(q\), expected reward is maximized at \(c=q\). This supplies a direct incentive for honest confidence. It does not imply that arbitrary joint optimization of answers and confidence will also maximize accuracy: changing the answer changes the event being scored. Population optimality and empirical calibration must be distinguished.
RLCR: reward correctness and calibration together
Beyond Binary Rewards: Training LMs to Reason about Their Uncertainty (2025; ICLR 2026) proposes RLCR, with
\[ R_{\mathrm{RLCR}}(c,Z)=Z-(c-Z)^2. \]
The first term rewards a correct answer, while the second scores its reported confidence. Under the paper’s idealized model, for an answer with success probability \(q\),
\[ \mathbb E[R]=q-(c-q)^2-q(1-q). \]
The best report is \(c=q\), and the resulting reward is \(q^2\), increasing with answer quality. This makes the two incentives explicit. The theorem concerns ideal optima; finite-capacity RL with imperfect correctness judgments still needs held-out evaluation. The reported scalar confidence is different from a full categorical distribution over all possible answers.
When Is RL Actually Needed?
For a fixed labeled classification problem with a differentiable probability head, CE or Brier can be optimized directly. Calling negative Brier a reward does not make policy-gradient training necessary. The classical calibration baselines should remain part of the comparison.
RL becomes relevant when training must change sampled reasoning, tool use, or sequential decisions that influence the eventual prediction or observed outcome. Proper scores can supply a calibration incentive, but the choice of what is scored matters: a full outcome distribution, the correctness of a selected answer, and success after taking an action are different targets.
For action-dependent outcomes, specify the action and policy in the target probability. Passive labels collected under an old policy may not identify success under a new one. For annotator disagreement, decide whether to predict a majority label or the distribution of judgments; additional reasoning cannot be assumed to remove disagreement inherent in that target.
Interview Questions and Exercises
- Why can a base-rate predictor be calibrated but unhelpful?
- Derive negative-downsampling correction and the weighted-BCE optimum.
- Why might temperature scaling fail to correct a shifted CTR base rate?
- Why do calibrated CTR and CVR scores not guarantee a calibrated product?
- How do you evaluate seven-day CVR without treating pending events as negatives?
- Why does a proper score incentivize honest probabilities? What assumptions separate that statement from a production guarantee?
- Derive the optimal confidence and answer-quality incentive under RLCR.
- Compare event probability, answer correctness, token likelihood, and Jev’s distribution-derived confidence statistic.
- Fit logistic, isotonic, and beta calibrators on a chronological split; compare NLL, Brier, reliability plots, P/O, and slice-level results.
- Compare CE plus post-hoc calibration with a calibration-reward method using the same data and a reported compute budget; evaluate fixed-threshold risk–coverage on untouched tasks.