Computer scientists have introduced an optimized metaheuristic framework that substantially enhances the automated detection of structured query language injection attacks against web applications while cutting the required feature processing volume by approximately seventy percent. Published in Discover Internet of Things by researchers Bahman Arasteh, Huseyin Kusetogullari, and Keyvan Arasteh, the study demonstrates an improved chaos-based binary shuffled frog-leaping algorithm, designated bSFLA, engineered specifically for feature subset selection. Structured query language injection, commonly abbreviated as SQLi, remains classified by the Open Web Application Security Project among the most critical security vulnerabilities threatening modern digital infrastructure. By altering the database queries generated by application interfaces, malicious actors can subvert authentication routines, extract sensitive organizational records, or achieve comprehensive backend system compromise. Although machine learning classifiers are widely deployed to distinguish benign transactions from malicious inputs across cloud services, electronic commerce systems, and online banking platforms, traditional models struggle with high false-positive rates, unacceptable error margins, and computational degradation when forced to process high-dimensional input spaces containing redundant or uninformative data.
Designing an optimal feature selection mechanism represents a known non-deterministic polynomial-time complete combinatorial optimization challenge, requiring algorithms to evaluate promising combinations out of two to the power of n potential subsets without conducting exhaustive enumeration. Conventional feature selection approaches in cybersecurity frequently rely on static, rule-based indicators that prove ineffective against novel attack variations, or they depend on standard random initialization routines that risk converging prematurely onto sub-optimal local solutions. Furthermore, unoptimized feature sets often introduce overlapping noise that distorts the mathematical decision boundaries established by supervised classifiers. To address these vulnerabilities, the research team designed an explicit, interpretable optimization framework that merges the natural collective foraging dynamics of the shuffled frog-leaping algorithm with deterministic chaos theory. By integrating chaotic population initialization, divided memeplex evolution, stochastic binary transformations, and periodic shuffling, the resulting bSFLA framework isolates compact, highly discriminative subsets containing roughly thirty percent of original input attributes while enhancing overall classification accuracy, sensitivity, precision, and harmonic stability.
The foundational architecture of the proposed bSFLA model relies on a multi-phase evolutionary search process modeled after groups of leaping frogs distributed across distinct environmental memeplexes. To guarantee uniform population dispersion and eliminate the sampling clustering typical of conventional pseudo-random initialization, the authors incorporated a chaotic logistic map defined by a recurrence relation with an empirically calibrated growth parameter r set to four. This chaotic sequence produces persistent, non-repetitive initial frog coordinates bounded between zero and one. In this formulation, each frog represents a candidate solution encoded as a discrete binary vector corresponding to the available feature space, wherein a value of one designates feature inclusion and zero denotes exclusion. The overarching population of candidate solutions is subsequently ranked according to fitness and partitioned into m independent memeplexes. Within each local memeplex, the least-fit candidate iteratively updates its spatial position by learning from the local best-performing frog. If this localized movement fails to yield fitness improvements, the candidate reorients toward the global best solution across the entire population, and if necessary, initiates two-point crossover and two-point mutation operators before resorting to random replacement.
Converting continuous spatial trajectories into discrete feature selection decisions is accomplished through a specialized binary mapping framework governed by the logistic sigmoid transformation. Because raw position updates yield continuous numerical values, the algorithm applies a sigmoid transfer function that maps continuous frog coordinates onto a smooth probability interval between zero and one. A stochastic thresholding mechanism then compares this computed probability against a uniformly distributed random value between zero and one to assign a deterministic binary flag of zero or one for each feature dimension. Candidate subsets are evaluated using a multi-objective fitness minimization function designed to balance predictive quality against dimensionality reduction. This mathematical objective balances the classifier error rate against the ratio of selected attributes to total features using weighted constant coefficients alpha and beta, where alpha is bounded within zero and one, and beta is strictly defined as one minus alpha. Consequently, the optimization algorithm continuously penalizes redundant feature retention while rewarding significant decreases in classification misclassification.
To rigorously validate the generalizability and robustness of the bSFLA approach, the researchers evaluated the optimization pipeline across two distinct experimental databases representing diverse sample scales, structural properties, and class distributions. Dataset 1 consists of 1,027 structured query records, comprising 473 benign operational queries such as standard select, insert, update, and delete commands, alongside 554 malicious injection attacks featuring common attack signatures including tautological disjunctions, union select injections, and table-dropping commands. Each record in Dataset 1 was encoded using twelve numerical structural attributes, capturing query length, nesting depth, special character counts, keyword frequencies for union, or, and, and null, quotation marks, and parenthesis counts. Dataset 2 was constructed to evaluate performance under enterprise-scale traffic, encompassing 30,919 query instances comprising 19,537 legitimate queries and 11,382 attack payloads. The twelve features of Dataset 2 incorporate lexical complexity metrics, query token lengths, punctuation frequencies, non-alphanumeric character ratios, lexical entropy, and explicit binary flags denoting union select syntax, or-based tautologies, and database sleep commands. To eliminate predictive data leakage, all numerical features underwent min-max normalization calculated strictly from designated training partitions.
Empirical evaluation of Dataset 1 via an ablation study demonstrated direct, statistically verifiable performance enhancements when bSFLA feature selection was combined with four primary machine learning models: Artificial Neural Networks, Support Vector Machines, K-Nearest Neighbors, and Decision Trees. When trained on the complete unpruned feature baseline across five independent experimental executions, the standard classifiers produced average baseline scores of 95.64 percent accuracy, 96.99 percent sensitivity, 94.24 percent precision, and an F1-score of 95.41 percent. Integrating the bSFLA feature selection module increased these average performance metrics to 98.32 percent accuracy, 98.35 percent sensitivity, 97.58 percent precision, and an F1-score of 97.89 percent. These improvements correspond to an absolute increase of 2.68 percentage points in accuracy, 1.36 points in sensitivity, 3.34 points in precision, and 2.48 points in F1-score. In relative terms, the optimization process reduced the classifiers’ error rates for accuracy, sensitivity, precision, and F1-score by approximately 61.5 percent, 45.2 percent, 58.0 percent, and 54.0 percent, respectively, confirming that removing uninformative dimensions systematically eliminates false-positive alerts without sacrificing attack capture rates.
The evaluation on Dataset 2 further substantiated the predictive strength and stability of the framework when scaling to broader query distributions evaluated through rigorous ten-fold cross-validation. Across all four primary classifiers, the bSFLA-guided models achieved an overall average classification accuracy of 99.47 percent, an average sensitivity of 98.95 percent, an average precision of 99.61 percent, and a combined F1-score of 99.28 percent. Among the evaluated learning mechanisms, the K-Nearest Neighbors algorithm demonstrated the highest individual performance, recording an average accuracy of 99.63 percent, sensitivity of 99.23 percent, precision of 99.77 percent, and an F1-score of 99.50 percent. Decision Trees, Artificial Neural Networks, and Support Vector Machines demonstrated comparably robust results, recording accuracies of 99.44 percent, 99.44 percent, and 99.37 percent, respectively. In contrast, an auxiliary evaluation of Naive Bayes demonstrated noticeably lower efficacy, yielding an accuracy of 88.05 percent, sensitivity of 70.77 percent, and an F1-score of 81.33 percent despite maintaining 95.62 percent precision. Receiver operating characteristic analysis conducted on the Artificial Neural Network across all ten cross-validation folds revealed area under the curve metrics ranging narrowly between 0.9976 and 0.9995, establishing an exemplary mean area under the curve of 0.9988.
Granular tracking of selection frequencies across repeated executions highlighted fundamental structural attributes that govern accurate query classification, while uncovering distinct model-specific feature dependencies. In Dataset 1, the frequency of constant numerical and textual values emerged as the single most critical structural attribute, achieving an overall selection rate of 100 percent across all twenty independent runs and classifier configurations. Nesting depth and bracket counts each registered selection frequencies of 65 percent, followed by overall query character length at 60 percent and special character counts at 55 percent. In Dataset 2, normalized feature importance calculations revealed that four primary attributes accounted for approximately 75.57 percent of total cumulative importance across all classifiers: query lexical entropy led with 23.91 percent, followed by token length at 19.95 percent, non-alphanumeric character ratios at 19.55 percent, and overall character length at 12.16 percent. Comment dash counts contributed 9.06 percent, whereas specific boolean indicators like union select and sleep commands accounted for less than one percent of relative importance, demonstrating that generalized lexical complexity and character composition provide far more dependable detection signals than fragile keyword-matching rules.
Statistical evaluation confirmed that the bSFLA framework substantially improves operational stability and reduces performance variance across repeated algorithmic runs. In comparative error bar evaluations assessing classification accuracy on Dataset 1, the selective-feature model operating on thirty percent of available attributes achieved a 95 percent confidence interval error bar of just 0.4386 around an average accuracy of 98.27 percent, whereas the full-feature baseline displayed an error bar of 2.7517 around an inferior mean accuracy of 92.01 percent. For Dataset 2, non-parametric Friedman testing across the ten paired cross-validation folds established statistically significant distinctions among the models, prompting post-hoc pairwise Wilcoxon signed-rank tests with Holm correction. This analysis confirmed that K-Nearest Neighbors significantly outperformed Support Vector Machines, Decision Trees, and Artificial Neural Networks, while Naive Bayes performed significantly worse than all counterparts. Differences among the Decision Tree, Artificial Neural Network, and Support Vector Machine models were found to be statistically non-significant, confirming broad classifier compatibility across differing underlying learning architectures.
Despite these favorable predictive outcomes and computational advantages, the authors outline important methodological constraints governing the interpretation of their findings and identify critical avenues for future research. While Dataset 1 provided direct ablation evidence contrasting performance with and without feature selection under identical conditions, the experiments on Dataset 2 did not record an unoptimized full-feature baseline, preventing researchers from isolating the precise causal contribution of bSFLA independently from the larger dataset’s intrinsic structural properties. Additionally, the experimental data was generated using controlled query generation frameworks and captured access logs rather than unconstrained, real-time live enterprise traffic. To expand the operational capability of the framework in latency-critical web application firewalls and cloud environments, future investigations plan to combine handcrafted structural attributes with deep semantic embeddings derived from transformer architectures such as BERT, RoBERTa, and large language models, while exploring synthetic oversampling techniques like SMOTE and generative augmentation to better mitigate extreme class imbalance in emerging zero-day attack patterns.
Subject of Research: Machine learning feature selection using chaos-based shuffled frog-leaping for SQL injection detection
Article Title: Chaos-based shuffled frog-leaping and machine learning approach for SQL injection detection in web applications
Article References: Arasteh, B., Kusetogullari, H., & Arasteh, K. (2026). Chaos-based shuffled frog-leaping and machine learning approach for SQL injection detection in web applications. Discover Internet of Things, 6(1), Article 281. https://doi.org/10.1007/s43926-026-00494-5
Image Credits: AI Generated
DOI: 10.1007/s43926-026-00494-5
Keywords: SQL injection detection, feature selection, shuffled frog-leaping algorithm, chaos theory, machine learning, web application security, logistic map, artificial neural network, support vector machine, k-nearest neighbors, decision tree, cross-validation, ROC analysis, cybersecurity, dimensionality reduction, OWASP vulnerabilities, query classification
Cite Scienmag News
Blake Davidson. (November 26, 2026). Chaos-Based Frog Leaping Algorithm Boosts Machine Learning SQL Injection Detection. Scienmag. https://scienmag.com/chaos-based-frog-leaping-algorithm-boosts-machine-learning-sql-injection-detection/
Blake Davidson. "Chaos-Based Frog Leaping Algorithm Boosts Machine Learning SQL Injection Detection." Scienmag, 26 November 2026, https://scienmag.com/chaos-based-frog-leaping-algorithm-boosts-machine-learning-sql-injection-detection/. Accessed 26 November 2026.
Blake Davidson. "Chaos-Based Frog Leaping Algorithm Boosts Machine Learning SQL Injection Detection." Scienmag. November 26, 2026. https://scienmag.com/chaos-based-frog-leaping-algorithm-boosts-machine-learning-sql-injection-detection/








