interpret-text  by interpretml

SDK for explaining text-based ML models with a visualization dashboard

created 5 years ago
426 stars

Top 70.5% on sourcepulse

GitHubView on GitHub
Project Summary

Interpret-Text is an open-source Python library designed to provide state-of-the-art explainability techniques for text-based machine learning models. It offers a unified API across various explainers and an interactive dashboard for visualizing results, targeting data scientists, developers, and researchers seeking to understand, audit, and deploy transparent NLP models.

How It Works

Interpret-Text integrates multiple community-developed interpretability methods, offering a common API for comparative analysis. It supports both classical ML models (via bag-of-words and logistic regression defaults) and deep learning models like BERT and RNNs. The library handles text preprocessing and provides explainers that can operate globally or locally, with a focus on generating rationales and understanding feature importance for text classification and generative tasks.

Quick Start & Requirements

  • Installation: Clone the repository, set up a Conda environment (CPU or GPU), and install from source (pip install -e . in python/) or PyPI (pip install interpret-text).
  • Prerequisites: Python >= 3.7, Anaconda. GPU support requires CUDA.
  • Usage: Run Jupyter Notebooks for examples. See official docs for detailed setup and usage.

Highlighted Details

  • Supports a range of explainers including Classical Text Explainer, Unified Information Explainer, Introspective Rationale Explainer, Likelihood Explainer, Sentence Embedder Explainer, and Hierarchical Explainer.
  • Offers an interactive visualization dashboard for local feature importance analysis.
  • Designed for extensibility, allowing researchers to add new interpretability techniques.
  • Supports text classification and generative text scenarios.

Maintenance & Community

The project is part of the interpretml initiative. Contributions are welcome via pull requests, requiring agreement with the GitHub Developer Certificate of Origin. Security issues should be reported to Microsoft Security Response Center (MSRC).

Licensing & Compatibility

The repository does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The library is currently in an "Alpha Release" state. The README indicates that some explainers have specific model requirements (e.g., UnifiedInformationExplainer only supports BERT, Likelihood Explainer requires models providing log probabilities).

Health Check
Last commit

1 year ago

Responsiveness

1+ week

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
1 more.

lit by PAIR-code

0.0%
4k
Interactive ML model analysis tool for understanding model behavior
created 5 years ago
updated 5 days ago
Feedback? Help us improve.