# meta-pytorch/captum

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/meta-pytorch-captum).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

5,720 stars · 574 forks · Python · BSD-3-Clause

## Links

- GitHub: https://github.com/meta-pytorch/captum
- Homepage: https://captum.ai
- awesome-repositories: https://awesome-repositories.com/repository/meta-pytorch-captum.md

## Topics

`feature-attribution` `feature-importance` `interpretability` `interpretable-ai` `interpretable-ml`

## Description

Captum is a model interpretability library for PyTorch that explains why neural networks make the predictions they do. It provides a unified set of attribution and explanation algorithms covering input features, internal layers, individual neurons, and human-understandable concepts, and it also serves as a research framework for building and comparing new interpretability methods.

Feature attribution is the central capability: gradient-based and perturbation-based methods such as Integrated Gradients and DeepLift score how strongly each input feature pushed a prediction up or down, often relative to a baseline input. The same approach extends to layers and neurons to show which parts of a network matter most. Concept-based explanation uses concept vectors to test how higher-level concepts contribute to predictions. A separate training data influence area uses influence functions and similarity comparisons to identify which training examples most shaped a model's behavior on test inputs.

Around these core methods, the library reports a convergence delta so users can judge attribution approximation error, and it can average results over noise-perturbed inputs to produce cleaner attribution maps. Evaluation metrics for infidelity and sensitivity allow different algorithms to be compared on shared models. Visualization tools render attribution scores as plots, and counterfactual and adversarial perturbation tools show how small input edits change a model's output.

## Tags

### Artificial Intelligence & ML

- [Model Interpretability](https://awesome-repositories.com/f/artificial-intelligence-ml/model-interpretability.md) — Offers a unified set of interpretability methods that help researchers understand and attribute the outputs of PyTorch neural networks. ([source](https://github.com/meta-pytorch/captum/blob/master/CITATION))
- [PyTorch Libraries](https://awesome-repositories.com/f/artificial-intelligence-ml/model-interpretability/pytorch-libraries.md) — Provides a PyTorch-native library of attribution and explanation algorithms that reveal why neural networks make their predictions, across input features, layers, neurons and concepts.
- [Feature Attribution Methods](https://awesome-repositories.com/f/artificial-intelligence-ml/feature-attribution-methods.md) — Scores each input feature's push on a prediction using gradient and perturbation methods, often relative to a baseline input. ([source](https://github.com/meta-pytorch/captum#readme))
- [Input Feature Attributions](https://awesome-repositories.com/f/artificial-intelligence-ml/feature-contribution-analysis/layer-contribution-attribution-methods/input-feature-attributions.md) — Collects gradient-based and perturbation-based methods such as Integrated Gradients and DeepLift that score each input feature's effect on a model's output.
- [Model Explainability](https://awesome-repositories.com/f/artificial-intelligence-ml/model-explainability.md) — Explains neural network outputs by attributing them to the input features and internal neurons that influenced them. ([source](https://github.com/meta-pytorch/captum/blob/master/pyproject.toml))
- [Neural Network Explainability Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-network-explainability-frameworks.md) — Provides a research framework for comparing interpretability algorithms on shared models, with metrics for attribution accuracy, infidelity and sensitivity.
- [Attribution Algorithm Benchmarks](https://awesome-repositories.com/f/artificial-intelligence-ml/algorithm-benchmarking-libraries/attribution-algorithm-benchmarks.md) — Lets researchers implement new attribution methods and benchmark them against a shared library of existing algorithms on the same models. ([source](https://github.com/meta-pytorch/captum/blob/master/README.md))
- [Concept-Based Explanations](https://awesome-repositories.com/f/artificial-intelligence-ml/concept-based-explanations.md) — Uses concept vectors to test how higher-level, human-understandable concepts contribute to a model's predictions. ([source](https://github.com/meta-pytorch/captum#readme))
- [Neuron Importance Attribution](https://awesome-repositories.com/f/artificial-intelligence-ml/feature-importance-attribution/neuron-importance-attribution.md) — Measures how much individual neurons and internal layers contribute to a prediction using gradient, activation and conductance-based attribution methods. ([source](https://github.com/meta-pytorch/captum/blob/master/README.md))
- [Training Data Influence Analysis](https://awesome-repositories.com/f/artificial-intelligence-ml/model-interpretability/interpretable-model-training/training-data-influence-analysis.md) — Traces which training examples most shaped a model's predictions on test inputs using influence functions and similarity comparisons between training and test samples.
- [Explanation Fidelity Evaluation](https://awesome-repositories.com/f/artificial-intelligence-ml/perturbation-based-sampling/explanation-fidelity-evaluation.md) — Provides infidelity and sensitivity metrics for scoring how faithful and stable attribution explanations are across algorithms. ([source](https://github.com/meta-pytorch/captum#readme))
