Repository Analysis

arogozhnikov/einops

Flexible and powerful tensor operations for readable and reliable code (for pytorch, jax, TF and others)

9.9 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of arogozhnikov/einops, a Python project with 9,549 GitHub stars. SynthScan v2.0 examined 10,082 lines of code across 55 source files, recording 88 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 9.9 places this repository in the Low 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).

9.9
Adjusted Score
9.9
Raw Score
100%
Time Factor
2026-07-05
Last Push
9.5K
Stars
Python
Language
10.1K
Lines of Code
55
Files
88
Pattern Hits
2026-07-14
Scan Date
0.05
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

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.

CRITICAL 0HIGH 3MEDIUM 0LOW 85

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 88 distinct pattern matches across 8 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.

Hyper-Verbose Identifiers51 hits · 51 pts
SeverityFileLineSnippetContext
LOWdocs/utils/__init__.py7def display_np_arrays_as_images():CODE
LOWeinops/einops.py167def _reconstruct_from_shape_uncached(CODE
LOWeinops/einops.py307def _prepare_transformation_recipe(CODE
LOWeinops/einops.py469def _prepare_recipes_for_all_dims(CODE
LOWeinops/einops.py780def _validate_einsum_axis_name(axis_name):CODE
LOWeinops/einops.py797def _compactify_pattern_for_einsum(pattern: str) -> str:CODE
LOWeinops/parsing.py127 def check_axis_name_return_reason(name: str, allow_underscore: bool = False) -> tuple[bool, str]:CODE
LOWeinops/_torch_specific.py48 def stack_on_zeroth_dimension(tensors: list[torch.Tensor]):CODE
LOWeinops/_torch_specific.py77def apply_for_scriptable_torch(CODE
LOWeinops/_torch_specific.py102def allow_ops_in_compiled_graph():CODE
LOWeinops/_backends.py104 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py180 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py263 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py314 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py397 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py457 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py517 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py587 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py651 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py708 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/_backends.py750 def stack_on_zeroth_dimension(self, tensors: list):CODE
LOWeinops/tests/test_parsing.py31def test_elementary_axis_name():CODE
LOWeinops/tests/test_layers.py37def test_rearrange_imperative():CODE
LOWeinops/tests/test_layers.py230def test_torch_layers_scripting():CODE
LOWeinops/tests/test_layers.py355def test_einmix_decomposition():CODE
LOWeinops/tests/__init__.py23def find_names_of_all_frameworks() -> list[str]:CODE
LOWeinops/tests/test_packing.py20def unpack_and_pack_against_numpy(x, ps, pattern: str):CODE
LOWeinops/tests/test_packing.py138def test_pack_unpack_with_numpy():CODE
LOWeinops/tests/test_packing.py201def test_pack_unpack_against_numpy():CODE
LOWeinops/tests/test_packing.py265def test_pack_unpack_array_api():CODE
LOWeinops/tests/test_ops.py44def test_collapsed_ellipsis_errors_out():CODE
LOWeinops/tests/test_ops.py100def test_ellipsis_ops_imperative():CODE
LOWeinops/tests/test_ops.py117def test_rearrange_consistency_numpy():CODE
LOWeinops/tests/test_ops.py155def test_rearrange_permutations_numpy():CODE
LOWeinops/tests/test_ops.py183def test_reduction_imperatives():CODE
LOWeinops/tests/test_ops.py272def test_reduction_stress_imperatives():CODE
LOWeinops/tests/test_ops.py304def test_reduction_with_callable_imperatives():CODE
LOWeinops/tests/test_ops.py355def test_enumerating_directions():CODE
LOWeinops/tests/test_ops.py370def test_concatenations_and_stacking():CODE
LOWeinops/tests/test_ops.py389def test_gradients_imperatives():CODE
LOWeinops/tests/test_ops.py549def test_torch_compile_with_dynamic_shape():CODE
LOWeinops/tests/test_ops.py582def test_reduction_imperatives_booleans():CODE
LOWeinops/tests/test_other.py56def test_optimize_transformations_numpy():CODE
LOWeinops/tests/test_other.py93def test_parse_shape_imperative():CODE
LOWeinops/tests/test_other.py154def test_parse_with_anonymous_axes():CODE
LOWeinops/tests/test_other.py194def test_parse_shape_symbolic(backend):CODE
LOWeinops/tests/test_other.py222def test_parse_shape_symbolic_ellipsis(backend):CODE
LOWeinops/tests/test_other.py258def test_torch_compile_for_functions():CODE
LOWeinops/tests/test_other.py309def test_torch_compile_for_layers():CODE
LOWeinops/tests/test_examples.py153def tensor_train_example_numpy():CODE
LOWeinops/tests/test_examples.py194def test_pytorch_yolo_fragment():CODE
Deep Nesting19 hits · 19 pts
SeverityFileLineSnippetContext
LOWeinops/einops.py61CODE
LOWeinops/einops.py307CODE
LOWeinops/einops.py677CODE
LOWeinops/einops.py797CODE
LOWeinops/parsing.py35CODE
LOWeinops/parsing.py55CODE
LOWeinops/_torch_specific.py27CODE
LOWeinops/_backends.py22CODE
LOWeinops/_backends.py243CODE
LOWeinops/_backends.py502CODE
LOWeinops/layers/_einmix.py95CODE
LOWeinops/tests/test_layers.py37CODE
LOWeinops/tests/test_layers.py110CODE
LOWeinops/tests/test_layers.py151CODE
LOWeinops/tests/test_einsum.py199CODE
LOWeinops/tests/test_einsum.py234CODE
LOWeinops/tests/test_ops.py100CODE
LOWeinops/tests/test_ops.py219CODE
LOWeinops/tests/test_ops.py272CODE
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHeinops/einops.py485 einops.reduce combines rearrangement and reduction using reader-friendly notation. Some examples: ```pythSTRING
HIGHeinops/einops.py570 einops.rearrange is a reader-friendly smart element reordering for multidimensional tensors. This operation incSTRING
HIGHeinops/einops.py867 einops.einsum calls einsum operations with einops-style named axes indexing, computing tensor products with an STRING
Unused Imports9 hits · 9 pts
SeverityFileLineSnippetContext
LOWeinops/__init__.py19CODE
LOWeinops/__init__.py19CODE
LOWeinops/__init__.py19CODE
LOWeinops/__init__.py19CODE
LOWeinops/__init__.py19CODE
LOWeinops/__init__.py19CODE
LOWeinops/__init__.py20CODE
LOWeinops/__init__.py20CODE
LOWeinops/_backends.py225CODE
Excessive Try-Catch Wrapping3 hits · 3 pts
SeverityFileLineSnippetContext
LOWeinops/array_api.py149 except Exception as e:CODE
LOWeinops/packing.py184 except Exception as e:CODE
LOWeinops/tests/test_other.py50 except Exception as e:CODE
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOW.github/workflows/deploy_docs.yml21 with:COMMENT
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWeinops/__init__.py17__all__ = ["EinopsError", "asnumpy", "einsum", "pack", "parse_shape", "rearrange", "reduce", "repeat", "unpack"]CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWeinops/tests/test_examples.py250CODE