Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback
Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng
Abstract
Large language models (LLMs) demonstrate impressive performance but lack the flexibility to adapt to human preferences quickly without retraining. In this work, we introduce Test-time Preference Optimization (TPO), a framework that aligns LLM outputs with human preferences during inference, removing the need to update model parameters. Rather than relying on purely numerical rewards, TPO translates reward signals into textual critiques and uses them as textual rewards to iteratively refine its response. Evaluations on benchmarks covering instruction following, preference alignment, safety, and mathematics reveal that TPO progressively improves alignment with human preferences. Notably, after only a few TPO steps, the initially unaligned Llama-3.1-70B-SFT model can surpass the aligned counterpart, Llama-3.1-70B-Instruct. Furthermore, TPO scales efficiently with both the search width and depth during inference. Through case studies, we illustrate how TPO exploits the innate capacity of LLM to interpret and act upon reward signals. Our findings establish TPO as a practical, lightweight alternative for test-time preference optimization, achieving alignment on the fly. Our code is publicly available at https://github.com/yafuly/TPO .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers18
- TTOM: Test-Time Optimization and Memorization for Compositional Video GenerationLeigang Qu, Ziyang Wang, Na Zheng, Wenjie Wang et al.ICLR 2026 · 6 citations
- Partition-Then-Adapt: Combating Prediction Bias for Reliable Multi-Modal Test-Time AdaptationGuowei Wang, Fan Lyu, Changxing DingNeurIPS 2025 · 6 citations
- ∇-Reasoner: LLM Reasoning via Test-Time Gradient Descent in Latent SpacePeihao Wang, Ruisi Cai, Zhen Wang, Hongyuan Mei et al.ICLR 2026 · 5 citations
- MIRAGE: Misleading Retrieval-Augmented Generation via Black-box and Query-agnostic Poisoning AttacksTailun Chen, Yu He, Yan Wang, Shuo Shao et al.CCS 2026 · 4 citations
- Many-Shot CoT-ICL: Making In-Context Learning Truly LearnTsz Ting Chung, Lemao Liu, Mo Yu, Dit-Yan YeungICML 2026 · 3 citations
Builds on12
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran et al.NeurIPS 2023 · 5,068 citations
- Let's Verify Step by StepHunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards et al.ICLR 2024 · 3,045 citations
- Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng et al.SOSP 2023 · 1,016 citations
Related papers
- Textual Self-Attention Network: Test-Time Preference Optimization Through Textual Gradient-Based AttentionShibing Mo, Haoyang Ruan, Kai Wu, Jing LiuAAAI 2026
- TPO: Aligning Large Language Models with Multi-branch & Multi-step Preference TreesWeibin Liao, Xu Chu, Yasha WangICLR 2025
- DiffPO: Diffusion-styled Preference Optimization for Inference Time Alignment of Large Language ModelsRuizhe Chen, Wenhao Chai, Zhifei Yang, Xiaotian Zhang et al.ACL 2025
- REAR: Test-time Preference Realignment through Reward DecompositionFuxiang Zhang, Pengcheng Wang, Chenran Li, Yi-Chen Li et al.ICML 2026
- Cal-DPO: Calibrated Direct Preference Optimization for Language Model AlignmentTeng Xiao, Yige Yuan, Huaisheng Zhu, Mingxiao Li et al.NeurIPS 2024 · 76 citations
