Probabilistic Calibration Is a Trainable Capability in Language Models

Davide Baldelli, Sruthi Kuriakose, Maryam Hashemzadeh, Amal Zouaq, Sarath ChandararXiv 2026

TL;DR

Large language models (LLMs) are notoriously bad at acting as true random samplers, often collapsing into narrow, highly predictable outputs when asked to generate random choices. This paper introduces Calibration Fine-Tuning (CFT), demonstrating that probabilistic calibration is a trainable capability that generalizes well to unseen distributions. By training LLMs on synthetic mathematical distributions, the authors successfully teach models to follow complex randomness constraints across both numeric and natural language tasks.

What Problem Does This Paper Address?

When you ask a standard LLM to "pick a random number between 1 and 10" or "name a random city," it doesn't behave like a true random number generator. Instead, LMs suffer from "probability collapse"—heavily favoring specific answers (like the number 7) and completely ignoring others.

This happens because standard pretraining (next-token prediction) and post-training (RLHF/instruction tuning) optimize for task success, compliance, or human preference, rather than distributional calibration. While prompting workarounds exist (like injecting random seeds), they introduce inference overhead and are highly sensitive to formatting. This paper investigates a fundamental question: Can we directly fine-tune language models to become well-calibrated probabilistic samplers?

Methods

The authors propose Calibration Fine-Tuning (CFT) using parameter-efficient LoRA adapters. They explore and compare two distinct supervision strategies:

  1. Soft-Target Fine-Tuning: The target mathematical distribution is discretized over a finite canonical output space. These valid numeric strings are inserted into a prefix trie, allowing the authors to compute exact target next-token probabilities at every prefix. The model is then trained to minimize the KL divergence between its logits and these trie-derived targets.
  2. Hard-Target Fine-Tuning: Instead of dense prefix-level probabilities, this method mimics standard supervised fine-tuning. The model is trained on multiple independent samples drawn directly from the target distribution using standard next-token cross-entropy.
Figure 1: Calibration Fine-Tuning pipeline. A prompt defines target law P, discretized into canonical output space Y with masses PY . Soft-target fine-tuning builds a token trie and matches the induced next-token distribution with Lsoft. Hard-target fine-tuning samples y ∼PY , tokenizes it, and applies masked completion cross-entropy Lhard. In both variants, only the LoRA adapter is updated.

Datasets

The authors evaluate their approach across a diverse suite of benchmarks:

  • Synthetic Sampling Benchmark: Consists of 30 mathematical distribution families. 24 are used during training, and 6 are completely held-out for out-of-distribution (OOD) evaluation (Bernoulli, Poisson, Maxwell, TruncNorm, Chi, and Weibull).
  • Open-Ended Random Generation: A new 102-prompt benchmark created for this work to test natural language diversity across categories like names, cities, and foods (e.g., "Name a random city. Output ONLY the answer.").
  • NoveltyBench: An existing benchmark used to evaluate open-ended generative breadth and semantic diversity.
  • MCQ Generation: A protocol requiring models to generate medical multiple-choice questions while uniformly distributing the correct answer among options A, B, C, and D.
  • TinyBenchmarks & PALOMA: Standard benchmarks used to evaluate downstream capability retention and language-model fit (perplexity).

Key Insights and Ideas

  • Calibration Generalizes: Training models on specific mathematical distributions allows them to generalize to entirely unseen parameter settings and completely novel distribution families (OOD). Calibration is a structural capability, not just memorization.
  • The Soft vs. Hard Trade-off: The two fine-tuning variants exhibit different empirical profiles. Hard-target fine-tuning yields the highest exact numeric fidelity. Conversely, soft-target fine-tuning acts as a better regularizer for broader natural language tasks, significantly broadening stochastic support in open-ended text generation.
  • Not Just Flattening Logits: One might fear that calibration training simply injects entropy and flattens the token distribution across the board. However, evaluation on the PALOMA benchmark showed that perplexity was frequently preserved or even improved, meaning the models retained structured language modeling capabilities.

Key Results

  • Across 12 models spanning 4 families (Qwen3, Gemma-3, Llama-3.2, GPT-OSS), CFT dramatically improved distribution fidelity. Scale-normalized Wasserstein distance ($W_1$) dropped sharply, and trie-based logit KL divergence decreased by roughly an order of magnitude.
Figure 2: Main structured-sampling result. Left: family-median normalized W1 on held-out OOD families; right: family-median normalized W1 on unseen parameter settings from seen families. Calibration Fine-Tuning consistently improves distributional fidelity across model sizes and families. Hatched bars indicate outputs with insufficient valid parsed samples for a finite empirical estimate.
  • In open-ended generation, soft-target fine-tuning expanded the top-90% support size (the number of tokens needed to cover 90% of the probability mass) by one to two orders of magnitude across all 12 models.
  • Qualitatively, the fine-tuned models closely mirrored target continuous and discrete distributions that the base models completely failed to capture.
Figure 3: Qualitative OOD sampling examples. Each panel overlays the target with base and Calibration Fine-Tuning samples for one held-out OOD configuration, using one strong model per family.

Limitations and Future Work

  • Downstream Capability Costs: The most notable drawback was a significant regression in arithmetic reasoning (specifically GSM8K performance). The authors hypothesize this happens because CFT trains models on short, direct completions without reasoning traces, inadvertently biasing them against chain-of-thought behavior.
  • Tail Distortion: Discretizing continuous distributions requires assigning tail mass outside the bounded interval to edge bins, which can distort heavy-tailed targets.
  • Future Directions: Developing "retention-aware" calibration fine-tuning methods that can preserve complex reasoning capabilities while maintaining high distributional calibration remains an open challenge.

Summary updated

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