Add UCB acquisition function for single-objective search - #98
Open
k-yoshimi wants to merge 3 commits into
Open
Conversation
Add score.UCB (fmean + beta * fstd) and wire it into the score dispatcher as mode "UCB". Thread a tunable ucb_beta parameter through bayes_search / get_score of the discrete, discrete_unified and range policies (mirroring alpha). Larger beta favors exploration; beta == 0 is greedy exploitation. Add unit tests for the UCB score, beta behavior and dispatcher, plus end-to-end bayes_search(score="UCB") convergence tests on the discrete policy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a UCB section to the algorithm chapter (English and Japanese): the score formula fmean + beta * fstd, the meaning of the ucb_beta trade-off parameter, and a usage note showing score="UCB" / ucb_beta in bayes_search. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Addresses AI review feedback (rounds 1-2): the ucb_beta wiring was only exercised end-to-end for the discrete policy, and the first integration tests had low detection power. Strengthen them: - discrete_unified test_ucb: pin the seeded hypervolume per unify_method (ParEGO/NDS), matching the deterministic-reference style of test_multi_objective. - range test_bayes_search_ucb: assert the UCB search improves on the random-only best and converges (abs=0.001, which the random phase's ~-0.014 best fails), and assert ucb_beta changes the score (proving it is threaded, not defaulted). - Both: ucb_beta monotonicity + finiteness checks on get_score. Verified by mutation testing: a UCB->TS fallback fails the unified vid pins, and dropping ucb_beta threading in range fails the range test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Upper Confidence Bound (UCB) acquisition function for single-objective Bayesian optimization.
score.UCB(predictor, training, test, beta)=fmean + beta * fstd, wired into the score dispatcher as mode"UCB".ucb_betaparameter is threaded throughbayes_search/get_scoreof the discrete, discrete_unified and range policies (mirroring howalphais threaded). Largerbetafavors exploration;beta == 0is greedy exploitation. Default1.0(soscore="UCB"works out of the box everywhere).Documentation
ucb_betatrade-off, and abayes_search(score="UCB", ucb_beta=...)usage example.Tests
betaexploration/exploitation behavior, dispatcher, unknown-mode error.bayes_search(score="UCB")end-to-end for discrete (convergence), discrete_unified (seeded hypervolume pins per unify method), and range (improvement over random +ucb_betathreading check).Verified by mutation testing (a
UCB→TSfallback and a droppeducb_betathreading each fail the relevant tests). Reviewed with Codex until convergence.🤖 Generated with Claude Code