Model interpretability and understanding for PyTorch
This report summarizes scanner evidence for meta-pytorch/captum, a Python project with 5,713 GitHub stars. SynthScan examined 78,124 lines of code across 289 source files, recording 1288 pattern matches distributed across 20 syntactic categories. The legacy adjusted pattern signal is 22.3 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 1036 finding(s).
Are imports declared and package/API names verified? 189 finding(s).
Are wrappers, guards, and repeated structures necessary? 967 finding(s).
Which changes need focused human review? 1288 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1288 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_tutorial_regressions.py | 23 | def test_titanic_tutorial_models_return_logits_for_cross_entropy_loss() -> None: | CODE |
| LOW | tests/test_insights_retired.py | 19 | def test_import_insights_module(self) -> None: | CODE |
| LOW | tests/test_insights_retired.py | 24 | def test_attribution_visualizer_raises(self) -> None: | CODE |
| LOW | tests/test_insights_retired.py | 44 | def test_error_message_includes_migration_guidance(self) -> None: | CODE |
| LOW | tests/metrics/test_sensitivity.py | 72 | def test_basic_sensitivity_max_single(self) -> None: | CODE |
| LOW | tests/metrics/test_sensitivity.py | 85 | def test_basic_sensitivity_max_multiple(self) -> None: | CODE |
| LOW | tests/metrics/test_sensitivity.py | 98 | def test_basic_sensitivity_max_multiple_gradshap(self) -> None: | CODE |
| LOW | tests/metrics/test_sensitivity.py | 124 | def test_convnet_multi_target(self) -> None: | CODE |
| LOW | tests/metrics/test_sensitivity.py | 143 | def test_convnet_multi_target_and_default_pert_func(self) -> None: | STRING |
| LOW | tests/metrics/test_sensitivity.py | 174 | def test_sensitivity_max_multi_dim(self) -> None: | STRING |
| LOW | tests/metrics/test_sensitivity.py | 194 | def test_sensitivity_max_multi_dim_batching(self) -> None: | STRING |
| LOW | tests/metrics/test_sensitivity.py | 226 | def test_sensitivity_additional_forward_args_multi_args(self) -> None: | STRING |
| LOW | tests/metrics/test_sensitivity.py | 256 | def test_classification_sensitivity_tpl_target_w_baseline(self) -> None: | STRING |
| LOW | tests/metrics/test_sensitivity.py | 287 | def test_sensitivity_max_with_feature_mask(self) -> None: | STRING |
| LOW | tests/metrics/test_infidelity.py | 36 | def _local_perturb_func_default( | CODE |
| LOW | tests/metrics/test_infidelity.py | 121 | def test_basic_infidelity_single(self) -> None: | CODE |
| LOW | tests/metrics/test_infidelity.py | 129 | def test_basic_infidelity_multiple(self) -> None: | CODE |
| LOW | tests/metrics/test_infidelity.py | 145 | def test_basic_infidelity_multiple_with_batching(self) -> None: | CODE |
| LOW | tests/metrics/test_infidelity.py | 210 | def test_classification_infidelity_convnet_multi_targets(self) -> None: | CODE |
| LOW | tests/metrics/test_infidelity.py | 228 | def test_classification_infidelity_tpl_target(self) -> None: | CODE |
| LOW | tests/metrics/test_infidelity.py | 261 | def test_classification_infidelity_tpl_target_w_baseline(self) -> None: | CODE |
| LOW | tests/metrics/test_infidelity.py | 313 | def test_basic_infidelity_multiple_with_normalize(self) -> None: | CODE |
| LOW | tests/metrics/test_infidelity.py | 346 | def basic_multilayer_sensitivity_n( | CODE |
| LOW | tests/metrics/test_infidelity.py | 455 | def basic_model_global_assert( | CODE |
| LOW | tests/robust/test_attack_comparator.py | 74 | def test_attack_comparator_basic(self) -> None: | CODE |
| LOW | tests/robust/test_attack_comparator.py | 125 | def test_attack_comparator_with_preproc(self) -> None: | CODE |
| LOW | tests/robust/test_attack_comparator.py | 165 | def test_attack_comparator_with_additional_args(self) -> None: | CODE |
| LOW | tests/robust/test_FGSM.py | 91 | def test_attack_label_listtuple(self) -> None: | CODE |
| LOW | tests/robust/test_FGSM.py | 105 | def test_attack_additional_inputs(self) -> None: | CODE |
| LOW | tests/robust/test_FGSM.py | 144 | def test_attack_masked_tensor(self) -> None: | CODE |
| LOW | tests/robust/test_FGSM.py | 152 | def test_attack_masked_multiinput(self) -> None: | CODE |
| LOW | tests/robust/test_FGSM.py | 167 | def test_attack_masked_loss_defined(self) -> None: | CODE |
| LOW | tests/robust/test_min_param_perturbation.py | 51 | def test_minimal_pert_basic_linear(self) -> None: | CODE |
| LOW | tests/robust/test_min_param_perturbation.py | 71 | def test_minimal_pert_basic_binary(self) -> None: | CODE |
| LOW | tests/robust/test_min_param_perturbation.py | 95 | def test_minimal_pert_preproc(self) -> None: | CODE |
| LOW | tests/robust/test_min_param_perturbation.py | 114 | def test_minimal_pert_alt_correct(self) -> None: | CODE |
| LOW | tests/robust/test_min_param_perturbation.py | 150 | def test_minimal_pert_additional_forward_args(self) -> None: | CODE |
| LOW | tests/robust/test_min_param_perturbation.py | 190 | def test_minimal_pert_tuple_test(self) -> None: | CODE |
| LOW | tests/robust/test_PGD.py | 125 | def test_attack_masked_nontargeted(self) -> None: | CODE |
| LOW | tests/robust/test_PGD.py | 139 | def test_attack_masked_targeted(self) -> None: | CODE |
| LOW | tests/robust/test_PGD.py | 153 | def test_attack_masked_multiinput(self) -> None: | CODE |
| LOW | tests/robust/test_PGD.py | 173 | def test_attack_masked_random_start(self) -> None: | CODE |
| LOW | tests/robust/test_PGD.py | 210 | def test_attack_masked_loss_defined(self) -> None: | CODE |
| LOW | tests/influence/_utils/test_common.py | 21 | def test_jacobian_loss_wrt_inputs(self) -> None: | CODE |
| LOW | tests/influence/_core/test_tracin_k_most_influential.py | 90 | def test_tracin_k_most_influential( | CODE |
| LOW | …sts/influence/_core/test_tracin_aggregate_influence.py | 41 | def test_tracin_aggregate_influence( | CODE |
| LOW | …sts/influence/_core/test_tracin_aggregate_influence.py | 102 | def test_tracin_aggregate_influence_api( | CODE |
| LOW | tests/influence/_core/test_tracin_self_influence.py | 162 | def test_tracin_self_influence( | CODE |
| LOW | tests/influence/_core/test_tracin_self_influence.py | 251 | def test_tracin_self_influence_dataloader_vs_single_batch( | CODE |
| LOW | tests/influence/_core/test_tracin_validation.py | 43 | def test_tracin_require_inputs_dataset( | CODE |
| LOW | tests/influence/_core/test_tracin_validation.py | 73 | def test_tracincp_fast_rand_proj_inputs(self) -> None: | CODE |
| LOW | tests/influence/_core/test_tracin_validation.py | 103 | def test_tracincp_input_checkpoints( | CODE |
| LOW | tests/influence/_core/test_tracin_regression.py | 38 | def _test_tracin_regression_setup( | CODE |
| LOW | tests/influence/_core/test_tracin_regression.py | 342 | def _test_tracin_identity_regression_setup( | STRING |
| LOW | tests/influence/_core/test_tracin_regression.py | 388 | def test_tracin_identity_regression( | STRING |
| LOW | tests/influence/_core/test_tracin_regression.py | 499 | def test_tracin_constant_test_loss_fn( | STRING |
| LOW | tests/influence/_core/test_tracin_show_progress.py | 39 | def _check_error_msg_multiplicity( | CODE |
| LOW | tests/influence/_core/test_tracin_show_progress.py | 111 | def test_tracin_show_progress( | CODE |
| LOW | …influence/_core/test_tracin_intermediate_quantities.py | 45 | def test_tracin_intermediate_quantities_aggregate( | CODE |
| LOW | …influence/_core/test_tracin_intermediate_quantities.py | 106 | def test_tracin_intermediate_quantities_api( | CODE |
| 809 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | captum/metrics/_core/infidelity.py | 72 | Args: perturb_func(Callable): Input perturbation function that takes inputs and op | STRING |
| HIGH | captum/metrics/_core/infidelity.py | 161 | Explanation infidelity represents the expected mean-squared error between the explanation multiplied by a meani | STRING |
| HIGH | captum/metrics/_core/sensitivity.py | 80 | Explanation sensitivity measures the extent of explanation change when the input is slightly perturbed. It has | STRING |
| HIGH | captum/robust/_core/metrics/attack_comparator.py | 270 | Evaluate model and attack performance on provided inputs Args: inputs (Any): Input for wh | STRING |
| HIGH | captum/robust/_core/metrics/min_param_perturbation.py | 385 | This method evaluates the model at each perturbed input and identifies the minimum perturbation that le | STRING |
| HIGH | captum/attr/_utils/visualization.py | 447 | Visualizes attribution for a given image by normalizing attribution values of the desired sign (positive, negat | STRING |
| HIGH | captum/attr/_utils/visualization.py | 667 | Visualizes attribution using multiple visualization methods displayed in a 1 x k grid, where k is the number of | STRING |
| HIGH | captum/attr/_utils/visualization.py | 913 | Visualizes attribution for a given timeseries data by normalizing attribution values of the desired sign (posit | STRING |
| HIGH | captum/attr/_core/feature_ablation.py | 387 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which ablation attri | STRING |
| HIGH | captum/attr/_core/feature_permutation.py | 162 | This function is almost equivalent to :func:`FeatureAblation.attribute <captum.attr.FeatureAblation.att | STRING |
| HIGH | captum/attr/_core/occlusion.py | 70 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which occlusion | STRING |
| HIGH | captum/attr/_core/gradient_shap.py | 135 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which SHAP attribution | STRING |
| HIGH | captum/attr/_core/lime.py | 258 | This method attributes the output of the model with given target index (in case it is provided, otherwi | STRING |
| HIGH | captum/attr/_core/lime.py | 945 | This method attributes the output of the model with given target index (in case it is provided, otherwi | STRING |
| HIGH | captum/attr/_core/noise_tunnel.py | 103 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which integrated gr | STRING |
| HIGH | captum/attr/_core/guided_backprop_deconvnet.py | 156 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | captum/attr/_core/guided_backprop_deconvnet.py | 265 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | captum/attr/_core/lrp.py | 110 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which relevance is | STRING |
| HIGH | captum/attr/_core/guided_grad_cam.py | 84 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | captum/attr/_core/shapley_value.py | 214 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which Shapley value | STRING |
| HIGH | captum/attr/_core/shapley_value.py | 1128 | NOTE: The feature_mask argument differs from other perturbation based methods, since feature indices ca | STRING |
| HIGH | captum/attr/_core/deep_lift.py | 1071 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | captum/attr/_core/deep_lift.py | 1564 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | captum/attr/_core/remote_provider.py | 124 | Generate text using the vLLM API. Args: prompt: The input prompt for text generation | STRING |
| HIGH | captum/attr/_core/remote_provider.py | 171 | Get the log probabilities for all tokens in the target string. Args: input_prompt: The inp | STRING |
| HIGH | captum/attr/_core/saliency.py | 51 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which saliency is c | STRING |
| HIGH | captum/attr/_core/kernel_shap.py | 73 | This method attributes the output of the model with given target index (in case it is provided, otherwi | STRING |
| HIGH | captum/attr/_core/kernel_shap.py | 444 | This method attributes the output of the model with given target index (in case it is provided, otherwi | STRING |
| HIGH | captum/attr/_core/input_x_gradient.py | 45 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | captum/attr/_core/integrated_gradients.py | 124 | This method attributes the output of the model with given target index (in case it is provided, otherwi | STRING |
| HIGH | captum/attr/_core/neuron/neuron_gradient.py | 76 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which neuron gradie | STRING |
| HIGH | …/attr/_core/neuron/neuron_guided_backprop_deconvnet.py | 77 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | …/attr/_core/neuron/neuron_guided_backprop_deconvnet.py | 235 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | captum/attr/_core/neuron/neuron_feature_ablation.py | 84 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which neuron attrib | STRING |
| HIGH | captum/attr/_core/neuron/neuron_gradient_shap.py | 118 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which SHAP attribution | STRING |
| HIGH | captum/attr/_core/neuron/neuron_deep_lift.py | 101 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribu | STRING |
| HIGH | captum/attr/_core/neuron/neuron_deep_lift.py | 336 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribu | STRING |
| HIGH | captum/attr/_core/neuron/neuron_integrated_gradients.py | 95 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which neuron integrated | STRING |
| HIGH | captum/attr/_core/neuron/neuron_conductance.py | 120 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which neuron conduc | STRING |
| HIGH | captum/attr/_core/layer/internal_influence.py | 86 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which internal infl | STRING |
| HIGH | captum/attr/_core/layer/layer_lrp.py | 127 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which relevance is | STRING |
| HIGH | captum/attr/_core/layer/layer_activation.py | 61 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer activat | STRING |
| HIGH | captum/attr/_core/layer/layer_conductance.py | 130 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer conduct | STRING |
| HIGH | captum/attr/_core/layer/grad_cam.py | 95 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | captum/attr/_core/layer/layer_gradient_x_activation.py | 94 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions | STRING |
| HIGH | captum/attr/_core/layer/layer_gradient_shap.py | 159 | Args: inputs (Tensor or tuple[Tensor, ...]): Input which are used to compute | STRING |
| HIGH | captum/attr/_core/layer/layer_feature_ablation.py | 83 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribu | STRING |
| HIGH | captum/attr/_core/layer/layer_integrated_gradients.py | 340 | This method attributes the output of the model with given target index (in case it is provided, otherwi | STRING |
| HIGH | captum/attr/_core/layer/layer_deep_lift.py | 146 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribu | STRING |
| HIGH | captum/attr/_core/layer/layer_deep_lift.py | 488 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribu | STRING |
| HIGH | captum/attr/_models/base.py | 163 | This method wraps a model's embedding layer with an interpretable embedding layer that allows us to access the | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/attr/test_targets.py | 0 | tests in this file are dynamically generated based on the config defined in captum/testing/attr/helpers/test_config.py. | STRING |
| HIGH | tests/attr/test_data_parallel.py | 0 | tests in this file are dynamically generated based on the config defined in captum/testing/attr/helpers/test_config.py. | STRING |
| HIGH | tests/attr/test_jit.py | 0 | tests in this file are dynamically generated based on the config defined in captum/testing/attr/helpers/test_config.py. | STRING |
| HIGH | tests/attr/test_hook_removal.py | 0 | tests in this file are dynamically generated based on the config defined in captum/testing/attr/helpers/test_config.py. | STRING |
| HIGH | captum/influence/_core/influence_function.py | 0 | args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labe | STRING |
| HIGH | captum/influence/_core/arnoldi_influence_function.py | 0 | args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labe | STRING |
| HIGH | captum/influence/_core/tracincp.py | 0 | args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labe | STRING |
| HIGH | captum/influence/_core/tracincp_fast_rand_proj.py | 0 | args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labe | STRING |
| HIGH | captum/influence/_core/influence_function.py | 0 | this is the key method of this class, and can be run in 2 different modes, where the mode that is run depends on the arg | STRING |
| HIGH | captum/influence/_core/arnoldi_influence_function.py | 0 | this is the key method of this class, and can be run in 2 different modes, where the mode that is run depends on the arg | STRING |
| HIGH | captum/influence/_core/tracincp.py | 0 | this is the key method of this class, and can be run in 2 different modes, where the mode that is run depends on the arg | STRING |
| HIGH | captum/influence/_core/tracincp_fast_rand_proj.py | 0 | this is the key method of this class, and can be run in 2 different modes, where the mode that is run depends on the arg | STRING |
| HIGH | captum/influence/_core/influence_function.py | 0 | args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labe | STRING |
| HIGH | captum/influence/_core/arnoldi_influence_function.py | 0 | args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labe | STRING |
| HIGH | captum/influence/_core/tracincp.py | 0 | args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labe | STRING |
| HIGH | captum/attr/_core/feature_ablation.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it. | STRING |
| HIGH | captum/attr/_core/occlusion.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it. | STRING |
| HIGH | captum/attr/_core/saliency.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it. | STRING |
| HIGH | captum/attr/_core/kernel_shap.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it. | STRING |
| HIGH | captum/attr/_core/guided_backprop_deconvnet.py | 0 | args: inputs (tensor or tuple[tensor, ...]): input for which attributions are computed. if forward_func takes a single t | STRING |
| HIGH | captum/attr/_core/saliency.py | 0 | args: inputs (tensor or tuple[tensor, ...]): input for which attributions are computed. if forward_func takes a single t | STRING |
| HIGH | captum/attr/_core/input_x_gradient.py | 0 | args: inputs (tensor or tuple[tensor, ...]): input for which attributions are computed. if forward_func takes a single t | STRING |
| HIGH | captum/attr/_core/deep_lift.py | 0 | implements deeplift algorithm for the layer based on the following paper: learning important features through propagatin | STRING |
| HIGH | captum/attr/_core/neuron/neuron_deep_lift.py | 0 | implements deeplift algorithm for the layer based on the following paper: learning important features through propagatin | STRING |
| HIGH | captum/attr/_core/layer/layer_deep_lift.py | 0 | implements deeplift algorithm for the layer based on the following paper: learning important features through propagatin | STRING |
| HIGH | captum/attr/_core/neuron/neuron_gradient.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | …/attr/_core/neuron/neuron_guided_backprop_deconvnet.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/layer/internal_influence.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/layer/layer_conductance.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/layer/layer_activation.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/layer/layer_feature_permutation.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/layer/layer_feature_ablation.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/neuron/neuron_gradient_shap.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/neuron/neuron_integrated_gradients.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/neuron/neuron_conductance.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/layer/layer_gradient_shap.py | 0 | args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): laye | STRING |
| HIGH | captum/attr/_core/layer/internal_influence.py | 0 | this method attributes the output of the model with given target index (in case it is provided, otherwise it assumes tha | STRING |
| HIGH | captum/attr/_core/layer/layer_conductance.py | 0 | this method attributes the output of the model with given target index (in case it is provided, otherwise it assumes tha | STRING |
| HIGH | captum/attr/_core/layer/layer_integrated_gradients.py | 0 | this method attributes the output of the model with given target index (in case it is provided, otherwise it assumes tha | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tests/influence/_core/test_dataloader.py | 45 | # captum.testing.helpers.influence.common.DataInfluenceConstructor(captum.influence._core. | COMMENT |
| CRITICAL | tests/influence/_core/test_dataloader.py | 47 | # captum.testing.helpers.influence.common.DataInfluenceConstructor( | COMMENT |
| CRITICAL | tests/influence/_core/test_tracin_k_most_influential.py | 84 | # `captum.testing.helpers.influence.common.build_test_name_func()` | COMMENT |
| CRITICAL | tests/influence/_core/test_tracin_xor.py | 234 | # `captum.testing.helpers.influence.common.build_test_name_func($parameter$args_to_skip | COMMENT |
| CRITICAL | tests/influence/_core/test_tracin_regression.py | 267 | # `captum.testing.helpers.influence.common.build_test_name_func()` | COMMENT |
| CRITICAL | tests/influence/_core/test_tracin_regression.py | 359 | # `captum.testing.helpers.influence.common.build_test_name_func()` | STRING |
| CRITICAL | tests/influence/_core/test_tracin_regression.py | 474 | # `captum.testing.helpers.influence.common.build_test_name_func()` | STRING |
| CRITICAL⚡ | tests/attr/test_llm_attr.py | 175 | self.trans.self_attn.in_proj_bias.data.fill_(0.0) | CODE |
| CRITICAL⚡ | tests/attr/test_llm_attr.py | 179 | self.trans.self_attn.out_proj.bias.data.fill_(0.0) | CODE |
| CRITICAL⚡ | tests/attr/test_llm_attr.py | 182 | self.trans.linear1.bias.data.fill_(0.0) | CODE |
| CRITICAL⚡ | tests/attr/test_llm_attr.py | 185 | self.trans.linear2.bias.data.fill_(0.0) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_insights_retired.py | 10 | CODE | |
| LOW | tests/utils/test_progress.py | 35 | CODE | |
| LOW | tests/utils/test_progress.py | 53 | CODE | |
| LOW | tests/attr/test_jit.py | 10 | CODE | |
| LOW | tests/attr/test_deconvolution.py | 10 | CODE | |
| LOW | tests/attr/neuron/test_neuron_deeplift.py | 10 | CODE | |
| LOW | tests/attr/models/test_base.py | 10 | CODE | |
| LOW | tests/attr/layer/test_layer_deeplift.py | 10 | CODE | |
| LOW | tests/concept/test_tcav.py | 1255 | CODE | |
| LOW | captum/__init__.py | 4 | CODE | |
| LOW | captum/__init__.py | 5 | CODE | |
| LOW | captum/__init__.py | 6 | CODE | |
| LOW | captum/__init__.py | 7 | CODE | |
| LOW | captum/__init__.py | 8 | CODE | |
| LOW | captum/__init__.py | 9 | CODE | |
| LOW | captum/metrics/__init__.py | 5 | CODE | |
| LOW | captum/metrics/__init__.py | 5 | CODE | |
| LOW | captum/metrics/__init__.py | 9 | CODE | |
| LOW | captum/_utils/models/__init__.py | 2 | CODE | |
| LOW | captum/_utils/models/linear_model/__init__.py | 2 | CODE | |
| LOW | captum/_utils/models/linear_model/__init__.py | 2 | CODE | |
| LOW | captum/_utils/models/linear_model/__init__.py | 2 | CODE | |
| LOW | captum/_utils/models/linear_model/__init__.py | 2 | CODE | |
| LOW | captum/_utils/models/linear_model/__init__.py | 2 | CODE | |
| LOW | captum/_utils/models/linear_model/__init__.py | 2 | CODE | |
| LOW | captum/_utils/models/linear_model/__init__.py | 2 | CODE | |
| LOW | captum/_utils/models/linear_model/__init__.py | 2 | CODE | |
| LOW | captum/_utils/models/linear_model/__init__.py | 2 | CODE | |
| LOW | captum/insights/__init__.py | 27 | CODE | |
| LOW | captum/robust/__init__.py | 5 | CODE | |
| LOW | captum/robust/__init__.py | 6 | CODE | |
| LOW | captum/robust/__init__.py | 7 | CODE | |
| LOW | captum/robust/__init__.py | 8 | CODE | |
| LOW | captum/robust/__init__.py | 9 | CODE | |
| LOW | captum/influence/__init__.py | 5 | CODE | |
| LOW | captum/influence/__init__.py | 6 | CODE | |
| LOW | captum/influence/__init__.py | 7 | CODE | |
| LOW | captum/influence/__init__.py | 8 | CODE | |
| LOW | captum/influence/__init__.py | 8 | CODE | |
| LOW | captum/influence/__init__.py | 9 | CODE | |
| LOW | captum/influence/__init__.py | 9 | CODE | |
| LOW | captum/influence/_utils/common.py | 38 | CODE | |
| LOW | captum/influence/_utils/common.py | 38 | CODE | |
| LOW | captum/influence/_utils/common.py | 42 | CODE | |
| LOW | captum/influence/_utils/common.py | 42 | CODE | |
| LOW | captum/module/__init__.py | 2 | CODE | |
| LOW | captum/module/__init__.py | 3 | CODE | |
| LOW | captum/module/__init__.py | 4 | CODE | |
| LOW | captum/testing/helpers/__init__.py | 6 | CODE | |
| LOW | captum/testing/helpers/__init__.py | 14 | CODE | |
| LOW | captum/testing/helpers/influence/common.py | 649 | CODE | |
| LOW | captum/attr/__init__.py | 4 | CODE | |
| LOW | captum/attr/__init__.py | 5 | CODE | |
| LOW | captum/attr/__init__.py | 5 | CODE | |
| LOW | captum/attr/__init__.py | 6 | CODE | |
| LOW | captum/attr/__init__.py | 7 | CODE | |
| LOW | captum/attr/__init__.py | 8 | CODE | |
| LOW | captum/attr/__init__.py | 9 | CODE | |
| LOW | captum/attr/__init__.py | 9 | CODE | |
| LOW | captum/attr/__init__.py | 10 | CODE | |
| 106 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/influence/_core/test_tracin_show_progress.py | 111 | CODE | |
| LOW | tests/influence/_core/test_arnoldi_influence.py | 129 | CODE | |
| LOW | tests/influence/_core/test_arnoldi_influence.py | 436 | CODE | |
| LOW | tests/utils/test_sample_gradient.py | 100 | CODE | |
| LOW | tests/attr/test_targets.py | 106 | CODE | |
| LOW | tests/attr/test_targets.py | 142 | CODE | |
| LOW | tests/attr/test_hook_removal.py | 71 | CODE | |
| LOW | tests/attr/test_data_parallel.py | 211 | CODE | |
| LOW | tests/attr/test_data_parallel.py | 71 | CODE | |
| LOW | tests/attr/test_jit.py | 90 | CODE | |
| LOW | tests/attr/test_jit.py | 134 | CODE | |
| LOW | tests/attr/test_jit.py | 147 | CODE | |
| LOW | tests/attr/test_feature_ablation.py | 948 | CODE | |
| LOW | tests/attr/neuron/test_neuron_conductance.py | 199 | CODE | |
| LOW | tests/attr/neuron/test_neuron_conductance.py | 250 | CODE | |
| LOW | tests/concept/test_tcav.py | 787 | CODE | |
| LOW | tests/concept/test_tcav.py | 915 | CODE | |
| LOW | scripts/parse_tutorials.py | 43 | CODE | |
| LOW | scripts/parse_sphinx.py | 42 | CODE | |
| LOW | captum/_utils/gradient.py | 44 | CODE | |
| LOW | captum/_utils/gradient.py | 260 | CODE | |
| LOW | captum/_utils/gradient.py | 950 | CODE | |
| LOW | captum/_utils/gradient.py | 297 | CODE | |
| LOW | captum/_utils/gradient.py | 302 | CODE | |
| LOW | captum/_utils/common.py | 356 | CODE | |
| LOW | captum/_utils/common.py | 618 | CODE | |
| LOW | captum/_utils/common.py | 769 | CODE | |
| LOW | captum/_utils/models/linear_model/train.py | 103 | CODE | |
| LOW | captum/robust/_core/metrics/attack_comparator.py | 440 | CODE | |
| LOW | captum/robust/_core/metrics/min_param_perturbation.py | 234 | CODE | |
| LOW | captum/robust/_core/metrics/min_param_perturbation.py | 291 | CODE | |
| LOW | captum/testing/helpers/basic.py | 32 | CODE | |
| LOW | captum/testing/helpers/basic.py | 190 | CODE | |
| LOW | captum/testing/helpers/influence/common.py | 345 | CODE | |
| LOW | captum/testing/helpers/influence/common.py | 659 | CODE | |
| LOW | captum/attr/_utils/approximation_methods.py | 48 | CODE | |
| LOW | captum/attr/_utils/approximation_methods.py | 79 | CODE | |
| LOW | captum/attr/_utils/visualization.py | 226 | CODE | |
| LOW | captum/attr/_utils/visualization.py | 274 | CODE | |
| LOW | captum/attr/_core/lime.py | 1182 | CODE | |
| LOW | captum/attr/_core/lrp.py | 306 | CODE | |
| LOW | captum/attr/_core/shapley_value.py | 203 | CODE | |
| LOW | captum/attr/_core/shapley_value.py | 541 | CODE | |
| LOW | captum/attr/_core/deep_lift.py | 306 | CODE | |
| LOW | captum/attr/_core/deep_lift.py | 329 | CODE | |
| LOW | captum/attr/_core/deep_lift.py | 694 | CODE | |
| LOW | captum/attr/_core/remote_provider.py | 165 | CODE | |
| LOW | captum/attr/_core/layer/layer_integrated_gradients.py | 128 | CODE | |
| LOW | captum/attr/_core/layer/layer_integrated_gradients.py | 135 | CODE | |
| LOW | captum/concept/_core/cav.py | 162 | CODE | |
| LOW | captum/concept/_core/tcav.py | 427 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/influence/_core/test_tracin_regression.py | 57 | # pyre-fixme[61]: `net_adjusted` is undefined, or not always defined. | COMMENT |
| HIGH | tests/influence/_core/test_tracin_regression.py | 554 | # pyre-fixme[61]: `test_loss_fn` is undefined, or not always defined. | STRING |
| HIGH | captum/_utils/gradient.py | 936 | # pyre-fixme[61]: `layer_parameters` is undefined, or not always | STRING |
| HIGH | captum/_utils/gradient.py | 1054 | # pyre-fixme[61]: `layer_parameters` is undefined, or not always | STRING |
| HIGH | captum/influence/_core/arnoldi_influence_function.py | 155 | # pyre-fixme[61]: `k` is undefined, or not always defined. | STRING |
| HIGH | captum/influence/_core/tracincp_fast_rand_proj.py | 1550 | # pyre-fixme[61]: `jacobian_projection` is undefined, or not | STRING |
| HIGH | captum/influence/_core/tracincp_fast_rand_proj.py | 1554 | # pyre-fixme[61]: `layer_input_projection` is undefined, or not | STRING |
| HIGH | captum/testing/helpers/basic_models.py | 343 | # pyre-fixme[61]: `another_embedding` is undefined, or not always defined. | STRING |
| HIGH | captum/testing/helpers/influence/common.py | 491 | # pyre-fixme[61]: `net_adjusted` is undefined, or not always defined. | COMMENT |
| HIGH | captum/concept/_utils/classifier.py | 188 | # pyre-fixme[61]: `input` is undefined, or not always defined. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/metrics/test_infidelity.py | 486 | CODE | |
| LOW | tests/utils/test_linear_model.py | 28 | CODE | |
| LOW | tests/attr/test_lime.py | 526 | CODE | |
| LOW | tests/attr/test_kernel_shap.py | 530 | CODE | |
| LOW | tests/attr/test_shapley.py | 1281 | CODE | |
| LOW | tests/attr/test_shapley.py | 1328 | CODE | |
| LOW | tests/attr/test_shapley.py | 545 | CODE | |
| LOW | tests/attr/test_shapley.py | 633 | CODE | |
| LOW | captum/_utils/gradient.py | 588 | CODE | |
| LOW | captum/_utils/gradient.py | 608 | CODE | |
| LOW | captum/_utils/gradient.py | 625 | CODE | |
| LOW | captum/_utils/models/linear_model/model.py | 49 | CODE | |
| LOW | captum/_utils/models/linear_model/train.py | 103 | CODE | |
| LOW | captum/influence/_core/influence_function.py | 698 | CODE | |
| LOW | captum/influence/_core/arnoldi_influence_function.py | 294 | CODE | |
| LOW | captum/influence/_core/tracincp_fast_rand_proj.py | 910 | CODE | |
| LOW | captum/attr/_utils/visualization.py | 397 | CODE | |
| LOW | captum/attr/_utils/visualization.py | 415 | CODE | |
| LOW | captum/attr/_utils/visualization.py | 432 | CODE | |
| LOW | captum/attr/_utils/visualization.py | 895 | CODE | |
| LOW | captum/attr/_core/feature_permutation.py | 112 | CODE | |
| LOW | captum/attr/_core/lime.py | 933 | CODE | |
| LOW | captum/attr/_core/lime.py | 1182 | CODE | |
| LOW | captum/attr/_core/dataloader_attr.py | 265 | CODE | |
| LOW | captum/attr/_core/shapley_value.py | 825 | CODE | |
| LOW | captum/attr/_core/shapley_value.py | 1052 | CODE | |
| LOW | captum/attr/_core/kernel_shap.py | 61 | CODE | |
| LOW | captum/attr/_core/kernel_shap.py | 431 | CODE | |
| LOW | captum/attr/_core/neuron/neuron_conductance.py | 103 | CODE | |
| LOW | captum/attr/_core/layer/internal_influence.py | 74 | CODE | |
| LOW | captum/attr/_core/layer/layer_conductance.py | 81 | CODE | |
| LOW | captum/attr/_core/layer/layer_conductance.py | 98 | CODE | |
| LOW | captum/attr/_core/layer/layer_conductance.py | 113 | CODE | |
| LOW | captum/attr/_core/layer/layer_integrated_gradients.py | 300 | CODE | |
| LOW | captum/attr/_core/layer/layer_integrated_gradients.py | 321 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/attr/test_llm_attr.py | 759 | # Create a mock OpenAI client | COMMENT |
| MEDIUM | captum/testing/attr/helpers/conductance_reference.py | 99 | # Create a forward hook in order to attach backward hook to appropriate | STRING |
| MEDIUM⚡ | captum/attr/_utils/interpretable_input.py | 773 | # Create a dummy mask for compatibility | COMMENT |
| MEDIUM⚡ | captum/attr/_utils/interpretable_input.py | 776 | # Create a dummy mask if None is provided | COMMENT |
| MEDIUM⚡ | captum/attr/_utils/interpretable_input.py | 778 | # Create a mask with all zeros (entire image as one segment) | COMMENT |
| MEDIUM | captum/concept/_core/tcav.py | 313 | >>> # Define the concepts | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/influence/_core/test_dataloader.py | 41 | # [("none", captum.testing.helpers.influence.common.DataInfluenceConstructor | COMMENT |
| LOW | sphinx/source/conf.py | 1 | #! /usr/bin/env python3 | COMMENT |
| LOW | sphinx/source/conf.py | 101 | html_theme = "alabaster" | COMMENT |
| LOW | sphinx/source/conf.py | 121 | # | COMMENT |
| LOW | sphinx/source/conf.py | 141 | COMMENT | |
| LOW | scripts/publish_site.sh | 61 | # |-- api/ | COMMENT |
| LOW | captum/_utils/gradient.py | 281 | This is especially useful when we execute forward pass in a distributed setting, | COMMENT |
| LOW | captum/influence/_core/influence_function.py | 521 | # this is the factory that accepts a batch | COMMENT |
| LOW | captum/influence/_core/influence_function.py | 1041 | # as described in the description for `NaiveInfluenceFunction`, the embedding | COMMENT |
| LOW | captum/influence/_core/arnoldi_influence_function.py | 541 | # first figure out names of params that require gradients. this is need to | COMMENT |
| LOW | captum/influence/_core/arnoldi_influence_function.py | 641 | # the Hessian-vector product are actually tuples of tensors representing | COMMENT |
| LOW | captum/influence/_core/arnoldi_influence_function.py | 761 | def get_batch_embeddings(batch: List[Tensor]) -> Tensor: | COMMENT |
| LOW | captum/influence/_core/tracincp_fast_rand_proj.py | 1381 | COMMENT | |
| LOW | captum/attr/_utils/summarizer.py | 121 | return temp if self._is_inputs_tuple else temp[0] | COMMENT |
| LOW | captum/attr/_core/feature_ablation.py | 301 | self.use_weights = False | COMMENT |
| LOW | captum/attr/_core/shapley_value.py | 501 | # (n_perturb, *output_shape, 1,.. 1) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | captum/__init__.py | 13 | __all__ = ["attr", "concept", "influence", "log", "metrics", "robust"] | CODE |
| LOW | captum/metrics/__init__.py | 11 | __all__ = [ | CODE |
| LOW | captum/_utils/models/__init__.py | 4 | __all__ = [ | CODE |
| LOW | captum/_utils/models/linear_model/__init__.py | 14 | __all__ = [ | CODE |
| LOW | captum/robust/__init__.py | 11 | __all__ = ["FGSM", "AttackComparator", "MinParamPerturbation", "Perturbation", "PGD"] | CODE |
| LOW | captum/influence/__init__.py | 14 | __all__ = [ | CODE |
| LOW | captum/influence/_utils/common.py | 1017 | def _set_attr(obj, names, val) -> None: | STRING |
| LOW | captum/module/__init__.py | 6 | __all__ = [ | CODE |
| LOW | captum/testing/helpers/__init__.py | 16 | __all__ = [ | CODE |
| LOW | captum/testing/helpers/basic.py | 150 | def set_all_random_seeds(seed: int = 1234) -> None: | CODE |
| LOW | captum/attr/__init__.py | 91 | __all__ = [ | CODE |
| LOW | captum/attr/visualization.py | 26 | __all__ = [ | CODE |
| LOW | captum/attr/_models/base.py | 151 | def _set_deep_layer_value(obj, layer_names, value) -> None: | STRING |
| LOW | captum/concept/__init__.py | 8 | __all__ = [ | CODE |
| LOW | captum/log/dummy_log.py | 66 | def set_environment(env: Union[None, List[str], str]) -> None: | CODE |
| LOW | captum/log/__init__.py | 25 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | website/pages/en/index.js | 156 | print('IG Attributions:', attributions) | CODE |
| HIGH | website/pages/en/index.js | 157 | print('Convergence Delta:', delta) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | captum/influence/_utils/common.py | 284 | except AttributeError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | captum/influence/_core/arnoldi_influence_function.py | 603 | CODE | |
| MEDIUM | captum/influence/_core/arnoldi_influence_function.py | 609 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | captum/influence/_core/tracincp_fast_rand_proj.py | 236 | except Exception as ex: | STRING |
| LOW | captum/attr/_core/guided_grad_cam.py | 222 | except Exception: | STRING |
| LOW | captum/attr/_core/remote_provider.py | 118 | except Exception as e: | CODE |
| LOW | captum/attr/_core/remote_provider.py | 162 | except Exception as e: | CODE |
| LOW | captum/attr/_core/remote_provider.py | 247 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/type-checks.yml | 27 | # docs, or the website scaffolding. Naming the scope and behavior here | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | captum/attr/_utils/stat.py | 227 | # NOTE: The following ensures mse is a float tensor. | COMMENT |
| LOW | captum/attr/_utils/summarizer.py | 168 | # Step 2: get the correct order | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | captum/attr/_utils/summarizer.py | 137 | # Step 1: | STRING |
| LOW | captum/attr/_utils/summarizer.py | 140 | # Step 2: | STRING |
| LOW | captum/attr/_utils/summarizer.py | 168 | # Step 2: get the correct order | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | captum/influence/_core/arnoldi_influence_function.py | 651 | # aforementioned hessian, then `R` would be `vs @ torch.diag(ls ** -0.5)`, i.e. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | captum/attr/_core/llm_attr.py | 246 | # Loop over the data and create a `Text` for each "pixel". | STRING |