Gaussian Process Preference Learning
Chapter 16 turned an answer to "which do you prefer?" into a likelihood: the probit choice model, under which the probability of preferring one option grows with the difference in their utilities. Chapter 17 showed how to handle the non-Gaussian posterior that such a likelihood creates. This chapter joins the two with the Gaussian process prior of Chapter 8, which is what lets a few dozen answers about a few dozen designs say something about every design, including those never shown.
The result is the model of Chu and Ghahramani (2005). It is the default model behind preferential Bayesian optimization (PBO) two decades later, and it is what runs inside the figures of Chapter 19. We set it up, derive how to fit it, use it to predict, and then ask two questions that the regression model never raised: what comparisons cannot tell us at all, and how the pattern of which pairs were compared shapes what they can.
Sources cited in the introduction 1
- Chu and Ghahramani (2005) Preference learning with Gaussian processes
18.1 The model #
A person has a latent utility over a domain of designs: the color of a poster, the parameters of an exoskeleton controller, the settings of a photo filter. We place a Gaussian process prior on it,
so that before any answer, the utilities of any finite set of designs are jointly Gaussian with covariances given by the kernel (Chapter 7). The kernel encodes the one assumption that makes learning from few answers possible: designs that are close in have similar utilities.
The data are answers among distinct designs . The -th answer says that design was preferred to design , where and are indices into the list of designs. A design can appear in many answers, so is at most and often much smaller. Collect the utilities at the designs in a vector , whose prior is with . Each answer follows Thurstone's Case V (Equation (16.2)), and answers are independent given the utilities:
Chu and Ghahramani (2005) derived this likelihood exactly as Section 16.3 did: start from an ideal judge who prefers whenever , then contaminate each latent value with independent Gaussian noise of variance . The noise scale is a hyperparameter, alongside the kernel's lengthscale and amplitude.
The posterior over is Equation (17.1): the Gaussian prior times Equation (18.1), normalized. It is not Gaussian, so Chu and Ghahramani (2005) replaced it by the Laplace approximation of Section 17.2. Predictions at new designs then follow from the Gaussian process exactly as in regression, because given the utility anywhere else is conditionally Gaussian.
The same model can be seen from a second angle. The likelihood depends only on differences, so one can define a function of pairs, , and treat each answer as a binary label on a pair. Because is a linear transformation of , it is itself a Gaussian process, with covariance
by expanding the covariance of two differences term by term. Houlsby et al. (2011) (a preprint) derived this preference kernel and concluded that the model of Chu and Ghahramani "is equivalent to GPC with a particular class of kernels", Gaussian process classification on pairs. Every tool for classification, including the approximations of Chapter 17, therefore applies.
Preference learning of this kind reached people early. Brochu et al. (2007) used the same Thurstone model to help people find material appearances for computer graphics by choosing between rendered examples, and it has since been used, with the Laplace approximation, to learn which exoskeleton gaits users prefer from their comparisons and ordinal labels (Li et al., 2021). Chapter 24 and Chapter 25 work through two such problems end to end.
Sources cited in Section 18.1 4
- Chu and Ghahramani (2005) Preference learning with Gaussian processes
- Houlsby et al. (2011) Bayesian Active Learning for Classification and Preference Learning
- Brochu et al. (2007) Active Preference Learning with Discrete Choice Data
- Li et al. (2021) ROIAL: Region of Interest Active Learning for Characterizing Exoskeleton Gait Preference Landscapes
18.2 Fitting it #
Fitting the model means finding the posterior mode and the curvature there. Equation (17.4) gave Newton's step for any likelihood; what it needs from the likelihood is its gradient and its negative Hessian . For comparisons both have a structure that explains much of the rest of this chapter, so we derive them in full. Write , and for the -th answer write and , the vector with at the winner, at the loser, and 0 elsewhere, so that .
- Take logs of Equation (18.1): .
- Differentiate one term. Since , which we write (the inverse Mills ratio), and , the chain rule gives .
- Sum over answers: . Each answer adds to its winner's entry and subtracts it from its loser's.
- Differentiate again. Using and the quotient rule, , so .
- Define the weight . Then .
- Each weight is positive: is the variance of a standard normal variable conditioned to exceed , which lies between 0 and 1, so and .
- Hence is a sum of positive multiples of , a positive semidefinite matrix, and is concave. With the concave log prior, the log posterior has a single maximum, as Chu and Ghahramani (2005) proved (their Lemma 1).
Look at what Equation (18.2) says entry by entry. The gradient pushes each design up by for every answer it won and down for every answer it lost. The push is large when the answer was surprising: grows roughly like when is very negative, that is, when the current utilities say the loser should have won, and it vanishes when the answer was already expected. The matrix has, on its diagonal, the total weight of the answers each design took part in, and off the diagonal, minus the total weight of the answers between two designs. That is the weighted graph Laplacian of the comparison graph, whose nodes are designs and whose edges are answered pairs. Section 18.5 returns to what that means.
Two consequences follow immediately. Every sums to zero, so the gradient sums to zero, , and : raising every utility by the same amount changes no answer's probability. And the weights depend on , so is recomputed at every Newton step.
With these two ingredients, the fit is the algorithm below. It is what
fitPreference in this book's figure code does.
Input: designs , answers for , kernel function , noise .
- Form , adding a small jitter to its diagonal, and set .
- Compute and from Equation (18.2).
- Take the Newton step Equation (17.4): .
- If the log posterior decreased, halve the step, , until it increases.
- Set and return to step 2 until the largest change is below a tolerance. Call the result .
- Return , , and evaluated at .
At the start, every , every answer is a coin flip under the model, and every weight is . The first step therefore treats all answers alike, and later steps reweight them by how surprising each turns out to be. In the figures of this chapter the fit converges in five to thirteen steps. Each step solves an system, so the cost is per step, the same as regression.
At the mode the gradient of the log posterior vanishes: , so
which is equation (11) of Chu and Ghahramani (2005). The vector plays the role that played in regression (Equation (8.4)): one weight per design, positive for designs that won more than the model expected and negative for those that lost.
Take two designs with prior correlation , so , and one answer, preferred to . Then and for the weight at the mode. The Laplace covariance is ; by the Sherman-Morrison formula it equals . Here , the prior variance of the difference , and .
- The posterior variance of the difference is , with . The answer shrinks it.
- The posterior variance of the sum is unchanged, because . The answer says nothing about the overall level.
This is the two-dimensional picture of Figure 17.6, now in formulas: a comparison acts only along the difference.
The same computations give the Laplace evidence Equation (17.5), which Chu and Ghahramani (2005) maximized over the kernel hyperparameters and (their equation 12); BoTorch fits its preference model the same way (Section 18.6).
import numpy as np
from scipy.stats import norm
def terms(f, duels, s):
"""Gradient and negative Hessian of the pairwise probit log-likelihood."""
n = len(f)
grad, W = np.zeros(n), np.zeros((n, n))
for i, j in duels: # design i was preferred to j
z = (f[i] - f[j]) / s
lam = np.exp(norm.logpdf(z) - norm.logcdf(z)) # phi(z) / Phi(z)
grad[i] += lam / s
grad[j] -= lam / s
w = lam * (z + lam) / s**2
W[i, i] += w; W[j, j] += w; W[i, j] -= w; W[j, i] -= w
return grad, W
def fit_preference(K, duels, sigma=0.1, iters=50):
n, s = len(K), np.sqrt(2) * sigma
f = np.zeros(n)
for _ in range(iters):
grad, W = terms(f, duels, s)
f_new = K @ np.linalg.solve(np.eye(n) + W @ K, W @ f + grad)
done = np.max(np.abs(f_new - f)) < 1e-8
f = f_new
if done:
break
grad, W = terms(f, duels, s) # beta and W at the mode
return f, grad, W
The sketch omits the step halving of Algorithm 18.1, which matters only when the first steps overshoot, and uses a general solver where a careful implementation would exploit symmetry, as Rasmussen and Williams (2006) do for classification. Section C.3 builds the full model in the minimal implementation.
Sources cited in Section 18.2 2
- Chu and Ghahramani (2005) Preference learning with Gaussian processes
- Rasmussen and Williams (2006) Gaussian Processes for Machine Learning
18.3 Predicting preferences #
With the mode and the curvature in hand, the Laplace posterior over is Gaussian, , and predicting the utility at new designs is Gaussian conditioning, as in Section 8.1. For a new design , write for its prior covariances with the compared designs.
- Given , the Gaussian process prior gives (Equation (8.2) with noise-free "observations" ).
- Average over the Laplace posterior of . The mean is , by Equation (18.3).
- The variance adds the spread of the conditional mean to the conditional variance (the law of total variance): .
- By the Woodbury identity (Section B.2), when is invertible, and in general , which needs no inverse of .
- Hence the variance is .
These match equations (17) and (18) of Chu and Ghahramani (2005) and Rasmussen and Williams's predictive equations for classification (Rasmussen and Williams, 2006, ch. 3), with the comparison in place of the diagonal one. The second form in step 4 matters: is a graph Laplacian, which always has a zero eigenvalue, so does not exist.
The quantity a preferential optimizer most often needs is the probability that a person will prefer one new design to another . The two latent values are jointly Gaussian under the approximation, with means , variances , and covariance from the same formula with on the right. Their difference has mean and variance , and Equation (16.6) gives
equation (19) of Chu and Ghahramani (2005). The covariance matters. Two nearby designs have strongly correlated latent values, so their difference is much better known than either value, and the model can be confident about their order even when it is unsure how good either one is.
The figure below runs the model on the running objective of this book, the two-bump function of Chapter 11. A simulated person whose utility is that function answers each comparison with a little probit noise; you choose the pairs. Above the plot, the comparison graph draws one arc per answer.
Some things to try:
- Ask ten random pairs, twice. The figure starts with six answers, too few to find either bump. After 20 more the mean follows both bumps and places its maximum at , next to the true one at 0.73. Every comparison moved the curve only at its two ends and, through the kernel, their neighborhoods.
- Watch the band. It narrows near compared designs but stays wide everywhere, about even after 20 answers. That is not a failure; Section 18.4 explains it.
- Read the last prediction. Among the first answers the probabilities scatter, and some winners had been predicted to lose (a probability below one half); later most winners are predicted at 0.8 or above. A surprising answer moves the curve the most, because its is large.
- Change the lengthscale. At each answer is a local bump, and the curve falls back toward zero wherever nothing nearby was compared. At the curve is too stiff to hold two bumps, and its maximum lands in the wrong place.
- Press Best against random repeatedly. Every pair now includes the current best design, and the graph becomes a star. The region around the best is learned well and the rest poorly, a pattern that returns with the champion-and-challenger rules of Section 19.3 and with EUBO's collapse toward the current best (Section 19.6).
18.3.1 In two and more dimensions #
Nothing in Equation (18.1) to Equation (18.5) depends on the input dimension. Designs enter only through the kernel, as distances. The figure below runs the same model on a two-dimensional design space, with a simulated person whose utility is the Branin function, a standard test function with three equally good maxima along a curved valley, rescaled to the unit square with larger values better.
Some things to try:
- Compare the left and middle maps. With 20 random pairs among 17 designs the posterior mean recovers the valley's broad shape. In the default draw it orders 89% of all pairs of compared designs correctly, and its rank agreement with the hidden utility over the whole square is 0.87; press New draw a few times to see that agreement range from about 0.4 to 0.9.
- Look at the right map. Uncertainty is lowest where designs were compared and highest in the corners no comparison reached.
- Switch to Star. Every answer involves the same central design. Its comparisons with the others are learned, but the others are never compared with one another, and the model does worst here: averaged over 30 draws it orders 81% of the pairs correctly, with a rank agreement of 0.63, against 85% and 0.71 for random pairs.
- Switch to Isolated pairs. Twenty answers now touch 40 designs in 20 separate components. Each answer orders two designs and says nothing directly about how they compare with the other pairs, so the offsets between pairs come only from the kernel. With a kernel this smooth, that works: over 30 draws the model still orders 82% of the pairs correctly, and because 40 designs cover the square better than 17, its rank agreement over the square is slightly higher (0.79).
- Shorten the lengthscale to 0.08. The kernel now links designs less. The isolated pairs drop to 76% of pairs ordered correctly, the random pairs to 82%: the less the prior ties designs together, the more the answers must do it themselves.
How far does this go in more dimensions? The same code answers that. Table 18.1 reports an illustrative computation: 40 random designs in the unit cube, random pairs among them answered by a simulated person with noise , an RBF kernel with lengthscale 0.52 (the mode of BoTorch's default prior, Section 18.6), and 20 repetitions. The utility is the Hartmann function in 3 and 6 dimensions, two standard benchmarks, and the 6-dimensional one hidden in 20 dimensions, where 14 inputs do not matter. The column "kernel value" is the average prior correlation between two of the designs.
| Utility | Kernel value | ρ, 20 | ρ, 40 | ρ, 80 | Rank, 20 | Rank, 40 | Rank, 80 |
|---|---|---|---|---|---|---|---|
| Hartmann, 3-D | 0.47 | 0.75 | 0.79 | 0.86 | 4.7 | 5.0 | 3.1 |
| Hartmann, 6-D | 0.23 | 0.49 | 0.55 | 0.61 | 7.7 | 5.5 | 3.1 |
| Hartmann 6-D in 20-D | 0.006 | 0.17 | 0.26 | 0.26 | 10.8 | 8.1 | 2.3 |
Two patterns stand out. The model's grasp of new designs collapses with dimension: in 20 dimensions, random designs are so far apart in the kernel's eyes (an average kernel value of 0.006) that each answer informs almost nothing beyond its own two designs. Meanwhile its ranking of the designs it has seen keeps improving with more answers in every dimension, because those are ordered by direct comparisons. Making the lengthscale grow with the number of inputs , to , raised the average kernel value in 20 dimensions to 0.41 but improved the rank correlation on new designs only to 0.19, 0.30, and 0.28: the problem there is the 14 inputs that do not matter, which a kernel with one lengthscale shared by all inputs (an isotropic kernel) cannot ignore. These are one illustrative setup, not a benchmark (inference). They suggest why PBO in many dimensions depends on the kernel's structure, such as one lengthscale per input (Section 9.2), and on choosing pairs well (Chapter 19); Chapter 30 reports the research.
Sources cited in Section 18.3 2
- Chu and Ghahramani (2005) Preference learning with Gaussian processes
- Rasmussen and Williams (2006) Gaussian Processes for Machine Learning
18.4 What can be identified #
The band in Figure 18.1 stayed wide after 20 answers, while the band of a regression model with 20 observations would have pinched at each one. The difference is not the approximation. It is what comparisons can measure.
Shift. Every answer's probability depends on a difference of utilities, so adding the same constant to every utility, , leaves the likelihood unchanged. In Equation (18.2) this appears as and : no answer pushes along the direction , and no answer adds curvature along it. Only the prior says anything about the overall level, so the posterior keeps the prior's uncertainty about it, and that shared uncertainty is what keeps the band wide. The figure below shows the same model with the band redrawn for minus its average over the domain, a quantity comparisons can measure.
Shift invariance is harmless for optimization, which needs only the order of utilities, but it trips up anyone who reads the posterior variance as a measure of how much has been learned. Some models remove it by construction. Bıyık et al. (2020), learning robot reward functions from preferences, fixed the utility to zero at an arbitrary reference design, building the constraint into the kernel, because query responses are invariant to such shifts. Chau et al. (2022) note likewise that utilities are determined only up to a global shift.
Scale versus noise. The likelihood depends on . Doubling every utility and doubling the noise gives exactly the same probabilities for every answer. Comparisons therefore measure utility in units of the person's noise, just as Thurstone measured scale values in units of the discriminal dispersion (Section 16.3). In the model, only the prior separates the two: the kernel's amplitude says how large utilities are a priori, and with it fixed, is identified relative to it. Fitting both from comparisons alone means fitting one ratio. BoTorch makes this explicit by fixing the noise and learning the amplitude (Section 18.6). In Figure 18.3 the amplitude is fixed at 1, so the model-noise slider changes the ratio. At the answers are satisfied by small differences, a few multiples of , and the posterior mean spans about 0.7 from its lowest to its highest point; at it spans about 1.4, with the maximum unchanged at . The answers fix the order and the rough shape; how large the differences are depends on what the model is told about the noise. At the answers count for so little that the maximum moves to the wide bump.
What survives. The order of utilities, the location of the maximum, and probabilities of future answers are identified; the level is not, and the scale is identified only relative to the noise. A practical consequence follows for anyone who compares learned utilities across people or sessions: two posteriors on different levels or scales may describe the same preferences, and comparing them requires recalibration, for instance by including common reference comparisons (inference). Section 20.5 returns to this for models with several people.
Sources cited in Section 18.4 2
- Bıyık et al. (2020) Active Preference-Based Gaussian Process Regression for Reward Learning
- Chau et al. (2022) Learning Inconsistent Preferences with Gaussian Processes
18.5 The comparison graph #
Equation (18.2) showed that the curvature of the log-likelihood is a weighted graph Laplacian: designs are nodes, answered pairs are edges with weights . Graph Laplacians have well-understood properties, and three of them translate directly into statements about what the answers determine.
Components are zero eigenvalues. For any vector , . This is zero exactly when is constant on every connected component of the graph, so has one zero eigenvalue per component. One of them is the global shift of Section 18.4. Each additional one is an offset between two groups of designs that were never compared, directly or through a chain of other designs. Along those directions the answers carry no information, and the posterior relies on the prior alone. The figure below shows this for four designs of the same number of comparisons; Figure 18.2 showed the same thing on a map.
Connectivity is the second eigenvalue. A connected graph has exactly one zero eigenvalue, and the second-smallest eigenvalue, which Fiedler (1973) called the algebraic connectivity, measures how well connected it is. A chain has a tiny algebraic connectivity, a star or a densely connected graph a large one. Switch Figure 18.4 between Chain and Star with the same number of comparisons: the chain's smallest nonzero eigenvalues crowd toward zero, while the star's sit at 1. Directions with small eigenvalues are nearly unconstrained by the answers.
Differences are resistances. Think of each answer as a resistor with conductance between its two designs. Then, if the prior is weak, the uncertainty about the difference between two designs is the effective resistance between them.
- With a prior so broad that along the relevant directions, the Laplace precision of is , which is singular. Differences with , inside one component, are still well defined.
- Their variance is , where is the pseudo-inverse: the inverse on the space orthogonal to the zero eigenvectors.
- For , the quantity is, by definition, the effective resistance between nodes and of an electrical network with conductances .
- Hence : resistors in series add, so long chains of comparisons leave large uncertainty; resistors in parallel combine, so many independent paths between two designs pin their difference down.
In a chain of eight comparisons with equal weights, the two ends are eight resistors apart and their difference has eight times the variance of a single comparison; in a star, any two leaves are two apart. The prior then caps every variance at its prior value, but the ordering of designs by how well their differences are known follows the resistances.
This picture is not only an analogy for the Gaussian process model. For estimating the utilities of a finite set of items under the Thurstone and Bradley-Terry models, Shah et al. (2016) proved minimax error bounds that depend on the topology of the comparison graph through its Laplacian spectrum, and Hendrickx et al. (2019) proved that the relevant quantity is "the square root of the resistance of the comparison graph", with a matching lower bound up to logarithmic factors. Which pairs are asked therefore matters for any comparison model, not only for this one.
Why it matters in practice. With a Gaussian process prior, the Laplace precision is always invertible, because the prior adds , and Figure 18.2 showed that a smooth kernel can supply much of the missing linkage. The trouble starts when the prior cannot: along a zero or near-zero direction of the precision comes from the prior alone, and when the prior's variance in that direction is large, the precision is small and the matrix is badly conditioned. A 2026 preprint traced numerical trouble in the default pipeline to exactly this, observing that EUBO tends to choose pairs that share no design with earlier queries, which makes the likelihood Hessian rank deficient; a diagonal correction scaled by the prior uncertainty improved results by up to 10.9% across 11 benchmarks in 5 to 20 dimensions, with (a p-value: the probability of seeing a difference at least this large if the correction made no difference) (Shao et al., 2026). That margins and connectivity of the comparison graph govern the sample efficiency of Bradley-Terry estimation was also argued at ICML 2026 (Pukdee et al., 2026). Section 27.6 reports this work, and Section 19.6 places it among the known failure modes of the loop.
Comparisons constrain differences along the edges of the comparison graph. A disconnected graph leaves the offsets between components to the prior, and a long chain leaves the ends loosely tied. Which pairs were asked shapes the posterior as much as how they were answered.
Sources cited in Section 18.5 5
- Fiedler (1973) Algebraic Connectivity of Graphs
- Shah et al. (2016) Estimation from Pairwise Comparisons: Sharp Minimax Bounds with Topology Dependence
- Hendrickx et al. (2019) Graph Resistance and Learning from Pairwise Comparisons
- Shao et al. (2026) Adaptive KappaSharp: Condition-Number Shaping for Preferential Bayesian Optimization
- Pukdee et al. (2026) What Does Preference Learning Recover from Pairwise Comparison Data?
18.6 In software #
Most people who fit this model use BoTorch's PairwiseGP, which its docstring
describes as "a probit-likelihood GP that learns via pairwise comparison data,
using a Laplace approximation of the posterior of the estimated utility
values" (Meta Platforms, Inc., 2026h). The model takes the designs as a tensor and the answers as a list of
index pairs, preferred design first, and fits its hyperparameters by
maximizing the Laplace evidence (Meta Platforms, Inc., 2026c).
import torch
from botorch.fit import fit_gpytorch_mll
from botorch.models.pairwise_gp import PairwiseGP, PairwiseLaplaceMarginalLogLikelihood
from botorch.models.transforms.input import Normalize
X = torch.rand(10, 3, dtype=torch.double) # 10 designs with 3 parameters
comparisons = torch.tensor([[0, 1], [2, 0], [3, 4], [4, 2]]) # row (i, j): i preferred to j
model = PairwiseGP(X, comparisons, input_transform=Normalize(d=X.shape[-1]))
mll = PairwiseLaplaceMarginalLogLikelihood(model.likelihood, model)
fit_gpytorch_mll(mll)
post = model.posterior(torch.rand(5, 3, dtype=torch.double))
post.mean, post.variance # the latent utility at 5 new designs
This follows the structure of BoTorch's preference tutorial; Section C.5 runs a complete loop.
The defaults matter, because they are, in effect, the field's defaults. Reading the source of version 0.18.1 shows the following choices (Meta Platforms, Inc., 2026h; Meta Platforms, Inc., 2026g).
| Choice | Default | Where explained |
|---|---|---|
| Likelihood | probit, , noise implicitly fixed at 1; argument clipped to | Equation (18.1), Section 16.5 |
| Alternative likelihood | logistic, with the logit clipped to | Section 16.4 |
| Noise scale | dropped; its role taken by the kernel's output scale, BoTorch's name for the amplitude | Section 18.4 |
| Posterior mode | solved with scipy.optimize.fsolve, warm-started from the previous solution |
Algorithm 18.1 |
| Numerics | jitter in the Cholesky factorization; duplicate designs within merged | Section 8.4 |
| Hyperparameters | PairwiseLaplaceMarginalLogLikelihood, the Laplace evidence of Chu and Ghahramani's equation (12) |
Equation (17.5) |
| Kernel | scaled RBF with one lengthscale per input; constant mean not optimized | Section 9.2 |
| Lengthscale prior | Gamma(2.4, 2.7), initialized at its mode, about 0.52 in every dimension | Section 18.3.1 |
| Output-scale prior | smoothed box on , constraint | Section 18.4 |
Three entries connect to this chapter. Fixing the noise at 1 and learning the
output scale is the scale-versus-noise trade of Section 18.4 made
explicit: a large amplitude means decisive answers. Clipping the probit
argument at caps the likelihood of any single comparison at about
0.9987 during fitting, which limits the pull of one surprising answer, the
probit tail problem of Figure 16.2; as of September 2026 we found
no paper that records this as a modeling choice (inference). And the lengthscale prior does not scale
with the dimension: version 0.12.0 (September 2024) switched most BoTorch
models to dimension-scaled lengthscale priors but explicitly excluded
PairwiseGP, which in 0.18.1 (June 2026) still uses Gamma(2.4, 2.7)
(Meta Platforms, Inc., 2026e). As Table 18.1 illustrates, a fixed lengthscale of
about 0.5 puts typical designs in many dimensions where kernel values are near
zero; that this happens with PairwiseGP itself has not been verified directly
(inference).
Other libraries choose differently. The preferential sampler in optuna-dashboard, based on Takeno et al. (2023), uses a Matérn 3/2 kernel with one lengthscale per input and a Gamma(5, 10) prior, also independent of the dimension (Optuna developers, 2026c), with the approximations of Chapter 17. Section 27.5 reports the version history and these choices in more detail.
Sources cited in Section 18.6 6
- Meta Platforms, Inc. (2026h) BoTorch PairwiseGP source code pairwise_gp.py
- Meta Platforms, Inc. (2026c) Bayesian optimization with pairwise comparison data (preferential Bayesian optimization tutorial, documentation v0.18.1)
- Meta Platforms, Inc. (2026g) BoTorch pairwise likelihood source code likelihoods/pairwise.py
- Meta Platforms, Inc. (2026e) BoTorch CHANGELOG
- Takeno et al. (2023) Towards Practical Preferential Bayesian Optimization with Skew Gaussian Processes
- Optuna developers (2026c) optuna-dashboard PreferentialGPSampler source code gp.py
18.7 Exercises #
Show that the weights of Equation (18.3) always sum to zero. What does this imply about the posterior mean Equation (18.4) far from all compared designs, and about averaged over many designs when the kernel is stationary and the domain is large?
Solution
, and each sums to zero, so . Far from all compared designs, every is near zero and , the prior mean, as in regression. The posterior mean is a sum of kernel bumps whose weights cancel: with a stationary kernel, each bump integrates to the same amount over a large domain, so the integral of over the domain is times that amount, which is zero. The data raise some regions and lower others by the same total; they never raise the level, which they cannot measure.
In Example 18.1 with and (so ), find the mode of the difference and the weight numerically, given that the mode satisfies , where 2 is the prior variance of the difference. Then compute the Laplace standard deviation of the difference and compare it with the prior's.
Solution
The log posterior of is , whose derivative vanishes at . Trying values: at , while ; at , while . So , where . Then , and the Laplace variance of the difference is , a standard deviation of about 1.03 against the prior's . One answer at moderate noise removes about half of the variance of the difference and none of the variance of the sum.
Three designs are compared with unit weights. In design (a) the answers form a chain, 1 with 2 and 2 with 3. In design (b) they form a triangle, adding 1 with 3. Using Equation (18.6), find under a flat prior in both, and say how many more comparisons of the pair (1, 3) alone would match the triangle.
Solution
(a) Two unit resistors in series: . (b) The direct edge (resistance
- is in parallel with the path through 2 (resistance 2), so . Repeating the comparison of 1 with 3 directly times gives unit resistors in parallel, resistance , so direct comparisons would match the triangle, and one direct comparison (resistance 1) is already better than the chain. The indirect path through 2 is worth half a direct comparison.
Show that the posterior of under prior and noise depends on and only through the ratio . What does this imply for fitting both the amplitude and the noise by maximizing the evidence?
Solution
Let . Its prior is , and the likelihood Equation (18.1) is , which does not involve . The posterior of is prior times likelihood, so it depends only on . The evidence is the normalizer of the same product, so it too depends only on : any pair with the same ratio fits the answers equally well. Only one of them can be learned, which is why BoTorch fixes the noise and fits the amplitude.
Further reading #
- Chu and Ghahramani (2005) is short and complete: the likelihood, the convexity proof, the Laplace approximation, the evidence, and the predictive probability of a new preference.
- Rasmussen and Williams (2006), chapter 3, gives the numerically stable algorithms for the classification case, which carry over with the Laplacian .
- Houlsby et al. (2011) derive the preference kernel and an information-based rule for choosing pairs.
- Shah et al. (2016) and Hendrickx et al. (2019) explain, for ranking finite sets of items, why the comparison graph's spectrum and resistances govern the error; Fiedler (1973) introduced algebraic connectivity.
- BoTorch's preference tutorial (Meta Platforms, Inc., 2026c) fits
PairwiseGPand runs the loop of Chapter 19.
References
- (2020). Active Preference-Based Gaussian Process Regression for Reward Learning. RSS 2020. Cited in §18.4
- (2007). Active Preference Learning with Discrete Choice Data. Advances in Neural Information Processing Systems. Cited in §18.1
- (2022). Learning Inconsistent Preferences with Gaussian Processes. International Conference on Artificial Intelligence and Statistics. Cited in §18.4
- (2005). Preference learning with Gaussian processes. Proceedings of the 22nd international conference on Machine learning - ICML '05. Cited in §18.1 §18.2 §18.3
- (1973). Algebraic Connectivity of Graphs. Czechoslovak Mathematical Journal. Cited in §18.5
- (2019). Graph Resistance and Learning from Pairwise Comparisons. ICML. Cited in §18.5
- (2011). Bayesian Active Learning for Classification and Preference Learning. arXiv. preprint Cited in §18.1
- (2021). ROIAL: Region of Interest Active Learning for Characterizing Exoskeleton Gait Preference Landscapes. ICRA 2021. Cited in §18.1
- (2026c). Bayesian optimization with pairwise comparison data (preferential Bayesian optimization tutorial, documentation v0.18.1). botorch.org. software Cited in §18.6
- (2026e). BoTorch CHANGELOG. GitHub. software Cited in §18.6
- (2026g). BoTorch pairwise likelihood source code likelihoods/pairwise.py. GitHub. software Cited in §18.6
- (2026h). BoTorch PairwiseGP source code pairwise_gp.py. GitHub. software Cited in §18.6
- (2026c). optuna-dashboard PreferentialGPSampler source code gp.py. GitHub. software Cited in §18.6
- (2026). What Does Preference Learning Recover from Pairwise Comparison Data? ICML 2026. Cited in §18.5
- (2006). Gaussian Processes for Machine Learning. MIT Press. Cited in §18.2 §18.3
- (2016). Estimation from Pairwise Comparisons: Sharp Minimax Bounds with Topology Dependence. Journal of Machine Learning Research. Cited in §18.5
- (2026). Adaptive KappaSharp: Condition-Number Shaping for Preferential Bayesian Optimization. arXiv. preprint Cited in §18.5
- (2023). Towards Practical Preferential Bayesian Optimization with Skew Gaussian Processes. International Conference on Machine Learning. Cited in §18.6