nlp-shap¶
Multimodal explainability for NLP and multimodal models based on Shapley-style cooperative game theory. The library separates what you measure (estimands), how you sample coalitions (estimators), and how you score outputs (value functions).
Install nlp-shap and run your first Shapley vs Banzhaf comparison in
a few lines of Python.
Work with estimand aggregators, explain results, and run-archive manifests.
Shapley axioms, cooperative games, estimands, and when they diverge.
Business, compliance, and LLM operations use cases for attribution.
Typed public modules, protocols, and re-exported symbols.
Runnable Jupyter notebooks: estimand toy game, masking views, runtime core, and exact estimation.
Per-version changelog for published releases.
Quick install¶
pip install nlp-shap
Requires Python 3.12. See Getting started for a full walkthrough.