AI Slop Code RIsk Monitor

meta-pytorch/captum

Model interpretability and understanding for PyTorch

22.3 Elevated pattern signal View on GitHub

Maintenance and Governance Review

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.

22.3
Adjusted Signal
22.3
Raw Pattern Score
100%
Time Factor
2026-10-01
Last Push
5.7K
Stars
Python
Language
78.1K
Lines of Code
289
Files
1.3K
Pattern Hits
2026-10-12
Scan Date
0.39
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 53.3/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 1036 finding(s).

Hallucinated Dependency & Supply Chain Risk 18.9/100 · LOW

Are imports declared and package/API names verified? 189 finding(s).

Agent Over-Engineering Ratio 49.3/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 967 finding(s).

PR Review Velocity Impact 70.8/100 · HIGH

Which changes need focused human review? 1288 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 11HIGH 103MEDIUM 10LOW 1164

Directory Score Breakdown

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.

Pattern Findings

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.

Hyper-Verbose Identifiers869 hits · 807 pts
SeverityFileLineSnippetContext
LOWtests/test_tutorial_regressions.py23def test_titanic_tutorial_models_return_logits_for_cross_entropy_loss() -> None:CODE
LOWtests/test_insights_retired.py19 def test_import_insights_module(self) -> None:CODE
LOWtests/test_insights_retired.py24 def test_attribution_visualizer_raises(self) -> None:CODE
LOWtests/test_insights_retired.py44 def test_error_message_includes_migration_guidance(self) -> None:CODE
LOWtests/metrics/test_sensitivity.py72 def test_basic_sensitivity_max_single(self) -> None:CODE
LOWtests/metrics/test_sensitivity.py85 def test_basic_sensitivity_max_multiple(self) -> None:CODE
LOWtests/metrics/test_sensitivity.py98 def test_basic_sensitivity_max_multiple_gradshap(self) -> None:CODE
LOWtests/metrics/test_sensitivity.py124 def test_convnet_multi_target(self) -> None:CODE
LOWtests/metrics/test_sensitivity.py143 def test_convnet_multi_target_and_default_pert_func(self) -> None:STRING
LOWtests/metrics/test_sensitivity.py174 def test_sensitivity_max_multi_dim(self) -> None:STRING
LOWtests/metrics/test_sensitivity.py194 def test_sensitivity_max_multi_dim_batching(self) -> None:STRING
LOWtests/metrics/test_sensitivity.py226 def test_sensitivity_additional_forward_args_multi_args(self) -> None:STRING
LOWtests/metrics/test_sensitivity.py256 def test_classification_sensitivity_tpl_target_w_baseline(self) -> None:STRING
LOWtests/metrics/test_sensitivity.py287 def test_sensitivity_max_with_feature_mask(self) -> None:STRING
LOWtests/metrics/test_infidelity.py36def _local_perturb_func_default(CODE
LOWtests/metrics/test_infidelity.py121 def test_basic_infidelity_single(self) -> None:CODE
LOWtests/metrics/test_infidelity.py129 def test_basic_infidelity_multiple(self) -> None:CODE
LOWtests/metrics/test_infidelity.py145 def test_basic_infidelity_multiple_with_batching(self) -> None:CODE
LOWtests/metrics/test_infidelity.py210 def test_classification_infidelity_convnet_multi_targets(self) -> None:CODE
LOWtests/metrics/test_infidelity.py228 def test_classification_infidelity_tpl_target(self) -> None:CODE
LOWtests/metrics/test_infidelity.py261 def test_classification_infidelity_tpl_target_w_baseline(self) -> None:CODE
LOWtests/metrics/test_infidelity.py313 def test_basic_infidelity_multiple_with_normalize(self) -> None:CODE
LOWtests/metrics/test_infidelity.py346 def basic_multilayer_sensitivity_n(CODE
LOWtests/metrics/test_infidelity.py455 def basic_model_global_assert(CODE
LOWtests/robust/test_attack_comparator.py74 def test_attack_comparator_basic(self) -> None:CODE
LOWtests/robust/test_attack_comparator.py125 def test_attack_comparator_with_preproc(self) -> None:CODE
LOWtests/robust/test_attack_comparator.py165 def test_attack_comparator_with_additional_args(self) -> None:CODE
LOWtests/robust/test_FGSM.py91 def test_attack_label_listtuple(self) -> None:CODE
LOWtests/robust/test_FGSM.py105 def test_attack_additional_inputs(self) -> None:CODE
LOWtests/robust/test_FGSM.py144 def test_attack_masked_tensor(self) -> None:CODE
LOWtests/robust/test_FGSM.py152 def test_attack_masked_multiinput(self) -> None:CODE
LOWtests/robust/test_FGSM.py167 def test_attack_masked_loss_defined(self) -> None:CODE
LOWtests/robust/test_min_param_perturbation.py51 def test_minimal_pert_basic_linear(self) -> None:CODE
LOWtests/robust/test_min_param_perturbation.py71 def test_minimal_pert_basic_binary(self) -> None:CODE
LOWtests/robust/test_min_param_perturbation.py95 def test_minimal_pert_preproc(self) -> None:CODE
LOWtests/robust/test_min_param_perturbation.py114 def test_minimal_pert_alt_correct(self) -> None:CODE
LOWtests/robust/test_min_param_perturbation.py150 def test_minimal_pert_additional_forward_args(self) -> None:CODE
LOWtests/robust/test_min_param_perturbation.py190 def test_minimal_pert_tuple_test(self) -> None:CODE
LOWtests/robust/test_PGD.py125 def test_attack_masked_nontargeted(self) -> None:CODE
LOWtests/robust/test_PGD.py139 def test_attack_masked_targeted(self) -> None:CODE
LOWtests/robust/test_PGD.py153 def test_attack_masked_multiinput(self) -> None:CODE
LOWtests/robust/test_PGD.py173 def test_attack_masked_random_start(self) -> None:CODE
LOWtests/robust/test_PGD.py210 def test_attack_masked_loss_defined(self) -> None:CODE
LOWtests/influence/_utils/test_common.py21 def test_jacobian_loss_wrt_inputs(self) -> None:CODE
LOWtests/influence/_core/test_tracin_k_most_influential.py90 def test_tracin_k_most_influential(CODE
LOW…sts/influence/_core/test_tracin_aggregate_influence.py41 def test_tracin_aggregate_influence(CODE
LOW…sts/influence/_core/test_tracin_aggregate_influence.py102 def test_tracin_aggregate_influence_api(CODE
LOWtests/influence/_core/test_tracin_self_influence.py162 def test_tracin_self_influence(CODE
LOWtests/influence/_core/test_tracin_self_influence.py251 def test_tracin_self_influence_dataloader_vs_single_batch(CODE
LOWtests/influence/_core/test_tracin_validation.py43 def test_tracin_require_inputs_dataset(CODE
LOWtests/influence/_core/test_tracin_validation.py73 def test_tracincp_fast_rand_proj_inputs(self) -> None:CODE
LOWtests/influence/_core/test_tracin_validation.py103 def test_tracincp_input_checkpoints(CODE
LOWtests/influence/_core/test_tracin_regression.py38 def _test_tracin_regression_setup(CODE
LOWtests/influence/_core/test_tracin_regression.py342 def _test_tracin_identity_regression_setup(STRING
LOWtests/influence/_core/test_tracin_regression.py388 def test_tracin_identity_regression(STRING
LOWtests/influence/_core/test_tracin_regression.py499 def test_tracin_constant_test_loss_fn(STRING
LOWtests/influence/_core/test_tracin_show_progress.py39 def _check_error_msg_multiplicity(CODE
LOWtests/influence/_core/test_tracin_show_progress.py111 def test_tracin_show_progress(CODE
LOW…influence/_core/test_tracin_intermediate_quantities.py45 def test_tracin_intermediate_quantities_aggregate(CODE
LOW…influence/_core/test_tracin_intermediate_quantities.py106 def test_tracin_intermediate_quantities_api(CODE
809 more matches not shown…
Docstring Block Structure51 hits · 255 pts
SeverityFileLineSnippetContext
HIGHcaptum/metrics/_core/infidelity.py72 Args: perturb_func(Callable): Input perturbation function that takes inputs and opSTRING
HIGHcaptum/metrics/_core/infidelity.py161 Explanation infidelity represents the expected mean-squared error between the explanation multiplied by a meaniSTRING
HIGHcaptum/metrics/_core/sensitivity.py80 Explanation sensitivity measures the extent of explanation change when the input is slightly perturbed. It has STRING
HIGHcaptum/robust/_core/metrics/attack_comparator.py270 Evaluate model and attack performance on provided inputs Args: inputs (Any): Input for whSTRING
HIGHcaptum/robust/_core/metrics/min_param_perturbation.py385 This method evaluates the model at each perturbed input and identifies the minimum perturbation that leSTRING
HIGHcaptum/attr/_utils/visualization.py447 Visualizes attribution for a given image by normalizing attribution values of the desired sign (positive, negatSTRING
HIGHcaptum/attr/_utils/visualization.py667 Visualizes attribution using multiple visualization methods displayed in a 1 x k grid, where k is the number ofSTRING
HIGHcaptum/attr/_utils/visualization.py913 Visualizes attribution for a given timeseries data by normalizing attribution values of the desired sign (positSTRING
HIGHcaptum/attr/_core/feature_ablation.py387 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which ablation attriSTRING
HIGHcaptum/attr/_core/feature_permutation.py162 This function is almost equivalent to :func:`FeatureAblation.attribute <captum.attr.FeatureAblation.attSTRING
HIGHcaptum/attr/_core/occlusion.py70 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which occlusion STRING
HIGHcaptum/attr/_core/gradient_shap.py135 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which SHAP attribution STRING
HIGHcaptum/attr/_core/lime.py258 This method attributes the output of the model with given target index (in case it is provided, otherwiSTRING
HIGHcaptum/attr/_core/lime.py945 This method attributes the output of the model with given target index (in case it is provided, otherwiSTRING
HIGHcaptum/attr/_core/noise_tunnel.py103 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which integrated grSTRING
HIGHcaptum/attr/_core/guided_backprop_deconvnet.py156 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGHcaptum/attr/_core/guided_backprop_deconvnet.py265 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGHcaptum/attr/_core/lrp.py110 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which relevance is STRING
HIGHcaptum/attr/_core/guided_grad_cam.py84 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGHcaptum/attr/_core/shapley_value.py214 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which Shapley value STRING
HIGHcaptum/attr/_core/shapley_value.py1128 NOTE: The feature_mask argument differs from other perturbation based methods, since feature indices caSTRING
HIGHcaptum/attr/_core/deep_lift.py1071 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGHcaptum/attr/_core/deep_lift.py1564 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGHcaptum/attr/_core/remote_provider.py124 Generate text using the vLLM API. Args: prompt: The input prompt for text generation STRING
HIGHcaptum/attr/_core/remote_provider.py171 Get the log probabilities for all tokens in the target string. Args: input_prompt: The inpSTRING
HIGHcaptum/attr/_core/saliency.py51 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which saliency is cSTRING
HIGHcaptum/attr/_core/kernel_shap.py73 This method attributes the output of the model with given target index (in case it is provided, otherwiSTRING
HIGHcaptum/attr/_core/kernel_shap.py444 This method attributes the output of the model with given target index (in case it is provided, otherwiSTRING
HIGHcaptum/attr/_core/input_x_gradient.py45 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGHcaptum/attr/_core/integrated_gradients.py124 This method attributes the output of the model with given target index (in case it is provided, otherwiSTRING
HIGHcaptum/attr/_core/neuron/neuron_gradient.py76 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which neuron gradieSTRING
HIGH…/attr/_core/neuron/neuron_guided_backprop_deconvnet.py77 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGH…/attr/_core/neuron/neuron_guided_backprop_deconvnet.py235 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGHcaptum/attr/_core/neuron/neuron_feature_ablation.py84 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which neuron attribSTRING
HIGHcaptum/attr/_core/neuron/neuron_gradient_shap.py118 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which SHAP attribution STRING
HIGHcaptum/attr/_core/neuron/neuron_deep_lift.py101 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribuSTRING
HIGHcaptum/attr/_core/neuron/neuron_deep_lift.py336 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribuSTRING
HIGHcaptum/attr/_core/neuron/neuron_integrated_gradients.py95 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which neuron integrated STRING
HIGHcaptum/attr/_core/neuron/neuron_conductance.py120 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which neuron conducSTRING
HIGHcaptum/attr/_core/layer/internal_influence.py86 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which internal inflSTRING
HIGHcaptum/attr/_core/layer/layer_lrp.py127 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which relevance is STRING
HIGHcaptum/attr/_core/layer/layer_activation.py61 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer activatSTRING
HIGHcaptum/attr/_core/layer/layer_conductance.py130 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer conductSTRING
HIGHcaptum/attr/_core/layer/grad_cam.py95 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGHcaptum/attr/_core/layer/layer_gradient_x_activation.py94 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which attributions STRING
HIGHcaptum/attr/_core/layer/layer_gradient_shap.py159 Args: inputs (Tensor or tuple[Tensor, ...]): Input which are used to compute STRING
HIGHcaptum/attr/_core/layer/layer_feature_ablation.py83 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribuSTRING
HIGHcaptum/attr/_core/layer/layer_integrated_gradients.py340 This method attributes the output of the model with given target index (in case it is provided, otherwiSTRING
HIGHcaptum/attr/_core/layer/layer_deep_lift.py146 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribuSTRING
HIGHcaptum/attr/_core/layer/layer_deep_lift.py488 Args: inputs (Tensor or tuple[Tensor, ...]): Input for which layer attribuSTRING
HIGHcaptum/attr/_models/base.py163 This method wraps a model's embedding layer with an interpretable embedding layer that allows us to access the STRING
Cross-File Repetition39 hits · 195 pts
SeverityFileLineSnippetContext
HIGHtests/attr/test_targets.py0tests in this file are dynamically generated based on the config defined in captum/testing/attr/helpers/test_config.py. STRING
HIGHtests/attr/test_data_parallel.py0tests in this file are dynamically generated based on the config defined in captum/testing/attr/helpers/test_config.py. STRING
HIGHtests/attr/test_jit.py0tests in this file are dynamically generated based on the config defined in captum/testing/attr/helpers/test_config.py. STRING
HIGHtests/attr/test_hook_removal.py0tests in this file are dynamically generated based on the config defined in captum/testing/attr/helpers/test_config.py. STRING
HIGHcaptum/influence/_core/influence_function.py0args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labeSTRING
HIGHcaptum/influence/_core/arnoldi_influence_function.py0args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labeSTRING
HIGHcaptum/influence/_core/tracincp.py0args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labeSTRING
HIGHcaptum/influence/_core/tracincp_fast_rand_proj.py0args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labeSTRING
HIGHcaptum/influence/_core/influence_function.py0this is the key method of this class, and can be run in 2 different modes, where the mode that is run depends on the argSTRING
HIGHcaptum/influence/_core/arnoldi_influence_function.py0this is the key method of this class, and can be run in 2 different modes, where the mode that is run depends on the argSTRING
HIGHcaptum/influence/_core/tracincp.py0this is the key method of this class, and can be run in 2 different modes, where the mode that is run depends on the argSTRING
HIGHcaptum/influence/_core/tracincp_fast_rand_proj.py0this is the key method of this class, and can be run in 2 different modes, where the mode that is run depends on the argSTRING
HIGHcaptum/influence/_core/influence_function.py0args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labeSTRING
HIGHcaptum/influence/_core/arnoldi_influence_function.py0args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labeSTRING
HIGHcaptum/influence/_core/tracincp.py0args: inputs (tuple): `inputs` is the test batch and is a tuple of any, where the last element is assumed to be the labeSTRING
HIGHcaptum/attr/_core/feature_ablation.py0args: forward_func (callable): the forward function of the model or any modification of it.STRING
HIGHcaptum/attr/_core/occlusion.py0args: forward_func (callable): the forward function of the model or any modification of it.STRING
HIGHcaptum/attr/_core/saliency.py0args: forward_func (callable): the forward function of the model or any modification of it.STRING
HIGHcaptum/attr/_core/kernel_shap.py0args: forward_func (callable): the forward function of the model or any modification of it.STRING
HIGHcaptum/attr/_core/guided_backprop_deconvnet.py0args: inputs (tensor or tuple[tensor, ...]): input for which attributions are computed. if forward_func takes a single tSTRING
HIGHcaptum/attr/_core/saliency.py0args: inputs (tensor or tuple[tensor, ...]): input for which attributions are computed. if forward_func takes a single tSTRING
HIGHcaptum/attr/_core/input_x_gradient.py0args: inputs (tensor or tuple[tensor, ...]): input for which attributions are computed. if forward_func takes a single tSTRING
HIGHcaptum/attr/_core/deep_lift.py0implements deeplift algorithm for the layer based on the following paper: learning important features through propagatinSTRING
HIGHcaptum/attr/_core/neuron/neuron_deep_lift.py0implements deeplift algorithm for the layer based on the following paper: learning important features through propagatinSTRING
HIGHcaptum/attr/_core/layer/layer_deep_lift.py0implements deeplift algorithm for the layer based on the following paper: learning important features through propagatinSTRING
HIGHcaptum/attr/_core/neuron/neuron_gradient.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGH…/attr/_core/neuron/neuron_guided_backprop_deconvnet.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/layer/internal_influence.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/layer/layer_conductance.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/layer/layer_activation.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/layer/layer_feature_permutation.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/layer/layer_feature_ablation.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/neuron/neuron_gradient_shap.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/neuron/neuron_integrated_gradients.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/neuron/neuron_conductance.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/layer/layer_gradient_shap.py0args: forward_func (callable): the forward function of the model or any modification of it layer (torch.nn.module): layeSTRING
HIGHcaptum/attr/_core/layer/internal_influence.py0this method attributes the output of the model with given target index (in case it is provided, otherwise it assumes thaSTRING
HIGHcaptum/attr/_core/layer/layer_conductance.py0this method attributes the output of the model with given target index (in case it is provided, otherwise it assumes thaSTRING
HIGHcaptum/attr/_core/layer/layer_integrated_gradients.py0this method attributes the output of the model with given target index (in case it is provided, otherwise it assumes thaSTRING
Hallucination Indicators11 hits · 145 pts
SeverityFileLineSnippetContext
CRITICALtests/influence/_core/test_dataloader.py45 # captum.testing.helpers.influence.common.DataInfluenceConstructor(captum.influence._core.COMMENT
CRITICALtests/influence/_core/test_dataloader.py47 # captum.testing.helpers.influence.common.DataInfluenceConstructor(COMMENT
CRITICALtests/influence/_core/test_tracin_k_most_influential.py84 # `captum.testing.helpers.influence.common.build_test_name_func()`COMMENT
CRITICALtests/influence/_core/test_tracin_xor.py234 # `captum.testing.helpers.influence.common.build_test_name_func($parameter$args_to_skipCOMMENT
CRITICALtests/influence/_core/test_tracin_regression.py267 # `captum.testing.helpers.influence.common.build_test_name_func()`COMMENT
CRITICALtests/influence/_core/test_tracin_regression.py359 # `captum.testing.helpers.influence.common.build_test_name_func()`STRING
CRITICALtests/influence/_core/test_tracin_regression.py474 # `captum.testing.helpers.influence.common.build_test_name_func()`STRING
CRITICAL⚡tests/attr/test_llm_attr.py175 self.trans.self_attn.in_proj_bias.data.fill_(0.0)CODE
CRITICAL⚡tests/attr/test_llm_attr.py179 self.trans.self_attn.out_proj.bias.data.fill_(0.0)CODE
CRITICAL⚡tests/attr/test_llm_attr.py182 self.trans.linear1.bias.data.fill_(0.0)CODE
CRITICAL⚡tests/attr/test_llm_attr.py185 self.trans.linear2.bias.data.fill_(0.0)CODE
Unused Imports166 hits · 136 pts
SeverityFileLineSnippetContext
LOWtests/test_insights_retired.py10CODE
LOWtests/utils/test_progress.py35CODE
LOWtests/utils/test_progress.py53CODE
LOWtests/attr/test_jit.py10CODE
LOWtests/attr/test_deconvolution.py10CODE
LOWtests/attr/neuron/test_neuron_deeplift.py10CODE
LOWtests/attr/models/test_base.py10CODE
LOWtests/attr/layer/test_layer_deeplift.py10CODE
LOWtests/concept/test_tcav.py1255CODE
LOWcaptum/__init__.py4CODE
LOWcaptum/__init__.py5CODE
LOWcaptum/__init__.py6CODE
LOWcaptum/__init__.py7CODE
LOWcaptum/__init__.py8CODE
LOWcaptum/__init__.py9CODE
LOWcaptum/metrics/__init__.py5CODE
LOWcaptum/metrics/__init__.py5CODE
LOWcaptum/metrics/__init__.py9CODE
LOWcaptum/_utils/models/__init__.py2CODE
LOWcaptum/_utils/models/linear_model/__init__.py2CODE
LOWcaptum/_utils/models/linear_model/__init__.py2CODE
LOWcaptum/_utils/models/linear_model/__init__.py2CODE
LOWcaptum/_utils/models/linear_model/__init__.py2CODE
LOWcaptum/_utils/models/linear_model/__init__.py2CODE
LOWcaptum/_utils/models/linear_model/__init__.py2CODE
LOWcaptum/_utils/models/linear_model/__init__.py2CODE
LOWcaptum/_utils/models/linear_model/__init__.py2CODE
LOWcaptum/_utils/models/linear_model/__init__.py2CODE
LOWcaptum/insights/__init__.py27CODE
LOWcaptum/robust/__init__.py5CODE
LOWcaptum/robust/__init__.py6CODE
LOWcaptum/robust/__init__.py7CODE
LOWcaptum/robust/__init__.py8CODE
LOWcaptum/robust/__init__.py9CODE
LOWcaptum/influence/__init__.py5CODE
LOWcaptum/influence/__init__.py6CODE
LOWcaptum/influence/__init__.py7CODE
LOWcaptum/influence/__init__.py8CODE
LOWcaptum/influence/__init__.py8CODE
LOWcaptum/influence/__init__.py9CODE
LOWcaptum/influence/__init__.py9CODE
LOWcaptum/influence/_utils/common.py38CODE
LOWcaptum/influence/_utils/common.py38CODE
LOWcaptum/influence/_utils/common.py42CODE
LOWcaptum/influence/_utils/common.py42CODE
LOWcaptum/module/__init__.py2CODE
LOWcaptum/module/__init__.py3CODE
LOWcaptum/module/__init__.py4CODE
LOWcaptum/testing/helpers/__init__.py6CODE
LOWcaptum/testing/helpers/__init__.py14CODE
LOWcaptum/testing/helpers/influence/common.py649CODE
LOWcaptum/attr/__init__.py4CODE
LOWcaptum/attr/__init__.py5CODE
LOWcaptum/attr/__init__.py5CODE
LOWcaptum/attr/__init__.py6CODE
LOWcaptum/attr/__init__.py7CODE
LOWcaptum/attr/__init__.py8CODE
LOWcaptum/attr/__init__.py9CODE
LOWcaptum/attr/__init__.py9CODE
LOWcaptum/attr/__init__.py10CODE
106 more matches not shown…
Deep Nesting51 hits · 51 pts
SeverityFileLineSnippetContext
LOWtests/influence/_core/test_tracin_show_progress.py111CODE
LOWtests/influence/_core/test_arnoldi_influence.py129CODE
LOWtests/influence/_core/test_arnoldi_influence.py436CODE
LOWtests/utils/test_sample_gradient.py100CODE
LOWtests/attr/test_targets.py106CODE
LOWtests/attr/test_targets.py142CODE
LOWtests/attr/test_hook_removal.py71CODE
LOWtests/attr/test_data_parallel.py211CODE
LOWtests/attr/test_data_parallel.py71CODE
LOWtests/attr/test_jit.py90CODE
LOWtests/attr/test_jit.py134CODE
LOWtests/attr/test_jit.py147CODE
LOWtests/attr/test_feature_ablation.py948CODE
LOWtests/attr/neuron/test_neuron_conductance.py199CODE
LOWtests/attr/neuron/test_neuron_conductance.py250CODE
LOWtests/concept/test_tcav.py787CODE
LOWtests/concept/test_tcav.py915CODE
LOWscripts/parse_tutorials.py43CODE
LOWscripts/parse_sphinx.py42CODE
LOWcaptum/_utils/gradient.py44CODE
LOWcaptum/_utils/gradient.py260CODE
LOWcaptum/_utils/gradient.py950CODE
LOWcaptum/_utils/gradient.py297CODE
LOWcaptum/_utils/gradient.py302CODE
LOWcaptum/_utils/common.py356CODE
LOWcaptum/_utils/common.py618CODE
LOWcaptum/_utils/common.py769CODE
LOWcaptum/_utils/models/linear_model/train.py103CODE
LOWcaptum/robust/_core/metrics/attack_comparator.py440CODE
LOWcaptum/robust/_core/metrics/min_param_perturbation.py234CODE
LOWcaptum/robust/_core/metrics/min_param_perturbation.py291CODE
LOWcaptum/testing/helpers/basic.py32CODE
LOWcaptum/testing/helpers/basic.py190CODE
LOWcaptum/testing/helpers/influence/common.py345CODE
LOWcaptum/testing/helpers/influence/common.py659CODE
LOWcaptum/attr/_utils/approximation_methods.py48CODE
LOWcaptum/attr/_utils/approximation_methods.py79CODE
LOWcaptum/attr/_utils/visualization.py226CODE
LOWcaptum/attr/_utils/visualization.py274CODE
LOWcaptum/attr/_core/lime.py1182CODE
LOWcaptum/attr/_core/lrp.py306CODE
LOWcaptum/attr/_core/shapley_value.py203CODE
LOWcaptum/attr/_core/shapley_value.py541CODE
LOWcaptum/attr/_core/deep_lift.py306CODE
LOWcaptum/attr/_core/deep_lift.py329CODE
LOWcaptum/attr/_core/deep_lift.py694CODE
LOWcaptum/attr/_core/remote_provider.py165CODE
LOWcaptum/attr/_core/layer/layer_integrated_gradients.py128CODE
LOWcaptum/attr/_core/layer/layer_integrated_gradients.py135CODE
LOWcaptum/concept/_core/cav.py162CODE
LOWcaptum/concept/_core/tcav.py427CODE
Cross-Language Confusion10 hits · 35 pts
SeverityFileLineSnippetContext
HIGHtests/influence/_core/test_tracin_regression.py57 # pyre-fixme[61]: `net_adjusted` is undefined, or not always defined.COMMENT
HIGHtests/influence/_core/test_tracin_regression.py554 # pyre-fixme[61]: `test_loss_fn` is undefined, or not always defined.STRING
HIGHcaptum/_utils/gradient.py936 # pyre-fixme[61]: `layer_parameters` is undefined, or not alwaysSTRING
HIGHcaptum/_utils/gradient.py1054 # pyre-fixme[61]: `layer_parameters` is undefined, or not alwaysSTRING
HIGHcaptum/influence/_core/arnoldi_influence_function.py155 # pyre-fixme[61]: `k` is undefined, or not always defined.STRING
HIGHcaptum/influence/_core/tracincp_fast_rand_proj.py1550 # pyre-fixme[61]: `jacobian_projection` is undefined, or notSTRING
HIGHcaptum/influence/_core/tracincp_fast_rand_proj.py1554 # pyre-fixme[61]: `layer_input_projection` is undefined, or notSTRING
HIGHcaptum/testing/helpers/basic_models.py343 # pyre-fixme[61]: `another_embedding` is undefined, or not always defined.STRING
HIGHcaptum/testing/helpers/influence/common.py491 # pyre-fixme[61]: `net_adjusted` is undefined, or not always defined.COMMENT
HIGHcaptum/concept/_utils/classifier.py188 # pyre-fixme[61]: `input` is undefined, or not always defined.STRING
AI Structural Patterns35 hits · 32 pts
SeverityFileLineSnippetContext
LOWtests/metrics/test_infidelity.py486CODE
LOWtests/utils/test_linear_model.py28CODE
LOWtests/attr/test_lime.py526CODE
LOWtests/attr/test_kernel_shap.py530CODE
LOWtests/attr/test_shapley.py1281CODE
LOWtests/attr/test_shapley.py1328CODE
LOWtests/attr/test_shapley.py545CODE
LOWtests/attr/test_shapley.py633CODE
LOWcaptum/_utils/gradient.py588CODE
LOWcaptum/_utils/gradient.py608CODE
LOWcaptum/_utils/gradient.py625CODE
LOWcaptum/_utils/models/linear_model/model.py49CODE
LOWcaptum/_utils/models/linear_model/train.py103CODE
LOWcaptum/influence/_core/influence_function.py698CODE
LOWcaptum/influence/_core/arnoldi_influence_function.py294CODE
LOWcaptum/influence/_core/tracincp_fast_rand_proj.py910CODE
LOWcaptum/attr/_utils/visualization.py397CODE
LOWcaptum/attr/_utils/visualization.py415CODE
LOWcaptum/attr/_utils/visualization.py432CODE
LOWcaptum/attr/_utils/visualization.py895CODE
LOWcaptum/attr/_core/feature_permutation.py112CODE
LOWcaptum/attr/_core/lime.py933CODE
LOWcaptum/attr/_core/lime.py1182CODE
LOWcaptum/attr/_core/dataloader_attr.py265CODE
LOWcaptum/attr/_core/shapley_value.py825CODE
LOWcaptum/attr/_core/shapley_value.py1052CODE
LOWcaptum/attr/_core/kernel_shap.py61CODE
LOWcaptum/attr/_core/kernel_shap.py431CODE
LOWcaptum/attr/_core/neuron/neuron_conductance.py103CODE
LOWcaptum/attr/_core/layer/internal_influence.py74CODE
LOWcaptum/attr/_core/layer/layer_conductance.py81CODE
LOWcaptum/attr/_core/layer/layer_conductance.py98CODE
LOWcaptum/attr/_core/layer/layer_conductance.py113CODE
LOWcaptum/attr/_core/layer/layer_integrated_gradients.py300CODE
LOWcaptum/attr/_core/layer/layer_integrated_gradients.py321CODE
Self-Referential Comments6 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUMtests/attr/test_llm_attr.py759 # Create a mock OpenAI clientCOMMENT
MEDIUMcaptum/testing/attr/helpers/conductance_reference.py99 # Create a forward hook in order to attach backward hook to appropriateSTRING
MEDIUM⚡captum/attr/_utils/interpretable_input.py773 # Create a dummy mask for compatibilityCOMMENT
MEDIUM⚡captum/attr/_utils/interpretable_input.py776 # Create a dummy mask if None is providedCOMMENT
MEDIUM⚡captum/attr/_utils/interpretable_input.py778 # Create a mask with all zeros (entire image as one segment)COMMENT
MEDIUMcaptum/concept/_core/tcav.py313 >>> # Define the conceptsCODE
Over-Commented Block16 hits · 16 pts
SeverityFileLineSnippetContext
LOWtests/influence/_core/test_dataloader.py41 # [("none", captum.testing.helpers.influence.common.DataInfluenceConstructorCOMMENT
LOWsphinx/source/conf.py1#! /usr/bin/env python3COMMENT
LOWsphinx/source/conf.py101html_theme = "alabaster"COMMENT
LOWsphinx/source/conf.py121#COMMENT
LOWsphinx/source/conf.py141COMMENT
LOWscripts/publish_site.sh61# |-- api/COMMENT
LOWcaptum/_utils/gradient.py281 This is especially useful when we execute forward pass in a distributed setting,COMMENT
LOWcaptum/influence/_core/influence_function.py521 # this is the factory that accepts a batchCOMMENT
LOWcaptum/influence/_core/influence_function.py1041 # as described in the description for `NaiveInfluenceFunction`, the embeddingCOMMENT
LOWcaptum/influence/_core/arnoldi_influence_function.py541 # first figure out names of params that require gradients. this is need toCOMMENT
LOWcaptum/influence/_core/arnoldi_influence_function.py641 # the Hessian-vector product are actually tuples of tensors representingCOMMENT
LOWcaptum/influence/_core/arnoldi_influence_function.py761 def get_batch_embeddings(batch: List[Tensor]) -> Tensor:COMMENT
LOWcaptum/influence/_core/tracincp_fast_rand_proj.py1381COMMENT
LOWcaptum/attr/_utils/summarizer.py121 return temp if self._is_inputs_tuple else temp[0]COMMENT
LOWcaptum/attr/_core/feature_ablation.py301 self.use_weights = FalseCOMMENT
LOWcaptum/attr/_core/shapley_value.py501 # (n_perturb, *output_shape, 1,.. 1)COMMENT
Modern Structural Boilerplate16 hits · 15 pts
SeverityFileLineSnippetContext
LOWcaptum/__init__.py13__all__ = ["attr", "concept", "influence", "log", "metrics", "robust"]CODE
LOWcaptum/metrics/__init__.py11__all__ = [CODE
LOWcaptum/_utils/models/__init__.py4__all__ = [CODE
LOWcaptum/_utils/models/linear_model/__init__.py14__all__ = [CODE
LOWcaptum/robust/__init__.py11__all__ = ["FGSM", "AttackComparator", "MinParamPerturbation", "Perturbation", "PGD"]CODE
LOWcaptum/influence/__init__.py14__all__ = [CODE
LOWcaptum/influence/_utils/common.py1017def _set_attr(obj, names, val) -> None:STRING
LOWcaptum/module/__init__.py6__all__ = [CODE
LOWcaptum/testing/helpers/__init__.py16__all__ = [CODE
LOWcaptum/testing/helpers/basic.py150def set_all_random_seeds(seed: int = 1234) -> None:CODE
LOWcaptum/attr/__init__.py91__all__ = [CODE
LOWcaptum/attr/visualization.py26__all__ = [CODE
LOWcaptum/attr/_models/base.py151def _set_deep_layer_value(obj, layer_names, value) -> None:STRING
LOWcaptum/concept/__init__.py8__all__ = [CODE
LOWcaptum/log/dummy_log.py66def set_environment(env: Union[None, List[str], str]) -> None:CODE
LOWcaptum/log/__init__.py25__all__ = [CODE
Cross-Language Confusion (JS/TS)2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHwebsite/pages/en/index.js156print('IG Attributions:', attributions)CODE
HIGHwebsite/pages/en/index.js157print('Convergence Delta:', delta)CODE
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHcaptum/influence/_utils/common.py284except AttributeError:CODE
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMcaptum/influence/_core/arnoldi_influence_function.py603CODE
MEDIUMcaptum/influence/_core/arnoldi_influence_function.py609CODE
Excessive Try-Catch Wrapping5 hits · 4 pts
SeverityFileLineSnippetContext
LOWcaptum/influence/_core/tracincp_fast_rand_proj.py236 except Exception as ex:STRING
LOWcaptum/attr/_core/guided_grad_cam.py222 except Exception:STRING
LOWcaptum/attr/_core/remote_provider.py118 except Exception as e:CODE
LOWcaptum/attr/_core/remote_provider.py162 except Exception as e:CODE
LOWcaptum/attr/_core/remote_provider.py247 except Exception as e:CODE
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/type-checks.yml27 # docs, or the website scaffolding. Naming the scope and behavior hereCOMMENT
Structural Annotation Overuse2 hits · 2 pts
SeverityFileLineSnippetContext
LOWcaptum/attr/_utils/stat.py227 # NOTE: The following ensures mse is a float tensor.COMMENT
LOWcaptum/attr/_utils/summarizer.py168 # Step 2: get the correct orderSTRING
Verbosity Indicators3 hits · 2 pts
SeverityFileLineSnippetContext
LOWcaptum/attr/_utils/summarizer.py137 # Step 1:STRING
LOWcaptum/attr/_utils/summarizer.py140 # Step 2:STRING
LOWcaptum/attr/_utils/summarizer.py168 # Step 2: get the correct orderSTRING
AI Slop Vocabulary1 hit · 1 pts
SeverityFileLineSnippetContext
MEDIUMcaptum/influence/_core/arnoldi_influence_function.py651 # aforementioned hessian, then `R` would be `vs @ torch.diag(ls ** -0.5)`, i.e.STRING
Redundant / Tautological Comments1 hit · 0 pts
SeverityFileLineSnippetContext
LOWcaptum/attr/_core/llm_attr.py246 # Loop over the data and create a `Text` for each "pixel".STRING