GeneSuite
Documentation / Understand the methods

12. Model checking, validation and software comparison

Advanced notes: contents · Abbreviations

1 Numerical acceptance and scientific agreement

Backward error, conditioning and iterative refinement are treated by Higham (2002). A residual criterion is a numerical diagnostic, not a biological model-checking procedure.

For \(C\hat x=b\), record the original-system residual \(r=b-C\hat x\). A useful normwise backward-error diagnostic is

\[ \eta=\frac{\|r\|}{\|C\|\,\|\hat x\|+\|b\|}. \]

A small residual does not by itself guarantee small coefficient error when the system is ill conditioned. The identity

\[ x-\hat x=C^{-1}r \]

shows why scaling and conditioning matter. A solve in transformed variables must be checked after reconstructing the original target, under the declared original-system acceptance criterion.

A symmetric positive definite (SPD) preconditioner used solely to accelerate preconditioned conjugate gradient (PCG) preserves the target equations; finite stopping error still depends on convergence. Refinement changes how accurately a backend solve is performed. Neither should be confused with adding a ridge to \(K\), which changes the statistical model. Residual acceptance, variance-component optimizer convergence and scientific predictive validity are three separate assessments.

Practical equivalence is a scientific judgment about the size of differences; it does not retrospectively turn a failed numerical gate into a pass. The software-comparison section specifies the alignment, error summaries and performance evidence needed for that judgment.

2 Statistical diagnostics after an accepted solve

Inspect observed patterns, influential groups, residual distributions and variance heterogeneity against the model. Conditional residuals \(y-X\hat\beta-Z\hat u\) have covariance shaped by fitting and shrinkage; they are not independent draws with covariance \(R\). Standardized or whitened diagnostics must use the appropriate fitted residual covariance or a stated approximation. Marginal and conditional residuals address different questions.

A good numerical residual does not diagnose omitted management effects, incorrect parentage or a misspecified residual process. Large scientific residuals do not necessarily imply a failed equation solve either.

3 Validation aligned with deployment

Simulation, validation design and benchmarking in genomic prediction are discussed by Daetwyler et al. (2013). Multitrait-specific validation leakage and remedies are studied by Runcie and Cheng (2019).

A random animal split mostly tests prediction for animals with the relationships and information retained in that split. Forward-generation validation tests a different task; leave-family, leave-population and leave-environment designs answer other questions. Specify what information would genuinely be available at prediction time, including relatives’ future records and environmental covariates.

Marker selection, phenotype-derived weights, hyperparameter tuning and covariance estimation must be fitted within the training procedure for the claimed validation design. If target genotypes are allowed in frequency or kernel construction, state that transductive information explicitly rather than describing the exercise as entirely independent prediction.

4 Accuracy, calibration and uncertainty

In simulation, compare predictions to known latent breeding values. In field data those values are not observed: correlation with phenotype is not genetic accuracy, and heritability-based adjustments require assumptions. Predictive correlation is insensitive to additive shifts and multiplicative dispersion, so also assess bias, regression calibration and prediction error on a clearly specified target.

For held-out phenotypes, mean squared error includes unexplained environmental and residual variation. For breeding values, reliability describes a model-based uncertainty measure rather than an automatically observed out-of-sample accuracy. Interval coverage should be checked against the target actually covered, with repeated simulation or an appropriate external design.

Partial-versus-whole-data prediction comparisons, including the linear-regression (LR) method (Legarra and Reverter, 2018), provide additional validation tools under their assumptions. They do not make true breeding values directly observable or eliminate the effects of an incorrect covariance model.

4.1 Qualifying an information pipeline

Compare a model using new information with a baseline using the same eligible animals, markers, records and prediction-time availability. Distinguish the benefit of obtaining additional measurements from the benefit of a different method for analysing them. An annotation-weighted model and a sensor-assisted predictor may answer different information questions even when both improve a retrospective correlation (Daetwyler et al., 2013; Runcie and Cheng, 2019).

Feature extraction, calibration, annotation selection, factor rank, covariance estimation and tuning learned from the study data belong inside the assessed training procedure. Externally trained, frozen components form a distinct case: record their provenance and assess transfer rather than silently assuming it. Hold out animals and relevant farms, devices, populations or time periods.

For estimation, assess recovery of the intended component or total covariance and interval behaviour, including misspecified annotations and recording error. For prediction, assess the actual genetic or phenotypic target, calibration and uncertainty. Feature enrichment, molecular association and variance explained by fitted scores are not interchangeable measures of success.

5 Comparing software and models

First establish the same data, allele coding, relationship base, covariance scales and prediction target. Align external animal IDs and trait order; exclude marker coefficients when comparing animal genetic values. Check complete coverage, duplicates and nonfinite outputs before error summaries. Report maximum absolute error, per-target root mean squared error (RMSE) and a prespecified absolute/ relative gate. Agreement on predictions alone does not prove equal likelihoods, prediction-error variances (PEVs) or variance estimates.

Then compare setup, factorization, iteration, reconstruction and output time, plus end-to-end time, on documented hardware. Use repeated runs where practical to assess variability. Different stopping criteria and different nodes limit causal claims about algorithmic speed. A smaller time per iteration can coexist with a larger complete runtime.

Finally distinguish two conclusions: equivalent-model software qualification and predictive model comparison. The former asks whether implementations solve the same problem; the latter asks whether a model improves inference or prediction for a scientifically relevant population.

6 A report that can be interpreted later

Preserve the scientific specification, input identities, code/runtime versions, parameter estimates or supplied covariances, numerical status and uncertainty method. State the validation design and what was learned inside each training set. Keep unsuccessful numerical gates and unsupported uncertainty requests visible; practical agreement is not a replacement for recording those results.

NoteImplementation in gsuite

The standalone runner records separate numerical, estimation and execution status in results and diagnostics. Supplied-truth evaluation checks labelled predictions and reports accuracy, error and calibration summaries. The software validation pages describe existing focused evidence. LMT conversion and other directive/data converters cover restricted model subsets; conversion acceptance is separate from numerical agreement. Deployment validation and inferential calibration remain study-design tasks, not consequences of a successful run.

Next: current developments.

The qualification framework sets out how independent numerical, simulation, validation and performance evidence support different kinds of claims.

For applications to automated measurements and high-dimensional traits, see large-scale phenomics.

7 References

Daetwyler, H. D., Calus, M. P. L., Pong-Wong, R., Campos, G. de los, and Hickey, J. M. (2013). Genomic Prediction in Animals and Plants: Simulation of Data, Validation, Reporting, and Benchmarking. Genetics, 193(2), 347–365. https://doi.org/10.1534/genetics.112.147983.
Higham, N. J. (2002). Accuracy and Stability of Numerical Algorithms. 2nd ed. Society for Industrial and Applied Mathematics. https://doi.org/10.1137/1.9780898718027.
Legarra, A., and Reverter, A. (2018). Semi-parametric estimates of population accuracy and bias of predictions of breeding values and future phenotypes using the LR method. Genetics Selection Evolution, 50(1). https://doi.org/10.1186/s12711-018-0426-6.
Runcie, D., and Cheng, H. (2019). Pitfalls and Remedies for Cross Validation with Multi-trait Genomic Prediction Methods. G3 Genes|Genomes|Genetics, 9(11), 3727–3741. https://doi.org/10.1534/g3.119.400598.