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

  1. Each training example holds a prompt, an answer and a single label marking it desirable or undesirable.
  2. The model and a frozen reference model are compared on the probabilities they give the answer.
  3. The loss raises desirable answers' relative probability while lowering undesirable ones'; gain and loss terms can be weighted differently, as in prospect theory.
  4. 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

TermHow it differs
RLHF and online reinforcement learningRLHF (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-tuningSFT 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.

ON-PREMISES EXAMPLE

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.

Sources

In the glossary: Glossary, E to L

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.