What does a held-out size reveal that an in-sample residual cannot?
A neat finite-size fit can point to the wrong limit
Source research checked . Teaching calculations are ideal models.
A finite quantum simulator answers a finite question. Researchers may then ask how the observable changes as the represented system becomes larger. Extrapolation can be informative, but the inferred limit depends on a functional form and a range of sizes. A narrow fitted residual is evidence about the observed window, not automatic evidence about an unobserved limit.
This lab creates an exact curve with both inverse-size and inverse-size-squared terms. It deliberately fits only the first term. Because the generating limit is known, the error in the extrapolated intercept is visible. Comparing all sizes with the largest two, and testing a new holdout size, reveals sensitivity that the fitted line alone could conceal.
The example avoids simulated measurement noise so the source of error stays clear: the model is misspecified. In a real study, sampling noise, control error and different finite-size corrections can coexist. Comparing fit windows alongside explicit extrapolation assumptions exposes this sensitivity. Readers should be able to distinguish a directly measured finite-size observable from an inferred large-system value.
Start with the assumptions
- The generating curve is known only because this is synthetic.
- Fits use exact values without measurement noise.
- Ordinary least squares weights all supplied sizes equally.
Synthetic observable y(L) = y_infinity + a/L + b/L²
Deliberately restricted fit y_fit(L) = intercept + slope/L
Holdout error = fitted prediction at unused size - generating value
Compare the input regimes
Each case uses invented inputs. The results follow from this model and do not describe measured hardware.
Baseline regime
Complete inputs
- Infinite-size reference
- 0.6
- Inverse-size coefficient
- 1.5
- Curvature coefficient
- 2
- System sizes
- 6, 10, 16, 24
- Unfitted holdout size
- 40
- Generate y(L) = reference + a/L + b/L² at L = 6, 10, 16, 24. These are exact synthetic function values, not noisy observations.
- Fit a straight line in 1/L while omitting curvature. Using all sizes gives intercept 0.582319; the largest two give 0.594792.
- At the held-out size 40, the all-size fit predicts 0.630441 and the generating curve gives 0.63875. Their difference is -0.008309.
| Calculated quantity | Synthetic result |
|---|---|
| All-size linear extrapolated intercept | 0.582318670987 |
| Largest-two extrapolated intercept | 0.594791666667 |
| Known synthetic infinite-size reference | 0.6 |
| All-size intercept bias | -0.0176813290126 |
| In-sample residual RMS | 0.00324066979607 |
| Unfitted holdout prediction minus truth | -0.00830892942871 |
| System size | Observable |
|---|---|
| 6 | 0.905555555556 |
| 10 | 0.77 |
| 16 | 0.7015625 |
| 24 | 0.665972222222 |
The known intercept is 0.6, so the fitted intercept error can be measured directly here. A small residual over the observed window does not guarantee an accurate extrapolation outside it. On a real experiment the infinite-size answer is unknown; varying the fit window and testing held-out sizes becomes evidence about model sensitivity, not proof of the limit.
Comparison regime
Complete inputs
- Infinite-size reference
- 0.65
- Inverse-size coefficient
- 1.1
- Curvature coefficient
- 8
- System sizes
- 11, 15, 21, 29
- Unfitted holdout size
- 50
- Generate y(L) = reference + a/L + b/L² at L = 11, 15, 21, 29. These are exact synthetic function values, not noisy observations.
- Fit a straight line in 1/L while omitting curvature. Using all sizes gives intercept 0.621764; the largest two give 0.636864.
- At the held-out size 50, the all-size fit predicts 0.66398 and the generating curve gives 0.6752. Their difference is -0.01122.
| Calculated quantity | Synthetic result |
|---|---|
| All-size linear extrapolated intercept | 0.621764082501 |
| Largest-two extrapolated intercept | 0.636863711002 |
| Known synthetic infinite-size reference | 0.65 |
| All-size intercept bias | -0.0282359174994 |
| In-sample residual RMS | 0.00275852015511 |
| Unfitted holdout prediction minus truth | -0.0112197571812 |
| System size | Observable |
|---|---|
| 11 | 0.816115702479 |
| 15 | 0.758888888889 |
| 21 | 0.72052154195 |
| 29 | 0.69744351962 |
The known intercept is 0.65, so the fitted intercept error can be measured directly here. A small residual over the observed window does not guarantee an accurate extrapolation outside it. On a real experiment the infinite-size answer is unknown; varying the fit window and testing held-out sizes becomes evidence about model sensitivity, not proof of the limit.
Extended regime
Complete inputs
- Infinite-size reference
- 0.71
- Inverse-size coefficient
- 0.62
- Curvature coefficient
- 15.2
- System sizes
- 17, 21, 27, 35
- Unfitted holdout size
- 62
- Generate y(L) = reference + a/L + b/L² at L = 17, 21, 27, 35. These are exact synthetic function values, not noisy observations.
- Fit a straight line in 1/L while omitting curvature. Using all sizes gives intercept 0.682791; the largest two give 0.693915.
- At the held-out size 62, the all-size fit predicts 0.714273 and the generating curve gives 0.723954. Their difference is -0.009681.
| Calculated quantity | Synthetic result |
|---|---|
| All-size linear extrapolated intercept | 0.682790908716 |
| Largest-two extrapolated intercept | 0.693915343915 |
| Known synthetic infinite-size reference | 0.71 |
| All-size intercept bias | -0.0272090912836 |
| In-sample residual RMS | 0.00151932667369 |
| Unfitted holdout prediction minus truth | -0.00968081314859 |
| System size | Observable |
|---|---|
| 17 | 0.799065743945 |
| 21 | 0.773990929705 |
| 27 | 0.753813443073 |
| 35 | 0.74012244898 |
The known intercept is 0.71, so the fitted intercept error can be measured directly here. A small residual over the observed window does not guarantee an accurate extrapolation outside it. On a real experiment the infinite-size answer is unknown; varying the fit window and testing held-out sizes becomes evidence about model sensitivity, not proof of the limit.
Try the reasoning: Can a two-point fit with zero residual certify the infinite-size limit? Compare the fit-window change and the held-out-size error.