Raghuram Shankar
← Bayesian Optimization

Part 4 · The Maths II: Acquisition Functions

Improvement, and its expectation

Define the improvement a new evaluation at x would deliver: I(x) = max( f(x) − f*n, 0 ). Under the posterior, f(x) is Gaussian, so I(x) is a censored Gaussian — and its expectation has a closed form:

EIn(x) = 𝔼[I(x)] = (μn(x) − f*n)·Φ(z) + σn(x)·φ(z)

μn, σn the posterior mean and standard deviation at x · f*n the best value seen so far · z = (μn − f*n)/σn the standardized improvement · Φ, φ the standard normal CDF and density

with Φ and φ the standard normal CDF and PDF. The two terms are exploitation and exploration wearing mathematical clothes: the first pays for a mean above the incumbent (weighted by the probability the improvement is real), the second pays for spread — a chance of a large upside even when the mean is unpromising. At z = 0 (mean exactly at the incumbent), EI = σ·φ(0) ≈ 0.40σ: pure uncertainty value.

Faded derivation: EI in closed form
1Write EI as an integral over the posterior for f(x) (drop subscripts: mean μ, sd σ, incumbent f*).
EI = ∫f*∞ (v − f*) · 𝒩(v; μ, σ²) dv

Values below f* contribute zero improvement, so the integral starts at f*.

2Standardize: substitute v = μ + σu and z = (μ − f*)/σ.
EI = σ ∫−z∞ (u + z) φ(u) du

The lower limit v = f* maps to u = (f* − μ)/σ = −z, and (v − f*) = σ(u + z).

3Evaluate ∫−z∞ u·φ(u) du using the identity φ′(u) = −uφ(u).
∫−z∞ uφ(u) du = [−φ(u)]−z∞ = φ(−z) = φ(z)

The Gaussian PDF is its own (negated) antiderivative under multiplication by u, and it is symmetric.

4Evaluate the remaining piece z·∫−z∞ φ(u) du.
z ∫−z∞ φ(u) du = z (1 − Φ(−z)) = z·Φ(z)

Tail probability plus symmetry of Φ.

5Assemble, un-standardize, and sanity-check z = 0.
EI = σ[ zΦ(z) + φ(z) ] = (μ − f*)Φ(z) + σφ(z)

At z = 0: EI = σφ(0) = σ/√(2π) ≈ 0.399σ — a point whose mean merely ties the incumbent is still worth two-fifths of its standard deviation. Uncertainty alone has cash value.

Five steps, one substitution, two normal identities. This is the same derivation Jones et al. relied on in 1998 — try to reproduce it cold.