One Model, Many Outputs: Why Shapley Explanations refuse to Mix

Authors: Umberto Biccari, Roberto Morales, Enrique Zuazua

Many artificial-intelligence systems make several predictions at once. A medical model might use the same blood tests to estimate several health indicators; a weather model might forecast temperature, rainfall, and wind together. Instead of training a separate model for every target, one model can build a common picture of the data, produce several answers, and save computing resources.

It also creates a less obvious problem: how should we explain a prediction when the model gives several answers at once?One widely used explanation tool is SHAP, short for SHapley Additive exPlanations. SHAP treats the input variables as members of a team and asks how much credit each member deserves for a prediction. For a medical model, for example, it might estimate how strongly glucose, blood pressure, or cholesterol influenced the result.

When there are several outputs, it is tempting to build one combined explanation in which credit can move between them. Our recent work shows that the familiar Shapley rules do not permit that kind of mixing. If we keep the standard rules, each output must be explained separately.
A method can combine the outputs, but only by changing at least one of those rules [1].

How SHAP divides the creditSHAP grew out of cooperative game theory: if a team earns a reward, how should it be divided among the players? In machine learning, the “players” are the input variables and the “reward” is the prediction relative to a typical result. SHAP measures what changes when each variable is included and averages those changes to assign credit.

The method is guided by four principles [2, 3]:
• Everything is accounted for: the individual contributions add up to the prediction being explained;
• Equal roles receive equal credit: two variables with the same effect should be treated in the same way;
• No effect means no credit: a variable that never changes the prediction receives a contribution of zero;• Combined problems have combined explanations: when prediction problems are added together, their explanations add together as well.

These are rules about fair credit allocation. They are not statements about demographic or social fairness.

With several outputs, a group of variables can affect several predictions at once. The question is whether the four principles allow credit to move between those predictions.


Figure 1: A multi-output model shares information internally, but SHAP still gives each feature a separate contribution for each prediction.

The central result

Our result says that the four principles leave only one possibility: apply the ordinary Shapley calculation separately to each output. This is not merely a convenient software choice; it is forced by the rules. If a model predicts age, a metabolic-risk score, and biological sex, the credit assigned to age cannot borrow from the other two predictions.

This yields a useful no-go statement:
Under the classical Shapley rules, there is no genuinely mixed explanation across outputs. If a method explicitly transfers or combines credit between different predictions, then at least one of the standard rules has been changed.

The rule about combining problems is especially restrictive because it prevents hidden transfers of credit between outputs. This does not mean that a joint explanation is impossible or undesirable.

Researchers could first combine the outputs into one score, assign different priorities to them, or adopt a different notion of what the contributions should add up to. Such choices may be useful, but they define a new explanation framework rather than the classical Shapley one.

Similar models should have similar explanations

We also studied stability: small changes in a model should not produce wildly different explanations.
The theory provides that reassurance. When two models behave similarly as variables are added or removed, their Shapley explanations must also remain close. We should therefore expect comparable shared and specialized models to report broadly similar feature importance.

A biomedical test case

To see how the theory plays out in practice, we used a biomedical dataset containing 15,931 complete samples and 75 numerical measurements. These included metabolites, lipid markers, indicators of inflammation, and standard clinical measurements [1]. The models predicted three targets: chronological age, MetSCORE—a continuous metabolomics-based risk index—and biological sex.

We compared one neural network that predicts all three targets with three separate networks, each trained for only one target. The shared model learns a common internal representation before producing its three answers. This is precisely the setting in which one might expect the explanations to become intertwined: if the model learns the tasks together, why would it explain them separately?


Figure 2: One model may learn several tasks together, but the classical Shapley rules require a separate explanation for each prediction.

The experiment makes the distinction clear. The model can share information internally even though SHAP explains each result separately. The shared model performed nearly as well as the specialized models. For age, their R2 scores were 0.6206 and 0.6529; for MetSCORE, they were0.8123 and 0.8173. Here, R2 is a common measure of prediction quality, with values closer to 1 indicating a better fit. Accuracy for biological sex was 0.9485 for the shared model and 0.9498 for the specialized model.

The main practical gain was training time. The shared model took 89.37 seconds to train. Training the three specialized models took 249.44 seconds in total, so the shared approach reduced total training time by about 64%. Peak memory use was almost unchanged.


Figure 3: One shared nonlinear model predicts all three targets with a total training time of about 89 seconds, compared with roughly 249 seconds for three separately trained models.

The SHAP explanations tell a complementary story. On a scale where 1 means perfect agreement, the shared and specialized models obtained similarity scores of 0.9867 for age, 0.9949 for MetSCORE, and 0.9740 for sex. Their feature-ranking correlations were 0.9460, 0.9003, and 0.8639.
The most influential variables therefore remained highly consistent; most differences appeared among variables with smaller effects.

This agrees with the stability result, although the experiment illustrates rather than proves the theory. We estimated the SHAP values with DeepExplainer, while the mathematical result concerns exact Shapley values.


Figure 4: Agreement between multi-output and single-output explanations. The dominant feature importance patterns remain strongly aligned across all three prediction tasks.

References

[1] U. Biccari, A. Ibáñez de Opakua, J. M. Mato, O. Millet, R. Morales, and E. Zuazua, Fair Feature Attribution for Multi-Output Prediction: A Shapley-Based Perspective, arXiv:2602.22882, 2026. https://arxiv.org/abs/2602.22882
[2] L. S. Shapley, A Value for n-Person Games, in Contributions to the Theory of Games, Vol. II, H. W. Kuhn and A. W. Tucker, eds., Princeton University Press, 1953, pp. 307–317.
[3] S. M. Lundberg and S.-I. Lee, A Unified Approach to Interpreting Model Predictions, Advances in Neural Information Processing Systems 30, 2017.