Repository Analysis

maderix/ANE

Training neural networks on Apple Neural Engine via reverse-engineered private APIs

6.6 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of maderix/ANE, a Objective-C project with 7,229 GitHub stars. SynthScan v2.0 examined 14,302 lines of code across 54 source files, recording 67 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 6.6 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).

6.6
Adjusted Score
6.6
Raw Score
100%
Time Factor
2026-03-10
Last Push
7.2K
Stars
Objective-C
Language
14.3K
Lines of Code
54
Files
67
Pattern Hits
2026-08-02
Scan Date
0.02
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

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.

No multi-scan history yet — run the scanner again to build trend data.

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 1MEDIUM 2LOW 64

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 67 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.

Over-Commented Block25 hits · 25 pts
SeverityFileLineSnippetContext
LOWane_int8_bench.m1// ane_int8_bench.m — INT8 W8A8 benchmark on ANE via _ANEInMemoryModelCOMMENT
LOWbridge/ane_bridge.h1// ane_bridge.h — C-callable bridge to ANE private APIs for Python ctypesCOMMENT
LOWbridge/ane_bridge.h21COMMENT
LOWtraining/train_large.m561 io_copy(kern[L].qkvBwd->ioIn, 0, sdpaBwd2[L]->ioOut, 0, 2*DIM, SEQ);COMMENT
LOWtraining/train_large.m581 // Wait no - dx2 = d(loss)/d(x2), not d(loss)/d(layer_input)COMMENT
LOWtraining/ane_classifier.h1// ane_classifier.h — MIL generators for classifier matmul and softmax on ANECOMMENT
LOWtraining/test_conv_attn3.m1// Grouped conv causal attention with CORRECT layout A: blob[oc*ICg + ic]COMMENT
LOWtraining/test_weight_reload.m1// test_weight_reload.m — Can we skip recompilation by rewriting weight blobs on disk?COMMENT
LOWtraining/tiny_train_old.m1// tiny_train.m — Train a 2-layer linear model on ANE (forward AND backward)COMMENT
LOWtraining/test_dynamic_matmul.m1// test_dynamic_matmul.m — Benchmark dynamic matmul on ANE (no recompile)COMMENT
LOWtraining/test_weight_patch.m1// test_weight_patch.m — Test whether ANE weights can be patched after compileCOMMENT
LOWtraining/ane_rmsnorm_bwd.h1// ane_rmsnorm_bwd.h — MIL generator for RMSNorm backward on ANECOMMENT
LOWtraining/stories_config.h1// stories_config.h — Stories110M model config and structuresCOMMENT
LOWtraining/stories_config.h21#define HD (DIM/HEADS)COMMENT
LOWtraining/train_large_ane.m1// train_large_ane.m — Stories110M training with CPU ops offloaded to ANECOMMENT
LOWtraining/test_fused_qkv.m1// Test: Fused QKV projections in single MIL graph (3 convs → concat output)COMMENT
LOWtraining/model.h1// model.h — Stories110M model struct + weight loading + ANE kernel compilationCOMMENT
LOWtraining/tiny_train.m1// tiny_train.m — Train a 2-layer linear model on ANE (forward AND backward)COMMENT
LOWtraining/test_fused_bwd.m1// Test: fused backward dx kernelsCOMMENT
LOWtraining/test_full_fused.m1// Full fused forward: QKV convs → reshape → matmul(Q,K^T) → scale+mask → softmax → matmul(scores,V) → Wo convCOMMENT
LOWtraining/test_ane_causal_attn.m1// Decomposed causal attention: Q@K^T on ANE, mask+softmax on CPU, scores@V on ANECOMMENT
LOWtraining/training_dynamic/config.h1// config.h — Model-agnostic structs, derived sizes, ANE initCOMMENT
LOWtraining/training_dynamic/config.h21#ifndef MODEL_NAMECOMMENT
LOWtraining/training_dynamic/models/stories110m.h1// stories110m.h — Stories110M (Llama2-style, 12 layers, MHA)COMMENT
LOWtraining/training_dynamic/models/qwen3_06b.h1// qwen3_06b.h — Qwen3-0.6B (28 layers, GQA 16q/8kv, head_dim=128)COMMENT
Verbosity Indicators12 hits · 22 pts
SeverityFileLineSnippetContext
LOWtraining/test_conv_attn3.m177 // Step 1: Q@K^TCOMMENT
LOWtraining/test_conv_attn3.m181 // Step 2: Scale + causal mask + softmax (CPU)COMMENT
LOWtraining/test_conv_attn3.m202 // Step 3: scores@VCOMMENT
LOWtraining/ane_rmsnorm_bwd.h35 // Step 1: Compute rrms = 1/sqrt(mean(x²) + eps)COMMENT
LOWtraining/ane_rmsnorm_bwd.h51 // Step 2: Load RMSNorm weights w [1, DIM, 1, 1]COMMENT
LOWtraining/ane_rmsnorm_bwd.h54 // Step 3: Compute dot = sum(dy * w * x, axis=1) * invd * rrms²COMMENT
LOWtraining/ane_rmsnorm_bwd.h68 // Step 4: dx = (dy * w - x * coeff) * rrmsCOMMENT
LOWtraining/test_ane_causal_attn.m97 // Step 1: Q @ K^T → scores [1, HEADS, SEQ, SEQ]COMMENT
LOWtraining/test_ane_causal_attn.m115 // Step 3: scores_softmax @ V → output [1, HEADS, SEQ, HD]COMMENT
LOWtraining/test_ane_causal_attn.m167 // Step 1: Q@K^T on ANECOMMENT
LOWtraining/test_ane_causal_attn.m173 // Step 2: Scale + causal mask + softmax on CPUCOMMENT
LOWtraining/test_ane_causal_attn.m197 // Step 3: softmax_scores @ V on ANECOMMENT
Structural Annotation Overuse12 hits · 22 pts
SeverityFileLineSnippetContext
LOWtraining/test_conv_attn3.m177 // Step 1: Q@K^TCOMMENT
LOWtraining/test_conv_attn3.m181 // Step 2: Scale + causal mask + softmax (CPU)COMMENT
LOWtraining/test_conv_attn3.m202 // Step 3: scores@VCOMMENT
LOWtraining/ane_rmsnorm_bwd.h35 // Step 1: Compute rrms = 1/sqrt(mean(x²) + eps)COMMENT
LOWtraining/ane_rmsnorm_bwd.h51 // Step 2: Load RMSNorm weights w [1, DIM, 1, 1]COMMENT
LOWtraining/ane_rmsnorm_bwd.h54 // Step 3: Compute dot = sum(dy * w * x, axis=1) * invd * rrms²COMMENT
LOWtraining/ane_rmsnorm_bwd.h68 // Step 4: dx = (dy * w - x * coeff) * rrmsCOMMENT
LOWtraining/test_ane_causal_attn.m97 // Step 1: Q @ K^T → scores [1, HEADS, SEQ, SEQ]COMMENT
LOWtraining/test_ane_causal_attn.m115 // Step 3: scores_softmax @ V → output [1, HEADS, SEQ, HD]COMMENT
LOWtraining/test_ane_causal_attn.m167 // Step 1: Q@K^T on ANECOMMENT
LOWtraining/test_ane_causal_attn.m173 // Step 2: Scale + causal mask + softmax on CPUCOMMENT
LOWtraining/test_ane_causal_attn.m197 // Step 3: softmax_scores @ V on ANECOMMENT
Excessive Try-Catch Wrapping8 hits · 10 pts
SeverityFileLineSnippetContext
LOWtraining/dashboard.py135 except Exception as e:CODE
LOWtraining/dashboard.py172 except Exception as e:CODE
LOWtraining/dashboard.py313 except Exception as e:CODE
LOWtraining/dashboard.py1044 except Exception:CODE
LOWtraining/dashboard.py1103 except Exception:CODE
LOWtraining/dashboard.py1182 except Exception as e:CODE
MEDIUMtraining/dashboard.py141def load_weights_from_ckpt(path):CODE
MEDIUMtraining/dashboard.py1173def force_gen():CODE
Deep Nesting7 hits · 7 pts
SeverityFileLineSnippetContext
LOWtraining/dashboard.py186CODE
LOWtraining/dashboard.py290CODE
LOWtraining/dashboard.py418CODE
LOWtraining/dashboard.py590CODE
LOWtraining/dashboard.py651CODE
LOWtraining/dashboard.py947CODE
LOWtraining/tokenize.py12CODE
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtraining/dashboard.py910 cmd = f'cd training_dynamic && make{model_arg} 2>&1 && ./train'CODE
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtraining/dashboard.py394def _sync_globals_from_parsed(cfg):CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtraining/dashboard.py906CODE