Bayesian Optimization
中文

Bayesian Optimization

From First Principles to Human Preferences

Some functions are expensive to evaluate and impossible to write down: the accuracy of a model after a day of training, the comfort of an exoskeleton after a minute of walking, the look of a design that only a person can judge. Bayesian optimization finds good inputs for such functions with few evaluations. It keeps a probabilistic model of what every untried input might return, and spends each evaluation where the model expects to learn the most. When the only measurement is a person saying "this one, not that one", the same idea becomes preferential Bayesian optimization, and the person becomes part of the system being studied.

This book teaches both from the beginning: the probability and linear algebra a software engineer may not have used since school, Gaussian processes and the analysis behind their kernels, the optimization loop, and learning from comparisons. It works four real problems end to end, then follows the research through 2026: what has been proved, what happened with real people, and what psychology, economics, neuroscience, and philosophy say about whether a preference is there to be found. Its argument is that the algorithms are now mature and the hard part has moved to measurement: what a single comparison measures, and what asking does to the person who answers.

hidden objectiveposterior mean95% bandnext query−1.0−0.50.00.51.01.5f(x)best so far 0.69, true max 0.820.000.020.040.060.00.20.40.60.81.0input xacquisition: EI
hidden objectiveposterior mean95% bandnext query−1.0−0.50.00.51.01.5f(x)best so far 0.69, true max 0.820.000.020.040.060.00.20.40.60.81.0input xacquisition: EI
An optimizer at work on a function it cannot see (dashed). Blue is what it believes, the band is how unsure it is, and orange is where it looks next.

Every chapter has figures you can change, derivations you can step through, and references attached to the section that uses them. In some figures you are the person being optimized.

Start with Chapter 1, read the preface first, or pick a part from the contents below.

The book is open source on GitHub. If you find an error, a number that does not match its source, or a passage that is hard to follow, please open an issue; every page also has a link at the bottom that does this for that page.

Contents #

Three ways in #

I FoundationsII Gaussian ProcessesIII Bayesian OptimizationIV Learning from ComparisonsV Case StudiesVI The Research FrontierVII People in the LoopVIII Neighbors in ComputingIX What Is a Preference?X Synthesis11. Optimizing What You Cannot Write Down22. Probability as Bookkeeping for Uncertainty33. The Linear Algebra of Uncertainty44. The Gaussian Distribution55. Bayesian Inference66. Measuring Information77. Distributions over Functions88. Gaussian Process Regression99. Kernels and Hyperparameters1010. The Analysis Behind Kernels1111. The Bayesian Optimization Loop1212. Acquisition Functions1313. Regret, Bandits, and Guarantees1414. Bayesian Optimization in Practice1515. Where Bayesian Optimization Works1616. Why Ask for Comparisons1717. When the Posterior Is Not Gaussian1818. Gaussian Process Preference Learning1919. Preferential Bayesian Optimization2020. Designing the Question2121. Dueling Bandits and the Theory of Comparisons2222. Tuning a Classifier2323. Optimizing a Chemical Reaction2424. Tuning an Exoskeleton with a Person in the Loop2525. Enhancing a Photo by Comparison2626. A Decade of Preferential Bayesian Optimization2727. Observation Models, Surrogates, and Inference2828. Acquisition, Query Forms, and Problem Extensions2929. Theory: From Dueling Bandits to Kernelized Preference Optimization3030. High Dimensions and the Changing Landscape of BO3131. Software, Evaluation, and the Research Community3232. Interactive Design and Human-Computer Interaction3333. Wearable Robots, Health, and Assistive Technology3434. Built Environments, Science, and Industry3535. Preferences and Large Language Models3636. Reward Learning, Recommendation, Ranking, and Automated Science3737. Judgment, Decision, and Psychophysics3838. Social, Affective, and Developmental Psychology3939. Neuroscience and Computational Cognitive Science4040. Economics, Decision Theory, and Operations Research4141. Philosophy and Religious Traditions4242. Social Sciences and the Humanities4343. Natural and Formal Sciences4444. Design, Sensory Science, Art, and Health4545. What a Comparison Measures4646. Building and Evaluating a Preferential Optimization System4747. Open Problems and the Decisive ExperimentClick a chapter to see what it builds on and what builds on it.
IIIIIIIVVVIVIIVIIIIXX11. Optimizing What You Cannot Write Down22. Probability as Bookkeeping for Uncertainty33. The Linear Algebra of Uncertainty44. The Gaussian Distribution55. Bayesian Inference66. Measuring Information77. Distributions over Functions88. Gaussian Process Regression99. Kernels and Hyperparameters1010. The Analysis Behind Kernels1111. The Bayesian Optimization Loop1212. Acquisition Functions1313. Regret, Bandits, and Guarantees1414. Bayesian Optimization in Practice1515. Where Bayesian Optimization Works1616. Why Ask for Comparisons1717. When the Posterior Is Not Gaussian1818. Gaussian Process Preference Learning1919. Preferential Bayesian Optimization2020. Designing the Question2121. Dueling Bandits and the Theory of Comparisons2222. Tuning a Classifier2323. Optimizing a Chemical Reaction2424. Tuning an Exoskeleton with a Person in the Loop2525. Enhancing a Photo by Comparison2626. A Decade of Preferential Bayesian Optimization2727. Observation Models, Surrogates, and Inference2828. Acquisition, Query Forms, and Problem Extensions2929. Theory: From Dueling Bandits to Kernelized Preference Optimization3030. High Dimensions and the Changing Landscape of BO3131. Software, Evaluation, and the Research Community3232. Interactive Design and Human-Computer Interaction3333. Wearable Robots, Health, and Assistive Technology3434. Built Environments, Science, and Industry3535. Preferences and Large Language Models3636. Reward Learning, Recommendation, Ranking, and Automated Science3737. Judgment, Decision, and Psychophysics3838. Social, Affective, and Developmental Psychology3939. Neuroscience and Computational Cognitive Science4040. Economics, Decision Theory, and Operations Research4141. Philosophy and Religious Traditions4242. Social Sciences and the Humanities4343. Natural and Formal Sciences4444. Design, Sensory Science, Art, and Health4545. What a Comparison Measures4646. Building and Evaluating a Preferential Optimization System4747. Open Problems and the Decisive ExperimentClick a chapter to see what it builds on and what builds on it.
How the chapters build on each other: one row per part. Click a chapter to see what it needs and what needs it, and to open it.