Tutorials › Competing Risks and Multi-State Models › Multicategory Brier Scores for Dynamic State Predictions

Landmarking and Dynamic Prediction · Tutorial 505 of 699

Multicategory Brier Scores for Dynamic State Predictions

Calculate horizon-specific Brier scores for predicted state probabilities, account for incomplete follow-up, and interpret comparisons between prediction models.

Advanced 10 min read

What You'll Learn

  • Define the multicategory Brier score for a predicted state at a fixed horizon after a landmark.
  • Calculate individual losses and average scores from observed states and predicted probabilities.
  • Interpret why lower scores indicate better probabilistic prediction on the evaluated cohort.
  • Use inverse-probability-of-censoring weights when the horizon state is not always observed.
  • Check the assumptions and diagnostics needed for fair comparisons between models.

Why score dynamic state predictions?

A model can produce a probability for every possible state at a future time, but a prediction needs to be evaluated against what happens at that time. The multicategory Brier score does this by comparing the full predicted probability vector with the state that is actually observed. It evaluates the predictions at a specified horizon; it is not a summary of prediction performance over all times.

For a fair comparison, the models should be evaluated for the same target population, landmark time, prediction horizon, and state definitions. The predictions must use only information available at the landmark. This is especially important when the prediction is updated at successive landmarks: a score at one landmark concerns that landmark’s eligible population, not automatically the population used at another.

Definition and assumptions

Definition: Suppose the possible states are \(1,\ldots,K\). For individual \(i\), let \(X_i(s+h)\) be the state at horizon \(h\) after landmark time \(s\). Let \(\hat p_{ik}(s,h)\) be the predicted probability that individual \(i\) is in state \(k\) at that horizon. The individual multicategory Brier loss is $$ L_i(s,h)=\sum_{k=1}^{K}\left\{I\bigl(X_i(s+h)=k\bigr)-\hat p_{ik}(s,h)\right\}^2. $$ If the horizon state is observed for all \(n\) individuals in the target set, the Brier score is $$ \widehat{BS}(s,h)=\frac{1}{n}\sum_{i=1}^{n}L_i(s,h). $$

Here \(I(\cdot)\) equals 1 when its condition is true and 0 otherwise. A valid prediction has \(\hat p_{ik}(s,h)\geq 0\) for every state and \(\sum_{k=1}^{K}\hat p_{ik}(s,h)=1\). The observed outcome is represented by a one-hot vector: exactly one state indicator is 1. The score is dimensionless, and lower values indicate smaller average squared probability errors. This tutorial uses the unnormalized sum over states shown above; dividing every score by 2 is another convention, but it changes the scale and must be applied consistently.

Before calculating the score, the prediction and outcome must refer to the same state system and horizon. The target individuals should be eligible at the stated landmark, and each prediction should be based only on information available by that landmark. For the simple average above, every horizon state must be observed. When follow-up ends before the horizon, the missing outcome cannot be treated as an observed state; censoring requires explicit handling.

Worked Example: One Individual’s Loss

Suppose a hypothetical model predicts probabilities \(0.60\), \(0.30\), and \(0.10\) for states 1, 2, and 3 at a specified horizon. The individual is observed in state 2 at that horizon. The probabilities are nonnegative and sum to 1, so they form a valid prediction.

The observed state indicators are \(0,1,0\). Therefore,

$$ L=(0-0.60)^2+(1-0.30)^2+(0-0.10)^2 =0.36+0.49+0.01=0.86. $$

The loss is 0.86 squared-probability units. It is not a probability that the prediction is wrong; it is the squared distance between the predicted probability vector and the observed one-hot vector.

Why the score rewards accurate probabilities

The score uses the whole probability vector, not just the state assigned the largest probability. To see why this is useful, suppose the true state probabilities for an individual with given prediction-time information are \(q_1,\ldots,q_K\), while the model reports \(p_1,\ldots,p_K\). The state indicators are random, with probability \(q_k\) of being 1 for category \(k\). The expected Brier loss, averaging over the possible horizon states, is

$$ \begin{aligned} E(L) &=\sum_{k=1}^{K}\left[q_k(1-p_k)^2+(1-q_k)p_k^2\right]\\ &=\sum_{k=1}^{K}q_k-2\sum_{k=1}^{K}q_kp_k+\sum_{k=1}^{K}p_k^2\\ &=1-2\sum_{k=1}^{K}q_kp_k+\sum_{k=1}^{K}p_k^2. \end{aligned} $$

