AI Slop Code RIsk Monitor

bayesian-optimization/BayesianOptimization

A Python implementation of global optimization with gaussian processes.

17.7 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for bayesian-optimization/BayesianOptimization, a Python project with 8,720 GitHub stars. SynthScan examined 8,428 lines of code across 39 source files, recording 134 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 17.7 (Elevated 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.

17.7
Adjusted Signal
17.7
Raw Pattern Score
100%
Time Factor
2026-10-02
Last Push
8.7K
Stars
Python
Language
8.4K
Lines of Code
39
Files
134
Pattern Hits
2026-10-12
Scan Date
0.10
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 42.4/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 13.3/100 · LOW

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

Agent Over-Engineering Ratio 49.0/100 · MEDIUM

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

PR Review Velocity Impact 60.8/100 · HIGH

Which changes need focused human review? 134 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

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

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 4MEDIUM 2LOW 128

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 134 distinct pattern matches across 10 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.

Hyper-Verbose Identifiers81 hits · 81 pts
SeverityFileLineSnippetContext
LOWbayes_opt/domain_reduction.py243 def _window_bounds_compatibility(self, global_bounds: NDArray[Float]) -> None:CODE
LOWbayes_opt/acquisition.py1221 def _sample_idx_from_softmax_gains(self, random_state: RandomState) -> int:CODE
LOWtests/test_parameter.py90def test_categorical_kernel_transform_preserves_batch_rows():CODE
LOWtests/test_parameter.py144def test_cateogrical_valid_bounds():CODE
LOWtests/test_parameter.py186def test_preconstructed_parameter():CODE
LOWtests/test_parameter.py202def test_integration_mixed_optimization():CODE
LOWtests/test_parameter.py219def test_integration_mixed_optimization_with_constraints():CODE
LOWtests/test_parameter.py262def test_combined_wrapped_kernel_fit():CODE
LOW⚡tests/test_acquisition.py110def test_acquisition_optimization(gp, target_space):CODE
LOW⚡tests/test_acquisition.py120def test_acquisition_optimization_only_random(gp, target_space, random_state):CODE
LOW⚡tests/test_acquisition.py406def test_upper_confidence_bound_invalid_kappa_error(kappa: float):CODE
LOW⚡tests/test_acquisition.py412def test_upper_confidence_bound_invalid_exploration_decay_error(exploration_decay: float):CODE
LOW⚡tests/test_acquisition.py420def test_upper_confidence_bound_invalid_exploration_decay_delay_error(exploration_decay_delay):CODE
LOW⚡tests/test_acquisition.py428def test_probability_of_improvement_invalid_xi_error(xi: float):CODE
LOW⚡tests/test_acquisition.py434def test_probability_of_improvement_invalid_exploration_decay_error(exploration_decay: float):CODE
LOW⚡tests/test_acquisition.py442def test_probability_of_improvement_invalid_exploration_decay_delay_error(exploration_decay_delay):CODE
LOW⚡tests/test_acquisition.py450def test_expected_improvement_invalid_xi_error(xi: float):CODE
LOW⚡tests/test_acquisition.py456def test_expected_improvement_invalid_exploration_decay_error(exploration_decay: float):CODE
LOW⚡tests/test_acquisition.py464def test_expected_improvement_invalid_exploration_decay_delay_error(exploration_decay_delay):CODE
LOWtests/test_acquisition.py135def test_acquisition_optimization_only_l_bfgs_b(gp, target_space):CODE
LOWtests/test_acquisition.py142def test_upper_confidence_bound(gp, target_space, random_state):CODE
LOWtests/test_acquisition.py159def test_smart_minimize_fails(target_space, random_state):CODE
LOWtests/test_acquisition.py174def test_upper_confidence_bound_with_constraints(gp, constrained_target_space):CODE
LOWtests/test_acquisition.py182def test_probability_of_improvement(gp, target_space, random_state):CODE
LOWtests/test_acquisition.py203def test_probability_of_improvement_with_constraints(gp, constrained_target_space, random_state):CODE
LOWtests/test_acquisition.py220def test_expected_improvement(gp, target_space, random_state):CODE
LOWtests/test_acquisition.py241def test_expected_improvement_with_constraints(gp, constrained_target_space, random_state):CODE
LOWtests/test_acquisition.py289def test_constant_liar_invalid_strategy():CODE
LOWtests/test_acquisition.py294def test_constant_liar_with_constraints(gp, constrained_target_space, random_state):CODE
LOWtests/test_acquisition.py328def test_gphedge_update_gains(random_state):CODE
LOWtests/test_acquisition.py352def test_gphedge_softmax_sampling(random_state):CODE
LOWtests/test_acquisition.py376def test_gphedge_skips_duplicate_candidate_when_unique_candidate_exists(gp, target_space, random_state):CODE
LOWtests/test_acquisition.py519def test_integration_acquisition_functions(CODE
LOWtests/test_acquisition.py549def test_integration_constrained(target_func_x_and_y, pbounds, constraint, tmp_path):CODE
LOWtests/test_acquisition.py579def test_custom_acquisition_without_get_params():CODE
LOWtests/test_acquisition.py600def test_custom_acquisition_without_set_params():CODE
LOW⚡tests/test_bayesian_optimization.py190def test_prime_queue_all_empty():CODE
LOW⚡tests/test_bayesian_optimization.py200def test_prime_queue_empty_with_init():CODE
LOW⚡tests/test_bayesian_optimization.py210def test_prime_queue_with_register():CODE
LOWtests/test_bayesian_optimization.py101def test_register_array_uses_pbounds_order_without_warning():CODE
LOWtests/test_bayesian_optimization.py112def test_probe_array_uses_pbounds_order_without_warning():CODE
LOWtests/test_bayesian_optimization.py172def test_suggest_with_one_observation():CODE
LOWtests/test_bayesian_optimization.py221def test_prime_queue_with_register_and_init():CODE
LOWtests/test_bayesian_optimization.py285def test_define_wrong_transformer():CODE
LOWtests/test_bayesian_optimization.py292def test_single_value_objective():CODE
LOWtests/test_bayesian_optimization.py371def test_save_load_w_categorical_params(tmp_path):CODE
LOWtests/test_bayesian_optimization.py402def test_suggest_point_returns_same_point(tmp_path):CODE
LOWtests/test_bayesian_optimization.py419def test_save_load_random_state(tmp_path):CODE
LOWtests/test_bayesian_optimization.py441def test_save_load_unused_optimizer(tmp_path):CODE
LOWtests/test_bayesian_optimization.py523def test_save_load_w_domain_reduction(tmp_path):CODE
LOWtests/test_bayesian_optimization.py560def test_save_load_w_custom_parameter(tmp_path):CODE
LOWtests/test_bayesian_optimization.py708def test_predict_integer_params():CODE
LOWtests/test_bayesian_optimization.py745def test_predict_categorical_params():CODE
LOWtests/test_bayesian_optimization.py775def test_predict_no_points_registered():CODE
LOWtests/test_bayesian_optimization.py795def test_predict_custom_parameter():CODE
LOWtests/test_bayesian_optimization.py829def test_predict_invalid_params_type():CODE
LOWtests/test_bayesian_optimization.py849def test_predict_return_std_and_cov_mutually_exclusive():CODE
LOWtests/test_bayesian_optimization.py864def test_predict_shape_semantics_dict_vs_list():CODE
LOWtests/test_bayesian_optimization.py885def test_predict_shape_semantics_with_std():CODE
LOWtests/test_bayesian_optimization.py913def test_predict_shape_semantics_with_cov():CODE
21 more matches not shown…
Unused Imports25 hits · 24 pts
SeverityFileLineSnippetContext
LOWbayes_opt/target_space.py3CODE
LOWbayes_opt/constraint.py3CODE
LOWbayes_opt/exception.py3CODE
LOWbayes_opt/domain_reduction.py8CODE
LOWbayes_opt/util.py3CODE
LOWbayes_opt/bayesian_optimization.py7CODE
LOWbayes_opt/__init__.py3CODE
LOWbayes_opt/__init__.py7CODE
LOWbayes_opt/__init__.py8CODE
LOWbayes_opt/__init__.py9CODE
LOWbayes_opt/__init__.py10CODE
LOWbayes_opt/__init__.py11CODE
LOWbayes_opt/__init__.py12CODE
LOWbayes_opt/logger.py3CODE
LOWbayes_opt/acquisition.py21CODE
LOWbayes_opt/parameter.py3CODE
LOWtests/test_notebooks_run.py5CODE
LOWtests/test_parameter.py1CODE
LOWtests/test_util.py1CODE
LOWtests/test_acquisition.py1CODE
LOWtests/test_bayesian_optimization.py1CODE
LOWtests/test_target_space.py1CODE
LOWtests/test_constraint.py1CODE
LOWtests/test_logger.py1CODE
LOWtests/test_seq_domain_red.py1CODE
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHREADME.md0function with unknown internals we wish to maximize. this is just serving as an example, however, for all intents and puSTRING
HIGHtests/test_seq_domain_red.py0function with unknown internals we wish to maximize. this is just serving as an example, however, for all intents and puSTRING
HIGHexamples/async_optimization.py0function with unknown internals we wish to maximize. this is just serving as an example, however, for all intents and puSTRING
Modern Structural Boilerplate14 hits · 12 pts
SeverityFileLineSnippetContext
LOWbayes_opt/target_space.py687 def set_bounds(self, new_bounds: BoundsMapping) -> None:CODE
LOWbayes_opt/exception.py5__all__ = [CODE
LOWbayes_opt/bayesian_optimization.py393 def set_bounds(self, new_bounds: BoundsMapping) -> None:STRING
LOWbayes_opt/bayesian_optimization.py403 def set_gp_params(self, **params: Any) -> None:STRING
LOWbayes_opt/__init__.py17__all__ = [CODE
LOWbayes_opt/logger.py226 def _update_tracker(self, current_max: dict[str, Any] | None) -> None:CODE
LOWbayes_opt/acquisition.py102 def set_acquisition_params(self, params: dict[str, Any]) -> None:CODE
LOWbayes_opt/acquisition.py570 def set_acquisition_params(self, params: dict[str, Any]) -> None:STRING
LOWbayes_opt/acquisition.py750 def set_acquisition_params(self, params: dict[str, Any]) -> None:STRING
LOWbayes_opt/acquisition.py939 def set_acquisition_params(self, params: dict[str, Any]) -> None:STRING
LOWbayes_opt/acquisition.py1166 def set_acquisition_params(self, params: dict[str, Any]) -> None:STRING
LOWbayes_opt/acquisition.py1238 def _update_gains(self, gp: GaussianProcessRegressor) -> None:CODE
LOWbayes_opt/acquisition.py1346 def set_acquisition_params(self, params: dict[str, Any]) -> None:CODE
LOW⚡tests/test_acquisition.py106 def set_acquisition_params(self, params: dict) -> None:CODE
Redundant / Tautological Comments4 hits · 5 pts
SeverityFileLineSnippetContext
LOWbayes_opt/acquisition.py390 # Check if successCOMMENT
LOWbayes_opt/acquisition.py1110 # Check if any dummies have been evaluated and remove themSTRING
LOWtests/test_logger.py179 # Check if header contains expected column namesCOMMENT
LOWtests/test_logger.py185 # Check if divider line is includedCOMMENT
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHexamples/async_optimization.py53except KeyError:CODE
Self-Referential Comments2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMbayes_opt/acquisition.py1113 # Create a copy of the target spaceSTRING
MEDIUMexamples/typed_hyperparameter_tuning.py16# Define the hyperparameter spaceCOMMENT
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWbayes_opt/target_space.py237CODE
LOWbayes_opt/acquisition.py1058CODE
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWdocsrc/conf.py1# Configuration file for the Sphinx documentation builder.COMMENT
Excessive Try-Catch Wrapping1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_bayesian_optimization.py335 except Exception as e:CODE