---
artifact_kind: optimizer-card
artifact_name: bayesian-optimization
version: 1.0.0
owner: Nous · agreement-search team
last_reviewed: 2026-04-25
next_review: 2026-07-25
optimizer_kind: bayesian
related_phase_179_tasks: [179.4.2.5]
---

# Optimizer Card — bayesian-optimization v1.0.0

## 1. Identity

- **Optimizer name:** bayesian-optimization
- **Algorithm family:** Bayesian optimization with Gaussian-process surrogate
  (RBF kernel) and Expected-Improvement / UCB / PI acquisition.
- **Implementation source:**
  `libs/nous/agreement-search/src/bayesian-optimization.ts`. No external GP
  library; Cholesky decomposition with automatic jitter is in-house.
- **Intended use:** expensive-to-score landscapes — frontier-model utility
  scoring, legal-reviewer sign-off, domain-simulator evaluations — where each
  fitness call costs cents to seconds and the GA / NSGA-II / MCTS budget of
  hundreds of evaluations is unaffordable.

## 2. Scoring rule

- **Utility aggregation:** scalar fitness, caller-supplied.
- **Acquisition functions:** Expected Improvement, Upper Confidence Bound
  (β-tunable), Probability of Improvement.
- **Fairness metrics reported:** post-acquisition, via `fairness-metrics.ts`.
- **Handling of hard constraints:** every proposed point passes through
  `filterCandidates` before evaluation.
- **Handling of uncertainty:** explicit — the GP posterior IS the uncertainty
  model. Acquisition trades exploration vs exploitation using the GP's posterior
  variance.

## 3. Inputs

- **Variable space:** typed parameter space via `BoVariableSpec` (int,
  continuous, boolean, enum); normalized to a unit hypercube `[0,1]^d` for GP
  modeling, decoded back when applying to the candidate.
- **Initial design:** scrambled Latin-hypercube-like sequence of
  `initialDesignSize` points before acquisition starts.
- **GP kernel:** isotropic RBF (squared-exponential) with caller-tuned
  `rbfLengthscale` and `rbfAmplitude`; Gaussian observation noise with variance
  `observationNoiseVariance`.
- **Acquisition optimization:** `acquisitionSamples` random samples → top-K
  refined by seeded Gaussian-perturbation local search.
- **Time / iteration budget:** total iterations + acquisition-iteration budget
  per step.
- **Randomness:** seeded `mulberry32`.

## 4. Outputs

- **Accepted candidate contract:** the best evaluated candidate
  (`argmax fitness`).
- **Diagnostics:** GP posterior at every iteration, acquisition value history,
  per-iteration fitness, observation list.
- **Uncertainty propagation:** the final GP posterior is exposed for workbench
  rendering of "what we're still uncertain about".

## 5. Evaluation

| Metric                          | Value                                  | Evaluator card                                                      | Date       |
| ------------------------------- | -------------------------------------- | ------------------------------------------------------------------- | ---------- |
| Pareto-front coverage           | single-objective; multi-objective BO   | n/a                                                                 | 2026-04-25 |
|                                 | is a roadmap item                      |                                                                     |            |
| Diversity preservation          | acquisition exploration term provides  | n/a — `bayesian-optimization.test.ts`                               | 2026-04-25 |
|                                 | structural diversity                   |                                                                     |            |
| Sample efficiency               | converges in `initialDesignSize +`     | [baseline-benchmark-gate](../evaluators/baseline-benchmark-gate.md) | 2026-04-25 |
|                                 | O(d) acquisition iters typical         |                                                                     |            |
| Regret vs oracle                | sub-linear under standard GP-UCB       | [baseline-benchmark-gate](../evaluators/baseline-benchmark-gate.md) | 2026-04-25 |
|                                 | regret bounds                          |                                                                     |            |
| Specification-gaming resistance | spec-gaming-audit on incumbent         | [fairness-suite](../evaluators/fairness-suite.md)                   | 2026-04-25 |
| Runtime (typical)               | dominated by fitness-call cost; GP fit | n/a                                                                 | 2026-04-25 |
|                                 | is `O(n^3)` in observations            |                                                                     |            |
| Cost per run                    | bounded by caller-set iteration cap ×  | n/a — orchestrator scoring-cost trace                               | 2026-04-25 |
|                                 | fitness-call cost                      |                                                                     |            |

## 6. Known limitations

- GP fit is `O(n^3)` in observations; practical budget ~150 observations per run
  before refit cost dominates. Sparse-GP variants are a roadmap item.
- RBF kernel assumes smooth fitness landscapes; discontinuous landscapes (hard
  threshold rewards) degrade performance.
- High-dimensional spaces (d > ~20) suffer from the curse of dimensionality; for
  these, prefer CP-SAT or shell to dimensionality- aware BO methods.

## 7. Guardrails

- **Candidate safety gate:** `filterCandidates` before every fitness call; a
  filter failure is logged and the BO loop drops the point.
- **Clause static validation:** inside `filterCandidates`.
- **Redline separation:** hard constraints encoded into the variable space or
  via `filterCandidates`; the optimizer cannot trade them.
- **Determinism guarantee:** seeded; reproducible.

## 8. References

- `libs/nous/agreement-search/src/bayesian-optimization.ts`
- Snoek, Larochelle, Adams (2012), "Practical Bayesian optimization of machine
  learning algorithms".
- Srinivas et al. (2010), "Gaussian Process Optimization in the Bandit Setting"
  (GP-UCB regret bound).
- `docs/research/bibliography.md` §bayesian-optimization
