A concise but complete full-attention transformer with a set of promising experimental features from various papers
This report presents the forensic synthetic code analysis of lucidrains/x-transformers, a Python project with 5,932 GitHub stars. SynthScan v2.0 examined 19,108 lines of code across 39 source files, recording 190 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 9.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).
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 190 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 | train_with_muon.py | 17 | CODE | |
| LOW | train_enwik8.py | 20 | CODE | |
| LOW | train_path_star.py | 24 | CODE | |
| LOW | train_self_masked_repr.py | 12 | CODE | |
| LOW | train_self_masked_repr.py | 26 | CODE | |
| LOW | train_entropy_tokenizer.py | 22 | CODE | |
| LOW | train_xl_enwik8.py | 20 | CODE | |
| LOW | train_parity.py | 3 | CODE | |
| LOW | train_gpt_vae.py | 12 | CODE | |
| LOW | train_length_extrapolate.py | 18 | CODE | |
| LOW | train_free.py | 18 | CODE | |
| LOW | train_free.py | 19 | CODE | |
| LOW | train_belief_state.py | 2 | CODE | |
| LOW | train_belief_state.py | 10 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 1 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 2 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 13 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 15 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 7 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 12 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 13 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 21 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 6 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 18 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 19 | CODE | |
| LOW | x_transformers/neo_mlp.py | 1 | CODE | |
| LOW | x_transformers/neo_mlp.py | 4 | CODE | |
| LOW | x_transformers/neo_mlp.py | 4 | CODE | |
| LOW | x_transformers/neo_mlp.py | 5 | CODE | |
| LOW | x_transformers/neo_mlp.py | 6 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 1 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 7 | CODE | |
| LOW | x_transformers/x_transformers.py | 1 | CODE | |
| LOW | x_transformers/x_transformers.py | 9 | CODE | |
| LOW | x_transformers/x_transformers.py | 12 | CODE | |
| LOW | x_transformers/multi_input.py | 1 | CODE | |
| LOW | x_transformers/multi_input.py | 6 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 1 | CODE | |
| LOW | x_transformers/__init__.py | 18 | CODE | |
| LOW | x_transformers/__init__.py | 19 | CODE | |
| LOW | x_transformers/__init__.py | 20 | CODE | |
| LOW | x_transformers/__init__.py | 21 | CODE | |
| LOW | x_transformers/__init__.py | 23 | CODE | |
| LOW | x_transformers/__init__.py | 23 | CODE | |
| LOW | x_transformers/__init__.py | 28 | CODE | |
| LOW | x_transformers/__init__.py | 30 | CODE | |
| LOW | x_transformers/__init__.py | 30 | CODE | |
| 36 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | train_enwik8_lejepa_style.py | 37 | CODE | |
| LOW | train_enwik8.py | 45 | CODE | |
| LOW | train_path_star.py | 113 | CODE | |
| LOW | train_self_masked_repr.py | 424 | CODE | |
| LOW | train_self_masked_repr.py | 72 | CODE | |
| LOW | train_self_masked_repr.py | 223 | CODE | |
| LOW | train_entropy_tokenizer.py | 53 | CODE | |
| LOW | train_xl_enwik8.py | 48 | CODE | |
| LOW | train_enwik8_xm.py | 100 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 224 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 84 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 69 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 159 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 200 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 367 | CODE | |
| LOW | x_transformers/x_transformers.py | 1526 | CODE | |
| LOW | x_transformers/x_transformers.py | 1633 | CODE | |
| LOW | x_transformers/x_transformers.py | 1719 | CODE | |
| LOW | x_transformers/x_transformers.py | 2126 | CODE | |
| LOW | x_transformers/x_transformers.py | 2580 | CODE | |
| LOW | x_transformers/x_transformers.py | 3119 | CODE | |
| LOW | x_transformers/x_transformers.py | 3569 | CODE | |
| LOW | x_transformers/x_transformers.py | 3720 | CODE | |
| LOW | x_transformers/x_transformers.py | 3960 | CODE | |
| LOW | x_transformers/x_transformers.py | 4502 | CODE | |
| LOW | x_transformers/multi_input.py | 35 | CODE | |
| LOW | x_transformers/multi_input.py | 108 | CODE | |
| LOW | x_transformers/next_latent_wrapper.py | 154 | CODE | |
| LOW | x_transformers/attend.py | 176 | CODE | |
| LOW | x_transformers/up_wrapper.py | 146 | CODE | |
| LOW | x_transformers/gpt_vae.py | 33 | CODE | |
| LOW | x_transformers/continuous.py | 63 | CODE | |
| LOW | x_transformers/continuous.py | 138 | CODE | |
| LOW | x_transformers/nonautoregressive_wrapper.py | 105 | CODE | |
| LOW | x_transformers/xm_induced_latent_decoder.py | 45 | CODE | |
| LOW | x_transformers/xval.py | 49 | CODE | |
| LOW | x_transformers/xval.py | 109 | CODE | |
| LOW | x_transformers/continuous_autoencoder.py | 80 | CODE | |
| LOW | x_transformers/free_transformer.py | 133 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | x_transformers/belief_state_wrapper.py | 177 | def generate_with_suffix_cond( | CODE |
| LOW | x_transformers/x_transformers.py | 154 | def resolve_repeat_blocks_to_layer_execute_order( | CODE |
| LOW | x_transformers/x_transformers.py | 445 | def _relative_position_bucket(relative_position, causal = True, num_buckets = 32, max_distance = 128): | CODE |
| LOW | x_transformers/entropy_based_tokenizer.py | 29 | def get_accumulated_threshold_mask( | CODE |
| LOW | x_transformers/attend.py | 76 | def log_prob_from_hard_attend(intermeds: Intermediates): | CODE |
| LOW | x_transformers/up_wrapper.py | 206 | def get_rand_sequences_from_buffer(self, size = None): | CODE |
| LOW | x_transformers/continuous.py | 35 | def sample_from_mean_variance( | CODE |
| LOW | x_transformers/xm_induced_latent_decoder.py | 102 | def generate_with_candidate_latents( | CODE |
| LOW | x_transformers/dpo.py | 20 | def log_prob_from_model_and_seq(model, seq): | CODE |
| LOW | tests/test_x_transformers.py | 141 | def test_attn_softclamp_logits(): | CODE |
| LOW | tests/test_x_transformers.py | 158 | def test_multiple_input_embeds(): | CODE |
| LOW | tests/test_x_transformers.py | 231 | def test_squeeze_logit_dim_one(): | CODE |
| LOW | tests/test_x_transformers.py | 371 | def test_forgetting_transformer( | CODE |
| LOW | tests/test_x_transformers.py | 428 | def test_custom_rotary_pos_emb(rotary_xpos): | CODE |
| LOW | tests/test_x_transformers.py | 452 | def test_custom_alibi_across_heads(flash: bool): | CODE |
| LOW | tests/test_x_transformers.py | 700 | def test_caching_when_inputs_not_include_past(): | CODE |
| LOW | tests/test_x_transformers.py | 732 | def test_caching_when_inputs_not_include_past_continuous(): | CODE |
| LOW | tests/test_x_transformers.py | 765 | def test_multi_latent_attention(): | CODE |
| LOW | tests/test_x_transformers.py | 812 | def test_belief_state_wrapper( | CODE |
| LOW | tests/test_x_transformers.py | 884 | def test_entropy_based_tokenizer( | CODE |
| LOW | tests/test_x_transformers.py | 914 | def test_entropy_based_tokenizer_max_token_len(): | CODE |
| LOW | tests/test_x_transformers.py | 942 | def test_custom_ff_activation(): | CODE |
| LOW | tests/test_x_transformers.py | 1029 | def test_autoregressive_wrapper( | CODE |
| LOW | tests/test_x_transformers.py | 1198 | def test_prompts_given_as_list_tensor(): | CODE |
| LOW | tests/test_x_transformers.py | 1252 | def test_learned_head_attn_sink(): | CODE |
| LOW | tests/test_x_transformers.py | 1269 | def test_accept_layer_intermediates(): | CODE |
| LOW | tests/test_x_transformers.py | 1403 | def test_attn_negative_weights( | CODE |
| LOW | tests/test_x_transformers.py | 1542 | def test_seq_start_pos_parity(): | CODE |
| LOW | tests/test_x_transformers.py | 1627 | def test_continuous_transformer_external_projects(): | CODE |
| LOW | tests/test_x_transformers.py | 1652 | def test_attn_aggregated_residuals( | CODE |
| LOW | tests/test_x_transformers.py | 1699 | def test_repeat_blocks_multiple(): | CODE |
| LOW | tests/test_x_transformers.py | 1848 | def test_continuous_autoencoder( | CODE |
| LOW | tests/test_x_transformers.py | 2012 | def test_ttt_source_target_mapping(): | CODE |
| LOW | tests/test_x_transformers.py | 2065 | def test_ttt_custom_loss_optimization(): | CODE |
| LOW | tests/test_x_transformers.py | 2258 | def test_relative_proj_positional_bias(): | CODE |
| LOW | tests/test_x_transformers.py | 2282 | def test_xm_induced_latent_decoder(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | train_enwik8_lejepa_style.py | 37 | CODE | |
| LOW | train_enwik8.py | 45 | CODE | |
| LOW | train_path_star.py | 113 | CODE | |
| LOW | train_self_masked_repr.py | 424 | CODE | |
| LOW | train_xl_enwik8.py | 48 | CODE | |
| LOW | train_enwik8_xm.py | 100 | CODE | |
| LOW | x_transformers/xl_autoregressive_wrapper.py | 534 | CODE | |
| LOW | x_transformers/belief_state_wrapper.py | 287 | CODE | |
| LOW | x_transformers/gpt_lejepa.py | 164 | CODE | |
| LOW | x_transformers/autoregressive_wrapper.py | 367 | CODE | |
| LOW | x_transformers/x_transformers.py | 1633 | CODE | |
| LOW | x_transformers/x_transformers.py | 2126 | CODE | |
| LOW | x_transformers/x_transformers.py | 2580 | CODE | |
| LOW | x_transformers/x_transformers.py | 3119 | CODE | |
| LOW | x_transformers/x_transformers.py | 3960 | CODE | |
| LOW | x_transformers/next_latent_wrapper.py | 154 | CODE | |
| LOW | x_transformers/attend.py | 176 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | x_transformers/autoregressive_wrapper.py | 178 | # paper shows masking (MLM) in conjunction with autoregressive decoder-only training leads to big improvements h | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | train_path_star.py | 1 | # /// script | COMMENT |