Skip to main content

Multimodal explainability tool for NLP based on Shapley value.

Project description

📦 nlp-shap

Multimodal explainability for NLP and multimodal models based on Shapley-style cooperative game theory.

PyPI Python Documentation License

Installation

pip install nlp-shap

From source:

git clone https://github.com/Pawlo77/nlp-shap
cd nlp-shap
make install

Requires Python 3.12 and uv.

Documentation

Full documentation: pawlo77.github.io/nlp-shap

Examples

Runnable Jupyter notebooks in examples/:

Notebook What it demonstrates
estimands_toy_game.ipynb Shapley vs Banzhaf aggregators, coalition weights, labelled results, manifests, plugin entry points
masking_views.ipynb Token partitioning, absence policies, masked views, mask codec, mask space, plugin registry
runtime_core.ipynb Run archive, coalition dedup, hot LRU cache, async scheduler with bounded concurrency
exact_estimation.ipynb Exact coalition enumeration, estimand delegation, budget guard, plugin resolution

Setup and details: examples/README.md. Embedded walkthroughs: docs/examples.

Development

make install
make check

Run make help for other targets.

License

Apache License 2.0. See LICENSE.

Copyright 2026 Paweł Pozorski.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nlp_shap-0.1.5.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nlp_shap-0.1.5-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file nlp_shap-0.1.5.tar.gz.

File metadata

  • Download URL: nlp_shap-0.1.5.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nlp_shap-0.1.5.tar.gz
Algorithm Hash digest
SHA256 2d706d0d16f4d46f78fa32490400fefda98b2fd09e00f62cf3d71a5b79a22aea
MD5 6e65e7e810f2ec159e6d73e94c4f6fc5
BLAKE2b-256 ec1137c5c1f36240d07b94ef5472a95768c7a936895802cf2de394eef1fe5487

See more details on using hashes here.

File details

Details for the file nlp_shap-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: nlp_shap-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nlp_shap-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 55fe090999c08f8ca61ebbf0f850d25cfef0ab5e9d3d3b0419f5fde81cb9dead
MD5 51152a6c00930d4676651d0ac41568c0
BLAKE2b-256 d09bf7a223c9cd3c6074ee28864e2cc0e3a390c696e3e01d7ca432eadc21b647

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page