Why Tuning Must Match the Prediction Task
A matrix-completion model can fit the entries it sees well and still predict missing omics blocks poorly. Its flexibility is controlled partly by rank: a higher rank can represent more patterns of variation, but can also fit noise. Shrinkage provides another control by penalizing the size of the fitted low-rank structure. Neither choice is universally best. They must be selected against a clearly stated prediction target.
For block-missing data, the target matters especially because entire modalities may be absent for some subjects. Hiding a few individual cells from subjects whose other measurements remain available is not necessarily a useful stand-in for predicting a missing block. Validation should mimic the scale and pattern of the prediction task as closely as the observed data allow.
Candidate Models and Tuning Parameters
Let \(X\) be an \(n\times p\) data matrix, with subjects in rows and measured features in columns. Let \(\Omega\) be the set of observed entries, and let \(M_{ij}=1\) when \(X_{ij}\) is observed and \(M_{ij}=0\) otherwise. A matrix-completion estimate \(L\) predicts the entries of \(X\); it is fit using entries in \(\Omega\). For simplicity, the objectives below use squared-error loss, typically after appropriate training-set preprocessing.
Here \(\Omega_{\mathrm{train}}\) is the set of entries available for fitting a candidate. Rank and \(\lambda\) are different controls, not interchangeable labels for the same model. A rank constraint limits the number of singular directions; a nuclear-norm penalty discourages large singular values and may reduce the effective rank. With incomplete data, the penalized solution does not in general arise by simply truncating the singular values of the observed matrix.
These objectives assume that squared error is a meaningful measure on the chosen scale, that the observed training entries contain enough information to fit the candidate, and that the optimization procedure adequately solves the stated problem. They do not, by themselves, make missingness ignorable or guarantee that unobserved values are identifiable. The earlier material on identifiability assumptions for matrix completion is relevant: tuning cannot repair a lack of information in the observed pattern.
Validation Design for Block-Missing Data
Split data before fitting candidate models. Training entries are used to fit each candidate and estimate preprocessing quantities such as feature means and scales. Validation entries are not used to fit candidates or estimate preprocessing parameters. They are used to select among candidates. If an unbiased final assessment after selection is needed, reserve a separate test set and do not use it to choose the model.
Suppose modality \(b\) contains a set of feature columns \(J_b\). To assess prediction of a missing modality block, select subjects for whom that block is actually observed, temporarily hide the block \(J_b\) for each selected subject, fit using the remaining training information, and score predictions on the hidden entries. A validation mask may also need to reflect the other modalities available for those subjects. This tests the model under a specified block-availability pattern, rather than merely testing isolated cell prediction.
A validation design can only use values that are observed in the study. Consequently, hiding an observed block provides evidence about predicting comparable blocks among subjects and patterns represented in the data. It cannot directly reveal prediction accuracy for a block that is never observed in a relevant subgroup, or for values whose observation depends on their unobserved magnitude.
Choosing a Loss That Matches the Goal
For a validation set \(\Omega_{\mathrm{val}}\), the pooled entrywise mean squared error is
This gives more influence to blocks contributing more validation entries. That is appropriate if the target is average squared error for a randomly selected validation entry. If the goal instead gives each modality equal importance, calculate an MSE within each block and average those block-specific MSEs. A per-block score may also be scaled to account for different measurement units, but the scales must be estimated from training data, not validation data.
The validation scheme and loss function together define the target. For example, equally weighting modality-specific MSEs estimates a different performance summary from pooling all entries. Neither is automatically correct: choose based on the scientific use of the predictions, state the choice, and report block-specific results where feasible.
Worked Example: Selecting Rank From Block-Held-Out Predictions
Consider a hypothetical standardized data set with two modalities. The intended task is to predict modality B when it is absent, using other available information. Researchers choose four subjects with observed B values, hide all of B for those subjects, and fit rank-1 and rank-2 candidates using the remaining training data. Suppose the four held-out B values are \(2, -1, 0, 3\). The rank-1 predictions are \(1, 0, 2, 1\); the rank-2 predictions are \(1.5, -0.5, 1, 2\).
For rank 1, the errors are \(1,-1,-2,2\). Thus the validation sum of squared errors is \(1^2+(-1)^2+(-2)^2+2^2=10\), and the MSE is \(10/4=2.50\) standardized units squared.
For rank 2, the errors are \(0.5,-0.5,-1,1\). The sum of squared errors is \(0.5^2+(-0.5)^2+(-1)^2+1^2=2.50\), so the MSE is \(2.50/4=0.625\) standardized units squared. For this validation design, rank 2 has the lower observed validation error and is preferred among these two candidates.
This comparison does not establish that rank 2 is best for every modality or availability pattern. It supports the narrower conclusion that rank 2 predicted these held-out B blocks better under the stated validation design. Repeating the split or using several folds can show how sensitive that comparison is to which subjects were held out.
Worked Example: Pooled Loss Versus Equal Block Weighting
Suppose a hypothetical validation set has eight entries from modality A and two from modality B. Candidate C has squared-error sum 16 in A and 18 in B. Candidate D has squared-error sum 20 in A and 2 in B. Calculate pooled and equal-block MSEs.
For candidate C, the block MSEs are \(16/8=2.00\) for A and \(18/2=9.00\) for B. Its pooled MSE is \((16+18)/(8+2)=34/10=3.40\). Its equal-block MSE is \((2+9)/2=5.50\).
For candidate D, the block MSEs are \(20/8=2.50\) for A and \(2/2=1.00\) for B. Its pooled MSE is \((20+2)/10=2.20\), while its equal-block MSE is \((2.50+1.00)/2=1.75\). Candidate D is preferred by both summaries here, but the numerical summaries answer different questions. A different pair of candidates could be ranked differently because pooled loss gives A four times as many entries as B, whereas equal-block loss gives each modality half the weight.
Why Block-Level Validation Estimates the Relevant Risk
The logic of validation can be stated in terms of a prediction risk. Let \(Q\) denote the distribution of validation tasks: for example, which modality is hidden and which other modalities remain available. For a task drawn from \(Q\), let \(H\) be the set of hidden entries and let \(\widehat L\) be the prediction made without using their values. A target risk is the expected loss over tasks drawn from \(Q\).
The justification for a validation average is direct. If validation tasks are sampled from \(Q\), each task's loss is calculated without revealing its hidden values to the fitted candidate, and the tasks are independent or suitably representative, then the average validation loss estimates the expected loss under \(Q\). It is therefore the validation design, not just the model, that determines what performance is being estimated.
If cells are hidden uniformly but the real task is to predict whole modality blocks, the validation tasks are drawn from the wrong distribution. In particular, cellwise masking often leaves most of a subject's modality visible, while block prediction removes all its features. A low cellwise validation error therefore need not imply low block-prediction error. Block masking aligns the validation task more closely with the target; it does not remove uncertainty caused by small samples or unsupported patterns.
This argument also explains why selecting the minimum over many candidates can be optimistic: random validation fluctuations help determine which candidate wins. The selected validation score is useful for tuning but is not a fully independent final assessment. A test set that is untouched until after selection, or an appropriate repeated outer validation design, is needed when a final performance estimate is required.
Worked Example: Selecting Shrinkage and Keeping a Test Set Separate
In a hypothetical block-validation exercise, candidates with \(\lambda=0.01,\ 0.10,\ 0.50\) have validation block-MSEs \(1.40,\ 0.90,\ 1.10\), respectively. Each candidate was fit only on training entries, and all centering and scaling parameters were estimated on those entries.
The smallest validation MSE is \(0.90\), so \(\lambda=0.10\) is selected among the three candidates. The validation values have appropriately influenced tuning, but were not used to fit the candidate matrices or estimate preprocessing parameters.
Suppose a previously reserved, comparable test set then gives squared errors \(0.8, 1.2, 1.0, 1.4\) for the selected candidate. Its test MSE is \((0.8+1.2+1.0+1.4)/4=4.4/4=1.10\). This is a separate assessment after selection. It is not a new tuning score: choosing another \(\lambda\) because it performs better on this test set would use the test data for selection and compromise its role as an independent assessment.
A Practical Tuning Workflow
Specify which blocks are to be predicted, what information remains available, and whether modalities or entries receive equal weight.
Hold out observed blocks or patterns that represent the target as far as the available data permit. Keep their values out of candidate fitting.
Fit each selected rank or shrinkage value using training data only. Estimate centering, scaling, and other preprocessing quantities from training data only as well.
Calculate the prespecified validation loss, including the chosen block weighting. Select the candidate with the lowest score, while checking variability across folds or repeated splits.
Evaluate the selected candidate once on a separate test set or use an outer validation procedure. Do not use this assessment set to revise the selection.
The grid should be broad enough to include under- and over-regularized candidates, but not so large that computation and validation noise dominate. For rank, values cannot exceed the dimensions or effective information available to the fitting problem. For \(\lambda\), a grid on a logarithmic scale can be useful because the practically relevant values may span several orders of magnitude. These are design choices, not guarantees that the best candidate lies in the grid.
Diagnostics, Alternatives, and Limitations
Inspect more than a single minimum. Plot validation loss against rank or \(\lambda\), and compare results across folds, repeated masks, and modalities. A flat minimum indicates that several choices perform similarly at the available precision; selecting the most complex candidate in that situation may add complexity without clear predictive gain. A sharp minimum that moves greatly across splits suggests unstable tuning. Also check whether particular blocks or availability patterns have too few validation cases to support a reliable comparison.
Compare block-specific errors, not only the aggregate. A good pooled score can conceal poor prediction for a smaller modality. Check prediction distributions and residuals for systematic bias or extreme errors, and verify that every scored entry was genuinely withheld from fitting. If preprocessing, tuning, and evaluation are not separated correctly, reported validation performance can be misleading.
Rank-constrained and nuclear-norm-penalized fitting are alternatives for controlling complexity, and both can be tuned with the same target-aligned validation design. A third option is to choose a rank and apply additional factor or entrywise regularization; that changes the candidate family and requires its own tuning. No method is uniformly preferable. The comparison should use a common split, common preprocessing, and a common scoring target.
A key limitation is that validation can only assess values observed in the study. If block availability is associated with the unseen values, performance among subjects whose block is observed may not represent performance for subjects whose block is missing. This is particularly important under nonignorable missingness. Block-aware masking improves alignment of the prediction task, but does not identify unobserved outcomes under arbitrary missingness mechanisms. Report the population and availability patterns to which the validation evidence applies.
Common Mistakes
- Using random-cell masking for a block-prediction goal. This can leave most of a modality available to the model. Hide whole blocks when whole blocks are the target.
- Saying validation data must not influence tuning. That is incorrect: validation loss is used to select among candidates. The correction is to keep validation values out of candidate fitting and preprocessing, while using them for selection. Reserve a separate test set if a final independent performance assessment is needed.
- Reporting pooled error as if modalities were equally weighted. Pooled loss weights blocks by their number of entries. Calculate and report block-specific or equal-block scores when that matches the scientific target.
- Treating the winning validation score as an unbiased final estimate. The candidate was selected partly because of its validation score. Use separate test data or an outer evaluation procedure for final assessment.
- Assuming validation solves missingness bias. It measures prediction on the observed validation population and design. It cannot establish accuracy for unsupported patterns or arbitrary MNAR values.
Check Your Understanding
Try each question, then compare your reasoning with the solutions below.
- A researcher wants to predict an entire missing modality but randomly hides individual cells for validation. What mismatch could result?
- Eight validation entries from modality A have squared-error sum 12, and two from modality B have squared-error sum 10. Find the pooled MSE and the equal-block MSE.
- May validation entries be used to select \(\lambda\)? What must they not be used for?
- A modality is never observed for a particular availability subgroup. What can block-held-out validation establish about prediction in that subgroup?
Solutions. (1) Cellwise masking may leave most of the modality visible for each subject, unlike the target task of predicting a whole block. Block-level masking is a closer validation design. (2) The pooled MSE is \((12+10)/(8+2)=22/10=2.20\). The block MSEs are \(12/8=1.50\) and \(10/2=5.00\), so the equal-block MSE is \((1.50+5.00)/2=3.25\). (3) Yes. Validation loss is used to choose among candidates, but validation values must not fit candidate models or estimate preprocessing parameters. A separate test set can assess performance after selection. (4) It cannot establish accuracy for a subgroup with no observed examples of that modality. Validation evidence applies only to represented observed patterns, subject to the assumptions connecting those patterns to the intended prediction task.