Hindsight Merging: Diverse Data Generation with Language Models
Abstract
Pre-training a language model equips it with a broad understanding of the world, while fine- tuning refines it into a helpful assistant. However, fine-tuning does not exclusively enhance task- specific behaviors but also suppresses some of the beneficial variability from pre-training. This reduction in diversity is partly due to the optimization process, which theoretically decreases model entropy in exchange for task performance. To counteract this, we introduce hindsight merging, a technique that combines a fine-tuned model with a previous training checkpoint using linear interpolation to restore entropy and improve performance. Hindsight-merged models retain strong instruction-following capabilities and alignment while displaying increased diversity present in the base model. Additionally, this results in improved inference scaling, achieving a consistent 20-50% increase in pass@10 relative to the instruction tuned model across a coding benchmark and series of models. Our findings suggest that hindsight merging is an effective strategy for generating diverse generations that follow instructions.
Cite
Text
Veselovsky et al. "Hindsight Merging: Diverse Data Generation with Language Models." Proceedings of the Forty-first Conference on Uncertainty in Artificial Intelligence, 2025.Markdown
[Veselovsky et al. "Hindsight Merging: Diverse Data Generation with Language Models." Proceedings of the Forty-first Conference on Uncertainty in Artificial Intelligence, 2025.](https://mlanthology.org/uai/2025/veselovsky2025uai-hindsight/)BibTeX
@inproceedings{veselovsky2025uai-hindsight,
title = {{Hindsight Merging: Diverse Data Generation with Language Models}},
author = {Veselovsky, Veniamin and Stroebl, Benedikt and Bencomo, Gianluca and Arumugam, Dilip and Schut, Lisa and Narayanan, Arvind and Griffiths, Thomas L.},
booktitle = {Proceedings of the Forty-first Conference on Uncertainty in Artificial Intelligence},
year = {2025},
pages = {4349-4369},
volume = {286},
url = {https://mlanthology.org/uai/2025/veselovsky2025uai-hindsight/}
}