HomeAI & Machine LearningSHAP Feature Attribution: Shapley Values by Coalition Sampling

SHAP Feature Attribution: Shapley Values by Coalition Sampling

Interactive 3D simulator of the Shapley-value engine behind SHAP: watch random feature orderings build up a prediction one coalition at a time, and see each feature's marginal-contribution average converge to its exact game-theoretic attribution.

AI & Machine Learning3DAdvanced60 FPS📱 Mobile-adapted⇄ 2D version
explainable-ai-shap-feature-attribution ↗ Open standalone

SHAP (SHapley Additive exPlanations) attributes a model's prediction to its input features using the Shapley value from cooperative game theory: the average marginal contribution of a feature across every possible order in which features are revealed. This simulator makes that process visible in 3D for a five-feature loan-approval model with a real feature interaction. Random permutations animate as a coalition being built one feature at a time — the front row of bars lights up as each feature joins and a gold ladder climbs the coalition's running value — while a back row of bars accumulates each feature's running-average marginal contribution, converging toward the exact Shapley value (computed by brute-force enumeration of all 32 subsets) as more permutations are sampled. Adjust the instance, toggle the interaction term, and watch the additivity property hold: the estimated attributions always sum to the prediction minus the baseline.

⚙ Under the hood

Watch the Shapley-value engine behind SHAP explanations in 3D: random feature orderings build up a loan-approval prediction one coalition at a time, and each feature's marginal-contribution average converges to its exact game-theoretic attribution.

explainable AISHAPShapley valuefeature attributiongame theoryinterpretability

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)