- Home
- Library
- Computational Quantum Field Theory
- Predicting Observables across Parameters
- Uncertainty and Active Learning
Uncertainty and Active Learning
An uncertainty band is useful only when its meaning survives comparison with known errors. A Gaussian-process variance, variation among five neural initializations, and an error from numerical quadrature are different quantities. This example calibrates the first two against independent scalar-response labels, then asks where to spend a fixed budget of new reference calculations.
Preparation: The common scalar reference, conditional GP variance, and the missing-region experiment.
Three sources of uncertainty that should not be merged
The observable is in the same two-site periodic model, with . Work with . The reference is deterministic quadrature with separate tail, refinement and identity checks. Its tiny numerical error is not the explanation for the visible learned-prediction errors.
For the frozen Matérn model, let and be its posterior mean and latent SD in physical log-susceptibility units. Both are three times the corresponding scaled-output quantities. The usual interval is a 90% Gaussian interval conditional on the assumed kernel, nugget and selected hyperparameters. Those assumptions are not established facts about the deterministic scalar response.
For the five frozen neural networks, use the average and sample SD of their values. The interval mean SD is heuristic. The networks share their training labels, architecture and loss; five initializations are not independent measurements of the physical susceptibility and are not automatically posterior samples. The mean in log space corresponds to a geometric mean of physical susceptibility predictions.
Variation in a finite test set is yet another uncertainty. Once the predictor and interval are fixed, independent random inputs can estimate their coverage under a declared input distribution. This estimates a property of the predictor; it does not turn its error band into a field-theory confidence interval.
Calibrate a fixed predictor with independent labels
Reserve iid uniform parameter points on the full rectangle for calibration and a separate iid points for testing. Their seeds are respectively SeedSequence([941025,40]) and SeedSequence([941025,41]). Neither set trains the model or selects its length scales or stopping iteration.
For either predictor, define a fixed positive scale . The calibration scores are
Sort the scores and take their th value:
The split-conformal band is
Exponentiating both endpoints produces a positive band for . Monotonicity of the exponential preserves the coverage event. This normalized-residual construction and its assumptions are given in Angelopoulos–Bates, §1.1, Theorem 1, and §2.3, Eqs. (9)–(11).
Conditional on an independently trained estimator, exchangeability of calibration and future test examples gives a marginal rank guarantee. With continuous scores the coverage probability is ; ties can make it larger. This probability averages over calibration and a new test example. It does not assert 90% coverage at every parameter point, in every subregion, or for every realized calibration set. The theorem concerns the declared numerical label function; the reference-error controls support its interpretation as the physical response separately.
The retained scale factors are for the GP and for the neural ensemble. The GP bands shrink substantially; the neural bands widen. The held-out results are:
| Predictor and interval | Uniform test covered | Central-source shift covered | Uniform mean log-width |
|---|---|---|---|
| GP, raw Gaussian 90% | |||
| GP, conformal | |||
| Ensemble, raw heuristic | |||
| Ensemble, conformal |
On the uniform test, conformal coverage is for the GP and for the ensemble. The conditional binomial plug-in standard errors are and . The raw GP's observed coverage of one does not establish perfect coverage: its exact two-sided 95% binomial interval is approximately , whereas the plug-in standard error degenerates to zero. Exact binomial intervals are retained for every row.
The shifted set has new inputs uniform in , , using seed SeedSequence([941025,42]). The same calibrated bands are applied without refitting. GP conformal coverage becomes , while the ensemble gives . Neither value inherits the original exchangeability guarantee. Angelopoulos–Bates, §4.5, distinguishes covariate-shift corrections from unchanged calibration; no weighted correction is implemented here.
Select new reference calculations without consulting their answers
Now restrict to the rapid-response slice and learn . This is a new query-budget experiment. The algorithm receives only its own queried labels, not the previously calculated primary grid or the offline evaluation curve.
All designs start at , , , and , and receive oracle calls total, including those five. The selectable candidate set has equally spaced sources. After each acquisition, fit a one-output Matérn model to , with nugget and length chosen by training-only leave-one-out error from
Lengths refer to . Three designs are compared:
- A nested nearly uniform grid at counts , , and .
- Maximum current latent variance among unqueried candidates.
- Curvature-weighted variance
The curvature in this formula is the derivative of the posterior mean of the scaled target with respect to scaled . Its units and normalization are part of the heuristic. For a single Matérn factor, with and ,
Multiplying these derivatives by the fitted kernel coefficients gives . A finite-difference control checks the formula. It uses no unqueried target curvature.
Exact score ties choose the lower source; length ties choose the larger length. The grid uses nearest candidate indices, with half-index ties toward lower . An exactly equally spaced 33-point grid would have some half-indices on the 1201-point candidate set, so this rounding is explicit. It preserves nesting, gives 33 unique queries, and moves a point by at most . All queried points remain disjoint from the midpoint test sources.
These acquisition rules are simpler than integrated optimal design. Cohn, Ghahramani and Jordan, §§1–2.1, pp. 130–132 (PDF), derive a bias–variance decomposition and an integrated variance criterion under stated modeling assumptions. Their optimality claim is not a property of the two heuristics above. In particular, reducing assumed variance does not remove systematic predictor bias.
Equal-budget outcomes and their limits
The offline -point reference grid supplies evaluation only. At 33 queries the whole-interval errors are:
| Design | RMSE in | RMSE in | Maximum error in |
|---|---|---|---|
| Nested nearly uniform grid | |||
| Maximum variance | |||
| Curvature-weighted variance |
All three policies select at every retained checkpoint in this particular run. At 33 calls the adaptive rules improve whole-interval error, but there is no pointwise dominance. In the central region , the nine-point grid has log-error RMSE , slightly below maximum variance's . At 17 points the same ordering persists: versus . Those losses remain in the record.
The query positions and errors are outputs of three deterministic policies. Each uses reference calls including the same five initial points; offline test labels do not enter acquisition. Error curves use the retained checkpoints, and the displayed query positions are the actual selected sources.
Mean assumed log-susceptibility SD at the final checkpoint is about to , much larger than the corresponding observed RMS errors. Even after successful point selection, the numerical GP variance is not an empirically exact error bar.
At a fixed kernel, adding an observation subtracts a positive-semidefinite covariance term, as derived in the baseline exercise. If length scales are reselected, that monotonicity is not a theorem about the new model. Here the length remains unchanged, but the distinction matters for applying the algorithm elsewhere.
The three designs are deterministic, not three independent Monte Carlo replicas. Across them the charged training budget is calls, even where a cached reference value can be reused after a query has been selected. There are additional unique reference evaluations beyond the original shared archive; all pass the same order- to order- gate. The companion active_observables.py --run reproduces the calibration and query decisions. Its default mode reads saved results without new queries or fits.
Summary
A model's internal spread must be interpreted under its assumptions and tested against independent labels. Split conformal calibration gives a precise marginal rank statement, not pointwise or automatic shift coverage. Sequential querying can improve a fixed-budget approximation, but a variance-based score need not track bias or outperform a grid in every region.
Exercises
1. Prove the finite-rank coverage statement
Assume the estimator and positive scale are fixed independently of exchangeable calibration examples and one future example. For continuous scores, take from the calibration set. Derive the coverage probability for , and explain the effect of ties.
Solution
By exchangeability and continuity, the future score's rank among all scores is uniform on . It is at most the calibration th score exactly when its full-sample rank is at most . Hence
For , , this is . With ties, accepting equality gives a conservative lower bound rather than the continuous-score equality. If the requested rank exceeds , an infinite band is needed for the corresponding universal construction.
The probability includes calibration randomness. Conditioning on a particular realized calibration set can give a different future coverage. Conditioning on the physical input changes the rank argument if the score distribution varies with the input. The fixed-estimator assumption is why training and calibration cannot be casually reused in this proof.
2. What does decreasing posterior variance fail to prove?
Give a counterexample to the claim that small GP variance guarantees small bias. Then explain, with an explicit squared-exponential example, how a refitted length can increase variance despite an additional observation.
Solution
Take zero observed values and a smooth true function that vanishes at all observed points but has a nonzero bump between them. A zero-mean GP predicts zero there. Increasing the bump's amplitude increases its error without changing any training data or the kernel posterior variance. A variance bound becomes an error statement only with additional assumptions about the function or probability law.
For the second claim, use a unit-amplitude squared-exponential kernel and noiseless observation at . At test point , length gives
Add an observation at but change the fitted length to . Correlations from to the two observed points are and ; their mutual correlation is . The new variance is therefore nearly one, much larger than before. This compares two different priors. Holding the original length fixed would instead give the usual nonnegative variance reduction.
References
- A. N. Angelopoulos and S. Bates, A Gentle Introduction to Conformal Prediction and Distribution-Free Uncertainty Quantification, arXiv:2107.07511v6 (2022), §1.1/Theorem 1, §2.3/Eqs. (9)–(11), and §4.5.
- D. A. Cohn, Z. Ghahramani and M. I. Jordan, “Active Learning with Statistical Models,” Journal of Artificial Intelligence Research 4 (1996), 129–145, §§1–2.1 (author-hosted PDF).
- C. E. Rasmussen and C. K. I. Williams, Gaussian Processes for Machine Learning (MIT Press, 2006), chapter 2 (PDF), conditional Gaussian prediction, and chapter 5 (PDF), fixed-model leave-one-out formulas.
Scrollable formula. Use Left and Right arrow keys to reveal hidden content.
Scrollable table. Use Left and Right arrow keys to reveal hidden columns.
Scrollable figure. Use Left and Right arrow keys to reveal hidden content.