# Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback

테스트 시점 선호 최적화: 반복적 텍스트 피드백을 통한 즉석 정렬

Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · arXiv · 2025년 1월 22일

- **연구 문제** 대규모 언어 모델을 사람의 선호에 맞추려면 보통 학습 시점에 파라미터를 갱신해야 하므로, 새로운 요구에 빠르게 적응하기 어렵습니다.
- **연구 방법** TPO는 모델 파라미터를 고정한 채, 보상 모델의 점수가 높은 응답과 낮은 응답을 비교해 텍스트 비평을 만들고 이를 바탕으로 응답을 반복 개선합니다.
- **주요 결과** 원문은 정렬되지 않은 Llama-3.1-70B-SFT가 두 번의 TPO 반복 post-training 시점 정렬 모델과 비슷하거나 더 나은 보상 점수를 보인다고 보고합니다.

## 학습 시점 정렬의 한계와 질문

대규모 언어 모델은 방대한 비라벨 텍스트로 학습되기 때문에, 정렬되지 않으면 예상과 다르거나 안전하지 않은 응답을 낼 수 있습니다. 기존의 RLHF와 DPO는 모델 파라미터를 그래디언트 기반으로 갱신하여 선호를 반영하므로, 새로운 요구나 변화하는 데이터 분포에 빠르게 적응하기 어렵습니다. 이 논문은 두 질문을 다룹니다. 첫째, 추론 시점에 정렬하면서도 학습 시점 방법과 비슷한 성능을 낼 수 있는지입니다. 둘째, 수치 점수 대신 해석 가능한 텍스트 피드백으로 선호 최적화를 할 수 있는지입니다.

![Figure 1: Training-time preference optimization (e.g., RLHF and DPO) compared with test-time preference optimization (TPO), where the model aligns with human p…](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d/figures/figure-5afd8be6f0a8c99c2bdba4d13ce90223.png?thumb=512)

**Figure 1** . Training-time preference optimization (e.g., RLHF and DPO) compared with test-time preference optimization (TPO), where the model aligns with human preferences during test-time with the model parameters fixed.

