Repository Analysis

TheAlgorithms/Rust

All Algorithms implemented in Rust

7.6 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of TheAlgorithms/Rust, a Rust project with 25,911 GitHub stars. SynthScan v2.0 examined 62,964 lines of code across 442 source files, recording 384 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 7.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).

7.6
Adjusted Score
7.6
Raw Score
100%
Time Factor
2026-07-03
Last Push
25.9K
Stars
Rust
Language
63.0K
Lines of Code
442
Files
384
Pattern Hits
2026-07-14
Scan Date
0.00
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 0MEDIUM 43LOW 341

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 384 distinct pattern matches across 5 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 Block326 hits · 320 pts
SeverityFileLineSnippetContext
LOWsrc/data_structures/segment_tree_recursive.rs81 ///COMMENT
LOWsrc/data_structures/segment_tree_recursive.rs121 match (left_res, right_res) {COMMENT
LOWsrc/data_structures/fenwick_tree.rs21 IndexOutOfBounds,COMMENT
LOWsrc/data_structures/fenwick_tree.rs41 /// A new `FenwickTree` instance.COMMENT
LOWsrc/data_structures/fenwick_tree.rs101COMMENT
LOWsrc/data_structures/fenwick_tree.rs121 let left_query = if left == 0 {COMMENT
LOWsrc/data_structures/fenwick_tree.rs161 /// desired value and the current value, then applying that difference using `update`.COMMENT
LOWsrc/data_structures/fenwick_tree.rs181///COMMENT
LOWsrc/data_structures/heap.rs1//! A generic heap data structure.COMMENT
LOWsrc/data_structures/heap.rs21COMMENT
LOWsrc/data_structures/heap.rs161 } else {COMMENT
LOWsrc/data_structures/heap.rs221 ///COMMENT
LOWsrc/data_structures/stack_using_singly_linked_list.rs101/// With the help of the ownership mechanism, the type `List` will be cleaned up automatically (dropped) after it goes oCOMMENT
LOWsrc/data_structures/trie.rs1//! This module provides a generic implementation of a Trie (prefix tree).COMMENT
LOWsrc/data_structures/segment_tree.rs61 }COMMENT
LOWsrc/data_structures/segment_tree.rs101 left /= 2;COMMENT
LOWsrc/data_structures/range_minimum_query.rs1//! Range Minimum Query (RMQ) ImplementationCOMMENT
LOWsrc/data_structures/range_minimum_query.rs21}COMMENT
LOWsrc/data_structures/range_minimum_query.rs41 /// A `RangeMinimumQuery` instance that can be used to perform range minimum queries.COMMENT
LOWsrc/data_structures/probabilistic/count_min_sketch.rs1use std::collections::hash_map::RandomState;COMMENT
LOWsrc/data_structures/probabilistic/count_min_sketch.rs21 fn increment_by(&mut self, item: Self::Item, count: usize);COMMENT
LOWsrc/data_structures/probabilistic/count_min_sketch.rs41/// <- WIDTH = 5 ->COMMENT
LOWsrc/data_structures/probabilistic/count_min_sketch.rs61/// E hash2: [0, 1, 0, 0, 0]COMMENT
LOWsrc/data_structures/probabilistic/bloom_filter.rs1use std::collections::hash_map::{DefaultHasher, RandomState};COMMENT
LOWsrc/data_structures/probabilistic/bloom_filter.rs81COMMENT
LOWsrc/bit_manipulation/swap_odd_even_bits.rs1/// Swaps odd and even bits in an integer.COMMENT
LOWsrc/bit_manipulation/swap_odd_even_bits.rs21/// assert_eq!(swap_odd_even_bits(2), 1);COMMENT
LOWsrc/bit_manipulation/find_unique_number.rs1/// Finds the unique number in a slice where every other element appears twice.COMMENT
LOWsrc/bit_manipulation/n_bits_gray_code.rs1/// Custom error type for Gray code generation.COMMENT
LOWsrc/bit_manipulation/reverse_bits.rs1//! This module provides a function to reverse the bits of a 32-bit unsigned integer.COMMENT
LOWsrc/bit_manipulation/reverse_bits.rs21//! O(1) - Uses a constant amount of extra spaceCOMMENT
LOWsrc/bit_manipulation/reverse_bits.rs41/// A 32-bit unsigned integer with bits in reverse orderCOMMENT
LOWsrc/bit_manipulation/binary_coded_decimal.rs1//! Binary Coded Decimal (BCD) conversionCOMMENT
LOWsrc/bit_manipulation/binary_coded_decimal.rs21///COMMENT
LOWsrc/bit_manipulation/binary_coded_decimal.rs41///COMMENT
LOWsrc/bit_manipulation/find_previous_power_of_two.rs1//! Previous Power of TwoCOMMENT
LOWsrc/bit_manipulation/find_previous_power_of_two.rs21///COMMENT
LOWsrc/bit_manipulation/find_previous_power_of_two.rs41/// assert_eq!(find_previous_power_of_two(8).unwrap(), 8);COMMENT
LOWsrc/bit_manipulation/rightmost_set_bit.rs1/// Finds the index (position) of the rightmost set bit in a number.COMMENT
LOWsrc/bit_manipulation/rightmost_set_bit.rs21///COMMENT
LOWsrc/bit_manipulation/sum_of_two_integers.rs1//! This module provides a function to add two integers without using the `+` operator.COMMENT
LOWsrc/bit_manipulation/find_missing_number.rs1/// Finds the missing number in a slice of consecutive integers.COMMENT
LOWsrc/bit_manipulation/highest_set_bit.rs1//! This module provides a function to find the position of the most significant bit (MSB)COMMENT
LOWsrc/bit_manipulation/counting_bits.rs1//! This module implements a function to count the number of set bits (1s)COMMENT
LOWsrc/bit_manipulation/twos_complement.rs1//! Two's Complement RepresentationCOMMENT
LOWsrc/bit_manipulation/twos_complement.rs21/// A `Result` containing:COMMENT
LOWsrc/bit_manipulation/binary_count_trailing_zeros.rs1/// Counts the number of trailing zeros in the binary representation of a numberCOMMENT
LOWsrc/bit_manipulation/binary_count_trailing_zeros.rs21pub fn binary_count_trailing_zeros(num: u64) -> u32 {COMMENT
LOWsrc/bit_manipulation/hamming_distance.rs1//! Hamming DistanceCOMMENT
LOWsrc/bit_manipulation/hamming_distance.rs41///COMMENT
LOWsrc/bit_manipulation/hamming_distance.rs61}COMMENT
LOWsrc/bit_manipulation/binary_shifts.rs1//! Binary Shift OperationsCOMMENT
LOWsrc/bit_manipulation/binary_shifts.rs21//!COMMENT
LOWsrc/bit_manipulation/binary_shifts.rs41///COMMENT
LOWsrc/bit_manipulation/binary_shifts.rs61 let zeros = "0".repeat(shift_amount as usize);COMMENT
LOWsrc/bit_manipulation/binary_shifts.rs81///COMMENT
LOWsrc/bit_manipulation/binary_shifts.rs101}COMMENT
LOWsrc/bit_manipulation/binary_shifts.rs121/// ```COMMENT
LOWsrc/bit_manipulation/binary_shifts.rs201/// # ArgumentsCOMMENT
LOWsrc/bit_manipulation/is_power_of_two.rs1//! Power of Two CheckCOMMENT
266 more matches not shown…
Decorative Section Separators38 hits · 122 pts
SeverityFileLineSnippetContext
MEDIUMsrc/financial/depreciation.rs427// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs429// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs435 // ── Straight-line ────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs23// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs25// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs63// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs65// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs84// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs86// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs137// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs139// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs205// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs207// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs282// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs284// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs348// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs350// ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs496 // ── Diminishing balance ──────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs537 // ── Units-of-production ──────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs577 // ── Sum-of-years' digits ─────────────────────────────────COMMENT
MEDIUMsrc/financial/depreciation.rs637 // ── Double-declining balance ─────────────────────────────COMMENT
MEDIUMsrc/machine_learning/optimization/adam.rs126 // ── Initialisation ────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/machine_learning/optimization/adam.rs206 // ── Step: standard Adam (weight_decay = 0.0) ──────────────────────────────COMMENT
MEDIUMsrc/machine_learning/optimization/adam.rs266 // ── Step: AdamW (weight_decay > 0.0) ─────────────────────────────────────COMMENT
MEDIUMsrc/machine_learning/optimization/adam.rs323 // ── Step: shared edge cases ───────────────────────────────────────────────COMMENT
MEDIUMsrc/machine_learning/optimization/adam.rs332 // ── Convergence (slow; marked #[ignore]) ─────────────────────────────────COMMENT
MEDIUMsrc/machine_learning/optimization/adam.rs332 // ── Convergence (slow; marked #[ignore]) ─────────────────────────────────COMMENT
MEDIUMsrc/hashing/sha1.rs156 // ── NIST FIPS 180-4 / RFC 3174 test vectors ──────────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs25// ── SHA-256 / SHA-224 ────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs153// ── SHA-512 / SHA-384 / SHA-512/224 / SHA-512/256 ───────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs305// ── Tests ────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs323 // ── Constant correctness ─────────────────────────────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs356 // ── SHA-256 (FIPS 180-4) ─────────────────────────────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs394 // ── SHA-224 (FIPS 180-4) ─────────────────────────────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs429 // ── SHA-512 (FIPS 180-4) ─────────────────────────────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs468 // ── SHA-384 (FIPS 180-4) ─────────────────────────────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs504 // ── SHA-512/256 (FIPS 180-4) ─────────────────────────────────────────────COMMENT
MEDIUMsrc/hashing/sha2.rs530 // ── SHA-512/224 (FIPS 180-4) ─────────────────────────────────────────────COMMENT
Fake / Example Data14 hits · 20 pts
SeverityFileLineSnippetContext
LOWsrc/general/huffman_encoding.rs351 "Lorem ipsum dolor sit amet, consectetur ",CODE
LOWsrc/general/huffman_encoding.rs351 "Lorem ipsum dolor sit amet, consectetur ",CODE
LOWsrc/general/huffman_encoding.rs355 "nullam vehicula. Interdum posuere lorem ipsum dolor. Elit eget ",CODE
LOWsrc/ciphers/base64.rs250 test_e_d!(b"Lorem Ipsum sit dolor amet.");CODE
LOWsrc/ciphers/vigenere.rs59 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",CODE
LOWsrc/ciphers/vigenere.rs59 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",CODE
LOWsrc/ciphers/vigenere.rs69 vigenere("1 Lorem ⏳ ipsum dolor sit amet Ѡ", "unicode"),CODE
LOWsrc/ciphers/vigenere.rs77 vigenere("Lorem ipsum dolor sit amet", "😉 key!"),CODE
LOWsrc/ciphers/vigenere.rs77 vigenere("Lorem ipsum dolor sit amet", "😉 key!"),CODE
LOWsrc/ciphers/vigenere.rs84 assert_eq!(vigenere("Lorem ipsum", ""), "Lorem ipsum");CODE
LOWsrc/string/z_algorithm.rs185 "lorem ipsum dolor sit amet, consectetur ",CODE
LOWsrc/string/z_algorithm.rs185 "lorem ipsum dolor sit amet, consectetur ",CODE
LOWsrc/string/z_algorithm.rs194 "lorem ipsum dolor sit amet, consectetur ",CODE
LOWsrc/string/z_algorithm.rs194 "lorem ipsum dolor sit amet, consectetur ",CODE
AI Slop Vocabulary5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMsrc/data_structures/probabilistic/bloom_filter.rs54/// Can we improve it? Certainly, in different ways.COMMENT
MEDIUM…hine_learning/loss_function/mean_squared_error_loss.rs4//! robust loss function used in machine learning.COMMENT
MEDIUM…ine_learning/loss_function/mean_absolute_error_loss.rs4//! robust loss function used in machine learning.COMMENT
MEDIUMsrc/math/huber_loss.rs3//! The `huber_loss` function calculates the Huber loss, which is a robust loss function used in machine learning, partiCOMMENT
MEDIUMsrc/math/huber_loss.rs18//! This implementation takes two references to vectors of f64 values, `actual` and `predicted`, and a `delta` value. ItCOMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/math/elliptic_curve.rs110 // TODO: implement counting for big PCOMMENT