Repository Analysis

fastai/fastai

The fastai deep learning library

22.3 Moderate AI signal View on GitHub

Analysis Overview

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

22.3
Adjusted Score
22.3
Raw Score
100%
Time Factor
2026-07-11
Last Push
28.1K
Stars
Jupyter Notebook
Language
20.0K
Lines of Code
114
Files
473
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 5LOW 468

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

Unused Imports344 hits · 310 pts
SeverityFileLineSnippetContext
LOWnbs/dltest.py1CODE
LOWnbs/dltest.py2CODE
LOWnbs/examples/distrib.py1CODE
LOWnbs/examples/distrib.py2CODE
LOWnbs/examples/distrib.py3CODE
LOWnbs/examples/dataloader_spawn.py4CODE
LOWnbs/examples/train_imdbclassifier.py1CODE
LOWnbs/examples/train_imdbclassifier.py2CODE
LOWnbs/examples/train_imdbclassifier.py3CODE
LOWnbs/examples/train_imdbclassifier.py5CODE
LOWnbs/examples/train_imdbclassifier.py6CODE
LOWnbs/examples/train_imdbclassifier.py7CODE
LOWnbs/examples/train_imagenette.py1CODE
LOWnbs/examples/train_imagenette.py2CODE
LOWnbs/examples/train_imagenette.py3CODE
LOWnbs/examples/train_imagenette.py4CODE
LOWnbs/examples/train_imagenette.py6CODE
LOWnbs/examples/train_imagenette.py7CODE
LOWnbs/examples/train_imagenette.py8CODE
LOWnbs/examples/train_imagenette.py9CODE
LOWnbs/examples/mnist_items.py1CODE
LOWnbs/examples/mnist_blocks.py1CODE
LOWnbs/examples/train_wt2.py1CODE
LOWnbs/examples/train_wt2.py2CODE
LOWnbs/examples/train_wt2.py3CODE
LOWnbs/examples/train_wt2.py4CODE
LOWnbs/examples/distrib_pytorch.py1CODE
LOWnbs/examples/distrib_pytorch.py2CODE
LOWnbs/examples/train_tabular.py1CODE
LOWnbs/examples/train_tabular.py2CODE
LOWnbs/examples/train_tabular.py3CODE
LOWnbs/examples/train_tabular.py4CODE
LOWnbs/examples/train_tabular.py6CODE
LOWnbs/examples/train_tabular.py7CODE
LOWnbs/examples/migrating_fastai.py1CODE
LOWfastai/torch_imports.py1CODE
LOWfastai/torch_imports.py2CODE
LOWfastai/torch_imports.py3CODE
LOWfastai/torch_imports.py3CODE
LOWfastai/torch_imports.py3CODE
LOWfastai/torch_imports.py3CODE
LOWfastai/torch_imports.py3CODE
LOWfastai/torch_imports.py3CODE
LOWfastai/torch_imports.py3CODE
LOWfastai/torch_imports.py4CODE
LOWfastai/torch_imports.py5CODE
LOWfastai/torch_imports.py6CODE
LOWfastai/torch_imports.py6CODE
LOWfastai/torch_imports.py6CODE
LOWfastai/torch_imports.py6CODE
LOWfastai/torch_imports.py7CODE
LOWfastai/torch_imports.py7CODE
LOWfastai/torch_imports.py8CODE
LOWfastai/torch_imports.py8CODE
LOWfastai/metrics.py18CODE
LOWfastai/metrics.py19CODE
LOWfastai/metrics.py20CODE
LOWfastai/test_utils.py12CODE
LOWfastai/test_utils.py13CODE
LOWfastai/test_utils.py14CODE
284 more matches not shown…
Modern Structural Boilerplate55 hits · 55 pts
SeverityFileLineSnippetContext
LOWfastai/metrics.py8__all__ = ['rmse', 'exp_rmspe', 'perplexity', 'AccumMetric', 'skm_to_fastai', 'optim_metric', 'accuracy', 'error_rate',CODE
LOWfastai/test_utils.py8__all__ = ['synth_dbunch', 'RegModel', 'synth_learner', 'VerboseCallback', 'get_env', 'try_import', 'nvidia_smi', 'nvidiCODE
LOWfastai/interpret.py8__all__ = ['plot_top_losses', 'Interpretation', 'ClassificationInterpretation', 'SegmentationInterpretation']CODE
LOWfastai/torch_core.py8__all__ = ['norm_types', 'setup_cuda', 'subplots', 'show_image', 'show_titled_image', 'show_images', 'ArrayBase',CODE
LOWfastai/_nbdev.py3__all__ = ["index", "modules", "custom_doc_links", "git_url"]CODE
LOWfastai/_pytorch_doc.py6__all__ = ['PYTORCH_URL', 'pytorch_doc_link']CODE
LOWfastai/distributed.py8__all__ = ['ParallelTrainer', 'setup_distrib', 'teardown_distrib', 'DistributedDL', 'DistributedTrainer', 'rank0_first']CODE
LOWfastai/collab.py8__all__ = ['TabularCollab', 'CollabDataLoaders', 'EmbeddingDotBias', 'EmbeddingNN', 'collab_learner']CODE
LOWfastai/optimizer.py8__all__ = ['pytorch_hp_map', 'Optimizer', 'sgd_step', 'weight_decay', 'l2_reg', 'average_grad', 'average_sqr_grad',CODE
LOWfastai/losses.py8__all__ = ['BaseLoss', 'CrossEntropyLossFlat', 'FocalLoss', 'FocalLossFlat', 'BCEWithLogitsLossFlat', 'BCELossFlat',CODE
LOWfastai/layers.py8__all__ = ['NormType', 'inplace_relu', 'Mish', 'Swish', 'module', 'Identity', 'Lambda', 'PartialLambda', 'Flatten',CODE
LOWfastai/learner.py8__all__ = ['replacing_yield', 'mk_metric', 'save_model', 'load_model', 'SkipToEpoch', 'Learner', 'before_batch_cb',CODE
LOWfastai/tabular/core.py8__all__ = ['make_date', 'add_datepart', 'add_elapsed_times', 'cont_cat_split', 'df_shrink_dtypes', 'df_shrink', 'TabularCODE
LOWfastai/tabular/model.py8__all__ = ['emb_sz_rule', 'get_emb_sz', 'TabularModel', 'tabular_config']CODE
LOWfastai/tabular/data.py8__all__ = ['TabularDataLoaders']CODE
LOWfastai/tabular/learner.py8__all__ = ['TabularLearner', 'tabular_learner', 'show_results']CODE
LOWfastai/vision/gan.py8__all__ = ['GANModule', 'basic_critic', 'AddChannels', 'basic_generator', 'DenseResBlock', 'gan_critic', 'GANLoss',CODE
LOWfastai/vision/core.py8__all__ = ['imagenet_stats', 'cifar_stats', 'mnist_stats', 'OpenMask', 'TensorPointCreate', 'to_image', 'load_image',CODE
LOWfastai/vision/augment.py8__all__ = ['TensorTypes', 'RandTransform', 'FlipItem', 'DihedralItem', 'CropPad', 'RandomCrop', 'OldRandomCrop', 'ResizeCODE
LOWfastai/vision/widgets.py8__all__ = ['widget', 'carousel', 'ImagesCleaner', 'ImageClassifierCleaner', 'HBox', 'VBox', 'widgets', 'Button', 'CheckbCODE
LOWfastai/vision/utils.py8__all__ = ['download_images', 'resize_to', 'verify_image', 'verify_images', 'resize_image', 'resize_images']CODE
LOWfastai/vision/data.py8__all__ = ['PointBlock', 'BBoxBlock', 'get_grid', 'clip_remove_empty', 'bb_pad', 'show_batch', 'ImageBlock', 'MaskBlock'CODE
LOWfastai/vision/learner.py8__all__ = ['model_meta', 'has_pool_type', 'cut_model', 'create_body', 'create_head', 'default_split', 'add_head',CODE
LOWfastai/vision/models/xresnet.py8__all__ = ['se_kwargs1', 'se_kwargs2', 'se_kwargs3', 'g0', 'g1', 'g2', 'g3', 'init_cnn', 'XResNet', 'xresnet18', 'xresneCODE
LOWfastai/vision/models/unet.py8__all__ = ['UnetBlock', 'ResizeToOrig', 'DynamicUnet']CODE
LOWfastai/medical/text.py8__all__ = []CODE
LOWfastai/medical/imaging.py8__all__ = ['dicom_windows', 'get_dicom_files', 'TensorDicom', 'PILDicom', 'array_freqhist_bins', 'TensorCTScan', 'PILCTSCODE
LOWfastai/text/core.py8__all__ = ['UNK', 'PAD', 'BOS', 'EOS', 'FLD', 'TK_REP', 'TK_WREP', 'TK_UP', 'TK_MAJ', 'WordTokenizer', 'fn_counter_pkl',CODE
LOWfastai/text/data.py8__all__ = ['pad_input', 'reverse_text', 'make_vocab', 'TensorText', 'LMTensorText', 'Numericalize', 'LMDataLoader', 'shoCODE
LOWfastai/text/learner.py8__all__ = ['match_embeds', 'load_ignore_keys', 'clean_raw_keys', 'load_model_text', 'TextLearner', 'decode_spec_tokens',CODE
LOWfastai/text/models/core.py8__all__ = ['LinearDecoder', 'SequentialRNN', 'get_language_model', 'SentenceEncoder', 'masked_concat_pool',CODE
LOWfastai/text/models/awdlstm.py8__all__ = ['awd_lstm_lm_config', 'awd_lstm_clas_config', 'dropout_mask', 'RNNDropout', 'WeightDropout', 'EmbeddingDropouCODE
LOWfastai/callback/comet.py8__all__ = ['CometCallback']CODE
LOWfastai/callback/mixup.py8__all__ = ['reduce_loss', 'MixHandler', 'MixUp', 'CutMix']CODE
LOWfastai/callback/wandb.py8__all__ = ['WandbCallback', 'log_dataset', 'log_model', 'wandb_process']CODE
LOWfastai/callback/fp16.py8__all__ = ['AMPMode', 'MixedPrecision', 'get_master', 'to_master_grads', 'to_model_params', 'test_overflow', 'grad_overfCODE
LOWfastai/callback/hook.py8__all__ = ['Hook', 'hook_output', 'Hooks', 'hook_outputs', 'dummy_eval', 'model_sizes', 'num_features_model', 'has_paramCODE
LOWfastai/callback/core.py8__all__ = ['Callback', 'TrainEvalCallback', 'GatherPredsCallback', 'FetchPredsCallback', 'CancelStepException',CODE
LOWfastai/callback/captum.py6__all__ = ['CaptumInterpretation']CODE
LOWfastai/callback/preds.py8__all__ = ['MCDropoutCallback']CODE
LOWfastai/callback/azureml.py3__all__ = ['AzureMLCallback']CODE
LOWfastai/callback/tracker.py8__all__ = ['TerminateOnNaNCallback', 'TrackerCallback', 'EarlyStoppingCallback', 'SaveModelCallback', 'ReduceLROnPlateauCODE
LOWfastai/callback/channelslast.py8__all__ = ['ChannelsLast']CODE
LOWfastai/callback/schedule.py8__all__ = ['annealer', 'sched_lin', 'sched_cos', 'sched_no', 'sched_exp', 'SchedLin', 'SchedCos', 'SchedNo', 'SchedExp',CODE
LOWfastai/callback/progress.py8__all__ = ['ProgressCallback', 'ShowGraphCallback', 'CSVLogger']CODE
LOWfastai/callback/rnn.py8__all__ = ['ModelResetter', 'RNNCallback', 'RNNRegularizer', 'rnn_cbs']CODE
LOWfastai/callback/tensorboard.py8__all__ = ['TensorBoardBaseCallback', 'TensorBoardCallback', 'TensorBoardProjectorCallback', 'projector_word_embeddings'CODE
LOWfastai/callback/training.py8__all__ = ['bn_types', 'ShortEpochCallback', 'GradientAccumulation', 'GradientClip', 'set_bn_eval', 'BnFreeze']CODE
LOWfastai/callback/training.py48def set_bn_eval(m:nn.Module, use_eval=True)->None:CODE
LOWfastai/callback/data.py8__all__ = ['CollectDataCallback', 'WeightedDL', 'PartialDL']CODE
LOWfastai/data/transforms.py8__all__ = ['image_extensions', 'get_files', 'FileGetter', 'get_image_files', 'ImageGetter', 'get_text_files', 'ItemGetteCODE
LOWfastai/data/core.py8__all__ = ['show_batch', 'get_show_batch_func', 'show_results', 'TfmdDL', 'DataLoaders', 'FilteredBase', 'TfmdLists', 'dCODE
LOWfastai/data/block.py8__all__ = ['TransformBlock', 'CategoryBlock', 'MultiCategoryBlock', 'RegressionBlock', 'DataBlock']CODE
LOWfastai/data/load.py8__all__ = ['fa_collate', 'fa_convert', 'SkipItemException', 'collate_error', 'DataLoader']CODE
LOWfastai/data/external.py8__all__ = ['fastai_cfg', 'fastai_path', 'URLs', 'untar_data']CODE
AI Structural Patterns37 hits · 37 pts
SeverityFileLineSnippetContext
LOWnbs/examples/train_imagenette.py39CODE
LOWfastai/layers.py245CODE
LOWfastai/layers.py469CODE
LOWfastai/learner.py109CODE
LOWfastai/learner.py291CODE
LOWfastai/tabular/core.py150CODE
LOWfastai/tabular/model.py40CODE
LOWfastai/vision/augment.py1238CODE
LOWfastai/vision/augment.py747CODE
LOWfastai/vision/augment.py802CODE
LOWfastai/vision/augment.py894CODE
LOWfastai/vision/utils.py96CODE
LOWfastai/vision/data.py114CODE
LOWfastai/vision/data.py166CODE
LOWfastai/vision/data.py221CODE
LOWfastai/vision/learner.py91CODE
LOWfastai/vision/learner.py155CODE
LOWfastai/vision/learner.py166CODE
LOWfastai/vision/learner.py191CODE
LOWfastai/vision/learner.py220CODE
LOWfastai/vision/learner.py266CODE
LOWfastai/vision/models/xresnet.py30CODE
LOWfastai/vision/models/unet.py59CODE
LOWfastai/medical/imaging.py413CODE
LOWfastai/text/core.py352CODE
LOWfastai/text/data.py253CODE
LOWfastai/text/data.py269CODE
LOWfastai/text/learner.py257CODE
LOWfastai/text/models/core.py147CODE
LOWfastai/callback/wandb.py28CODE
LOWfastai/callback/core.py118CODE
LOWfastai/callback/tracker.py81CODE
LOWfastai/callback/schedule.py114CODE
LOWfastai/data/transforms.py30CODE
LOWfastai/data/core.py309CODE
LOWfastai/data/core.py344CODE
LOWfastai/data/load.py94CODE
Excessive Try-Catch Wrapping13 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMfastai/fp16_utils.py121 print("Error in prep_param_lists: model may contain a mixture of parameters "CODE
LOWfastai/vision/utils.py37 except Exception as e: f"Couldn't download {url}."CODE
LOWfastai/medical/imaging.py385 except Exception as e:CODE
LOWfastai/callback/wandb.py70 except Exception as e:CODE
LOWfastai/callback/wandb.py107 except Exception as e:CODE
LOWfastai/callback/wandb.py130 except Exception as e:CODE
MEDIUMfastai/callback/wandb.py124def log_predictions(self):CODE
LOWfastai/callback/hook.py100 except Exception as e:CODE
LOWfastai/callback/core.py65 except Exception as e: raise modify_exception(e, f'Exception occured in `{self.__class__.__name__}` when calCODE
LOWfastai/data/core.py107 except Exception as e:CODE
LOWfastai/data/block.py182 except Exception as e:CODE
LOWfastai/data/block.py236 except Exception as e:CODE
LOWfastai/data/load.py183 except Exception as e:CODE
Deep Nesting9 hits · 9 pts
SeverityFileLineSnippetContext
LOWnbs/examples/train_imagenette.py39CODE
LOWfastai/metrics.py421CODE
LOWfastai/torch_core.py531CODE
LOWfastai/fp16_utils.py137CODE
LOWfastai/learner.py451CODE
LOWfastai/text/learner.py174CODE
LOWfastai/callback/wandb.py53CODE
LOWfastai/data/load.py71CODE
LOWfastai/data/load.py158CODE
Hyper-Verbose Identifiers6 hits · 6 pts
SeverityFileLineSnippetContext
LOWfastai/interpret.py164 def print_classification_report(self):CODE
LOWfastai/fp16_utils.py137def model_grads_to_master_grads(model_params, master_params, flat_master=False):CODE
LOWfastai/fp16_utils.py159def master_params_to_model_params(model_params, master_params, flat_master=False):CODE
LOWfastai/vision/utils.py19def _get_downloaded_image_filename(dest, name, suffix):CODE
LOWfastai/callback/tensorboard.py101def _write_projector_embedding(learn, writer, feat):CODE
LOWfastai/callback/tensorboard.py137def projector_word_embeddings(learn=None, layer=None, vocab=None, limit=-1, start=0, log_dir=None):CODE
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWfastai/callback/wandb.py55 # Check if wandb.init has been calledCOMMENT
LOWfastai/callback/wandb.py230 # Check if wandb.init has been called in case datasets are logged manuallyCOMMENT
LOWfastai/callback/fp16.py211 # Check if it's been long enough without overflowCOMMENT
AI Slop Vocabulary2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMfastai/tabular/data.py24 cat_names:list=None, # Column names pertaining to categorical variablesCODE
MEDIUMfastai/tabular/data.py25 cont_names:list=None, # Column names pertaining to continuous variablesCODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMfastai/interpret.py132 # This function is mainly copied from the sklearn docsCOMMENT
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWfastai/vision/gan.py241 # "Show a sample image."COMMENT
LOWfastai/callback/schedule.py21 def __init__(self, f, start, end): store_attr('f,start,end')COMMENT
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippetContext
LOWfastai/data/block.py84 _msg = "If you wanted to compose several transforms in your getter don't forget to wrap them in a `Pipeline`."CODE