[Paper Review] Long Horizon Temperature Scaling
This paper proposes Long Horizon Temperature Scaling (LHTS), a non-myopic method for sampling from temperature-scaled joint distributions in likelihood-based generative models. By fine-tuning a model on a temperature-dependent objective across a range of temperatures, LHTS enables a single model to generate high-likelihood, diverse outputs with controllable long-horizon temperature, improving likelihood, sample quality, and downstream accuracy by 10% on a multiple-choice analogy task compared to myopic temperature scaling.
Temperature scaling is a popular technique for tuning the sharpness of a model distribution. It is used extensively for sampling likely generations and calibrating model uncertainty, and even features as a controllable parameter to many large language models in deployment. However, autoregressive models rely on myopic temperature scaling that greedily optimizes the next token. To address this, we propose Long Horizon Temperature Scaling (LHTS), a novel approach for sampling from temperature-scaled joint distributions. LHTS is compatible with all likelihood-based models, and optimizes for the long horizon likelihood of samples. We derive a temperature-dependent LHTS objective, and show that finetuning a model on a range of temperatures produces a single model capable of generation with a controllable long horizon temperature parameter. We experiment with LHTS on image diffusion models and character/language autoregressive models, demonstrating advantages over myopic temperature scaling in likelihood and sample quality, and showing improvements in accuracy on a multiple choice analogy task by $10\%$.
Motivation & Objective
- To address the limitations of myopic temperature scaling in autoregressive models, which optimizes only the next token rather than the full sequence likelihood.
- To develop a general, tractable method for joint temperature scaling applicable to all likelihood-based generative models, including diffusion and autoregressive models.
- To enable a single fine-tuned model to support controllable temperature sampling across a range of temperatures, including unseen values.
- To improve the trade-off between sample likelihood and diversity compared to existing pseudo-temperature and myopic scaling methods.
- To demonstrate that long-horizon scaling enhances performance on downstream tasks requiring coherent, high-likelihood generation.
Proposed method
- LHTS formulates a temperature-dependent objective that optimizes the long-horizon likelihood of generated sequences, rather than just the next token.
- The method involves fine-tuning a likelihood-based model on a range of temperatures using a forward-KL divergence objective to align the model’s output distribution with the target temperature-scaled joint distribution.
- To reduce training variance, LHTS employs baseline fitting and limits the suffix horizon length during optimization.
- The approach is model-agnostic and compatible with autoregressive models, VAEs, normalizing flows, and diffusion models.
- After fine-tuning, the model can sample from the temperature-scaled joint distribution without additional cost, supporting extrapolation to unseen temperatures.
- The method enables sampling with a controllable long-horizon temperature parameter, even when the temperature was not seen during fine-tuning.
Experimental results
Research questions
- RQ1Can a single model be fine-tuned to support controllable long-horizon temperature scaling across a range of temperatures, including unseen values?
- RQ2Does non-myopic temperature scaling improve the trade-off between likelihood and diversity in generative model outputs compared to myopic or pseudo-temperature scaling?
- RQ3Can LHTS improve performance on downstream tasks requiring coherent, high-likelihood generation, such as multiple-choice analogy tasks?
- RQ4How does LHTS compare to existing methods like Quark or myopic temperature scaling in terms of sample quality and likelihood?
- RQ5To what extent can LHTS generalize to different model architectures, including diffusion and autoregressive models?
Key findings
- LHTS improves the accuracy of GPT-2 on a multiple-choice analogy task by 10% compared to myopic temperature scaling, achieving 31% accuracy on the most competitive setting with duplicate choices.
- On diffusion models, LHTS achieves a better trade-off between likelihood and sample diversity than pseudo-temperature scaling.
- LHTS demonstrates smooth extrapolation to unseen temperatures, enabling low-variance training on mild temperatures and sampling on extreme temperatures.
- For autoregressive models, LHTS outperforms myopic temperature scaling in both likelihood and sample quality, as measured by distinct and duplicate metrics.
- The method shows improved performance over Quark-based joint likelihood conditioning, which was less effective and more unstable during training.
- LHTS enables a single fine-tuned model to support controllable temperature sampling across a wide range of temperatures, including those not seen during training.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.