A Python implementation of global optimization with gaussian processes.
This report presents the forensic synthetic code analysis of bayesian-optimization/BayesianOptimization, a Python project with 8,691 GitHub stars. SynthScan v2.0 examined 8,415 lines of code across 39 source files, recording 132 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 17.1 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).
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 132 distinct pattern matches across 9 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 | bayes_opt/domain_reduction.py | 243 | def _window_bounds_compatibility(self, global_bounds: NDArray[Float]) -> None: | CODE |
| LOW | bayes_opt/acquisition.py | 1221 | def _sample_idx_from_softmax_gains(self, random_state: RandomState) -> int: | CODE |
| LOW | tests/test_parameter.py | 131 | def test_cateogrical_valid_bounds(): | CODE |
| LOW | tests/test_parameter.py | 173 | def test_preconstructed_parameter(): | CODE |
| LOW | tests/test_parameter.py | 189 | def test_integration_mixed_optimization(): | CODE |
| LOW | tests/test_parameter.py | 206 | def test_integration_mixed_optimization_with_constraints(): | CODE |
| LOW | tests/test_parameter.py | 249 | def test_combined_wrapped_kernel_fit(): | CODE |
| LOW⚡ | tests/test_acquisition.py | 110 | def test_acquisition_optimization(gp, target_space): | CODE |
| LOW⚡ | tests/test_acquisition.py | 120 | def test_acquisition_optimization_only_random(gp, target_space, random_state): | CODE |
| LOW⚡ | tests/test_acquisition.py | 406 | def test_upper_confidence_bound_invalid_kappa_error(kappa: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 412 | def test_upper_confidence_bound_invalid_exploration_decay_error(exploration_decay: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 420 | def test_upper_confidence_bound_invalid_exploration_decay_delay_error(exploration_decay_delay): | CODE |
| LOW⚡ | tests/test_acquisition.py | 428 | def test_probability_of_improvement_invalid_xi_error(xi: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 434 | def test_probability_of_improvement_invalid_exploration_decay_error(exploration_decay: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 442 | def test_probability_of_improvement_invalid_exploration_decay_delay_error(exploration_decay_delay): | CODE |
| LOW⚡ | tests/test_acquisition.py | 450 | def test_expected_improvement_invalid_xi_error(xi: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 456 | def test_expected_improvement_invalid_exploration_decay_error(exploration_decay: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 464 | def test_expected_improvement_invalid_exploration_decay_delay_error(exploration_decay_delay): | CODE |
| LOW | tests/test_acquisition.py | 135 | def test_acquisition_optimization_only_l_bfgs_b(gp, target_space): | CODE |
| LOW | tests/test_acquisition.py | 142 | def test_upper_confidence_bound(gp, target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 159 | def test_smart_minimize_fails(target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 174 | def test_upper_confidence_bound_with_constraints(gp, constrained_target_space): | CODE |
| LOW | tests/test_acquisition.py | 182 | def test_probability_of_improvement(gp, target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 203 | def test_probability_of_improvement_with_constraints(gp, constrained_target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 220 | def test_expected_improvement(gp, target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 241 | def test_expected_improvement_with_constraints(gp, constrained_target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 289 | def test_constant_liar_invalid_strategy(): | CODE |
| LOW | tests/test_acquisition.py | 294 | def test_constant_liar_with_constraints(gp, constrained_target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 328 | def test_gphedge_update_gains(random_state): | CODE |
| LOW | tests/test_acquisition.py | 352 | def test_gphedge_softmax_sampling(random_state): | CODE |
| LOW | tests/test_acquisition.py | 376 | def test_gphedge_skips_duplicate_candidate_when_unique_candidate_exists(gp, target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 519 | def test_integration_acquisition_functions( | CODE |
| LOW | tests/test_acquisition.py | 549 | def test_integration_constrained(target_func_x_and_y, pbounds, constraint, tmp_path): | CODE |
| LOW | tests/test_acquisition.py | 579 | def test_custom_acquisition_without_get_params(): | CODE |
| LOW | tests/test_acquisition.py | 600 | def test_custom_acquisition_without_set_params(): | CODE |
| LOW⚡ | tests/test_bayesian_optimization.py | 190 | def test_prime_queue_all_empty(): | CODE |
| LOW⚡ | tests/test_bayesian_optimization.py | 200 | def test_prime_queue_empty_with_init(): | CODE |
| LOW⚡ | tests/test_bayesian_optimization.py | 210 | def test_prime_queue_with_register(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 101 | def test_register_array_uses_pbounds_order_without_warning(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 112 | def test_probe_array_uses_pbounds_order_without_warning(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 172 | def test_suggest_with_one_observation(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 221 | def test_prime_queue_with_register_and_init(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 285 | def test_define_wrong_transformer(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 292 | def test_single_value_objective(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 371 | def test_save_load_w_categorical_params(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 402 | def test_suggest_point_returns_same_point(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 419 | def test_save_load_random_state(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 441 | def test_save_load_unused_optimizer(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 523 | def test_save_load_w_domain_reduction(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 560 | def test_save_load_w_custom_parameter(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 708 | def test_predict_integer_params(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 745 | def test_predict_categorical_params(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 775 | def test_predict_no_points_registered(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 795 | def test_predict_custom_parameter(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 829 | def test_predict_invalid_params_type(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 849 | def test_predict_return_std_and_cov_mutually_exclusive(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 864 | def test_predict_shape_semantics_dict_vs_list(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 885 | def test_predict_shape_semantics_with_std(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 913 | def test_predict_shape_semantics_with_cov(): | CODE |
| LOW | tests/test_target_space.py | 21 | def test_keys_and_bounds_in_same_order(): | CODE |
| 20 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bayes_opt/target_space.py | 3 | CODE | |
| LOW | bayes_opt/constraint.py | 3 | CODE | |
| LOW | bayes_opt/exception.py | 3 | CODE | |
| LOW | bayes_opt/domain_reduction.py | 8 | CODE | |
| LOW | bayes_opt/util.py | 3 | CODE | |
| LOW | bayes_opt/bayesian_optimization.py | 7 | CODE | |
| LOW | bayes_opt/__init__.py | 3 | CODE | |
| LOW | bayes_opt/__init__.py | 7 | CODE | |
| LOW | bayes_opt/__init__.py | 8 | CODE | |
| LOW | bayes_opt/__init__.py | 9 | CODE | |
| LOW | bayes_opt/__init__.py | 10 | CODE | |
| LOW | bayes_opt/__init__.py | 11 | CODE | |
| LOW | bayes_opt/__init__.py | 12 | CODE | |
| LOW | bayes_opt/logger.py | 3 | CODE | |
| LOW | bayes_opt/acquisition.py | 21 | CODE | |
| LOW | bayes_opt/parameter.py | 3 | CODE | |
| LOW | tests/test_notebooks_run.py | 5 | CODE | |
| LOW | tests/test_parameter.py | 1 | CODE | |
| LOW | tests/test_util.py | 1 | CODE | |
| LOW | tests/test_acquisition.py | 1 | CODE | |
| LOW | tests/test_bayesian_optimization.py | 1 | CODE | |
| LOW | tests/test_target_space.py | 1 | CODE | |
| LOW | tests/test_constraint.py | 1 | CODE | |
| LOW | tests/test_logger.py | 1 | CODE | |
| LOW | tests/test_seq_domain_red.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 0 | function with unknown internals we wish to maximize. this is just serving as an example, however, for all intents and pu | STRING |
| HIGH | tests/test_seq_domain_red.py | 0 | function with unknown internals we wish to maximize. this is just serving as an example, however, for all intents and pu | STRING |
| HIGH | examples/async_optimization.py | 0 | function with unknown internals we wish to maximize. this is just serving as an example, however, for all intents and pu | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bayes_opt/target_space.py | 687 | def set_bounds(self, new_bounds: BoundsMapping) -> None: | CODE |
| LOW | bayes_opt/exception.py | 5 | __all__ = [ | CODE |
| LOW | bayes_opt/bayesian_optimization.py | 393 | def set_bounds(self, new_bounds: BoundsMapping) -> None: | STRING |
| LOW | bayes_opt/bayesian_optimization.py | 403 | def set_gp_params(self, **params: Any) -> None: | STRING |
| LOW | bayes_opt/__init__.py | 17 | __all__ = [ | CODE |
| LOW | bayes_opt/logger.py | 226 | def _update_tracker(self, current_max: dict[str, Any] | None) -> None: | CODE |
| LOW | bayes_opt/acquisition.py | 102 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | CODE |
| LOW | bayes_opt/acquisition.py | 570 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | STRING |
| LOW | bayes_opt/acquisition.py | 750 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | STRING |
| LOW | bayes_opt/acquisition.py | 939 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | STRING |
| LOW | bayes_opt/acquisition.py | 1166 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | STRING |
| LOW | bayes_opt/acquisition.py | 1238 | def _update_gains(self, gp: GaussianProcessRegressor) -> None: | CODE |
| LOW | bayes_opt/acquisition.py | 1346 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | CODE |
| LOW⚡ | tests/test_acquisition.py | 106 | def set_acquisition_params(self, params: dict) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bayes_opt/acquisition.py | 390 | # Check if success | COMMENT |
| LOW | bayes_opt/acquisition.py | 1110 | # Check if any dummies have been evaluated and remove them | STRING |
| LOW | tests/test_logger.py | 179 | # Check if header contains expected column names | COMMENT |
| LOW | tests/test_logger.py | 185 | # Check if divider line is included | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | bayes_opt/acquisition.py | 1113 | # Create a copy of the target space | STRING |
| MEDIUM | examples/typed_hyperparameter_tuning.py | 16 | # Define the hyperparameter space | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bayes_opt/target_space.py | 237 | CODE | |
| LOW | bayes_opt/acquisition.py | 1058 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docsrc/conf.py | 1 | # Configuration file for the Sphinx documentation builder. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_bayesian_optimization.py | 335 | except Exception as e: | CODE |