AI Slop Code RIsk Monitor

jacobgil/pytorch-grad-cam

Advanced AI Explainability for computer vision. Support for CNNs, Vision Transformers, Classification, Object detection, Segmentation, Image similarity and more.

29.3 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for jacobgil/pytorch-grad-cam, a Python project with 12,996 GitHub stars. SynthScan examined 4,968 lines of code across 61 source files, recording 129 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 29.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.

29.3
Adjusted Signal
29.3
Raw Pattern Score
100%
Time Factor
2026-08-13
Last Push
13.0K
Stars
Python
Language
5.0K
Lines of Code
61
Files
129
Pattern Hits
2026-10-12
Scan Date
0.05
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 40.1/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 54.4/100 · HIGH

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

Agent Over-Engineering Ratio 43.6/100 · MEDIUM

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

PR Review Velocity Impact 77.5/100 · CRITICAL

Which changes need focused human review? 129 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 0HIGH 3MEDIUM 2LOW 124

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 129 distinct pattern matches across 8 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.

Unused Imports83 hits · 78 pts
SeverityFileLineSnippetContext
LOWcam.py17CODE
LOWcam.py17CODE
LOWcam.py87CODE
LOWusage_examples/clip_example.py7CODE
LOWusage_examples/vit_example.py16CODE
LOWpytorch_grad_cam/ablation_cam_multilayer.py1CODE
LOWpytorch_grad_cam/shapley_cam.py1CODE
LOWpytorch_grad_cam/shapley_cam.py1CODE
LOWpytorch_grad_cam/shapley_cam.py1CODE
LOWpytorch_grad_cam/shapley_cam.py1CODE
LOWpytorch_grad_cam/shapley_cam.py3CODE
LOWpytorch_grad_cam/__init__.py1CODE
LOWpytorch_grad_cam/__init__.py2CODE
LOWpytorch_grad_cam/__init__.py3CODE
LOWpytorch_grad_cam/__init__.py4CODE
LOWpytorch_grad_cam/__init__.py5CODE
LOWpytorch_grad_cam/__init__.py6CODE
LOWpytorch_grad_cam/__init__.py7CODE
LOWpytorch_grad_cam/__init__.py7CODE
LOWpytorch_grad_cam/__init__.py7CODE
LOWpytorch_grad_cam/__init__.py8CODE
LOWpytorch_grad_cam/__init__.py9CODE
LOWpytorch_grad_cam/__init__.py10CODE
LOWpytorch_grad_cam/__init__.py11CODE
LOWpytorch_grad_cam/__init__.py12CODE
LOWpytorch_grad_cam/__init__.py13CODE
LOWpytorch_grad_cam/__init__.py14CODE
LOWpytorch_grad_cam/__init__.py15CODE
LOWpytorch_grad_cam/__init__.py16CODE
LOWpytorch_grad_cam/__init__.py17CODE
LOWpytorch_grad_cam/__init__.py18CODE
LOWpytorch_grad_cam/__init__.py19CODE
LOWpytorch_grad_cam/__init__.py20CODE
LOWpytorch_grad_cam/__init__.py21CODE
LOWpytorch_grad_cam/__init__.py22CODE
LOWpytorch_grad_cam/__init__.py23CODE
LOWpytorch_grad_cam/__init__.py23CODE
LOWpytorch_grad_cam/__init__.py24CODE
LOWpytorch_grad_cam/__init__.py25CODE
LOWpytorch_grad_cam/__init__.py26CODE
LOWpytorch_grad_cam/__init__.py27CODE
LOWpytorch_grad_cam/hirescam.py1CODE
LOWpytorch_grad_cam/metrics/cam_mult_image.py3CODE
LOWpytorch_grad_cam/metrics/cam_mult_image.py3CODE
LOWpytorch_grad_cam/utils/__init__.py1CODE
LOWpytorch_grad_cam/utils/__init__.py2CODE
LOWpytorch_grad_cam/utils/__init__.py3CODE
LOWpytorch_grad_cam/utils/__init__.py4CODE
LOWpytorch_grad_cam/utils/model_targets.py1CODE
LOW…am/feature_factorization/deep_feature_factorization.py4CODE
LOW…am/feature_factorization/deep_feature_factorization.py4CODE
LOWtests/test_context_release.py6CODE
LOWtests/test_context_release.py6CODE
LOWtests/test_context_release.py6CODE
LOWtests/test_context_release.py6CODE
LOWtests/test_context_release.py6CODE
LOWtests/test_context_release.py6CODE
LOWtests/test_context_release.py6CODE
LOWtests/test_context_release.py6CODE
LOWtests/test_context_release.py16CODE
23 more matches not shown…
Hyper-Verbose Identifiers26 hits · 30 pts
SeverityFileLineSnippetContext
LOWpytorch_grad_cam/ablation_cam_multilayer.py84 def set_ablation_layer_batch_indices(self, indices):CODE
LOWpytorch_grad_cam/ablation_cam_multilayer.py88 def trim_ablation_layer_batch_indices(self, keep):CODE
LOW⚡pytorch_grad_cam/guided_backprop.py59 def recursive_replace_relu_with_guidedrelu(self, module_top):CODE
LOW⚡pytorch_grad_cam/guided_backprop.py65 def recursive_replace_guidedrelu_with_relu(self, module_top):CODE
LOWpytorch_grad_cam/ablation_layer.py11 def objectiveness_mask_from_svd(self, activations, threshold=0.01):CODE
LOWpytorch_grad_cam/ablation_layer.py25 def activations_to_be_ablated(CODE
LOWpytorch_grad_cam/base_cam.py183 def forward_augmentation_smoothing(CODE
LOW⚡pytorch_grad_cam/utils/find_layers.py11def replace_all_layer_type_recursive(model, old_layer_type, new_layer):CODE
LOW⚡pytorch_grad_cam/utils/find_layers.py18def find_layer_types_recursive(model, layer_types):CODE
LOW⚡pytorch_grad_cam/utils/find_layers.py24def find_layer_predicate_recursive(model, predicate):CODE
LOWpytorch_grad_cam/utils/reshape_transforms.py4def fasterrcnn_reshape_transform(x):CODE
LOWpytorch_grad_cam/utils/image.py83def show_factorization_on_image(CODE
LOWpytorch_grad_cam/utils/image.py179def scale_accross_batch_and_channels(tensor, target_size):CODE
LOWtests/test_context_release.py46def test_memory_usage_in_loop(numpy_image, batch_size, width, height,CODE
LOW⚡tests/test_finer_cam_correctness.py33def test_finercam_supports_context_manager():CODE
LOW⚡tests/test_finer_cam_correctness.py39def test_finercam_runs_on_binary_classifier_without_index_error():CODE
LOW⚡tests/test_finer_cam_correctness.py47def test_finercam_runs_on_ternary_classifier_without_index_error():CODE
LOW⚡tests/test_finer_cam_correctness.py55def test_finercam_htcore_is_single_underscore():CODE
LOWtests/test_run_all_models.py59def test_all_cam_models_can_run(numpy_image, batch_size, width, height,CODE
LOWtests/test_one_channel.py30def test_memory_usage_in_loop(numpy_image, cam_method):CODE
LOWtests/test_context_release_cuda.py48def test_memory_usage_in_loop(numpy_image, batch_size, width, height,CODE
LOWtests/test_sess.py88def test_sess_without_targets(numpy_image):CODE
LOWtests/test_sess.py105def test_sess_invalid_arguments():CODE
LOWtests/test_fasterrcnn_target_device.py12def test_target_inherits_output_device_cpu():CODE
LOWtests/test_fasterrcnn_target_device.py27def test_target_returns_zero_on_empty_boxes():CODE
LOWtests/test_fasterrcnn_target_device.py39def test_target_preserves_boxes_dtype():CODE
AI Structural Patterns10 hits · 10 pts
SeverityFileLineSnippetContext
LOWusage_examples/clip_example.py77CODE
LOWusage_examples/swinT_example.py62CODE
LOWusage_examples/vit_example.py62CODE
LOWpytorch_grad_cam/ablation_layer.py111CODE
LOWpytorch_grad_cam/sess.py28CODE
LOWpytorch_grad_cam/utils/reshape_transforms.py24CODE
LOWpytorch_grad_cam/utils/reshape_transforms.py34CODE
LOWpytorch_grad_cam/utils/image.py176CODE
LOWpytorch_grad_cam/utils/image.py189CODE
LOW…am/feature_factorization/deep_feature_factorization.py134CODE
Empty Error Handlers2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHpytorch_grad_cam/guided_backprop.py71except Exception:CODE
HIGHpytorch_grad_cam/finer_cam.py45except Exception:CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHREADME.md130 # In this example grayscale_cam has only one image in the batch:COMMENT
Excessive Try-Catch Wrapping4 hits · 6 pts
SeverityFileLineSnippetContext
LOW⚡pytorch_grad_cam/guided_backprop.py71 except Exception:CODE
MEDIUMpytorch_grad_cam/guided_backprop.py65def recursive_replace_guidedrelu_with_relu(self, module_top):CODE
LOWpytorch_grad_cam/finer_cam.py45 except Exception:CODE
MEDIUMpytorch_grad_cam/finer_cam.py42def __del__(self):CODE
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWpytorch_grad_cam/ablation_cam_multilayer.py92CODE
LOWpytorch_grad_cam/ablation_cam.py75CODE
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpytorch_grad_cam/metrics/road.py1# A Consistent and Efficient Evaluation Strategy for Attribution MethodsCOMMENT