Skip to main content

XAI Embeddings

A Python package for explainable AI (XAI) embeddings analysis, using perturbation based explanation methods for transformer-based models. Explanations show how tokens influence position of each other.

Installation

pip install xaiembeddings

Requirements for POS-PFI

  • Spacy Model: path to spacy model e.g.: en_core_web_trf
  • Part-of-speech Dictionary: dictionary with list of words for permutations.

Available Explainers

  • AttentionExplainer: Uses attention weights to explain token importance
  • LOOExplainer: Leave-one-out analysis
  • POSPermutationExplainer: Part-of-speech based permutation analysis
  • SubsetExplainer: Subset-based explanation generation

Models

  • BERTModel: BERT bert-base-uncased with embedding extraction
  • Model: Abstract base class for custom model implementations

Examples:

Sample usage was provided in examples.ipynb

License

This project is licensed under the MIT License.

Metadata

Release files for xaiembeddings 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xaiembeddings 0.1.3
File Size Uploaded Provenance Actions
xaiembeddings-0.1.3.tar.gz 2.0 MB Without provenance Details for xaiembeddings-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xaiembeddings 0.1.3
File Interpreter ABI Platform Actions
xaiembeddings-0.1.3-py3-none-any.whl Python 3 none any Details for xaiembeddings-0.1.3-py3-none-any.whl

Total release size: 2.0 MB

Release files / xaiembeddings-0.1.3.tar.gz

Download URL xaiembeddings-0.1.3.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
94da35befea4c14e6753d12d2d36b234a78864cde000c8857918e5cedd984df6
BLAKE2b-256 checksum
How to use checksums
df455ada0c505a96fcd554988dfd19f576a35fd51ec26e0875bd5647fff4a0d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / xaiembeddings-0.1.3-py3-none-any.whl

Download URL xaiembeddings-0.1.3-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d036a1ccf06a8955c8518c8522afbc895cec16df46aecd12374a38721e317fa
BLAKE2b-256 checksum
How to use checksums
4f1785e39b4fa441c65ee4e8598b52f206470bf34a6f843a5206d84adc62d2df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for xaiembeddings 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page