[원문](https://arxiv.org/abs/2501.12895v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback · 원문 그림 인용 · 원본 PDF 1쪽에서 그림 영역을 추출했습니다.

## TPO의 텍스트 기울기 반복 절차

TPO는 모델 파라미터 θ를 고정하고, 응답 v를 텍스트 변수로 취급하여 반복적으로 갱신합니다. 먼저 사용자 질의 x에 대해 N개의 후보 응답을 샘플링하고 보상 모델 R로 점수화하여 캐시에 저장합니다. 다음 반복에서는 캐시의 최고 점수 응답 v와 최저 점수 응답 v̂를 선택하고, 프롬프트 P\_loss로 두 응답을 비교하는 텍스트 손실 L(x, v)을 계산합니다. 이어서 P\_grad로 텍스트 기울기를 만들고, P\_update로 새 후보들을 생성합니다. 새 후보는 다시 보상 모델로 평가되어 캐시에 추가되며, 최대 D회 반복한 뒤 캐시에서 가장 높은 점수의 응답을 최종 출력으로 선택합니다.

![Figure 2: Framework of test-time preference optimization (TPO), shown here on a real example from AlpacaEval 2. Concretely, the model samples responses and sco…](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d/figures/figure-26a75e0b54238195e2c10cfafc427d8a.png?thumb=512)

**Figure 2** . Framework of test-time preference optimization (TPO), shown here on a real example from AlpacaEval 2. Concretely, the model samples responses and scores them with a reward model (Left), interprets reward model feedback of chosen response v3 and rejected response v1 (Middle), and provides critiques, generates improvement suggestions (Right), and then updates new responses for the next iteration. In analogy to traditional gradient-based methods, TPO performs gradient descent (loss calculation, gradient computation and variable optimization) in textual form to tailor model outputs based on numerical feedback from the reward model.

[원문](https://arxiv.org/abs/2501.12895v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback · 원문 그림 인용 · 원본 PDF 3쪽에서 그림 영역을 추출했습니다.

## 벤치마크에서 나타난 주요 비교 결과

정렬되지 않은 Llama-3.1-70B-SFT에 TPO를 적용하면, 기본 설정인 최대 반복 D=2, 샘플 수 N=5에서 보상 점수가 학습 시점 정렬 기준 모델과 비슷하거나 그 이상이 됩니다. 보상 모델을 Llama-3.1-Tulu-3-8B-RM으로 바꾼 TPO 설정은 AlpacaEval 2의 LC를 제외한 지표에서 Llama-3.1-70B-Instruct를 능가한다고 원문에 보고됩니다. 정렬 모델인 Mistral-Small-Instruct-2409에서는 AlpacaEval 2의 LC가 45.7에서 53.4로 높아진다고 보고됩니다. 이 결과들은 저자가 보고한 특정 모델, 보상 모델, 벤치마크 조건에서 얻은 값입니다.

![Figure 3: Test-time training curve for the (unaligned) SFT model and (aligned) instruct models. The colored lines represent the test-time training performance…](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d/figures/figure-c9dca30716e4b30e5bf9dda546fae1bc.png?thumb=512)

**Figure 3** . Test-time training curve for the (unaligned) SFT model and (aligned) instruct models. The colored lines represent the test-time training performance (reward model score) w.r.t. training steps (i.e., number of TPO iterations), while the dashed horizontal lines indicate scores for models without test-time training.

[원문](https://arxiv.org/abs/2501.12895v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

![Table 1: Benchmark performance of the unaligned model (Llama-3.1-70B-SFT) with TPO, compared against training-time aligned baselines (Llama-3.1-70B-DPO and Lla…](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d/figures/figure-1ef1cd6641f8e3fe0b4ae9f4e826293e.png?thumb=512)

**Table 1** . Benchmark performance of the unaligned model (Llama-3.1-70B-SFT) with TPO, compared against training-time aligned baselines (Llama-3.1-70B-DPO and Llama-3.1-70B-Instruct). The bold and underlined numbers indicate the best and second-best performances, respectively. By default, the maximum number of iterations D is set to 2, and the number of samples N is set to 5. To showcase the potential of TPO, we present an ultra setting, in which the number of iterations is increased to 5 and the number of samples to 20. ⋆ denotes the models optimized with TPO using the reward model FsfairX-LLaMA3-RM-v0.1, while † denotes Llama-3.1-Tulu-3-8B-RM.

[원문](https://arxiv.org/abs/2501.12895v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

![Table 2: Benchmark performance of the aligned models (Llama-3.1-70B-Instruct and Mistral-Small-Instruct-2409) with TPO. The bold numbers indicate the best perf…](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d/figures/figure-94ab80419b5636575a4e0a008af1a349.png?thumb=512)

**Table 2** . Benchmark performance of the aligned models (Llama-3.1-70B-Instruct and Mistral-Small-Instruct-2409) with TPO. The bold numbers indicate the best performance. The maximum number of iterations D is set to 2, and the number of samples N is set to 5. The reward model used for TPO is FsfairX-LLaMA3-RM-v0.1.

[원문](https://arxiv.org/abs/2501.12895v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Figure 8: Test-time training curves of the Llama-3.1-70B-SFT using FsfairX-LLaMA3-RM-v0.1](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d/figures/figure-c3eed59b389e999d61f43b458a8afc4d.png?thumb=512)

**Figure 8** . Test-time training curves of the Llama-3.1-70B-SFT using FsfairX-LLaMA3-RM-v0.1.

[원문](https://arxiv.org/abs/2501.12895v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

![Figure 9: Test-time training curves of the Llama-3.1-70B-SFT using Llama-3.1-Tulu-3-8B-RM](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d/figures/figure-847435b05fb8f5bd983f3d190bc095a5.png?thumb=512)

**Figure 9** . Test-time training curves of the Llama-3.1-70B-SFT using Llama-3.1-Tulu-3-8B-RM.

[원문](https://arxiv.org/abs/2501.12895v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback · 원문 그림 인용 · 원본 PDF 15쪽에서 그림 영역을 추출했습니다.

![Figure 10: Test-time training curves of the aligned models: Llama-3.1-70B-Instruct and Mistral-Small-Instruct-2409 (Reward model: FsfairX-LLaMA3-RM-v0.1)](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d/figures/figure-e9a803b07ae0a840ec412556b2417a69.png?thumb=512)

**Figure 10** . Test-time training curves of the aligned models: Llama-3.1-70B-Instruct and Mistral-Small-Instruct-2409 (Reward model: FsfairX-LLaMA3-RM-v0.1).

[원문](https://arxiv.org/abs/2501.12895v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.

## 적용 범위와 한계

Llama-3.1-8B-Instruct에 대한 실험에서는 TPO를 반복할수록 보상 모델 점수가 감소합니다. 원문은 이를 지시 따르기 능력이 충분하지 않으면 TPO가 제대로 작동하지 않을 수 있음을 보여준다고 서술합니다. 또한 원문은 이 모델들이 TPO를 위해 명시적으로 학습되지 않았다고 밝히며, 더 작은 모델을 세밀하게 미세조정하면 개선될 수 있는지는 향후 과제로 남겨 둡니다. 추론 비용 측면에서도 TPO는 학습 시점 정렬보다 적은 계산으로 설명되지만, 이는 저자가 계산한 조건에서의 비교입니다.

![Figure 7: Test-time training curve of Llama-3.1-8B-Instruct (red line) on the HH-RLHF dataset](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d/figures/figure-7cb11c2a678d80690e9e5e2ba6c633ad.png?thumb=512)

**Figure 7** . Test-time training curve of Llama-3.1-8B-Instruct (red line) on the HH-RLHF dataset.

[원문](https://arxiv.org/abs/2501.12895v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng · Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

## 논문 정보

- **저자**: Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2025년 1월 22일
- **등록일**: 2026년 11월 5일
- **수정일**: 2025년 1월 22일
- **버전**: v1
- **arXiv**: 2501.12895
- **분류**: cs.CL
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2501.12895v1) · [원문 PDF ↗](https://arxiv.org/pdf/2501.12895v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

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.

## 원문 인용

Yafu Li, Xuyang Hu, Xiaoye Qu, Linjie Li, Yu Cheng (2025). Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback. arXiv:2501.12895v1. https://arxiv.org/abs/2501.12895v1

**BibTeX**

```
@misc{li2025test,
  title = {{Test-Time Preference Optimization: On-the-Fly Alignment via Iterative Textual Feedback}},
  author = {Yafu Li and Xuyang Hu and Xiaoye Qu and Linjie Li and Yu Cheng},
  year = {2025},
  eprint = {2501.12895},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.12895v1}
}
```

## 이 논문의 용어

- [Direct Preference Optimization](https://refivu.com/terms/81ed2010f707-direct-preference-optimization)
- [MATH-500](https://refivu.com/terms/7e6fbbc4b736-math-500)
- [LLaMA-3.1-8B-Instruct](https://refivu.com/terms/0abd12a34f8f-llama-3-1-8b-instruct)
- [Reward Model](https://refivu.com/terms/76346da527c5-reward-model)
- [UltraFeedback](https://refivu.com/terms/a69b3fb20ccc-ultrafeedback)
- [XSTest](https://refivu.com/terms/9ec267e86e44-xstest)
- [Test-Time Training](https://refivu.com/terms/a740f645f3da-test-time-training)
- [Arena-Hard](https://refivu.com/terms/73f051c9dfee-arena-hard)
- [AlpacaEval 2](https://refivu.com/terms/50ecc97e6a23-alpacaeval-2)
- [HH-RLHF](https://refivu.com/terms/febf0153ca29-hh-rlhf)
- [Length-controlled win rate](https://refivu.com/terms/796f602331a9-length-controlled-win-rate)

## 다른 논문 해설

- [Selective Preference Optimization via Token-Level Reward Function Estimation](https://refivu.com/papers/bb6bc59d-6f0b-4f0f-bed2-dcbb3037eb8a-selective-preference-optimization-via-token-level-reward.md)
- [MaPPO: Maximum a Posteriori Preference Optimization with Prior Knowledge](https://refivu.com/papers/dcf1d65c-c60e-42ba-a984-a649256d7704-mappo-maximum-a-posteriori-preference-optimization-with.md)
- [LOGO -- Long cOntext aliGnment via efficient preference Optimization](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334-logo-long-context-alignment-via-efficient-preference.md)
- [GAW-PO: Preference Optimization with Gradient-Aligned Token Weights](https://refivu.com/papers/1751cadd-c5ac-4be5-b5f4-d5f5efd0c8fd-gaw-po-preference-optimization-with-gradient-aligned-token.md)
- [Multi-Objective Preference Optimization: Improving Human Alignment of Generative Models](https://refivu.com/papers/041fdbd0-012b-4a3d-919c-d5e10dca7d53-multi-objective-preference-optimization-improving-human.md)
- [Correcting the Mythos of KL-Regularization: Direct Alignment without Overoptimization via Chi-Squared Preference Optimization](https://refivu.com/papers/55e2d93e-c557-46e7-9034-94b78fdd5f91-correcting-the-mythos-of-kl-regularization-direct-alignment.md)
- [Calibrated Multi-Preference Optimization for Aligning Diffusion Models](https://refivu.com/papers/79fb386a-6628-4c08-8986-85b6fd0e10c5-calibrated-multi-preference-optimization-for-aligning.md)
- [Re-Align: Aligning Vision Language Models via Retrieval-Augmented Direct Preference Optimization](https://refivu.com/papers/b1f33794-2f7e-4db7-ad58-b04894663792-re-align-aligning-vision-language-models-via-retrieval.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/a5408c3c-bf17-431a-9280-bf3e7e14506d-test-time-preference-optimization-on-the-fly-alignment)
