Model interpretability and understanding for PyTorch
This report presents the forensic synthetic code analysis of meta-pytorch/captum, a Python project with 5,680 GitHub stars. SynthScan v2.0 examined 77,428 lines of code across 288 source files, recording 1264 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 22.1 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1264 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_tutorial_regressions.py | 24 | def test_titanic_tutorial_models_return_logits_for_cross_entropy_loss() -> None: | CODE |
| LOW | tests/test_insights_retired.py | 16 | def test_import_insights_module(self) -> None: | CODE |
| LOW | tests/test_insights_retired.py | 22 | def test_attribution_visualizer_raises(self) -> None: | CODE |
| LOW | tests/test_insights_retired.py | 51 | 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 |
| 791 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 | 307 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which ablation attri | STRING |
| HIGH | captum/attr/_core/feature_permutation.py | 121 | This function is almost equivalent to :func:`FeatureAblation.attribute <captum.attr.FeatureAblation.att | STRING |
| HIGH | captum/attr/_core/occlusion.py | 69 | 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 | 944 | 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 | 142 | Args: inputs (Tensor or tuple[Tensor, ...]): Input for which Shapley value | STRING |
| HIGH | captum/attr/_core/shapley_value.py | 1068 | 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 | 72 | 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 | 442 | 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 | 83 | 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 | 82 | 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 | 850 | 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 | 263 | CODE | |
| LOW | captum/_utils/gradient.py | 955 | CODE | |
| LOW | captum/_utils/gradient.py | 300 | CODE | |
| LOW | captum/_utils/gradient.py | 305 | CODE | |
| LOW | captum/_utils/common.py | 356 | CODE | |
| LOW | captum/_utils/common.py | 618 | CODE | |
| LOW | captum/_utils/common.py | 772 | 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 | 1181 | CODE | |
| LOW | captum/attr/_core/lrp.py | 306 | CODE | |
| LOW | captum/attr/_core/shapley_value.py | 131 | CODE | |
| LOW | captum/attr/_core/shapley_value.py | 476 | 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 | 163 | CODE | |
| LOW | captum/concept/_core/tcav.py | 428 | 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 | 941 | # pyre-fixme[61]: `layer_parameters` is undefined, or not always | STRING |
| HIGH | captum/_utils/gradient.py | 1059 | # 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 | 189 | # 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 | 1092 | CODE | |
| LOW | tests/attr/test_shapley.py | 1139 | CODE | |
| LOW | tests/attr/test_shapley.py | 356 | CODE | |
| LOW | tests/attr/test_shapley.py | 444 | CODE | |
| LOW | captum/_utils/gradient.py | 593 | CODE | |
| LOW | captum/_utils/gradient.py | 613 | CODE | |
| LOW | captum/_utils/gradient.py | 630 | 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/lime.py | 932 | CODE | |
| LOW | captum/attr/_core/lime.py | 1181 | CODE | |
| LOW | captum/attr/_core/dataloader_attr.py | 265 | CODE | |
| LOW | captum/attr/_core/shapley_value.py | 767 | CODE | |
| LOW | captum/attr/_core/shapley_value.py | 993 | CODE | |
| LOW | captum/attr/_core/kernel_shap.py | 60 | CODE | |
| LOW | captum/attr/_core/kernel_shap.py | 429 | 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 | 314 | >>> # Define the concepts | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | captum/__init__.py | 14 | __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 | 1018 | 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 | 27 | __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 | 9 | __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 |
|---|---|---|---|---|
| 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/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 |
| 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 |
|---|---|---|---|---|
| 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 |
|---|---|---|---|---|
| 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 |