Test-Time Alignment for Large Language Models via Textual Model Predictive Control

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Wang, Kuang-Da, Chen, Teng-Ruei, Hung, Yu Heng, Ko, Guo-Xun, Ding, Shuoyang, Wu, Yueh-Hua, Wang, Yu-Chiang Frank, Yang, Chao-Han Huck, Peng, Wen-Chih, Hsieh, Ping-Chun
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908902407274496
author Wang, Kuang-Da
Chen, Teng-Ruei
Hung, Yu Heng
Ko, Guo-Xun
Ding, Shuoyang
Wu, Yueh-Hua
Wang, Yu-Chiang Frank
Yang, Chao-Han Huck
Peng, Wen-Chih
Hsieh, Ping-Chun
author_facet Wang, Kuang-Da
Chen, Teng-Ruei
Hung, Yu Heng
Ko, Guo-Xun
Ding, Shuoyang
Wu, Yueh-Hua
Wang, Yu-Chiang Frank
Yang, Chao-Han Huck
Peng, Wen-Chih
Hsieh, Ping-Chun
contents Aligning Large Language Models (LLMs) with human preferences through finetuning is resource-intensive, motivating lightweight alternatives at test time. We address test-time alignment through the lens of sequential decision making, a perspective that reveals two fundamental challenges. When actions are defined at the token level, as in guided decoding, alignment suffers from the curse of horizon. Conversely, when actions are at the response level, as in traditional iterative refinement, the curse of dimensionality emerges. To resolve this trade-off, we draw inspiration from Model Predictive Control (MPC) in control theory to propose Textual Model Predictive Control (TMPC), a novel predictive planning framework adapted for aligning LLMs at inference time. A key limitation of standard MPC is its reliance on predefined, hard segment boundaries, which are often absent in text generation. TMPC overcomes this by introducing two principles inspired by hierarchical reinforcement learning: (1) Hindsight Subgoal Identification, where TMPC analyzes generation subgoals to retrospectively identify high-reward intermediate outputs as subgoals. This allows the framework to discover meaningful, task-specific planning steps (e.g., a sentence in machine translation or a bug fix in code generation.). (2) Subgoal-Conditioned Re-Generation, where these identified subgoals are used to guide subsequent planning iterations. By conditioning on these proven, high-quality subgoals, TMPC ensures stable improvement by building upon previously validated successes. TMPC is evaluated on three tasks with distinct segmentation properties: discourse-level translation, long-form response generation, and program synthesis. The results demonstrate that TMPC consistently improves performance, highlighting the generality.
format Preprint
id arxiv_https___arxiv_org_abs_2502_20795
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Test-Time Alignment for Large Language Models via Textual Model Predictive Control
Wang, Kuang-Da
Chen, Teng-Ruei
Hung, Yu Heng
Ko, Guo-Xun
Ding, Shuoyang
Wu, Yueh-Hua
Wang, Yu-Chiang Frank
Yang, Chao-Han Huck
Peng, Wen-Chih
Hsieh, Ping-Chun
Computation and Language
Aligning Large Language Models (LLMs) with human preferences through finetuning is resource-intensive, motivating lightweight alternatives at test time. We address test-time alignment through the lens of sequential decision making, a perspective that reveals two fundamental challenges. When actions are defined at the token level, as in guided decoding, alignment suffers from the curse of horizon. Conversely, when actions are at the response level, as in traditional iterative refinement, the curse of dimensionality emerges. To resolve this trade-off, we draw inspiration from Model Predictive Control (MPC) in control theory to propose Textual Model Predictive Control (TMPC), a novel predictive planning framework adapted for aligning LLMs at inference time. A key limitation of standard MPC is its reliance on predefined, hard segment boundaries, which are often absent in text generation. TMPC overcomes this by introducing two principles inspired by hierarchical reinforcement learning: (1) Hindsight Subgoal Identification, where TMPC analyzes generation subgoals to retrospectively identify high-reward intermediate outputs as subgoals. This allows the framework to discover meaningful, task-specific planning steps (e.g., a sentence in machine translation or a bug fix in code generation.). (2) Subgoal-Conditioned Re-Generation, where these identified subgoals are used to guide subsequent planning iterations. By conditioning on these proven, high-quality subgoals, TMPC ensures stable improvement by building upon previously validated successes. TMPC is evaluated on three tasks with distinct segmentation properties: discourse-level translation, long-form response generation, and program synthesis. The results demonstrate that TMPC consistently improves performance, highlighting the generality.
title Test-Time Alignment for Large Language Models via Textual Model Predictive Control
topic Computation and Language
url https://arxiv.org/abs/2502.20795