What is Kahneman-Tversky optimisation (KTO)?
KTO is a method that aligns a language model using individual answers each labelled only desirable or undesirable, instead of preferred and rejected pairs, with a loss function inspired by how Kahneman and Tversky's prospect theory treats gains and losses.
The name stands for Kahneman-Tversky Optimisation. Unlike DPO, which needs a comparison of two answers to the same prompt, KTO needs only a good or bad mark per answer. This lets user feedback such as thumbs up and thumbs down be used directly.
- Topic
- Machine learning, models and training
- Also known as
- Kahneman-Tversky Optimization
- Origin
- 2024
How Kahneman-Tversky optimisation (KTO) works
- Each training example holds a prompt, an answer and a single label marking it desirable or undesirable.
- The model and a frozen reference model are compared on the probabilities they give the answer.
- The loss raises desirable answers' relative probability while lowering undesirable ones'; gain and loss terms can be weighted differently, as in prospect theory.
- If desirable and undesirable examples are unbalanced, weights are adjusted to match.
In more detail
Loss aversion and the z0 reference point
In Kahneman and Tversky's prospect theory, people evaluate outcomes relative to a neutral reference point and feel losses more strongly than equivalent gains (loss aversion). KTO encodes this by defining a dynamic KL-divergence reference baseline z0 across the batch and weighting undesirable and desirable losses via asymmetric hyperparameters (lambda_U, lambda_D).
Use after SFT and batch size
For effective KTO alignment, the model must already produce reasonable responses in the target domain; therefore, KTO is normally run after supervised fine-tuning (SFT) rather than directly on a raw base model. Estimating z0 reliably also needs a large enough batch.
Robustness to imbalanced feedback and its limits
Because each prompt does not require a matching positive and negative pair, KTO works well when historical logs contain uneven feedback (for instance, 90% thumbs-up and 10% thumbs-down) and authors report it can match or approach DPO quality while tolerating noisy or imbalanced signals better.
Commonly confused terms
| Term | How it differs |
|---|---|
| RLHF and online reinforcement learning | RLHF (PPO or GRPO style) trains or uses an explicit reward function or model and generates online rollouts during optimisation, whereas KTO is an offline method optimising directly on binary-labelled responses without training a separate reward model. |
| Supervised fine-tuning | SFT trains the model uniformly to imitate all examples in the dataset (no negative signal), whereas KTO explicitly penalises undesirable responses relative to a reference model alongside reinforcing desirable ones. |
Why Kahneman-Tversky optimisation (KTO) matters for on-premises AI
Collecting preference pairs is hard in organisations, but single feedback such as thumbs up or down under answers builds up anyway. KTO enables alignment with such data, while feedback staying in-house keeps user data inside. Single labels can be noisier than pairs, so data cleaning and evaluation sets matter. When using user feedback, removing answers containing personal data is planned separately.
A telecoms operator collects employees' thumbs up and down on its internal support assistant's answers; after removing records with personal data, it aligns the model in-house with KTO on these single labels.
Common questions
How does KTO differ from DPO?
DPO needs a comparison of two answers to the same prompt. KTO can work with just a desirable or undesirable label per answer.
What data is KTO used with?
Answers each labelled good or bad. Users' thumbs up and thumbs down feedback fits this structure.
Related terms
- Direct preference optimisation (DPO)
- Odds ratio preference optimisation (ORPO)
- Reinforcement learning from human feedback (RLHF)
- Reward model
- AI alignment
- Supervised fine-tuning (SFT)
Sources
- KTO: Model Alignment as Prospect Theoretic Optimization, 2024
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model, 2023
In the glossary: Glossary, E to L