SHAP Feature Attribution: Shapley Lattice & Convergence
Interactive 2D simulator of the Shapley-value engine behind SHAP: a Boolean coalition lattice heat-mapped by the model's value function, with a live Monte-Carlo path climbing it and a convergence chart showing each feature's running estimate settle on its exact game-theoretic attribution.
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 2D simulator makes the entire computation visible at once as a Boolean coalition lattice — all 32 subsets of a five-feature loan-approval model (with a real feature interaction) arranged by coalition size and heat-mapped by their value v(S) — with a bright animated path showing the current Monte-Carlo permutation climbing from the empty coalition to the full one. A companion convergence chart tracks each feature's running-average estimated attribution against the number of permutations sampled, settling onto the exact Shapley value (computed by brute-force enumeration of all 32 subsets) as dashed target lines. Adjust the instance, toggle the interaction term, and watch the additivity property hold: the estimated attributions always sum to the prediction minus the baseline.
Watch the Shapley-value engine behind SHAP explanations in 2D: the entire Boolean coalition lattice of a loan-approval model is heat-mapped by value, a Monte-Carlo permutation animates as a bright path climbing the lattice one feature at a time, and a live convergence chart shows each feature's running estimate settle onto its exact game-theoretic attribution.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install