AI Slop Code Risk Monitor

mlpack/mlpack

SlopCodeMonitor badge for mlpack/mlpack Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

mlpack: a fast, header-only C++ machine learning library

1.4 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for mlpack/mlpack, a C++ project with 5,727 GitHub stars. SynthScan examined 529,199 lines of code across 1861 source files, recording 722 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 1.4 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

1.4
Adjusted Signal
1.4
Raw Pattern Score
100%
Time Factor
2026-11-15
Last Push
5.7K
Stars
C++
Language
529.2K
Lines of Code
1.9K
Files
722
Pattern Hits
2026-11-15
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-11-15.

Cognitive Ownership Risk 6.9/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 722 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.0/100 · LOW

Are imports declared and package/API names verified? 0 finding(s).

Agent Over-Engineering Ratio 0.0/100 · LOW

Are wrappers, guards, and repeated structures necessary? 0 finding(s).

PR Review Velocity Impact 7.0/100 · LOW

Which changes need focused human review? 722 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 1MEDIUM 19LOW 702

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 722 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block562 hits · 456 pts
SeverityFileLineSnippetContext
LOWCMake/exec2man.sh1#!/bin/shCOMMENT
LOWCMake/stb/a.cpp1#include "a.hpp"COMMENT
LOWCMake/stb/b.cpp1#include "b.hpp"COMMENT
LOWCMake/stb/main.cpp1// The purpose of this file is to include STB's implementation in two separateCOMMENT
LOWscripts/release-mlpack.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/test-docs.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/check-markdown-docs.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/build-docs.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/build-docs.sh101 # [name](other_file.md#anchor). We need these to turn into links to theCOMMENT
LOWdoc/developer/bindings.md101COMMENT
LOWdoc/developer/trees.md1041 // Any RuleType must implement the base case: this is the operation to be doneCOMMENT
LOWdoc/developer/trees.md1061 double Rescore(const size_t queryIndex,COMMENT
LOWdoc/developer/trees.md1081 TreeType& referenceNode,COMMENT
LOWdoc/user/load_save.md1061// in a CSV):COMMENT
LOWdoc/user/methods/decision_tree.md401 // sufficiently better than the gain of the unsplit node (call thisCOMMENT
LOWdoc/user/methods/decision_tree.md481 public:COMMENT
LOWdoc/user/methods/pca.md301 // input matrix (e.g. the mean of each dimension is 0).COMMENT
LOWdoc/user/methods/hoeffding_tree.md581 // Train on the given value with the given label.COMMENT
LOWdoc/user/methods/hoeffding_tree.md601 // childMajorities should be set to have length equal to the number ofCOMMENT
LOWdoc/user/methods/hoeffding_tree.md661// class's split strategy.COMMENT
LOWdoc/user/methods/hoeffding_tree.md681 // `double`).COMMENT
LOWdoc/user/methods/random_forest.md541COMMENT
LOWdoc/user/methods/random_forest.md581{COMMENT
LOWdoc/user/methods/random_forest.md661 // If a split with better resulting gain than `bestGain` is found, thenCOMMENT
LOWdoc/user/methods/knn.md941//COMMENT
LOWdoc/user/methods/decision_tree_regressor.md401 // `unsplitGain`):COMMENT
LOWdoc/user/methods/decision_tree_regressor.md481 template parameter, implement three functions, and have an internalCOMMENT
LOWdoc/user/methods/decision_tree_regressor.md501 //COMMENT
LOWdoc/user/methods/decision_tree_regressor.md581COMMENT
LOWdoc/user/methods/nca.md221// only perform 10 epochs of training. (In a real application you may want toCOMMENT
LOWdoc/user/methods/nmf.md321 // Initialize the termination policy for the given matrix V. (It is okay toCOMMENT
LOWdoc/user/methods/amf.md721class CustomTerminationPolicyCOMMENT
LOWdoc/user/methods/amf.md761// You can use this as a starting point for implementation.COMMENT
LOWdoc/user/methods/perceptron.md281 * The `SimpleWeightUpdate` class is available, and is the default.COMMENT
LOWdoc/user/methods/perceptron.md321// You can use this as a starting point for implementation.COMMENT
LOWdoc/user/methods/adaboost.md321 support instance weights for learning, and so any mlpack classifierCOMMENT
LOWdoc/user/core/imputation.md161class FullyCustomImputationCOMMENT
LOWdoc/user/core/trees/non_ort_mean_sp_tree.md421COMMENT
LOWdoc/user/core/trees/mean_sp_tree.md421Build a `MeanSPTree` on the `cloud` dataset and print basic statistics about theCOMMENT
LOWdoc/user/core/trees/binary_space_tree.md2201class SplitTypeCOMMENT
LOWdoc/user/core/trees/binary_space_tree.md2221 const size_t begin,COMMENT
LOWdoc/user/core/trees/rectangle_tree.md641```c++COMMENT
LOWdoc/user/core/trees/rectangle_tree.md861 CustomAuxiliaryInformationType(TreeType* node);COMMENT
LOWdoc/user/core/trees/rectangle_tree.md881 // Optionally, this method can manipulate `node`. If so, `true` should beCOMMENT
LOWdoc/tutorials/fastmks.md381// Create the metric induced by this kernel (because a kernel is not a metricCOMMENT
LOWsrc/mlpack.hpp21#ifndef MLPACK_HPPCOMMENT
LOWsrc/mlpack.hpp41#include "mlpack/methods/emst.hpp"COMMENT
LOWsrc/mlpack.hpp61#include "mlpack/methods/nmf.hpp"COMMENT
LOWsrc/mlpack/config.hpp21//COMMENT
LOWsrc/mlpack/config.hpp41 #define MLPACK_COUT_STREAM std::coutCOMMENT
LOWsrc/mlpack/config.hpp61// MLPACK_USE_SYSTEM_STB is used to enable usage of locally installed STB.COMMENT
LOWsrc/mlpack/config.hpp81#endifCOMMENT
LOWsrc/mlpack/config.hpp101// This is necessary if we would like to overwrite the default packagingCOMMENT
LOWsrc/mlpack/config.hpp121#if !defined(MLPACK_ENABLE_HTTPLIB)COMMENT
LOWsrc/mlpack/config.hpp141COMMENT
LOWsrc/mlpack/config.hpp161COMMENT
LOWsrc/mlpack/prereqs.hpp21#include <cereal/types/array.hpp>COMMENT
LOWsrc/mlpack/base.hpp21#include <cctype>COMMENT
LOWsrc/mlpack/base.hpp41 #define M_PI 3.141592653589793238462643383279COMMENT
LOWsrc/mlpack/base.hpp61#if defined(__GNUG__) && !defined(DEBUG)COMMENT
502 more matches not shown…
Structural Annotation Overuse108 hits · 180 pts
SeverityFileLineSnippetContext
LOW⚡doc/user/methods/logistic_regression.md24mlpack::LogisticRegression lr; // Step 1: create model.CODE
LOW⚡doc/user/methods/logistic_regression.md25lr.Train(dataset, labels); // Step 2: train model.CODE
LOW⚡doc/user/methods/logistic_regression.md27lr.Classify(testDataset, predictions); // Step 3: classify points.CODE
LOW⚡doc/user/methods/softmax_regression.md25mlpack::SoftmaxRegression sr; // Step 1: create model.CODE
LOW⚡doc/user/methods/softmax_regression.md26sr.Train(dataset, labels, 4); // Step 2: train model.CODE
LOW⚡doc/user/methods/softmax_regression.md28sr.Classify(testDataset, predictions); // Step 3: classify points.CODE
LOW⚡doc/user/methods/decision_tree.md24mlpack::DecisionTree tree; // Step 1: create model.CODE
LOW⚡doc/user/methods/decision_tree.md25tree.Train(dataset, labels, 5); // Step 2: train model.CODE
LOW⚡doc/user/methods/decision_tree.md27tree.Classify(testDataset, predictions); // Step 3: classify points.CODE
LOWdoc/user/methods/lmnn.md19mlpack::LMNN lmnn(3 /* neighbors to consider */); // Step 1: create object.CODE
LOWdoc/user/methods/lmnn.md21lmnn.LearnDistance(dataset, labels, distance); // Step 2: learn distance.CODE
LOWdoc/user/methods/pca.md21mlpack::PCA pca; // Step 1: create PCA object.CODE
LOWdoc/user/methods/pca.md22pca.Apply(dataset, 5); // Step 2: reduce data dimension to 5.CODE
LOWdoc/user/methods/hoeffding_tree.md24mlpack::HoeffdingTree tree; // Step 1: create model.CODE
LOWdoc/user/methods/hoeffding_tree.md28tree.Classify(testDataset, predictions); // Step 3: classify points.CODE
LOW⚡doc/user/methods/naive_bayes_classifier.md20mlpack::NaiveBayesClassifier nbc; // Step 1: create model.CODE
LOW⚡doc/user/methods/naive_bayes_classifier.md21nbc.Train(dataset, labels, 4); // Step 2: train model.CODE
LOW⚡doc/user/methods/naive_bayes_classifier.md23nbc.Classify(testDataset, predictions); // Step 3: classify points.CODE
LOW⚡doc/user/methods/random_forest.md31mlpack::RandomForest rf; // Step 1: create model.CODE
LOW⚡doc/user/methods/random_forest.md32rf.Train(dataset, labels, 5, 10); // Step 2: train model.CODE
LOW⚡doc/user/methods/random_forest.md34rf.Classify(testData, predictions); // Step 3: classify points.CODE
LOW⚡doc/user/methods/knn.md77mlpack::KNN knn; // Step 1: create object.CODE
LOW⚡doc/user/methods/knn.md78knn.Train(referenceSet); // Step 2: set the reference set.CODE
LOW⚡doc/user/methods/knn.md81knn.Search(5, neighbors, distances); // Step 3: find 5 nearest neighbors ofCODE
LOWdoc/user/methods/dbscan.md26// Step 1: create object.COMMENT
LOWdoc/user/methods/dbscan.md29// Step 2: perform clustering.COMMENT
LOW⚡doc/user/methods/decision_tree_regressor.md27mlpack::DecisionTreeRegressor tree; // Step 1: create tree.CODE
LOW⚡doc/user/methods/decision_tree_regressor.md28tree.Train(dataset, responses); // Step 2: train model.CODE
LOW⚡doc/user/methods/decision_tree_regressor.md30tree.Predict(testDataset, predictions); // Step 3: use model to predict.CODE
LOWdoc/user/methods/nca.md25mlpack::NCA nca; // Step 1: create object.CODE
LOWdoc/user/methods/nca.md27nca.LearnDistance(dataset, labels, distance); // Step 2: learn distance.CODE
LOW⚡doc/user/methods/linear_regression.md19mlpack::LinearRegression lr; // Step 1: create model.CODE
LOW⚡doc/user/methods/linear_regression.md20lr.Train(dataset, responses); // Step 2: train model.CODE
LOW⚡doc/user/methods/linear_regression.md22lr.Predict(testDataset, predictions); // Step 3: use model to predict.CODE
LOWdoc/user/methods/nmf.md24mlpack::NMF nmf; // Step 1: create object.CODE
LOWdoc/user/methods/nmf.md25double residue = nmf.Apply(V, 10, W, H); // Step 2: apply NMF to decompose V.CODE
LOWdoc/user/methods/mean_shift.md23mlpack::MeanShift ms; // Step 1: create object.CODE
LOWdoc/user/methods/mean_shift.md26ms.Cluster(dataset, assignments, centroids); // Step 2: perform clustering.CODE
LOWdoc/user/methods/radical.md20mlpack::Radical r; // Step 1: create RADICAL object.CODE
LOWdoc/user/methods/radical.md22r.Apply(x, y, w); // Step 2: perform RADICAL on data.CODE
LOWdoc/user/methods/amf.md27// Step 1: create object. The choices of template parameters control theCOMMENT
LOWdoc/user/methods/amf.md34// Step 2: apply alternating matrix factorization to decompose V.COMMENT
LOW⚡doc/user/methods/kfn.md74mlpack::KFN kfn; // Step 1: create object.CODE
LOW⚡doc/user/methods/kfn.md75kfn.Train(referenceSet); // Step 2: set the reference set.CODE
LOW⚡doc/user/methods/kfn.md78kfn.Search(5, neighbors, distances); // Step 3: find 5 furthest neighbors ofCODE
LOW⚡doc/user/methods/bayesian_linear_regression.md19mlpack::BayesianLinearRegression blr; // Step 1: create model.CODE
LOW⚡doc/user/methods/bayesian_linear_regression.md20blr.Train(dataset, responses); // Step 2: train model.CODE
LOW⚡doc/user/methods/bayesian_linear_regression.md22blr.Predict(testDataset, predictions); // Step 3: use model to predict.CODE
LOW⚡doc/user/methods/perceptron.md26mlpack::Perceptron p; // Step 1: create model.CODE
LOW⚡doc/user/methods/perceptron.md27p.Train(dataset, labels, 5); // Step 2: train model.CODE
LOW⚡doc/user/methods/perceptron.md29p.Classify(testDataset, predictions); // Step 3: classify points.CODE
LOW⚡doc/user/methods/yolov3.md163// Step 1: load the pretrained `YOLOv3Tiny` weights.COMMENT
LOW⚡doc/user/methods/yolov3.md168// Step 2: load the image.COMMENT
LOW⚡doc/user/methods/yolov3.md174// Step 3: Preprocess the input image, detect bounding boxes andCOMMENT
LOW⚡doc/user/methods/yolov3.md178// Step 4: Save to "output.jpg".COMMENT
LOW⚡doc/user/methods/yolov3.md238// Step 1: load the pretrained weights.COMMENT
LOW⚡doc/user/methods/yolov3.md243// Step 2: load the image.COMMENT
LOW⚡doc/user/methods/yolov3.md249// Step 3: Preprocess the `inputImage`, predict bounding boxes using `YOLOv3`.COMMENT
LOW⚡doc/user/methods/yolov3.md253// Step 4: Inspect the first possible bounding box.COMMENT
LOW⚡doc/user/methods/yolov3.md264// Step 1: load the pretrained model.COMMENT
48 more matches not shown…
Verbosity Indicators24 hits · 48 pts
SeverityFileLineSnippetContext
LOW⚡src/mlpack/methods/ann/layer/batch_norm_impl.hpp287 // Step 1: dl / dxhat.COMMENT
LOW⚡src/mlpack/methods/ann/layer/batch_norm_impl.hpp290 // Step 2: sum dl / dxhat * (x - mu) * -0.5 * stdInv^3.COMMENT
LOW⚡src/mlpack/methods/ann/layer/batch_norm_impl.hpp294 // Step 3: dl / dxhat * 1 / stdInv + variance * 2 * (x - mu) / m +COMMENT
LOW⚡src/mlpack/methods/ann/layer/batch_norm_impl.hpp299 // Step 4: sum (dl / dxhat * -1 / stdInv) + variance *COMMENT
LOW⚡src/mlpack/methods/ann/layer/batch_norm_impl.hpp320 // Step 5: dl / dy * xhat.COMMENT
LOW⚡src/mlpack/methods/ann/layer/batch_norm_impl.hpp324 // Step 6: dl / dy.COMMENT
LOW⚡src/mlpack/methods/ann/layer/layer_norm_impl.hpp111 // Step 5: dl / dy * xhat.COMMENT
LOW⚡src/mlpack/methods/ann/layer/layer_norm_impl.hpp114 // Step 6: dl / dy.COMMENT
LOW⚡…hods/ann/layer/not_adapted/virtual_batch_norm_impl.hpp124 // Step 5: dl / dy * xhat.COMMENT
LOW⚡…hods/ann/layer/not_adapted/virtual_batch_norm_impl.hpp127 // Step 6: dl / dy.COMMENT
LOW⚡…pack/methods/ann/layer/not_adapted/group_norm_impl.hpp162 // Step 5: dl / dy * xhat.COMMENT
LOW⚡…pack/methods/ann/layer/not_adapted/group_norm_impl.hpp169 // Step 6: dl / dy.COMMENT
LOWsrc/mlpack/methods/kmeans/elkan_kmeans_impl.hpp63 // Step 1: for all centers, compute between-cluster distances. For allCOMMENT
LOWsrc/mlpack/methods/kmeans/elkan_kmeans_impl.hpp87 // Step 2: identify all points such that u(x) <= s(c(x)).COMMENT
LOWsrc/mlpack/methods/kmeans/elkan_kmeans_impl.hpp98 // Step 3: for all remaining points x and centers c such that c != c(x),COMMENT
LOWsrc/mlpack/methods/kmeans/elkan_kmeans_impl.hpp151 // Step 4: for each center c, let m(c) be the mean of the pointsCOMMENT
LOW⚡src/mlpack/methods/kmeans/elkan_kmeans_impl.hpp175 // Step 5: for each point x and center c, assignCOMMENT
LOW⚡src/mlpack/methods/kmeans/elkan_kmeans_impl.hpp181 // Step 6: for each point x, assignCOMMENT
LOW⚡src/mlpack/core/transforms/spline_envelope.hpp45 // Step 1: assemble h_i segment lengths and rhs alpha.COMMENT
LOW⚡src/mlpack/core/transforms/spline_envelope.hpp53 // Step 2: solve tridiagonal system for spline second deriv (c).COMMENT
LOWsrc/mlpack/core/transforms/spline_envelope.hpp75 // Step 3: evaluate spline on each segment and fill envelope valuesCOMMENT
LOWsrc/mlpack/core/data/one_hot_encoding.hpp5 * One hot encoding functions. The purpose of this function is to convertCOMMENT
LOWsrc/mlpack/core/data/normalize_labels.hpp6 * {-1, 1} or otherwise. The purpose of this function is to normalize labels toCOMMENT
LOWsrc/mlpack/tests/catch.hpp12662 // No children have started. We need to check if they _can_COMMENT
AI Slop Vocabulary13 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUM…ann/activation_functions/tanh_exponential_function.hpp79 // leverage both y and xCOMMENT
MEDIUM…ann/activation_functions/tanh_exponential_function.hpp96 // leverage both y and xCOMMENT
MEDIUMsrc/mlpack/core/httplib/bundled/httplib.h10705 // Cross-host/scheme redirect - create new client with robust setupCOMMENT
MEDIUMsrc/mlpack/core/httplib/bundled/httplib.h10710// New method for robust redirect client creationCOMMENT
MEDIUMsrc/mlpack/core/httplib/bundled/httplib.h10778 // Setup client with robust configurationCOMMENT
MEDIUMsrc/mlpack/core/httplib/bundled/httplib.h10786// New method for robust client setup (based on basic_manual_redirect.cppCOMMENT
MEDIUMsrc/mlpack/tests/hmm_test.cpp1518 // robust.COMMENT
MEDIUMsrc/mlpack/tests/ann/not_adapted/ann_layer_test.cpp1670 // To make this test robust, check it five times.COMMENT
MEDIUMsrc/mlpack/tests/ann/not_adapted/ann_layer_test.cpp3450 // To make this test robust, check it ten times.COMMENT
LOWsrc/mlpack/bindings/python/mlpack/matrix_utils.py108 # We can just return the matrix as-is; it's all numeric.COMMENT
LOW…lpack/bindings/python/mlpack/preprocess_json_params.py119 # dictionary or list object, so just pass.COMMENT
LOW…lpack/bindings/python/mlpack/preprocess_json_params.py151 # dictionary or list object, so just pass.COMMENT
MEDIUMsrc/mlpack/bindings/R/mlpack/R/package.R4#' aims to provide fast, extensible implementations of cutting-edge machineCOMMENT
Self-Referential Comments9 hits · 26 pts
SeverityFileLineSnippetContext
MEDIUMscripts/build-docs.sh183 # Create the sidebar. Extract anchors from the page, unless we are looking atCOMMENT
MEDIUMscripts/build-docs.sh225# Create the template header file.COMMENT
MEDIUMscripts/build-docs.sh245# Create the template footer.COMMENT
MEDIUMscripts/build-docs.sh323 # Create the new details block, if the h2 has children.COMMENT
MEDIUMscripts/build-docs.sh406# Create the template files we will use, if they don't already exist.COMMENT
MEDIUMscripts/build-docs.sh511 # Create a basic config file for linkchecker. We will append domains to ignoreCOMMENT
MEDIUMscripts/update-website-after-release.sh34# Create the release file.COMMENT
MEDIUMsrc/mlpack/bindings/R/mlpack/R/matrix_utils.R3# This file defines the to_matrix() function, which can be used to convertCOMMENT
MEDIUMsrc/mlpack/bindings/julia/print_jl.cpp257 cout << " # Create the set of model pointers to avoid setting multiple "CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHsrc/mlpack/methods/ann/layer/lstm_impl.hpp280 // In this implementation we won't use aliases; we'll just address the correctCOMMENT
Deep Nesting3 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/mlpack/bindings/python/mlpack/matrix_utils.py40CODE
LOW…lpack/bindings/python/mlpack/preprocess_json_params.py83CODE
LOW…lpack/bindings/python/mlpack/preprocess_json_params.py122CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWCMake/exec2man.sh9# Usage:COMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…/reinforcement_learning/q_networks/categorical_dqn.hpp119 // TODO: implement copy constructor and operatorCOMMENT