Why Use a Forest for Integrated Omics?
An omics predictor may relate to survival in a curved, threshold-like, or otherwise non-monotone way. The predictive value of one feature may also depend on another feature, including a feature measured in a different omics layer. A linear predictor with a prespecified functional form can represent such patterns only if those forms and interactions are built into the model. A random survival forest offers a different strategy: it combines many survival trees, each of which partitions the predictor space into regions with relatively similar observed survival experience.
This flexibility does not make the forest assumption-free. The observed outcomes are right-censored, so the method must distinguish an observed event from a subject whose event time is not observed by the end of follow-up. It also needs enough events and comparable subjects in the relevant regions of the omics feature space to estimate survival patterns usefully. Its variable importance measures are about predictive performance under a specified procedure; they are not regression coefficients, hazard ratios, or causal effects.
In this tutorial, the event of interest is a single event type. The forest uses the observed time and event indicator, not a fabricated event time for censored subjects. Competing events require a target and an appropriate competing-risk prediction procedure; ordinary single-event forest output should not be interpreted as a competing-risk cumulative incidence estimate.
How a Survival Tree Splits
At a node of a tree, candidate splits divide the subjects into two groups, such as those with a feature below a threshold and those at or above it. A split is useful when the groups have different survival experience. A common survival-tree criterion is the logrank statistic. It compares the observed number of events in one child group with the number expected if, at each event time, failures were allocated in proportion to the groups’ risk-set sizes.
The expected count \(Y_{A,t}d_t/Y_t\) follows from the risk-set proportions. The variance term is the hypergeometric variance for the number of the \(d_t\) failures assigned to \(A\), under random allocation among the \(Y_t\) people at risk. The factor \((Y_t-d_t)/(Y_t-1)\) is the finite-population correction. Summing the time-specific contributions gives the conventional logrank variance estimate. Tree software may use a closely related criterion or an implementation-specific rule for ties and degenerate splits, so the actual fitting procedure should be recorded.
A tree typically searches a random subset of predictors at each node and chooses a candidate split with a large absolute standardized score or equivalent squared score. This random candidate selection, along with resampling subjects, makes the trees differ. A variable can be considered repeatedly in different parts of a tree, enabling stepwise partitions that represent thresholds and combinations of features. The process can capture interactions without specifying a product term in advance: a split on one feature followed by a split on another creates a region whose prediction depends on both.
Worked Example: Computing a Survival Split Score
Consider a hypothetical node and a candidate split into group \(A\) and its complement. At time 2, \(Y_t=8\), \(d_t=2\), \(Y_{A,t}=4\), and \(d_{A,t}=2\). At time 4, \(Y_t=5\), \(d_t=1\), \(Y_{A,t}=2\), and \(d_{A,t}=0\). At time 5, one person remains at risk, that person is outside \(A\), and an event occurs: \(Y_t=1\), \(d_t=1\), \(Y_{A,t}=0\), \(d_{A,t}=0\). These risk-set counts are compatible with subjects leaving risk through events or censoring between event times.
The score contributions are observed minus expected events in \(A\). At time 2, the expected count is \(4(2)/8=1\), so the contribution is \(2-1=1\). At time 4, it is \(2(1)/5=0.4\), so the contribution is \(0-0.4=-0.4\). At time 5, the expected count is \(0(1)/1=0\), giving \(0-0=0\). Thus \(U=1-0.4+0=0.6\).
For time 2, the variance contribution is \(2(4/8)(1-4/8)(8-2)/(8-1)=0.4286\). At time 4 it is \(1(2/5)(1-2/5)(5-1)/(5-1)=0.24\). At time 5, the general variance expression has denominator \(Y_t-1=0\), so it is not defined and must not be substituted. By definition, when \(Y_t=1\) the contribution is zero: the only person at risk must be the person experiencing the event, and group allocation is not random. The total estimated variance is \(0.4286+0.24+0=0.6686\), and \(Z=0.6/\sqrt{0.6686}=0.7337\). This candidate split has a modest standardized separation in this small hypothetical node. In a forest, this score is used to select a split, not as a standalone hypothesis test with a p-value.
Terminal-Node Estimates and Forest Predictions
Once a tree is grown, a new subject’s predictors route that subject through the splits to one terminal node. A common terminal-node estimate is the Nelson–Aalen cumulative hazard estimate. For event time \(t\) within that node, it adds the fraction of people at risk who experience the event. The cumulative hazard estimate then increases across event times. A survival estimate can be obtained by exponentiating the negative cumulative hazard. Some implementations combine tree survival estimates directly instead; the convention should be specified because these aggregation methods need not give identical results.
This prediction is a model-based estimate of survival for subjects with the specified predictor profile, under the fitted forest and its assumptions. It is not a guarantee that an individual will experience that outcome. The forest’s partitions can approximate complicated patterns, but the resolution of those patterns depends on sample size, event count, the candidate-feature strategy, and stopping rules such as minimum terminal-node size.
Worked Example: Combining Tree Predictions
Suppose a hypothetical forest has three trees. For a particular omics profile, their cumulative hazard estimates by 6 months are \(0.10\), \(0.20\), and \(0.15\); by 12 months they are \(0.35\), \(0.50\), and \(0.40\). Under the stated averaging convention, the 6-month forest cumulative hazard is \((0.10+0.20+0.15)/3=0.15\), and the 12-month value is \((0.35+0.50+0.40)/3=1.25/3=0.4167\).
The corresponding survival predictions are \(\exp(-0.15)=0.8607\) at 6 months and \(\exp(-0.4167)=0.6592\) at 12 months. Thus the fitted forest estimates survival probabilities of about 86.1% through 6 months and 65.9% through 12 months for this predictor profile. These are predictions from the hypothetical fitted model, not observed proportions or treatment effects.
The prediction decreases with time, as survival should. In actual use, examine the output across the supported follow-up range: predictions far beyond the times with adequate risk sets are weakly informed, and software conventions can differ in how they handle such times.
Out-of-Bag Variable Importance
A commonly used measure is permutation variable importance. For each tree, subjects not selected in that tree’s bootstrap sample are out-of-bag (OOB) for that tree. The fitted tree predicts these subjects. The values of one feature are then permuted among the OOB subjects, breaking the observed link between that feature and their other data while leaving the other feature columns unchanged. The tree’s OOB prediction error is recalculated. Aggregating the change over trees gives an importance measure: a large increase in error after permutation suggests that the feature contributed to prediction under this forest, error measure, and resampling procedure.
Because this is a comparison of predictive error, the result depends on the error measure, the permutation scheme, the training sample, and forest settings. It is not an effect estimate. In particular, importance does not give the direction or size of a feature’s association with event time, does not estimate a hazard ratio, and does not show that changing the feature would change survival.
Worked Example: Interpreting Permutation Importance
Suppose a hypothetical forest’s chosen OOB prediction error is \(0.21\) before permutation of feature \(X_1\), measured in the error measure’s stated units. After permuting \(X_1\), the error is \(0.27\). Define importance here as permuted error minus original error. Then the importance is \(0.27-0.21=0.06\) error units. The forest’s prediction worsened by 0.06 error units when the observed \(X_1\) values were disrupted in this OOB procedure.
The appropriate conclusion is that \(X_1\) had predictive contribution according to this particular importance calculation. It is not correct to conclude that \(X_1\) raises the hazard by 0.06, because the error difference is neither a hazard nor a coefficient. It also does not establish that \(X_1\) is biologically causal. If another highly correlated omics feature can carry similar predictive information, permuting \(X_1\) alone may yield modest importance even when the pair is jointly useful.
Assumptions, Diagnostics, and Alternatives
The forest can flexibly partition predictors, but its survival estimates still require defensible outcome and sampling conditions. Subjects should be independent sampling units, or the analysis must account for clustering at the design level. For standard right-censored estimation, censoring should be independent of the event time conditional on the information used for prediction, at least within the regions represented by the fitted trees. Informative censoring can distort estimated survival even if the split algorithm is flexible. There must also be enough follow-up and events to support the predictions of interest; no algorithm can recover late survival reliably when essentially no subjects remain under observation.
Useful diagnostics include checking event counts and risk-set sizes across follow-up, the range over which predictions are supported, and the stability of predictions and importance rankings across resamples or reasonable forest settings. Inspect whether a few very small terminal nodes drive extreme predictions. Check whether preprocessing, batch correction, feature filtering, and any supervised feature selection were performed using training data only within each validation or resampling split. If information from held-out subjects influenced these steps, OOB predictions can be optimistic despite the OOB mechanism.
In multi-omics data, high correlation and different numbers of measured features across layers complicate importance. A layer with thousands of correlated features may distribute predictive information across many substitutes, while a single isolated feature may appear more important. Feature-wise permutation can also create combinations of values that rarely occur jointly in real samples. Consider reporting the precise importance procedure and examining layer-level or grouped permutation analyses when that matches the scientific question; grouped importance answers a different question than importance for one feature.
| Approach | Useful distinction | Important limitation |
|---|---|---|
| Random survival forest | Partitions can represent nonlinearities and interactions without specifying their exact form in advance. | Predictions and importance can depend on tuning, correlated predictors, and data support; individual effects are not directly estimated. |
| Cox regression | Provides interpretable regression parameters under its chosen model specification. | Nonlinear forms and interactions must be represented appropriately; proportional-hazards assumptions may matter. |
| Single survival tree | Its partition can be inspected as a compact set of decision rules. | A single tree can be unstable and have higher prediction variability than an ensemble. |
The forest is therefore a useful predictive alternative when nonlinearities or interactions are plausible and a prespecified parametric form is not the main goal. It does not automatically solve high dimensionality, confounding, transportability, or causal interpretation. When the objective is an interpretable effect estimate, a forest’s split patterns and permutation scores should not be substituted for a model and estimand designed for that objective.
Common Pitfall
A second computational pitfall occurs in the logrank split variance at the last event time. If only one subject is at risk, substituting \(Y_t=1\) into a formula containing \(Y_t-1\) produces division by zero. The correct handling is to define that contribution as zero because there is no random allocation of the sole person at risk. Omitting this boundary case can make a hand calculation appear undefined even though the risk-set interpretation is straightforward.
Check Your Understanding
Answer each question, then compare with the solutions below.
- At a particular event time, \(Y_t=10\), \(d_t=2\), and \(Y_{A,t}=5\). What is the expected number of events in group \(A\) under the logrank calculation?
- Why is the variance contribution zero when \(Y_t=1\), rather than obtained by direct substitution into the usual formula?
- A feature’s permutation raises OOB prediction error from \(0.18\) to \(0.23\). What does the increase mean, and what does it not mean?
- Name one reason an omics feature can have low individual permutation importance even if its information is useful to the forest.
Solutions. (1) The expected count is \(Y_{A,t}d_t/Y_t=5(2)/10=1\) event. (2) The denominator \(Y_t-1\) is zero, so the formula is undefined there; with one person at risk there is no uncertainty about which group contains the event, and the defined variance contribution is zero. (3) Under the stated procedure, the feature’s permutation increased OOB error by \(0.23-0.18=0.05\) error units, indicating predictive contribution in that procedure. It is not a hazard ratio, an effect size on survival, or evidence of causation. (4) A correlated feature may substitute for it, so disrupting one feature alone need not remove the shared predictive information.