Advanced AI Explainability for computer vision. Support for CNNs, Vision Transformers, Classification, Object detection, Segmentation, Image similarity and more.
This report presents the forensic synthetic code analysis of jacobgil/pytorch-grad-cam, a Python project with 12,952 GitHub stars. SynthScan v2.0 examined 4,968 lines of code across 61 source files, recording 127 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 27.3 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 127 distinct pattern matches across 7 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 | cam.py | 17 | CODE | |
| LOW | cam.py | 17 | CODE | |
| LOW | cam.py | 87 | CODE | |
| LOW | usage_examples/clip_example.py | 7 | CODE | |
| LOW | usage_examples/vit_example.py | 16 | CODE | |
| LOW | pytorch_grad_cam/ablation_cam_multilayer.py | 1 | CODE | |
| LOW | pytorch_grad_cam/shapley_cam.py | 1 | CODE | |
| LOW | pytorch_grad_cam/shapley_cam.py | 1 | CODE | |
| LOW | pytorch_grad_cam/shapley_cam.py | 1 | CODE | |
| LOW | pytorch_grad_cam/shapley_cam.py | 1 | CODE | |
| LOW | pytorch_grad_cam/shapley_cam.py | 3 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 1 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 2 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 3 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 4 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 5 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 6 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 7 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 7 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 7 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 8 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 9 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 10 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 11 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 12 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 13 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 14 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 15 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 16 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 17 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 18 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 19 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 20 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 21 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 22 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 23 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 23 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 24 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 25 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 26 | CODE | |
| LOW | pytorch_grad_cam/__init__.py | 27 | CODE | |
| LOW | pytorch_grad_cam/hirescam.py | 1 | CODE | |
| LOW | pytorch_grad_cam/metrics/cam_mult_image.py | 3 | CODE | |
| LOW | pytorch_grad_cam/metrics/cam_mult_image.py | 3 | CODE | |
| LOW | pytorch_grad_cam/utils/__init__.py | 1 | CODE | |
| LOW | pytorch_grad_cam/utils/__init__.py | 2 | CODE | |
| LOW | pytorch_grad_cam/utils/__init__.py | 3 | CODE | |
| LOW | pytorch_grad_cam/utils/__init__.py | 4 | CODE | |
| LOW | pytorch_grad_cam/utils/model_targets.py | 1 | CODE | |
| LOW | …am/feature_factorization/deep_feature_factorization.py | 4 | CODE | |
| LOW | …am/feature_factorization/deep_feature_factorization.py | 4 | CODE | |
| LOW | tests/test_context_release.py | 6 | CODE | |
| LOW | tests/test_context_release.py | 6 | CODE | |
| LOW | tests/test_context_release.py | 6 | CODE | |
| LOW | tests/test_context_release.py | 6 | CODE | |
| LOW | tests/test_context_release.py | 6 | CODE | |
| LOW | tests/test_context_release.py | 6 | CODE | |
| LOW | tests/test_context_release.py | 6 | CODE | |
| LOW | tests/test_context_release.py | 6 | CODE | |
| LOW | tests/test_context_release.py | 16 | CODE | |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pytorch_grad_cam/ablation_cam_multilayer.py | 84 | def set_ablation_layer_batch_indices(self, indices): | CODE |
| LOW | pytorch_grad_cam/ablation_cam_multilayer.py | 88 | def trim_ablation_layer_batch_indices(self, keep): | CODE |
| LOW⚡ | pytorch_grad_cam/guided_backprop.py | 59 | def recursive_replace_relu_with_guidedrelu(self, module_top): | CODE |
| LOW⚡ | pytorch_grad_cam/guided_backprop.py | 65 | def recursive_replace_guidedrelu_with_relu(self, module_top): | CODE |
| LOW | pytorch_grad_cam/ablation_layer.py | 11 | def objectiveness_mask_from_svd(self, activations, threshold=0.01): | CODE |
| LOW | pytorch_grad_cam/ablation_layer.py | 25 | def activations_to_be_ablated( | CODE |
| LOW | pytorch_grad_cam/base_cam.py | 183 | def forward_augmentation_smoothing( | CODE |
| LOW⚡ | pytorch_grad_cam/utils/find_layers.py | 11 | def replace_all_layer_type_recursive(model, old_layer_type, new_layer): | CODE |
| LOW⚡ | pytorch_grad_cam/utils/find_layers.py | 18 | def find_layer_types_recursive(model, layer_types): | CODE |
| LOW⚡ | pytorch_grad_cam/utils/find_layers.py | 24 | def find_layer_predicate_recursive(model, predicate): | CODE |
| LOW | pytorch_grad_cam/utils/reshape_transforms.py | 4 | def fasterrcnn_reshape_transform(x): | CODE |
| LOW | pytorch_grad_cam/utils/image.py | 83 | def show_factorization_on_image( | CODE |
| LOW | pytorch_grad_cam/utils/image.py | 179 | def scale_accross_batch_and_channels(tensor, target_size): | CODE |
| LOW | tests/test_context_release.py | 46 | def test_memory_usage_in_loop(numpy_image, batch_size, width, height, | CODE |
| LOW⚡ | tests/test_finer_cam_correctness.py | 33 | def test_finercam_supports_context_manager(): | CODE |
| LOW⚡ | tests/test_finer_cam_correctness.py | 39 | def test_finercam_runs_on_binary_classifier_without_index_error(): | CODE |
| LOW⚡ | tests/test_finer_cam_correctness.py | 47 | def test_finercam_runs_on_ternary_classifier_without_index_error(): | CODE |
| LOW⚡ | tests/test_finer_cam_correctness.py | 55 | def test_finercam_htcore_is_single_underscore(): | CODE |
| LOW | tests/test_run_all_models.py | 59 | def test_all_cam_models_can_run(numpy_image, batch_size, width, height, | CODE |
| LOW | tests/test_one_channel.py | 30 | def test_memory_usage_in_loop(numpy_image, cam_method): | CODE |
| LOW | tests/test_context_release_cuda.py | 48 | def test_memory_usage_in_loop(numpy_image, batch_size, width, height, | CODE |
| LOW | tests/test_sess.py | 88 | def test_sess_without_targets(numpy_image): | CODE |
| LOW | tests/test_sess.py | 105 | def test_sess_invalid_arguments(): | CODE |
| LOW | tests/test_fasterrcnn_target_device.py | 12 | def test_target_inherits_output_device_cpu(): | CODE |
| LOW | tests/test_fasterrcnn_target_device.py | 27 | def test_target_returns_zero_on_empty_boxes(): | CODE |
| LOW | tests/test_fasterrcnn_target_device.py | 39 | def test_target_preserves_boxes_dtype(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | usage_examples/clip_example.py | 77 | CODE | |
| LOW | usage_examples/swinT_example.py | 62 | CODE | |
| LOW | usage_examples/vit_example.py | 62 | CODE | |
| LOW | pytorch_grad_cam/ablation_layer.py | 111 | CODE | |
| LOW | pytorch_grad_cam/sess.py | 28 | CODE | |
| LOW | pytorch_grad_cam/utils/reshape_transforms.py | 24 | CODE | |
| LOW | pytorch_grad_cam/utils/reshape_transforms.py | 34 | CODE | |
| LOW | pytorch_grad_cam/utils/image.py | 176 | CODE | |
| LOW | pytorch_grad_cam/utils/image.py | 189 | CODE | |
| LOW | …am/feature_factorization/deep_feature_factorization.py | 134 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 130 | # In this example grayscale_cam has only one image in the batch: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | pytorch_grad_cam/guided_backprop.py | 71 | except Exception: | CODE |
| MEDIUM | pytorch_grad_cam/guided_backprop.py | 65 | def recursive_replace_guidedrelu_with_relu(self, module_top): | CODE |
| LOW | pytorch_grad_cam/finer_cam.py | 45 | except Exception: | CODE |
| MEDIUM | pytorch_grad_cam/finer_cam.py | 42 | def __del__(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pytorch_grad_cam/ablation_cam_multilayer.py | 92 | CODE | |
| LOW | pytorch_grad_cam/ablation_cam.py | 75 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pytorch_grad_cam/metrics/road.py | 1 | # A Consistent and Efficient Evaluation Strategy for Attribution Methods | COMMENT |