The fastai deep learning library
This report presents the forensic synthetic code analysis of fastai/fastai, a Jupyter Notebook project with 28,081 GitHub stars. SynthScan v2.0 examined 20,027 lines of code across 114 source files, recording 473 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 22.3 places this repository in the Moderate 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 473 distinct pattern matches across 11 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 | nbs/dltest.py | 1 | CODE | |
| LOW | nbs/dltest.py | 2 | CODE | |
| LOW | nbs/examples/distrib.py | 1 | CODE | |
| LOW | nbs/examples/distrib.py | 2 | CODE | |
| LOW | nbs/examples/distrib.py | 3 | CODE | |
| LOW | nbs/examples/dataloader_spawn.py | 4 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 1 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 2 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 3 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 5 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 6 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 7 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 1 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 2 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 3 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 4 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 6 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 7 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 8 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 9 | CODE | |
| LOW | nbs/examples/mnist_items.py | 1 | CODE | |
| LOW | nbs/examples/mnist_blocks.py | 1 | CODE | |
| LOW | nbs/examples/train_wt2.py | 1 | CODE | |
| LOW | nbs/examples/train_wt2.py | 2 | CODE | |
| LOW | nbs/examples/train_wt2.py | 3 | CODE | |
| LOW | nbs/examples/train_wt2.py | 4 | CODE | |
| LOW | nbs/examples/distrib_pytorch.py | 1 | CODE | |
| LOW | nbs/examples/distrib_pytorch.py | 2 | CODE | |
| LOW | nbs/examples/train_tabular.py | 1 | CODE | |
| LOW | nbs/examples/train_tabular.py | 2 | CODE | |
| LOW | nbs/examples/train_tabular.py | 3 | CODE | |
| LOW | nbs/examples/train_tabular.py | 4 | CODE | |
| LOW | nbs/examples/train_tabular.py | 6 | CODE | |
| LOW | nbs/examples/train_tabular.py | 7 | CODE | |
| LOW | nbs/examples/migrating_fastai.py | 1 | CODE | |
| LOW | fastai/torch_imports.py | 1 | CODE | |
| LOW | fastai/torch_imports.py | 2 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 4 | CODE | |
| LOW | fastai/torch_imports.py | 5 | CODE | |
| LOW | fastai/torch_imports.py | 6 | CODE | |
| LOW | fastai/torch_imports.py | 6 | CODE | |
| LOW | fastai/torch_imports.py | 6 | CODE | |
| LOW | fastai/torch_imports.py | 6 | CODE | |
| LOW | fastai/torch_imports.py | 7 | CODE | |
| LOW | fastai/torch_imports.py | 7 | CODE | |
| LOW | fastai/torch_imports.py | 8 | CODE | |
| LOW | fastai/torch_imports.py | 8 | CODE | |
| LOW | fastai/metrics.py | 18 | CODE | |
| LOW | fastai/metrics.py | 19 | CODE | |
| LOW | fastai/metrics.py | 20 | CODE | |
| LOW | fastai/test_utils.py | 12 | CODE | |
| LOW | fastai/test_utils.py | 13 | CODE | |
| LOW | fastai/test_utils.py | 14 | CODE | |
| 284 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/metrics.py | 8 | __all__ = ['rmse', 'exp_rmspe', 'perplexity', 'AccumMetric', 'skm_to_fastai', 'optim_metric', 'accuracy', 'error_rate', | CODE |
| LOW | fastai/test_utils.py | 8 | __all__ = ['synth_dbunch', 'RegModel', 'synth_learner', 'VerboseCallback', 'get_env', 'try_import', 'nvidia_smi', 'nvidi | CODE |
| LOW | fastai/interpret.py | 8 | __all__ = ['plot_top_losses', 'Interpretation', 'ClassificationInterpretation', 'SegmentationInterpretation'] | CODE |
| LOW | fastai/torch_core.py | 8 | __all__ = ['norm_types', 'setup_cuda', 'subplots', 'show_image', 'show_titled_image', 'show_images', 'ArrayBase', | CODE |
| LOW | fastai/_nbdev.py | 3 | __all__ = ["index", "modules", "custom_doc_links", "git_url"] | CODE |
| LOW | fastai/_pytorch_doc.py | 6 | __all__ = ['PYTORCH_URL', 'pytorch_doc_link'] | CODE |
| LOW | fastai/distributed.py | 8 | __all__ = ['ParallelTrainer', 'setup_distrib', 'teardown_distrib', 'DistributedDL', 'DistributedTrainer', 'rank0_first'] | CODE |
| LOW | fastai/collab.py | 8 | __all__ = ['TabularCollab', 'CollabDataLoaders', 'EmbeddingDotBias', 'EmbeddingNN', 'collab_learner'] | CODE |
| LOW | fastai/optimizer.py | 8 | __all__ = ['pytorch_hp_map', 'Optimizer', 'sgd_step', 'weight_decay', 'l2_reg', 'average_grad', 'average_sqr_grad', | CODE |
| LOW | fastai/losses.py | 8 | __all__ = ['BaseLoss', 'CrossEntropyLossFlat', 'FocalLoss', 'FocalLossFlat', 'BCEWithLogitsLossFlat', 'BCELossFlat', | CODE |
| LOW | fastai/layers.py | 8 | __all__ = ['NormType', 'inplace_relu', 'Mish', 'Swish', 'module', 'Identity', 'Lambda', 'PartialLambda', 'Flatten', | CODE |
| LOW | fastai/learner.py | 8 | __all__ = ['replacing_yield', 'mk_metric', 'save_model', 'load_model', 'SkipToEpoch', 'Learner', 'before_batch_cb', | CODE |
| LOW | fastai/tabular/core.py | 8 | __all__ = ['make_date', 'add_datepart', 'add_elapsed_times', 'cont_cat_split', 'df_shrink_dtypes', 'df_shrink', 'Tabular | CODE |
| LOW | fastai/tabular/model.py | 8 | __all__ = ['emb_sz_rule', 'get_emb_sz', 'TabularModel', 'tabular_config'] | CODE |
| LOW | fastai/tabular/data.py | 8 | __all__ = ['TabularDataLoaders'] | CODE |
| LOW | fastai/tabular/learner.py | 8 | __all__ = ['TabularLearner', 'tabular_learner', 'show_results'] | CODE |
| LOW | fastai/vision/gan.py | 8 | __all__ = ['GANModule', 'basic_critic', 'AddChannels', 'basic_generator', 'DenseResBlock', 'gan_critic', 'GANLoss', | CODE |
| LOW | fastai/vision/core.py | 8 | __all__ = ['imagenet_stats', 'cifar_stats', 'mnist_stats', 'OpenMask', 'TensorPointCreate', 'to_image', 'load_image', | CODE |
| LOW | fastai/vision/augment.py | 8 | __all__ = ['TensorTypes', 'RandTransform', 'FlipItem', 'DihedralItem', 'CropPad', 'RandomCrop', 'OldRandomCrop', 'Resize | CODE |
| LOW | fastai/vision/widgets.py | 8 | __all__ = ['widget', 'carousel', 'ImagesCleaner', 'ImageClassifierCleaner', 'HBox', 'VBox', 'widgets', 'Button', 'Checkb | CODE |
| LOW | fastai/vision/utils.py | 8 | __all__ = ['download_images', 'resize_to', 'verify_image', 'verify_images', 'resize_image', 'resize_images'] | CODE |
| LOW | fastai/vision/data.py | 8 | __all__ = ['PointBlock', 'BBoxBlock', 'get_grid', 'clip_remove_empty', 'bb_pad', 'show_batch', 'ImageBlock', 'MaskBlock' | CODE |
| LOW | fastai/vision/learner.py | 8 | __all__ = ['model_meta', 'has_pool_type', 'cut_model', 'create_body', 'create_head', 'default_split', 'add_head', | CODE |
| LOW | fastai/vision/models/xresnet.py | 8 | __all__ = ['se_kwargs1', 'se_kwargs2', 'se_kwargs3', 'g0', 'g1', 'g2', 'g3', 'init_cnn', 'XResNet', 'xresnet18', 'xresne | CODE |
| LOW | fastai/vision/models/unet.py | 8 | __all__ = ['UnetBlock', 'ResizeToOrig', 'DynamicUnet'] | CODE |
| LOW | fastai/medical/text.py | 8 | __all__ = [] | CODE |
| LOW | fastai/medical/imaging.py | 8 | __all__ = ['dicom_windows', 'get_dicom_files', 'TensorDicom', 'PILDicom', 'array_freqhist_bins', 'TensorCTScan', 'PILCTS | CODE |
| LOW | fastai/text/core.py | 8 | __all__ = ['UNK', 'PAD', 'BOS', 'EOS', 'FLD', 'TK_REP', 'TK_WREP', 'TK_UP', 'TK_MAJ', 'WordTokenizer', 'fn_counter_pkl', | CODE |
| LOW | fastai/text/data.py | 8 | __all__ = ['pad_input', 'reverse_text', 'make_vocab', 'TensorText', 'LMTensorText', 'Numericalize', 'LMDataLoader', 'sho | CODE |
| LOW | fastai/text/learner.py | 8 | __all__ = ['match_embeds', 'load_ignore_keys', 'clean_raw_keys', 'load_model_text', 'TextLearner', 'decode_spec_tokens', | CODE |
| LOW | fastai/text/models/core.py | 8 | __all__ = ['LinearDecoder', 'SequentialRNN', 'get_language_model', 'SentenceEncoder', 'masked_concat_pool', | CODE |
| LOW | fastai/text/models/awdlstm.py | 8 | __all__ = ['awd_lstm_lm_config', 'awd_lstm_clas_config', 'dropout_mask', 'RNNDropout', 'WeightDropout', 'EmbeddingDropou | CODE |
| LOW | fastai/callback/comet.py | 8 | __all__ = ['CometCallback'] | CODE |
| LOW | fastai/callback/mixup.py | 8 | __all__ = ['reduce_loss', 'MixHandler', 'MixUp', 'CutMix'] | CODE |
| LOW | fastai/callback/wandb.py | 8 | __all__ = ['WandbCallback', 'log_dataset', 'log_model', 'wandb_process'] | CODE |
| LOW | fastai/callback/fp16.py | 8 | __all__ = ['AMPMode', 'MixedPrecision', 'get_master', 'to_master_grads', 'to_model_params', 'test_overflow', 'grad_overf | CODE |
| LOW | fastai/callback/hook.py | 8 | __all__ = ['Hook', 'hook_output', 'Hooks', 'hook_outputs', 'dummy_eval', 'model_sizes', 'num_features_model', 'has_param | CODE |
| LOW | fastai/callback/core.py | 8 | __all__ = ['Callback', 'TrainEvalCallback', 'GatherPredsCallback', 'FetchPredsCallback', 'CancelStepException', | CODE |
| LOW | fastai/callback/captum.py | 6 | __all__ = ['CaptumInterpretation'] | CODE |
| LOW | fastai/callback/preds.py | 8 | __all__ = ['MCDropoutCallback'] | CODE |
| LOW | fastai/callback/azureml.py | 3 | __all__ = ['AzureMLCallback'] | CODE |
| LOW | fastai/callback/tracker.py | 8 | __all__ = ['TerminateOnNaNCallback', 'TrackerCallback', 'EarlyStoppingCallback', 'SaveModelCallback', 'ReduceLROnPlateau | CODE |
| LOW | fastai/callback/channelslast.py | 8 | __all__ = ['ChannelsLast'] | CODE |
| LOW | fastai/callback/schedule.py | 8 | __all__ = ['annealer', 'sched_lin', 'sched_cos', 'sched_no', 'sched_exp', 'SchedLin', 'SchedCos', 'SchedNo', 'SchedExp', | CODE |
| LOW | fastai/callback/progress.py | 8 | __all__ = ['ProgressCallback', 'ShowGraphCallback', 'CSVLogger'] | CODE |
| LOW | fastai/callback/rnn.py | 8 | __all__ = ['ModelResetter', 'RNNCallback', 'RNNRegularizer', 'rnn_cbs'] | CODE |
| LOW | fastai/callback/tensorboard.py | 8 | __all__ = ['TensorBoardBaseCallback', 'TensorBoardCallback', 'TensorBoardProjectorCallback', 'projector_word_embeddings' | CODE |
| LOW | fastai/callback/training.py | 8 | __all__ = ['bn_types', 'ShortEpochCallback', 'GradientAccumulation', 'GradientClip', 'set_bn_eval', 'BnFreeze'] | CODE |
| LOW | fastai/callback/training.py | 48 | def set_bn_eval(m:nn.Module, use_eval=True)->None: | CODE |
| LOW | fastai/callback/data.py | 8 | __all__ = ['CollectDataCallback', 'WeightedDL', 'PartialDL'] | CODE |
| LOW | fastai/data/transforms.py | 8 | __all__ = ['image_extensions', 'get_files', 'FileGetter', 'get_image_files', 'ImageGetter', 'get_text_files', 'ItemGette | CODE |
| LOW | fastai/data/core.py | 8 | __all__ = ['show_batch', 'get_show_batch_func', 'show_results', 'TfmdDL', 'DataLoaders', 'FilteredBase', 'TfmdLists', 'd | CODE |
| LOW | fastai/data/block.py | 8 | __all__ = ['TransformBlock', 'CategoryBlock', 'MultiCategoryBlock', 'RegressionBlock', 'DataBlock'] | CODE |
| LOW | fastai/data/load.py | 8 | __all__ = ['fa_collate', 'fa_convert', 'SkipItemException', 'collate_error', 'DataLoader'] | CODE |
| LOW | fastai/data/external.py | 8 | __all__ = ['fastai_cfg', 'fastai_path', 'URLs', 'untar_data'] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nbs/examples/train_imagenette.py | 39 | CODE | |
| LOW | fastai/layers.py | 245 | CODE | |
| LOW | fastai/layers.py | 469 | CODE | |
| LOW | fastai/learner.py | 109 | CODE | |
| LOW | fastai/learner.py | 291 | CODE | |
| LOW | fastai/tabular/core.py | 150 | CODE | |
| LOW | fastai/tabular/model.py | 40 | CODE | |
| LOW | fastai/vision/augment.py | 1238 | CODE | |
| LOW | fastai/vision/augment.py | 747 | CODE | |
| LOW | fastai/vision/augment.py | 802 | CODE | |
| LOW | fastai/vision/augment.py | 894 | CODE | |
| LOW | fastai/vision/utils.py | 96 | CODE | |
| LOW | fastai/vision/data.py | 114 | CODE | |
| LOW | fastai/vision/data.py | 166 | CODE | |
| LOW | fastai/vision/data.py | 221 | CODE | |
| LOW | fastai/vision/learner.py | 91 | CODE | |
| LOW | fastai/vision/learner.py | 155 | CODE | |
| LOW | fastai/vision/learner.py | 166 | CODE | |
| LOW | fastai/vision/learner.py | 191 | CODE | |
| LOW | fastai/vision/learner.py | 220 | CODE | |
| LOW | fastai/vision/learner.py | 266 | CODE | |
| LOW | fastai/vision/models/xresnet.py | 30 | CODE | |
| LOW | fastai/vision/models/unet.py | 59 | CODE | |
| LOW | fastai/medical/imaging.py | 413 | CODE | |
| LOW | fastai/text/core.py | 352 | CODE | |
| LOW | fastai/text/data.py | 253 | CODE | |
| LOW | fastai/text/data.py | 269 | CODE | |
| LOW | fastai/text/learner.py | 257 | CODE | |
| LOW | fastai/text/models/core.py | 147 | CODE | |
| LOW | fastai/callback/wandb.py | 28 | CODE | |
| LOW | fastai/callback/core.py | 118 | CODE | |
| LOW | fastai/callback/tracker.py | 81 | CODE | |
| LOW | fastai/callback/schedule.py | 114 | CODE | |
| LOW | fastai/data/transforms.py | 30 | CODE | |
| LOW | fastai/data/core.py | 309 | CODE | |
| LOW | fastai/data/core.py | 344 | CODE | |
| LOW | fastai/data/load.py | 94 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | fastai/fp16_utils.py | 121 | print("Error in prep_param_lists: model may contain a mixture of parameters " | CODE |
| LOW | fastai/vision/utils.py | 37 | except Exception as e: f"Couldn't download {url}." | CODE |
| LOW | fastai/medical/imaging.py | 385 | except Exception as e: | CODE |
| LOW | fastai/callback/wandb.py | 70 | except Exception as e: | CODE |
| LOW | fastai/callback/wandb.py | 107 | except Exception as e: | CODE |
| LOW | fastai/callback/wandb.py | 130 | except Exception as e: | CODE |
| MEDIUM | fastai/callback/wandb.py | 124 | def log_predictions(self): | CODE |
| LOW | fastai/callback/hook.py | 100 | except Exception as e: | CODE |
| LOW | fastai/callback/core.py | 65 | except Exception as e: raise modify_exception(e, f'Exception occured in `{self.__class__.__name__}` when cal | CODE |
| LOW | fastai/data/core.py | 107 | except Exception as e: | CODE |
| LOW | fastai/data/block.py | 182 | except Exception as e: | CODE |
| LOW | fastai/data/block.py | 236 | except Exception as e: | CODE |
| LOW | fastai/data/load.py | 183 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nbs/examples/train_imagenette.py | 39 | CODE | |
| LOW | fastai/metrics.py | 421 | CODE | |
| LOW | fastai/torch_core.py | 531 | CODE | |
| LOW | fastai/fp16_utils.py | 137 | CODE | |
| LOW | fastai/learner.py | 451 | CODE | |
| LOW | fastai/text/learner.py | 174 | CODE | |
| LOW | fastai/callback/wandb.py | 53 | CODE | |
| LOW | fastai/data/load.py | 71 | CODE | |
| LOW | fastai/data/load.py | 158 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/interpret.py | 164 | def print_classification_report(self): | CODE |
| LOW | fastai/fp16_utils.py | 137 | def model_grads_to_master_grads(model_params, master_params, flat_master=False): | CODE |
| LOW | fastai/fp16_utils.py | 159 | def master_params_to_model_params(model_params, master_params, flat_master=False): | CODE |
| LOW | fastai/vision/utils.py | 19 | def _get_downloaded_image_filename(dest, name, suffix): | CODE |
| LOW | fastai/callback/tensorboard.py | 101 | def _write_projector_embedding(learn, writer, feat): | CODE |
| LOW | fastai/callback/tensorboard.py | 137 | def projector_word_embeddings(learn=None, layer=None, vocab=None, limit=-1, start=0, log_dir=None): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/callback/wandb.py | 55 | # Check if wandb.init has been called | COMMENT |
| LOW | fastai/callback/wandb.py | 230 | # Check if wandb.init has been called in case datasets are logged manually | COMMENT |
| LOW | fastai/callback/fp16.py | 211 | # Check if it's been long enough without overflow | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | fastai/tabular/data.py | 24 | cat_names:list=None, # Column names pertaining to categorical variables | CODE |
| MEDIUM | fastai/tabular/data.py | 25 | cont_names:list=None, # Column names pertaining to continuous variables | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | fastai/interpret.py | 132 | # This function is mainly copied from the sklearn docs | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/vision/gan.py | 241 | # "Show a sample image." | COMMENT |
| LOW | fastai/callback/schedule.py | 21 | def __init__(self, f, start, end): store_attr('f,start,end') | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/data/block.py | 84 | _msg = "If you wanted to compose several transforms in your getter don't forget to wrap them in a `Pipeline`." | CODE |