- Home
- Library
- Computational Quantum Field Theory
- Predicting Observables across Parameters
- Predicting a Field-Theory Observable with Simple Baselines
Predicting a Field-Theory Observable with Simple Baselines
Can a predictor interpolate the sharp susceptibility peak of a finite interacting scalar field? Compute the mean field and its response from the same two-site partition function, then give five predictors the same labels. The held-out test measures the error in the physical response after the fit. The simplest affine model and the best-performing spline have susceptibility errors that differ by three orders of magnitude on this particular grid.
Preparation: Expectation values and connected source derivatives in the Euclidean convention, the distinction between an integral and its error estimate, and singular-value decomposition for the regression step.
A response function with a known generating calculation
Choose dimensionless lattice units with spacing and two periodic real variables . The action is
with . Both terms of the periodic kinetic sum are present: its value is , rather than half that expression. The parameter is a bare quadratic coefficient. Negative is allowed because the quartic term keeps the integral finite. It is not a negative measured particle mass.
Define
This is a small interacting scalar theory. The scalar-field setting is standard; the particular two-site reduction and all numbers below are calculated here. See Tong, chapter 2 (PDF), for the statistical-field framework. The explicit and source sign above fix our normalization.
Introduce an orthogonal change of variables,
Its Jacobian has absolute value one. The kinetic term becomes , and expanding the two quartics gives
The mean field per site and its uniform-source response are
The last equality follows by differentiating the normalized measure, not by differentiating a fitted curve. It implies . Changing to also proves
In particular exactly. A finite positive integral with quartic tails is smooth throughout the compact parameter domain used here. A sharp response is a finite-volume crossover, not spontaneous symmetry breaking.
How the reference labels are controlled
The input domain is and . Every label is obtained from tensor Gauss–Legendre integration on in , with a common exponential rescaling before normalized moments are formed. Order supplies the reported label; order independently checks every requested parameter point. This is reference quadrature rather than Monte Carlo data: there are no independent noisy configurations behind a label.
Three errors must be separated. The omitted integration tails admit an analytic bound. Write and
Since and the mixed quartic is nonnegative,
For , and for . Convexity then gives . Expanding and integrating the exponential yields the two-sided bound
The corresponding bound uses . To bound the unrestricted other coordinate, use , where
A small square also gives
These estimates bound normalization and moment tails separately. For a truncated-box moment , , so tail bounds imply a ratio error at most . Propagating the first two moments gives uniform omitted-tail bounds below for and for . These are analytic integration-tail bounds evaluated numerically; they do not enclose floating-point quadrature error.
The second error is quadrature resolution. Across unique reference locations, the largest order- to order- changes are in and in . Fixed controls also use orders and . A different nested adaptive integration of the original two-dimensional integrand at four declared points agrees in both observables within . All four terminate successfully. Agreement and refinement are numerical evidence, not a rigorous quadrature enclosure.
The third error is a wrong formula. The calculation compares the original site action with the transformed action and checks the integration-by-parts identities
Their largest retained residual is . Source parity, finite differences of , and the independent free Gaussian limit provide additional checks. Their agreement would be unlikely if, for example, one periodic kinetic term or the source factor had been lost.
From parameter points to a supervised task
A training example is
The geometry, spacing and quartic coupling are fixed. They are not silently varied quantities that the predictor can infer from two inputs. The primary fit uses uniformly spaced parameter points, including the boundary. A separate cell-center set monitors training; it does not select stopping times or hyperparameters. A final cell-center set measures interpolation error on points. Random test sets and deliberately omitted intervals are introduced separately in distribution shift.
Every model receives the same declared dimensionless coordinates,
Predicting the logarithm makes the reconstructed positive. This positivity is supplied by the representation; it is not an empirical discovery. The fixed scales balance the two outputs approximately, without estimating scales from test data. A squared loss in emphasizes multiplicative errors and is not the same objective as a squared loss in physical .
Selected reference values are:
| by symmetry | |||
| by symmetry | |||
| by symmetry | |||
The computed zero-source means are retained before symmetry enforcement and are of order or smaller. The rapid variation at makes a useful challenge beside the smoother curve.
Reference response at fixed on the same two-site periodic lattice. The source curves use points each. The peak in is smooth; finite volume has not produced a phase transition.
Compare predictions in the physical variables after undoing the output scaling. Relative error at is undefined; use an absolute error there.
The companion scalar_learning_data.py --generate reproduces the reference and fixed roles. Its default mode checks the existing archive without generating labels. The full design requests labels before later sequential queries, with duplicate coordinates evaluated once. Offline test and monitoring labels are counted separately from the labels available to a primary fit. The accompanying examples record inputs and controls; this inexpensive reference is a teaching benchmark, not a demonstrated computational speedup over quadrature.
One comparison, one set of labels
The two scaled outputs are fitted separately. No fluctuation relation or cross-output covariance is imposed. Every predictor uses the same training, monitor and test coordinates specified above. Only the training values can select the kernel lengths. The curves at and report performance where the physical response changes at different rates.
Features and local interpolation
Let be a feature matrix, the target matrix, and a coefficient matrix. Minimize
The stationary equation is . With ,
This computes the solution without explicitly squaring the matrix condition number in a normal-equation solve. The affine fit uses and , with the usual SVD numerical-rank rule. The cubic-feature fit uses all ten monomials with and . Here even the constant coefficient is penalized; that convention belongs in the objective.
A small affine residual on a nearly straight curve does not imply success across a sharp susceptibility peak. Polynomial degree also creates a global tradeoff: improving one region may disturb another.
A tensor cubic spline instead uses piecewise cubic functions joined with derivative continuity along both axes. It interpolates the scaled target on the rectangular training grid, with no smoothing penalty. The implementation uses RectBivariateSpline(kx=3, ky=3, s=0) and ascending, dimensionless axes. The SciPy 1.13.1 documentation specifies this interpolation convention and warns about scaling and extrapolation. All test points here are inside the fitted rectangle. This spline is not immediately applicable to an irregular training cloud without changing the method.
A kernel is a choice of similarity
For length scales , explicitly define the anisotropic distance
Two unit-amplitude choices are
The squared-exponential kernel strongly favors smooth functions; the Matérn kernel has a different differentiability prior. Neither is deduced from the scalar action. The Matérn expression is Rasmussen–Williams, chapter 4, Eq. (4.17), p. 85 (PDF).
Write and . The fitted mean is
The same expression has two interpretations. In kernel ridge regression, is the coefficient of the reproducing-kernel norm when the data term is written without a factor . In a zero-mean Gaussian process with this unit-amplitude kernel, it is a presumed independent observation-noise variance in each scaled output. A deterministic quadrature label has not acquired physical noise just because the latter interpretation is convenient.
Under that GP model, the conditional latent variance is
This is the variance of the latent function, so an additional is not added for the bands used here. The two output fits share this variance formula but are not assigned a correlated two-output prior. The derivation is the conditional Gaussian calculation in Rasmussen–Williams, chapter 2, Eqs. (2.22)–(2.26) (PDF).
Choosing lengths without reading the test set
Each kernel considers twenty pairs:
Let and . Removing row while keeping the kernel, nugget and output transformation fixed gives
The division applies to both output components. A block inverse or Schur complement proves the identity, so one factorization supplies every leave-one-out residual. We select the pair minimizing their mean squared Euclidean norm. Exact ties select the lexicographically larger pair. This is the fast leave-one-out construction of Rasmussen–Williams, chapter 5, §5.4.2, Eq. (5.12) (PDF).
The score estimates interpolation from nearby training points. It does not test a missing parameter interval, and the selected GP variance remains conditional on the selected lengths; it does not integrate hyperparameter uncertainty. Failed Cholesky factorizations would remain recorded and ineligible. The calculation does not silently increase the nugget. All forty candidates in this comparison are finite.
Independent small controls compare the fast formula with actual omitted-row fits, check affine and bicubic recovery, and compare the kernel-ridge and GP means. The saved calculation also checks that adding a point with a fixed kernel cannot increase posterior variance. This last statement will need qualification when lengths are reselected.
What the common test actually finds
The table gives physical root-mean-square error on the same test points. It is an error against the reference function, not a sampling standard error.
| Predictor | RMSE in | RMSE in | Maximum error in |
|---|---|---|---|
| Affine | |||
| Cubic features | |||
| Tensor cubic spline | |||
| RBF kernel | |||
| Matérn |
The selected lengths are for the RBF kernel and for Matérn. The spline has the smallest errors in this particular comparison. Its rectangular interpolation structure is well suited to the supplied regular grid; the result is not a ranking valid for arbitrary data geometries or functions.
All predictors use the same training labels. Errors on the and curves distinguish the rapid crossover from the smoother response. The comparison is in physical , although the fitted second output is .
The Matérn relative RMSE in is only , despite its larger absolute error near the peak. The spline's corresponding value is . Both relative and absolute errors matter when the target spans a substantial range. A global average also needs a regional check: in , Matérn's physical RMSE is , whereas the spline's is .
The companion observable_baselines.py --fit reproduces the fixed selection and retains every model's parameters and scores. Its default mode reads saved models. No test-selected model is substituted for the reported choices. Neural training adds a different representation to this same comparison; uncertainty and active learning tests whether the assumed variance tracks actual error.
Summary
The normalized measure fixes the labels and their symmetries. On the held-out rectangle the spline has susceptibility RMSE , compared with for affine regression. The spline uses the regular grid. A model intended for an unsampled interval can be tested with the omitted-interval experiment; a Gaussian-process band requires a separate coverage test.
Exercises
1. Differentiate the normalized measure
Let have no explicit source dependence. Derive , then obtain and with their factors of two. What changes if depends explicitly on ?
Solution
Since ,
The second term comes from differentiating . Also , because is the mean per site. Taking gives , with no extra factor of two. If , add . Dropping that explicit derivative is incorrect, for example, when differentiating a source-dependent estimator.
2. Solve the free reference exactly
Set with . Evaluate , and , and explain why this check cannot be continued to negative as a real positive integral.
Solution
Complete the square:
Both Gaussian integrals converge for , giving
The normalized mean and variance are and . These agree with the source derivatives. At the uniform mode has no restoring term, and at its Gaussian weight grows along real . An analytic continuation of the formula is not the convergent probability measure used for learning. The interacting model remains well defined there because its quartic term stabilizes the tails.
3. Obtain the same mean in two ways
For one scaled output , minimize . Compare the answer with conditioning a zero-mean GP with covariance and independent Gaussian noise variance .
Solution
Decompose into its projection on the span of and an orthogonal component. The latter vanishes at all training points and only increases the penalty, so a minimizer has . Its objective is
For positive-definite , stationarity gives ; the same prediction extends to semidefinite through the positive matrix . Thus .
For the GP, the joint covariance of and the noisy vector is
Completing the Gaussian square gives the same conditional mean and variance . The optimization derivation alone did not assign this probabilistic variance. If the squared data term were divided by , its regularization coefficient would have to be to keep the same linear system.
4. Add one observation at fixed kernel
Suppose the current GP posterior covariance is . Add a noisy observation at with variance . Derive the new covariance and explain precisely why its monotonicity statement can fail after a hyperparameter refit.
Solution
Condition the current joint Gaussian of and the new observation. Its cross covariance is and the observation variance is , hence
For any finite vector of test values, the subtracted matrix is positive semidefinite. In particular
This comparison conditions one fixed joint Gaussian. Changing a length scale, amplitude or noise variance changes that Gaussian; the old covariance is no longer the starting matrix of this update. Either an increase or a decrease can then occur. Moreover the inequality bounds the assumed variance, not the squared error against an arbitrary physical function.
References
- D. Tong, Statistical Field Theory, chapter 2, especially the scalar statistical-field and finite-volume Fourier setup (author-hosted PDF). The two-site interacting example and reference controls above are derived explicitly here.
- C. E. Rasmussen and C. K. I. Williams, Gaussian Processes for Machine Learning (MIT Press, 2006): chapter 2 (PDF), §2.2, Eqs. (2.22)–(2.26); chapter 4 (PDF), §4.2, Eq. (4.17); chapter 5 (PDF), §5.4.2, Eq. (5.12).
- SciPy developers, RectBivariateSpline, SciPy 1.13.1 documentation, interpolation, knot and coordinate conventions.
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.