Inference-time Alignment in Continuous Space

Yige Yuan, Teng Xiao, Yun-Fan Li, Bing-Bing Xu, Shuchang Tao +3 more
5/1/2025
9 citations

Official code: yuanyige/sea (4 stars, Python, last commit 2025-11-07).

Abstract

Aligning large language models with human feedback at inference time has received increasing attention due to its flexibility. Existing methods rely on generating multiple responses from the base policy for search using a reward model, which can be considered as searching in a discrete response space.

Show full abstract

However, these methods struggle to explore informative candidates when the base policy is weak or the candidate set is small, resulting in limited effectiveness. In this paper, to address this problem, we propose Simple Energy Adaptation ($\textbf{SEA}$), a simple yet effective algorithm for inference-time alignment. In contrast to expensive search over the discrete space, SEA directly adapts original responses from the base policy toward the optimal one via gradient-based sampling in continuous latent space. Specifically, SEA formulates inference as an iterative optimization procedure on an energy function over actions in the continuous space defined by the optimal policy, enabling simple and effective alignment. For instance, despite its simplicity, SEA outperforms the second-best baseline with a relative improvement of up to $ \textbf{77.51%}$ on AdvBench and $\textbf{16.36%}$ on MATH. Our code is publicly available at https://github.com/yuanyige/sea

View on arXivView PDF

Code Implementations(1)

yuanyige/seaOfficial100%

[NeurIPS 2025] Inference-time Alignment in Continuous Space

41Python, ShellMay 28, 20251 years ago

Similar Papers

Cite this paper

@article{yuan2025inferencetime,
  title  = {Inference-time Alignment in Continuous Space},
  author = {Yige Yuan and Teng Xiao and Yun-Fan Li and Bing-Bing Xu and Shuchang Tao and Yunqi Qiu and Hua-Wei Shen and Xue-Qi Cheng},
  year   = {2025},
  eprint = {2505.20081},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2505.20081},
  url    = {https://doi.org/10.48550/arXiv.2505.20081},
  journal = {Neural Information Processing Systems}
}

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/2505.20081.svg)](https://codeofpaper.com/paper/2505.20081)

Discussion