Probabilistic Calibration Is a Trainable Capability in Language Models

Davide Baldelli, Sruthi Kuriakose, Maryam Hashemzadeh, Amal Zouaq, Sarath Chandar
5/12/2026
cs.CL

Official code: chandar-lab/calibration-finetuning (1 star, last commit 2026-05-07).

Abstract

Language models are increasingly used in settings where outputs must satisfy user-specified randomness constraints, yet their generation probabilities are often poorly calibrated to those targets. We study whether this capability can be improved directly through fine-tuning. Concretely, we fine-tune language models on synthetic prompts that require sampling from mathematical distributions, and compare two Calibration Fine-Tuning variants: a soft-target method that converts the desired output distribution into trie-derived next-token targets, and a hard-target method that trains on sampled completions from the same target distribution. Across 12 models spanning four families, both methods substantially improve structured-sampling fidelity on held-out distribution families and unseen parameter settings, showing that probabilistic calibration is a trainable capability. Under our selected training configurations, the two methods exhibit different empirical profiles: hard-target fine-tuning is often strongest on structured numeric sampling, while soft-target fine-tuning performs better on broader stochastic generation benchmarks, including open-ended random generation, multiple-choice answer-position balancing, and NoveltyBench. The gains sometimes reduce downstream capability, especially arithmetic reasoning, with costs varying by model. Overall, our results show that probabilistic calibration can be improved through fine-tuning, with our hard-target configuration favoring exact numeric fidelity and our soft-target configuration favoring broader stochastic transfer. Code is available at https://github.com/chandar-lab/calibration-finetuning.

View on arXivView PDF

Code Implementations(1)

Code for “Calibration Fine-Tuning”: training and evaluating language models as calibrated stochastic generators, with soft-target and hard-target fine-tuning methods and benchmarks beyond mathematical sampling.

11PythonMay 7, 20265 months ago

Similar Papers

Cite this paper

@article{baldelli2026probabilistic,
  title  = {Probabilistic Calibration Is a Trainable Capability in Language Models},
  author = {Davide Baldelli and Sruthi Kuriakose and Maryam Hashemzadeh and Amal Zouaq and Sarath Chandar},
  year   = {2026},
  eprint = {2605.11845},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.11845v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.11845.svg)](https://codeofpaper.com/paper/2605.11845)

Discussion