Preprint
Machine Learning

Thought Preference Optimization

Tianhao Wu, Janice Lan, Weizhe Yuan, Jiantao Jiao, J. Weston, Sainbayar Sukhbaatar
October 1, 2024arXiv.org57 citations

57

Citations

3

Influential Citations

arXiv.org

Venue

2024

Year

Abstract

Iteratively trains LLMs to generate useful "thoughts" that improve response quality by prompting the model to produce thought-response pairs, scoring the responses with a judge model, creating preference pairs from the highest and lowest-scoring responses and their associated thoughts, and then using these pairs with DPO or IRPO loss to optimize the thought generation process while mitigating judge model length bias through score normalization.

Analysis

Why This Paper Matters

Large language models (LLMs) are increasingly expected to handle complex instructions that require reasoning, planning, or self-correction. While chain-of-thought prompting has shown promise, it exposes intermediate reasoning to users, which is often undesirable for general instruction following. This paper introduces Thought Preference Optimization (TPO), a training method that teaches LLMs to generate internal "thoughts"—hidden from the user—that improve response quality. The key insight is that models can learn to think better through iterative preference optimization using only response-level feedback, without any human-labeled thought data. This matters because it offers a scalable way to enhance LLM reasoning capabilities while maintaining a clean user experience.

How It Works

Figure 1

The core idea is to treat thought generation as a latent variable that can be optimized via reinforcement learning from AI feedback (RLAIF). The process begins with a seed instruction-tuned LLM that normally produces responses directly. TPO prompts this model to first generate a thought (using either a generic or a more structured prompt) and then produce the final response. Multiple such thought-response pairs are sampled for each instruction.

Thought Preference Optimization

A judge model evaluates only the response parts of these samples, scoring them without seeing the thoughts. This design choice is deliberate: there is no reliable judge for internal thoughts, and the ultimate goal is response quality. For pointwise judges, each response gets a scalar score. For pairwise judges, all response pairs are compared, and ELO scoring converts pairwise preferences into pointwise scores.

Figure 4

From each set of K samples, the highest and lowest scoring responses (and their associated thoughts) form a preference pair. These pairs are used with Direct Preference Optimization (DPO) loss to update the model, teaching it which thought patterns lead to better responses. This process repeats iteratively: the updated model generates new samples, new preference pairs are created, and the model is trained again.

Figure 5

A critical practical issue is that many judge models exhibit length bias—they prefer longer responses regardless of quality. To counter this, TPO introduces a length-control (LC) mechanism. Scores are normalized by subtracting the mean and dividing by the standard deviation of response lengths, then a penalty proportional to length is applied. A hyperparameter ρ controls the strength of this penalty, typically set between 0 and 0.5.

Figure 6

Results

Benchmark win rates (%) for AlpacaEval (length-controlled (LC)) and Arena-Hard.

TPO was evaluated on two popular benchmarks: AlpacaEval (with length-controlled win rate) and Arena-Hard. Using Llama-3-8B-Instruct as the seed model and ArmoRM as the judge, TPO achieved a 52.5% win rate on AlpacaEval, outperforming the direct baseline (which generates responses without thoughts) by 4.1% and the seed model by 27.6%. On Arena-Hard, TPO reached 37.3% win rate, beating the direct baseline by 4.3% and ranking as the best model of its size on the leaderboard.

Training iterations on AlpacaEval (left) and Arena-Hard (right), comparing our TPOmethod to the direct baseline starting from the seed (iteration 0) model.

Ablation studies showed that performance improved consistently over training iterations, with the structured thought prompt (requiring a draft response and evaluation) slightly outperforming the generic prompt. The combination of UltraFeedback instructions and ArmoRM judge yielded the best results.

Breakdown of AlpacaEval results for different judge models, training instruction sets and Thought Prompts.

Significance

TPO demonstrates that LLMs can learn to generate useful internal thoughts through iterative self-improvement, without human annotation or external reasoning datasets. This is a significant step toward more autonomous and capable AI systems. The method's reliance on response-only feedback makes it practical, as judge models for response quality are readily available. The length-control mechanism is a simple but effective fix for a common failure mode in preference optimization. However, the approach is limited by the quality of the judge model—if the judge cannot capture nuanced improvements, the thoughts may not evolve optimally. Future work could explore multi-turn thought processes or integrating external knowledge into the thought generation. Overall, TPO offers a promising direction for enhancing LLM reasoning while preserving user-facing simplicity.