$npx skillfedfor your agent

captum

Model Interpretability for PyTorch

Worth itPyPI Scientific/EngineeringReleased Apr 2026548.3K downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — captum-0.9.0-py3-none-any.whl
v0.9.0 · released 2026-04-17 · Python >=3.10 · 5 runtime deps: matplotlib, numpy, packaging, torch, tqdm

Yes. Captum is a production-stable, actively maintained library from PyTorch with no known vulnerabilities, low install friction, and permissive licensing. It is the standard choice for PyTorch model interpretability and is worth installing if you need to understand or explain neural network predictions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires PyTorch >= 2.3 and Python >= 3.10.
  • Low install friction with a pure-Python wheel.
  • Active maintenance with recent releases; last commit 2026-08-14.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows commercial and private use with attribution and liability disclaimers.

last release 2026-04-17 (119 days) · last repo commit 2026-08-14 · 5,685 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 548,326 downloads/mo, #6,064 on PyPI

Verify before relying

pip install captum

import torch
from captum.attr import IntegratedGradients

model = torch.nn.Linear(3, 2)
ig = IntegratedGradients(model)
input_tensor = torch.rand(1, 3)
baseline = torch.zeros(1, 3)
attributions = ig.attribute(input_tensor, baseline, target=0)
  • Whether all interpretability algorithms scale efficiently to very large models or datasets.
  • Specific performance characteristics or computational overhead compared to alternative attribution methods.
  • Compatibility with non-standard PyTorch model architectures or custom layers.
Same gist for agents: .md · .json

What it is and what it does

Captum is a PyTorch library for understanding and interpreting neural network predictions by computing attribution scores that show which input features, neurons, or training examples contribute most to a model's output. It implements state-of-the-art interpretability algorithms including Integrated Gradients, DeepLift, TCAV, and TracIn influence functions, along with adversarial perturbation capabilities for generating counterfactual explanations.

The library is designed for model developers who need to debug and improve their models, interpretability researchers benchmarking new algorithms, and production engineers troubleshooting model behavior. It integrates with domain-specific PyTorch libraries like torchvision and torchtext, and provides convergence metrics to assess approximation quality for gradient-based attribution methods.

Use it for

  • Debug unexpected model predictions by identifying which input features most influenced the output.
  • Validate that a model learned meaningful patterns rather than spurious correlations in training data.
  • Generate explanations for end users on why a model made a specific recommendation or classification decision.
  • Benchmark new interpretability algorithms against established methods in the Captum library.
  • Identify important neurons and layers within a network to guide model compression or architecture redesign.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Captum is a production-stable, actively maintained library from PyTorch with no known vulnerabilities, low install friction, and permissive licensing. It is the standard choice for PyTorch model interpretability and is worth installing if you need to understand or explain neural network predictions.

Install

captum on PyPI

Before you install

Low install friction with a pure-Python wheel. Active maintenance with recent releases; last commit 2026-08-14. Requires PyTorch >= 2.3 and Python >= 3.10, which are standard modern versions.

Requires PyTorch >= 2.3 and Python >= 3.10.

License in practice

BSD-3-Clause permissive license allows commercial and private use with attribution and liability disclaimers.

Quickstart

pip install captum

import torch
from captum.attr import IntegratedGradients

model = torch.nn.Linear(3, 2)
ig = IntegratedGradients(model)
input_tensor = torch.rand(1, 3)
baseline = torch.zeros(1, 3)
attributions = ig.attribute(input_tensor, baseline, target=0)

Verify before relying

  • Whether all interpretability algorithms scale efficiently to very large models or datasets.
  • Specific performance characteristics or computational overhead compared to alternative attribution methods.
  • Compatibility with non-standard PyTorch model architectures or custom layers.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
matplotlibnumpypackagingtorchtqdm
MaintenanceActively maintained 119 days since the last release
Last repo commit
First released
Downloads548,326 / month, #6,064 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchProgramming Language :: Python :: 3 :: OnlyTopic :: Scientific/Engineering

Evidence: captum-0.9.0-py3-none-any.whl

Tags

Capabilities
pytorch model interpretabilityfeature attribution neural networksintegrated gradients pytorchexplainable ai pytorchmodel explanation algorithmssaliency maps pytorchneural network feature importance
Topics
model-explainabilitypytorch-ecosysteminterpretability
PyPI keywords
Model InterpretabilityModel UnderstandingFeature ImportanceNeuron ImportanceData AttributionExplainable AIPyTorch

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pytorch model interpretability”

  • captumCaptum provides model interpretability algorithms for PyTorch,…
  • sae-lensSAE Lens trains and analyzes sparse autoencoders for mechanistic…
  • neuralprophetNeuralProphet is a PyTorch-based framework for interpretable time…

Give your agent the search over MCP, or paste the wish link into any chat.

More Scientific/Engineering packages

numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
pandas Worth it
PyPI · Scientific/Engineering · released Jul 2026

pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.

BSD-3-Clausecompiled wheel · 3.11+
769.1Mdownloads / mo
scipy Worth it
PyPI · Libraries · released Jun 2026

scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.

BSD-3-Clausecompiled wheel · 3.12+
449.0Mdownloads / mo
scikit-learn Worth it
PyPI · Software Development · released Jun 2026

scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.

Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.

BSD-3-Clausecompiled wheel · 3.11+
235.5Mdownloads / mo
dill Worth it
PyPI · Software Development · released Jan 2026

dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.

BSD-3-Clausepure Python · 3.9+
208.1Mdownloads / mo
multiprocess Worth it
PyPI · Software Development · released Jan 2026

Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.

Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.

BSD-3-Clausepure Python · 3.9+
202.7Mdownloads / mo

See also sae-lens · entmax · interpret-core · interpret · shap · lime · torch · pytorch_revgrad · pytorch-forecasting · stable-baselines3