Skip to content

Add UCB acquisition function for single-objective search - #98

Open
k-yoshimi wants to merge 3 commits into
developfrom
feature/ucb-acquisition
Open

Add UCB acquisition function for single-objective search#98
k-yoshimi wants to merge 3 commits into
developfrom
feature/ucb-acquisition

Conversation

@k-yoshimi

Copy link
Copy Markdown
Contributor

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".
  • A tunable ucb_beta parameter is threaded through bayes_search / get_score of the discrete, discrete_unified and range policies (mirroring how alpha is threaded). Larger beta favors exploration; beta == 0 is greedy exploitation. Default 1.0 (so score="UCB" works out of the box everywhere).

Documentation

  • UCB section added to the algorithm chapter (English + Japanese): the score formula, the ucb_beta trade-off, and a bayes_search(score="UCB", ucb_beta=...) usage example.

Tests

  • Unit: UCB score, beta exploration/exploitation behavior, dispatcher, unknown-mode error.
  • Integration: bayes_search(score="UCB") end-to-end for discrete (convergence), discrete_unified (seeded hypervolume pins per unify method), and range (improvement over random + ucb_beta threading check).

Verified by mutation testing (a UCB→TS fallback and a dropped ucb_beta threading each fail the relevant tests). Reviewed with Codex until convergence.

🤖 Generated with Claude Code

Kazuyoshi Yoshimi and others added 3 commits June 27, 2026 08:46
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.
@k-yoshimi
k-yoshimi requested a review from rtmr June 27, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant