Algorithms and assumptions

The offline objective

At time \(t\), keep the current model or train a new model on a configured sample count \(n\). With loss weight \(w_\ell\) and time weight \(w_t\):

\[ c_t(\mathrm{keep},m)=w_\ell L_t(m),\qquad c_t(\mathrm{retrain},n)=w_t\tau_{t,n}+w_\ell L_t(m_{t,n}). \]

Here \(\tau\) is measured fit time in seconds for the built-in evaluator. A custom evaluator can supply a different measured training cost in the same objective units. Retraining depends on the current data and selected sample count, not on the previous model; warm-start-dependent training would require a different state model.

For a finite timeline, dynamic programming uses

\[ V_t(m)=\min\left\{c_t(\mathrm{keep},m)+V_{t+1}(m), \min_n[c_t(\mathrm{retrain},n)+V_{t+1}(m_{t,n})]\right\}, \quad V_T(m)=0. \]

exact measures every configured candidate and solves this recurrence. Negative acquisition scores are permitted in the approximate search; the finite-horizon recurrence does not require positive scores.

Acquisition operates on a complete stage

Let \(C=w_t\tau\) be training cost, already weighted, and \(L\) be raw loss. RetrainOpt assumes independent training-cost and loss posteriors when combining their moments:

\[ \mu_K=w_\ell\mu_L,\quad v_K=w_\ell^2v_L,\qquad \mu_R=\mu_C+w_\ell\mu_L,\quad v_R=v_C+w_\ell^2v_L. \]

Independence is an implementation assumption for the separate surrogates, not a claim proved by the paper. No joint covariance across stages is modeled: the acquisition objective is a sum of per-stage scores, as in the paper.

The scores minimized by DP are:

Acquisition

Stage score

expected

\(\mu\)

variance

\(-v\)

lcb

\(\mu-\beta\sqrt v\)

ucb

\(\mu+\beta\sqrt v\)

ei

negative expected improvement

pi

negative probability of improvement

For EI/PI, \(b\) is the global minimum measured legal stage cost, across times and actions. It includes the initial model’s keep costs, observed retrain costs, and observed models’ keep costs at later times. It is not the minimum loss or training-cost component considered separately. The margin \(\xi\) has the same units as a stage cost.

Measured stage costs have zero uncertainty: Expected/LCB/UCB return the measured cost, while Variance returns zero. EI and PI return zero at zero standard deviation, following the paper’s explicit convention.

For the Base and Learned online policies, see Online retraining.