Fully automatic censorship removal for language models
This report presents the forensic synthetic code analysis of p-e-w/heretic, a Python project with 26,263 GitHub stars. SynthScan v2.0 examined 7,128 lines of code across 30 source files, recording 37 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 5.7 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).
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.
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 37 distinct pattern matches across 6 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 | src/heretic/system.py | 50 | def get_nvidia_driver_version() -> str | None: | CODE |
| LOW | src/heretic/system.py | 64 | def get_amdgpu_driver_version() -> str | None: | CODE |
| LOW | src/heretic/system.py | 240 | def get_accelerator_info_dict() -> dict[str, Any]: | CODE |
| LOW | src/heretic/config.py | 552 | def settings_customise_sources( | CODE |
| LOW | src/heretic/reproduce.py | 115 | def load_reproduction_information(path: str) -> dict[str, Any]: | CODE |
| LOW | src/heretic/reproduce.py | 151 | def get_package_mismatch_severity(package_name: str) -> MismatchSeverity: | CODE |
| LOW | src/heretic/reproduce.py | 175 | def format_version_information(version_information: dict[str, Any]) -> str: | CODE |
| LOW | src/heretic/model.py | 451 | def get_abliterable_components(self) -> list[str]: | CODE |
| LOW | src/heretic/utils.py | 351 | def generate_requirements_txt() -> str: | CODE |
| LOW | src/heretic/utils.py | 376 | def generate_reproduce_readme( | CODE |
| LOW | src/heretic/evaluator.py | 128 | def get_dataset_specifications(self) -> list[DatasetSpecification]: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/heretic/system.py | 26 | CODE | |
| LOW | src/heretic/system.py | 64 | CODE | |
| LOW | src/heretic/system.py | 423 | CODE | |
| LOW | src/heretic/reproduce.py | 35 | CODE | |
| LOW | src/heretic/model.py | 189 | CODE | |
| LOW | src/heretic/model.py | 461 | CODE | |
| LOW | src/heretic/utils.py | 168 | CODE | |
| LOW | src/heretic/utils.py | 376 | CODE | |
| LOW | src/heretic/main.py | 178 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/heretic/system.py | 99 | except Exception: | CODE |
| LOW | src/heretic/system.py | 175 | except Exception: | CODE |
| LOW | src/heretic/model.py | 151 | except Exception as error: | CODE |
| LOW | src/heretic/utils.py | 200 | except Exception as error: | CODE |
| LOW | src/heretic/plugin.py | 126 | except Exception: | CODE |
| LOW | src/heretic/main.py | 142 | except Exception: | CODE |
| LOW | src/heretic/main.py | 446 | except Exception as error: | CODE |
| LOW | src/heretic/main.py | 1455 | except Exception as error: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | config.default.toml | 1 | # Rename this file to config.toml, place it in the working directory | COMMENT |
| LOW | config.default.toml | 101 | COMMENT | |
| LOW | config.default.toml | 201 | [scorer.KeywordRate.prompts] | COMMENT |
| LOW | src/heretic/model.py | 521 | # different model configurations, and PEFT employs different | COMMENT |
| LOW | src/heretic/main.py | 621 | direction_index = None | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/run_tests.py | 15 | # Read the file in 64 kB blocks. | COMMENT |
| LOW | src/heretic/model.py | 270 | # Check if we need special handling for quantized models | COMMENT |
| LOW | src/heretic/utils.py | 624 | # Read the file in 64 kB blocks. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/heretic/model.py | 195 | # This is more robust than splitting component keys (e.g. "attn.o_proj" -> "o_proj") | COMMENT |