Lune

ICML2026Top-tier venue

Temperature Scaling in Discrete Sequence (Language) Models

Hannah Scheufele, Peter Blohm, Vikas Garg

Abstract

Temperature scaling is widely used to control generation behavior and improve reasoning performance in discrete sequence models. However, temperature scaling at the sequence level is particularly challenging since the partition function of the model is typically not tractable and naive token-wise temperature scaling induces bias in the maximum a posteriori (MAP) estimates. Discrete diffusion settings exacerbate this issue: enhanced flexibility due to multiple potential orderings for generating tokens complicates likelihood computation and incurs high variance. We propose and investigate fine-tuning objectives for sequence-level temperature scaling, along with metrics to quantify the success of a given temperature scaling procedure. Specifically, our contributions are threefold. First, we introduce our objective across a wide class of sequence models through a novel formalism that unifies autoregressive and diffusion-based language models. Second, we design two metrics that quantify temperature scaling based on likelihood ratios and thus obviate access to the partition function. Finally, we introduce fine-tuning objectives that reliably achieve the desired change in model temperature. Our experiments with language models (GPT2, BD3LM) show that the proposed approach leads to more consistent generation with lower perplexity. Furthermore, we provide empirical evidence that it can enhance the reasoning performance in language models. Code is available at github.com/Aalto-QuML/temp_lm .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Large Language Diffusion Models cites Structured Denoising Diffusion Models in Discrete State-Spaces
  • Large Language Diffusion Models cites Language Models are Few-Shot Learners
  • Large Language Diffusion Models cites The Curious Case of Neural Text Degeneration
  • Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on28

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
  3. Let's Verify Step by StepHunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards et al.ICLR 2024 · 3,045 citations
  4. Structured Denoising Diffusion Models in Discrete State-SpacesJacob Austin, Daniel D. Johnson, Jonathan Ho, Daniel Tarlow et al.NeurIPS 2021 · 2,256 citations
  5. Large Language Diffusion ModelsShen Nie, Fengqi Zhu, Zebin You, Xiaolu Zhang et al.NeurIPS 2025 · 949 citations

Related papers

  1. Long Horizon Temperature ScalingAndy Shih, Dorsa Sadigh, Stefano ErmonICML 2023 · 20 citations
  2. MRO: Enhancing Reasoning in Diffusion Language Models via Multi-Reward OptimizationChenglong Wang, Yang Gan, Hang Zhou, Chi Hu et al.NeurIPS 2025 · 4 citations
  3. Principled RL for Diffusion LLMs Emerges from a Sequence-Level PerspectiveJingyang Ou, Jiaqi Han, Minkai Xu, Shaoxuan Xu et al.ICLR 2026 · 33 citations
  4. Efficiently Selecting Response Generation Strategies for Synthetic Data Construction by Self-Aligned PerplexityXuan Ren, Qi Chen, Lingqiao LiuEMNLP Findings 2025
  5. DiffusionBERT: Improving Generative Masked Language Models with Diffusion ModelsZhengfu He, Tianxiang Sun, Qiong Tang, Kuanning Wang et al.ACL 2023 · 63 citations
Dusk over the sea between two cliffs drawn in fine vertical lines