captum.ai
verifiedFreeOpen-source PyTorch library for model interpretability, offering attribution algorithms across vision, text and other modalities.
What it does
Captum is an open-source model interpretability library for PyTorch, developed by Meta. It provides attribution algorithms such as Integrated Gradients to explain model predictions across modalities including vision and text, works with most PyTorch models with minimal changes, and is extensible for interpretability research.
How to use: Install Captum via conda or pip. Import necessary libraries like numpy, torch, and IntegratedGradients from captum.attr. Define and prepare your PyTorch model. Instantiate an interpretability algorithm (e.g., IntegratedGradients). Apply the algorithm to your input data and baseline to obtain attributions and convergence delta.
Core features
- ✦Attribution algorithms (e.g. Integrated Gradients)
- ✦Multi-modal interpretability (vision, text and more)
- ✦Built on and integrates with PyTorch
- ✦Extensible for new algorithms
- ✦Open source
- ✦Installable via conda or pip
Use cases
- →Explaining PyTorch model predictions
- →Feature attribution and model debugging
- →Interpretability research and benchmarking