Captum logo

Captum

Freemium
Visit

An open source PyTorch library for developers and researchers interpreting model outputs.

What is Captum?

Captum is an open source, extensible library for model interpretability built on PyTorch. It helps developers and researchers examine which input features contribute to a model’s output and investigate how internal layers and neurons affect predictions.

The library supports most types of PyTorch models with minimal modification to the original network. Its algorithms and tutorials cover vision, text, tabular data, and multimodal models, providing a practical foundation for troubleshooting predictions and researching interpretability methods.

What can Captum do?

Input attribution algorithms

Apply Integrated Gradients, DeepLIFT, GradientShap, Occlusion, LRP, or LIME to examine how input features contribute to a selected model output.

Layer and neuron analysis

Use conductance and internal attribution methods to investigate layer and neuron importance, including the input features associated with a particular neuron.

LLM and multimodal attribution

Interpret text generation with LLM attribution functionality. For multimodal LLMs, combine ImageMaskInput, image segmentation, and FeatureAblation to examine image regions contributing to generated text.

Concept and robustness analysis

Explore concepts with Testing with Concept Activation Vectors (TCAV). Tutorials also demonstrate FGSM and PGD attacks and robustness metrics alongside attribution algorithms.

Extensible research workflows

Implement new interpretability algorithms and benchmark them against methods available in the library. Tutorials demonstrate distributed attribution using torch.distributed and DataParallel.

Use Cases

“Troubleshoot classification predictions”

Inspect influential words in sentiment predictions or image regions in vision models to investigate unexpected outputs.

“Analyze tabular regression models”

Evaluate feature importance and internal attribution in a house price regression network to understand how the network uses its inputs.

“Explain recommendation behavior”

Examine sparse and dense feature contributions in Deep Learning Recommender Models, including feature interactions involved in clicked and non-clicked ad predictions.

“Investigate question answering models”

Study BERT embeddings, attention layers, and token interactions to understand a particular answer prediction.

Frequently Asked Questions

How do I install Captum?

Install with `conda install captum -c pytorch`, the website’s recommended method, or use `pip install captum`.

What knowledge do I need to get started?

The tutorials assume familiarity with PyTorch and its basic features. The introductory Captum tutorial trains a neural network on Titanic survival data, then examines input, layer, and neuron importance.

What does an Integrated Gradients workflow return?

The homepage example passes input and baseline tensors to an IntegratedGradients instance, selects a target output, and returns attribution scores. With return_convergence_delta=True, it also returns a convergence delta.

Quick Facts

Product type
Open source model interpretability library
Framework
PyTorch
Primary users
Model developers, interpretability researchers, and application engineers
Website
https://captum.ai

Captum Traffic Analysis

Traffic data is for reference only.

Monthly Visits
11.6K
Global Rank
#1,891,534
User Bounce Rate
36.5%
Avg. Visit Duration
01:17
Pages per Visit
2.30
Domain Rating
64

Traffic Trends

Traffic Sources

Traffic analytics are not available yet.

Top Regions

Captum Alternatives

Clips AI logo

Clips AI

clipsai.com

An open-source Python library that helps developers turn longform video into clips and reframed formats.

Harness Manager logo

Harness Manager

harnessmanager.devmesh.xyz

Harness Manager is a free, open-source native Mac workspace for managing AI coding tools, MCP servers, skills, updates, and model comparisons. It helps developers inspect their local setup, discover additions, review updates, and compare models in one app.

Payload logo

Payload

payloadcms.com

An open-source, TypeScript-based Next.js CMS and application framework for developers and content teams.

Weave Router logo

Weave Router

weaveos.com

Weave Router is an intelligent model router for coding agents. It evaluates coding tasks and routes requests across open and closed models, helping developers keep existing agent workflows while managing speed, quality, and model spend.

APIPark logo

APIPark

apipark.com

APIPark is an open-source API portal and AI gateway for managing production APIs and LLMs with multi-model access, traffic control, and observability.

Cortex Docs logo

Cortex Docs

cortexdocs.dev

Cortex Docs is an open-source API tooling workflow that turns API specifications and Markdown into interactive documentation, typed SDKs, and MCP servers. It helps developers publish API interfaces for human users, applications, and AI agents from a shared project.