Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Interpreto: Interpretability Toolkit for LLMs

Build status Version Python Version Downloads License: MIT

📚 Explore Interpreto docs >>
🖼️ Checkout our explanation gallery >> 📜 Read our paper >>

🚀 Quick Start

The library is available on PyPI, try pip install interpreto to install it.

Checkout the tutorials to get started:

📦 What's Included

Interpreto 🪄 provides a modular framework encompassing Attribution Methods, Concept-Based Methods, and Evaluation Metrics.

🔥 Attribution Methods

Interpreto includes both inference-based and gradient-based attribution methods.

They all work seamlessly for both classification (...ForSequenceClassification) and generation (...ForCausalLM)

Inference-based Methods:

Gradient-based methods:

💡 Concept-Based Methods or Mechanistic Interpretability

Concept-based explanations aim to provide high-level interpretations of latent model representations.

We propose both supervised (probes and CAVs) and unsupervised (dictionary learning) approaches.

Interpreto generalizes these methods through four core steps, the two first are common between both approaches:

  1. Split a model in two and obtain a dataset of activations
  2. Learn concepts (e.g., from latent embeddings)
  3. Interpret concepts (mapping discovered concepts to human-understandable elements)
  4. Estimate concepts importance (assessing concept relevance to model outputs)

1. Split a model in two and obtain a dataset of activations: (mainly via nnsight):

Use our nnsight-based splitters to extract activations: SplitterForClassification for classifiers or TextTokensSplitter for token-level and pooled representations from causal or encoder text models.

2. (supervised) Train probe with the ProbeExplainer

We differentiate two families of probes:

Both can be tuned with bias_calibrator and normalization parameters.

2. (unsupervised) Dictionary Learning for Concept Discovery (mainly via overcomplete):

3. (unsupervised) Available Concept Interpretation Techniques:

Concept Interpretation Techniques Added in the future:

4. (unsupervised) Concept-to-Output Attribution:

Estimate the contribution of each concept to the model output.

Can be obtained with any concept-based explainer via MethodConcepts.concept_output_gradient().

Papers available in the future:

Thanks to this generalization encompassing all concept-based methods and our highly flexible architecture, we can easily obtain a large number of concept-based methods:

📊 Evaluation Metrics

Evaluation Metrics for Attribution

To evaluate attribution methods faithfulness, there are the Insertion and Deletion metrics.

Evaluation Metrics for Concepts

Concept-based methods have several steps that can be evaluated together via ConSim.

Or independently:

👍 Contributing

Feel free to propose your ideas or come and contribute with us on the Interpreto 🪄 toolbox! We have a specific document where we describe in a simple way how to make your first pull request.

👀 See Also

More from the DEEL project:

  • Xplique a Python library dedicated to explaining neural networks (Images, Time Series, Tabular data) on TensorFlow.
  • Puncc a Python library for predictive uncertainty quantification using conformal prediction.
  • oodeel a Python library that performs post-hoc deep Out-of-Distribution (OOD) detection on already trained neural network image classifiers.
  • deel-lip a Python library for training k-Lipschitz neural networks on TensorFlow.
  • deel-torchlip a Python library for training k-Lipschitz neural networks on PyTorch.
  • Influenciae a Python library dedicated to computing influence values for the discovery of potentially problematic samples in a dataset.
  • DEEL White paper a summary of the DEEL team on the challenges of certifiable AI and the role of data quality, representativity and explainability for this purpose.

🙏 Acknowledgments

This project received funding from the French ”Investing for the Future – PIA3” program within the Artificial and Natural Intelligence Toulouse Institute (ANITI). The authors gratefully acknowledge the support of the DEEL and the FOR projects.

👨‍🎓 Creators

Interpreto 🪄 is a project of the FOR and the DEEL teams at the IRT Saint-Exupéry in Toulouse, France.

🗞️ Citation

If you use Interpreto 🪄 as part of your workflow in a scientific publication, please consider citing 🗞️ our paper:

@article{poche2025interpreto,
    title       = {Interpreto: An Explainability Library for Transformers},
    author      = {Poch{\'e}, Antonin and Mullor, Thomas and Sarti, Gabriele and Boisnard, Fr{\'e}d{\'e}ric and Friedrich, Corentin and Claye, Charlotte and Hoofd, Fran{\c{c}}ois and Bernas, Raphael and Hudelot, C{\'e}line and Jourdan, Fanny},
    journal     = {arXiv preprint arXiv:2512.09730},
    year        = {2025}
}

📝 License

The package is released under MIT license.

Metadata

Release files for interpreto 0.6.0.dev1

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

Source distribution (sdist)

Source distribution for interpreto 0.6.0.dev1
File Size Uploaded Provenance Actions
interpreto-0.6.0.dev1.tar.gz 215.9 kB With provenance Details for interpreto-0.6.0.dev1.tar.gz

Built distribution (wheel)

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

Total release size: 537.6 kB

Release files / interpreto-0.6.0.dev1.tar.gz

Download URL interpreto-0.6.0.dev1.tar.gz
Size 215.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c5a5d4ef95814a24d36d008987ab1c97dad1f1da94a1f7a30692312e41b298a8
BLAKE2b-256 checksum
How to use checksums
15b37a56276f4ce69cb74c84ff251c8b9fa8a3f82a9b908f127fa79dc53fb246
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / interpreto-0.6.0.dev1-py3-none-any.whl

Download URL interpreto-0.6.0.dev1-py3-none-any.whl
Size 321.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e17ba153ac3bf0a92907abeda9a742f108b7fd6dba6b2e4d22a4d6c027f2ae06
BLAKE2b-256 checksum
How to use checksums
dfef834db191c3221589daddea2bbef046cd70b44c5a78cdfca7221751dafd92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for interpreto 0.6.0.dev1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for interpreto-0.6.0.dev1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

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
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