causal Responsibility-based eXplanations of black-box-classifiers
Project description
ReX: Causal Responsibility EXplanations for image classifiers
ReX is a causal explainability tool for image classifiers. It also works on tabular and 3D data.
Given an input image and a classifier, ReX calculates a causal responsibility map across the data and identifies a minimal, sufficient, explanation.
ReX is black-box, that is, agnostic to the internal structure of the classifier. ReX finds single explanations, non-contiguous explanations (for partially obscured images), multiple independent explanations, contrastive explanations and lots of other things! It has a host of options and parameters, allowing you to fine tune it to your data.
For background information and detailed usage instructions, see our documentation.
Installation
ReX can be installed using pip.
We recommend creating a virtual environment to install ReX.
ReX has been tested using versions of Python >= 3.10.
The following instructions assume conda:
conda create -n rex python=3.13
conda activate rex
pip install rex_xai
This should install an executable rex in your path.
To check that ReX is installed correctly, run:
ReX --help
To build from source, clone the repository and run:
git clone git@github.com:ReX-XAI/ReX.git
cd ReX
conda create -n rex python=3.13
conda activate rex
pip install .
Note:
By default,
onnxruntimewill be installed. If you wish to use a GPU, you should uninstallonnxruntimeand installonnxruntime-gpuinstead. You can alternatively clone the project and edit thepyproject.tomlto read "onnxruntime-gpu >= 1.17.0" rather than "onnxruntime >= 1.17.0".
If you want to use ReX with 3D data, you will need to install some optional extra dependencies:
pip install 'rex_xai[3D]'
Feedback
Bug reports, questions, and suggestions for enhancements are welcome - please check the GitHub Issues to see if there is already a relevant issue, or open a new one!
How to Contribute
Your contributions are highly valued and welcomed. To get started, please review the guidelines outlined in the CONTRIBUTING.md file. We look forward to your participation!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rex_xai-0.4.0.tar.gz.
File metadata
- Download URL: rex_xai-0.4.0.tar.gz
- Upload date:
- Size: 50.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0a272c606ca979a0ddf8e075901c9b0f62e3f1746c017c5ea7dcc943b75c481
|
|
| MD5 |
ac968914f5df5e0e60b3c05c3a34dd78
|
|
| BLAKE2b-256 |
93913fb1f08d317be111f23e47e1a5e6901c1b970ec563a291d78417faec2fd0
|
Provenance
The following attestation bundles were made for rex_xai-0.4.0.tar.gz:
Publisher:
publish.yml on ReX-XAI/ReX
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rex_xai-0.4.0.tar.gz -
Subject digest:
f0a272c606ca979a0ddf8e075901c9b0f62e3f1746c017c5ea7dcc943b75c481 - Sigstore transparency entry: 261940720
- Sigstore integration time:
-
Permalink:
ReX-XAI/ReX@7d90093797a4a0f9d723d3644068308bc8cd9044 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/ReX-XAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7d90093797a4a0f9d723d3644068308bc8cd9044 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rex_xai-0.4.0-py3-none-any.whl.
File metadata
- Download URL: rex_xai-0.4.0-py3-none-any.whl
- Upload date:
- Size: 59.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f951ae9e41ddca550d072f2271f0a5e6d5de71c70bc53b2e2d49fd6f2f42d82f
|
|
| MD5 |
8dae0981eb32ec35b10a70fa1f1868a5
|
|
| BLAKE2b-256 |
73969fadfd830b46d91a280065e92738cd676f3052cb38cb0955999b12177a91
|
Provenance
The following attestation bundles were made for rex_xai-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on ReX-XAI/ReX
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rex_xai-0.4.0-py3-none-any.whl -
Subject digest:
f951ae9e41ddca550d072f2271f0a5e6d5de71c70bc53b2e2d49fd6f2f42d82f - Sigstore transparency entry: 261940729
- Sigstore integration time:
-
Permalink:
ReX-XAI/ReX@7d90093797a4a0f9d723d3644068308bc8cd9044 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/ReX-XAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7d90093797a4a0f9d723d3644068308bc8cd9044 -
Trigger Event:
release
-
Statement type: