Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Captum (PyTorch) — model interpretability and feature attribution. Integrated Gradients, DeepLIFT, SmoothGrad, Occlusion, SHAP approximation, and Layer-wise Relevance Propagation. For vision and text models.
.claude/skills/mkurman-captum/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | -16% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 145% | 0% |
| case-22 | ✓→✓ | = Same ✓ | -2% | 0% |
| case-07 | ✓→✓ | = Same ✓ | 14% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -26% | 0% |
Captum (Comprehension in PyTorch) provides model interpretability for PyTorch models. Implements Integrated Gradients, Gradient SHAP, DeepLIFT, Occlusion, Feature Ablation, and Layer Conductance. Supports computer vision, NLP, and tabular models.
bashuv pip install captum
pythonimport torch import torch.nn as nn from captum.attr import IntegratedGradients model = nn.Linear(10, 2) input = torch.randn(1, 10) baseline = torch.zeros(1, 10) ig = IntegratedGradients(model) attrs = ig.attribute(input, baseline, target=0) print(f"Feature attributions: {attrs}")
pythonfrom captum.attr import Occlusion occ = Occlusion(model) attrs = occ.attribute(input, target=0, sliding_window_shapes=(1,)) # 1D print(attrs)
pythonfrom captum.attr import visualization as viz _ = viz.visualize_image_attr( attrs.squeeze().numpy(), original_image=input.squeeze().numpy(), method="heat_map", sign="absolute_value", show_colorbar=True, )
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | pass→pass | 11,942 | 10,605 | -11% | 1 | 1 | 0% | 2,389 | 2,335 | -2% | 0 | 0 | — |
case-07 | pass→pass | 4,234 | 2,268 | -46% | 1 | 1 | 0% | 593 | 678 | +14% | 0 | 0 | — |
case-01 | fail→fail | 11,081 | 7,116 | -36% | 1 | 1 | 0% | 2,143 | 1,839 | -14% | 0 | 0 | — |
case-02 | fail→fail | 12,907 | 7,331 | -43% | 1 | 1 | 0% | 2,513 | 1,836 | -27% | 0 | 0 | — |
case-03 | pass→pass | 9,002 | 5,251 | -42% | 1 | 1 | 0% | 1,829 | 1,349 | -26% | 0 | 0 | — |
case-04 | pass→pass | 2,733 | 1,711 | -37% | 1 | 1 | 0% | 423 | 595 | +41% | 0 | 0 | — |
case-05 | pass→pass | 3,438 | 1,932 | -44% | 1 | 1 | 0% | 573 | 512 | -11% | 0 | 0 | — |
case-06 | pass→pass | 5,939 | 2,025 | -66% | 1 | 1 | 0% | 1,047 | 641 | -39% | 0 | 0 | — |
case-08 | fail→pass | 9,720 | 6,467 | -33% | 1 | 1 | 0% | 1,819 | 1,532 | -16% | 0 | 0 | — |
case-09 | pass→pass | 3,803 | 3,116 | -18% | 1 | 1 | 0% | 704 | 876 | +24% | 0 | 0 | — |
case-10 | pass→pass | 10,267 | 6,076 | -41% | 1 | 1 | 0% | 1,948 | 1,496 | -23% | 0 | 0 | — |
case-11 | fail→fail | 3,970 | 2,410 | -39% | 1 | 1 | 0% | 607 | 722 | +19% | 0 | 0 | — |
case-12 | pass→pass | 9,514 | 5,286 | -44% | 1 | 1 | 0% | 1,697 | 1,231 | -27% | 0 | 0 | — |
case-13 | pass→pass | 4,117 | 2,422 | -41% | 1 | 1 | 0% | 778 | 734 | -6% | 0 | 0 | — |
case-14 | pass→pass | 6,934 | 1,715 | -75% | 1 | 1 | 0% | 1,204 | 593 | -51% | 0 | 0 | — |
case-15 | pass→pass | 4,496 | 3,060 | -32% | 1 | 1 | 0% | 744 | 892 | +20% | 0 | 0 | — |
case-20 | pass→pass | 7,865 | 5,574 | -29% | 1 | 1 | 0% | 1,424 | 1,398 | -2% | 0 | 0 | — |
case-16 | fail→fail | 3,876 | 4,395 | +13% | 1 | 1 | 0% | 690 | 1,148 | +66% | 0 | 0 | — |
case-17 | pass→pass | 7,548 | 4,816 | -36% | 1 | 1 | 0% | 1,422 | 1,235 | -13% | 0 | 0 | — |
case-18 | pass→pass | 7,538 | 1,797 | -76% | 1 | 1 | 0% | 1,174 | 569 | -52% | 0 | 0 | — |
case-19 | fail→pass | 1,804 | 1,630 | -10% | 1 | 1 | 0% | 210 | 514 | +145% | 0 | 0 | — |
case-21 | pass→pass | 10,404 | 8,732 | -16% | 1 | 1 | 0% | 2,086 | 2,197 | +5% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.