Thinxai
A CLI tool for explaining deep learning models. Provide it with a trained model + training dataset with target and it generates a PDF report telling what drives predictions and why.
Install
pip install thinxai
With extras:
pip install thinxai[tensorflow]
pip install thinxai[gpu]
pip install thinxai[all]
Quick Start
- Place your model file and CSV dataset in the same folder
- Run:
thinxai
Or:
python -m thinxai
- Select your model and dataset from the interactive menu
- Find the PDF report in the same folder
Supported Inputs
Deep Learning Models: PyTorch (.pth, .pt, .pkl), TensorFlow/Keras (.h5, .hdf5, .keras, SavedModel), Transformers (BERT, GPT, etc.), ONNX (.onnx)
Also Supported: Scikit-learn (.pkl, .joblib)
Data: CSV, tab-delimited, pipe-delimited
What It Does
Thinxai runs multiple explainability methods on your model and combines the results into a single ranked list. It then generates plain English explanations for the top features and packages everything into a PDF report.
Analysis Pipeline
- Permutation Importance: shuffles each feature and measures accuracy drop
- SHAP Values: game-theoretic attribution per prediction
- Integrated Gradients: gradient-based attribution along the input path
- Statistical Tests: mutual information and F-scores
- Built-in Importance: model native scores when available
These are merged into a consensus score. Features that rank highly across multiple methods get higher confidence.
Explanations
Top features are explained by a cascade LLM system:
- Groq API: Primary
- HuggingFace fallback: Secondary
- Rule-based fallback: Always works
Each explanation includes a business insight
PDF Report Contents
- Cover page with model validation metrics and trust indicator
- Feature importance distribution pie chart
- Each feature gets explanation cards with business insights
- Executive summary with the top 3 features
- Technical glossary automatically generated from terms found in the report
Trust Indicators
The tool flags suspicious results:
- Accuracy >99%: warns about possible data leakage
- Accuracy near random: warns model may not have learned patterns
- Raw state_dict models: skips validation, runs statistical analysis only
Requirements
- Python 3.8+
Metadata
Release files for Thinxai 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| thinxai-1.0.5.tar.gz | 72.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| thinxai-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 145.9 kB
Release files / thinxai-1.0.5.tar.gz
| Download URL | thinxai-1.0.5.tar.gz |
|---|---|
| Size | 72.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b43e59fb4af30c8aaf4282c9ce4e9d5c5fa44b446768d0093e6c40fcf381249c
|
|
BLAKE2b-256 checksum How to use checksums |
b21d55ebe815612d98eee652fc86dccd7bc204b61530a70685f79d9c6fcb4385
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|
Release files / thinxai-1.0.5-py3-none-any.whl
| Download URL | thinxai-1.0.5-py3-none-any.whl |
|---|---|
| Size | 73.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e6e2215c74071809db8a4e1dcd5c6c791f2c08d1c4cd10b9bc7813053ea600a
|
|
BLAKE2b-256 checksum How to use checksums |
f960903d1d81317254f697660f0846c84eca2c17e90a118a14dee0deb45a453a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|