If the prediction equals the true probability vector, \(p_k=q_k\), its expected loss is \(1-\sum_k q_k^2\). Subtracting that value from the expected loss for any other probability vector gives

$$ E(L\mid p)-E(L\mid p=q) =\sum_{k=1}^{K}(p_k-q_k)^2\geq 0. $$

Thus the expected score is minimized by reporting the true state probabilities. This is the proper-scoring property of the Brier score. For a single observation, the loss can range from 0 to 2: it is 0 for a probability of 1 on the observed state, and approaches 2 when probability 1 is assigned to a different state. A dataset average need not reach either extreme.

Calculating a score and comparing models

For complete horizon outcomes, calculate each individual’s loss against the observed state and then average those losses. The model comparison is made on the resulting average scores, with the same individuals and outcome definition used for each model. The difference is a descriptive comparison on that evaluation set; it does not by itself establish that one model will perform better in every population or at every horizon.

Worked Example: Comparing Two Models at One Horizon

In hypothetical data, four individuals have observed horizon states A, B, A, and C. Two models predict probabilities for states A, B, and C. All predictions are valid probability vectors, and every horizon state is observed.

IndividualObserved stateModel 1 probabilities (A, B, C)Model 1 lossModel 2 probabilities (A, B, C)Model 2 loss
1A(0.70, 0.20, 0.10)0.14(0.80, 0.10, 0.10)0.06
2B(0.20, 0.60, 0.20)0.24(0.40, 0.40, 0.20)0.56
3A(0.50, 0.30, 0.20)0.38(0.60, 0.20, 0.20)0.24
4C(0.10, 0.20, 0.70)0.14(0.20, 0.30, 0.50)0.38

For individual 2, for example, Model 1’s loss is

$$ (0.20-0)^2+(0.60-1)^2+(0.20-0)^2 =0.04+0.16+0.04=0.24. $$

The other row losses are calculated the same way. The average score for Model 1 is

$$ \widehat{BS}_1=\frac{0.14+0.24+0.38+0.14}{4} =\frac{0.90}{4}=0.225. $$

For Model 2,

$$ \widehat{BS}_2=\frac{0.06+0.56+0.24+0.38}{4} =\frac{1.24}{4}=0.310. $$

Model 1’s score is lower by \(0.310-0.225=0.085\) squared-probability units in this hypothetical evaluation. It therefore has the better average Brier performance for these four predictions at this horizon. That overall result does not mean Model 1 had a smaller loss for every individual: Model 2 did better for individuals 1 and 3.

The Brier score reflects several aspects of probabilistic prediction together. It rewards assigning high probability to the observed state and penalizes misplaced probability across all states. A lower score is useful for comparing overall probabilistic accuracy, but it does not identify which aspect of performance produced the difference. In particular, it is not a direct measure of calibration alone, nor is it the proportion of individuals whose most likely predicted state was correct.

When the horizon state is censored

If a participant’s follow-up ends before \(s+h\), the state at the horizon may be unknown. Averaging only the losses for participants whose outcomes happen to be observed can give a biased score: those participants may differ systematically from those lost to follow-up. One approach is inverse-probability-of-censoring weighting (IPCW).

Definition: Let \(R_i(s,h)=1\) if individual \(i\)’s horizon state is observed and 0 otherwise. Let \(G_i(h)\) be the conditional probability that the horizon outcome is observed, given the information used to model censoring for that individual. An IPCW Brier score using the original target-set size \(n\) is $$ \widehat{BS}_{IPCW}(s,h)=\frac{1}{n}\sum_{i=1}^{n}\frac{R_i(s,h)}{\hat G_i(h)}L_i(s,h), $$ where a loss is included only when \(R_i(s,h)=1\). Here \(\hat G_i(h)\) estimates the probability of observing the horizon state.

This form estimates the average loss in the original landmark target set, rather than only among those observed at the horizon. It requires that censoring be independent of the horizon outcome, conditional on the information used to estimate \(G_i(h)\), and that \(\hat G_i(h)>0\) for target individuals. The latter is a positivity condition: relevant individuals must have a nonzero chance of remaining observable through the horizon. The censoring model should use suitable prediction-time information and be estimated appropriately for the evaluation design.

The construction is justified by inverse weighting. If observation is independent of the horizon loss conditional on the censoring-model information, then the conditional expected value of \(R_i/G_i\) is \(G_i/G_i=1\). Consequently, weighting the observed loss by \(1/G_i\) recovers its expected contribution in the target set. If conditional independence fails, or observation probabilities are misspecified, the weighted score can still be biased.

Worked Example: IPCW With Two Observed Outcomes

Consider three hypothetical individuals in a landmark target set. At the horizon, the state is known for individuals 1 and 2, with losses 0.40 and 0.50; individual 3 was censored earlier, so the horizon loss is unknown. Suppose the estimated probabilities of observing the horizon state are 0.80 for individual 1 and 0.50 for individual 2. For simplicity, assume the censoring model is correctly specified and the conditional independent-censoring assumption is reasonable.

Using the original target-set size \(n=3\), the IPCW score is

$$ \widehat{BS}_{IPCW} =\frac{1}{3}\left(\frac{0.40}{0.80}+\frac{0.50}{0.50}+\frac{0}{\hat G_3(h)}\right) =\frac{0.50+1.00}{3}=0.500. $$

The third term contributes zero because \(R_3=0\); its unknown loss is not calculated or assigned an outcome. Individual 2 receives more weight because a horizon outcome with an estimated observation probability of 0.50 represents more target individuals, on average, than one observed with probability 0.80. This estimate can be unstable when observation probabilities are small.

Diagnostics, alternatives, and limitations

Before interpreting a score, check the prediction and evaluation process, not just the arithmetic. Useful checks include:

  • Verify that every probability vector is nonnegative and sums to 1, allowing only minor rounding discrepancies.
  • Confirm that the state labels and horizon are identical across the models being compared, and that predictions were formed without future information.
  • Tabulate how many horizon outcomes are observed. With IPCW, inspect the estimated observation probabilities and weights; very small \(\hat G_i(h)\) creates large contributions and high variability.
  • Check that the censoring assumptions are plausible for the information used in the censoring model. A weighted score does not automatically correct informative censoring.
  • Keep the evaluation target fixed. A score difference across distinct landmark populations or horizons can reflect a change in the people or prediction task, not just a change in model quality.

For the IPCW formula above, weights are not normalized by their sum: the denominator is the original target-set size \(n\). Some analyses use a normalized, weighted average instead. That alternative can be useful descriptively, but it is a different finite-sample estimator and should be identified rather than silently substituted. In either case, extreme weights deserve attention; any weight truncation changes the estimator and should be reported.

Other measures answer different questions. Classification accuracy uses only the most likely predicted state and discards the rest of the probability vector. The logarithmic score is another proper score but penalizes assigning very small probability to the observed state particularly strongly. Calibration assessments examine agreement between predicted probabilities and observed frequencies. These approaches complement rather than replace a Brier score: none should be interpreted as covering every aspect of model performance.

Finally, a score is an average over a particular evaluation set. It may conceal poor performance in a subgroup or at a different horizon. A lower observed score is not, by itself, evidence of a statistically meaningful difference; quantifying uncertainty in a model comparison requires an appropriate inferential procedure. When observations are dependent, the uncertainty procedure must also respect that dependence.

Common pitfall: A tempting but incorrect approach is to drop everyone censored before the horizon and average the remaining losses as if those individuals represented the entire target set. This is justified only under conditions that make the observed subset representative for the loss being estimated. The correction is to define the horizon outcome explicitly, assess censoring, and use a valid censoring adjustment when its assumptions are defensible.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. A three-state prediction is \((0.20,0.50,0.30)\), and the observed horizon state is state 1. What is the individual Brier loss?
  2. Why is a lower multicategory Brier score preferred, and what does it not mean?
  3. In an evaluation of 100 people, 20 are censored before the horizon. Why might averaging losses for only the 80 observed people be misleading?
  4. What does a very small estimated probability of observing an individual’s horizon state imply for the IPCW score?

Solutions. (1) The loss is \((1-0.20)^2+(0-0.50)^2+(0-0.30)^2=0.64+0.25+0.09=0.98\). (2) Lower means smaller average squared distance from the observed state indicators. It is not a probability that the model is correct, nor is it the fraction classified correctly. (3) The observed 80 may not represent the full target set; if outcome observation is related to the horizon loss, the complete-case average can be biased. (4) Its inverse weight is large, so an observed loss can contribute heavily and make the estimate unstable; positivity and the censoring model require scrutiny.

Clinical Biostats