Captum implements feature attribution, concept testing, and influence methods for PyTorch models, helping researchers explain predictions and debug neural networks.
Overview
Captum is Meta's interpretability library for PyTorch, named after the Latin word for comprehension. It ships algorithms such as Integrated Gradients, saliency and smoothgrad variants, TCAV, TracIn, Layer Conductance, and related tooling integrated with torchvision and torchtext models.
The documentation positions it for researchers benchmarking explanation methods and engineers troubleshooting production models or generating user-facing rationales for recommendations. Tutorials walk through baselines, attribution scores, convergence deltas, and neuron-level analysis APIs.
Installation supports pip releases or editable git installs with optional dev and tutorial dependency sets. Python 3.10+ and recent PyTorch releases are required.
Captum also documents adversarial perturbation utilities for counterfactual and robustness studies alongside attribution APIs.
Key features
- Integrated Gradients
- Saliency and SmoothGrad maps
- TCAV concept testing
- TracIn influence functions
- Layer and neuron conductance
- PyTorch model integrations
- Adversarial perturbation tools
- Tutorial notebook support
Use cases
- Explaining model predictions
- Debugging neural networks
- Feature importance studies
- Research algorithm benchmarks