Skip to Content
BiomimeticsBiomimetics
  • Article
  • Open Access

3 December 2026

24 Pages

Bio-Inspired Optimization and Biologically Constrained Machine Learning for Predicting Insect Survival Following Botanical Insecticide Application

,
and
1
Continuing Education Center, Fırat University, 23119 Elazığ, Türkiye
2
Department of Plant Protection, Faculty of Agriculture, Malatya Turgut Özal University, 44900 Malatya, Türkiye
3
Department of Bioengineering, Faculty of Engineering, Firat University, 23119 Elazig, Türkiye
*
Author to whom correspondence should be addressed.
Biomimetics2026, 11(12), 877;https://doi.org/10.3390/biomimetics11120877 
(registering DOI)
This article belongs to the Special Issue Bio-Inspired Optimization Algorithms: 2nd Edition

Abstract

Accurate prediction of insect survival following pesticide application is important for evaluating treatment outcomes and supporting pest management decisions. However, the relationships between pesticide formulation, application dose, treatment duration, and insect survival can be nonlinear, making reliable prediction challenging. This study proposes a survival-rate-based Gradient Boosting Regression approach (GBR_Survival) for estimating surviving insect populations following pesticide treatment. Unlike conventional regression models that directly predict surviving insect counts, the proposed approach models the proportion of surviving insects relative to the initial population and subsequently converts the predicted survival rate into a biologically bounded insect count. The dataset comprised 1040 observations from 34 experimental series, incorporating pesticide formulation, application dose, time after treatment, and initial population as predictors. The hyperparameters of the proposed GBR_Survival model were optimized using Particle Swarm Optimization (PSO). The selection of PSO was supported by an equal-budget comparison with three other optimization methods: Grey Wolf Optimization (GWO), Harris Hawks Optimization (HHO), and Optuna-TPE. Model performance was evaluated using group-aware nested cross-validation with five outer and four inner folds and compared against seven conventional machine learning regression algorithms. In the optimizer comparison, PSO achieved mean RMSE, MAE, and R2 values of 4.1580, 3.1458, and 0.9043, respectively, while Optuna-TPE achieved the lowest mean sMAPE of 29.4924%. In the ablation analysis, GBR_Survival achieved a mean RMSE of 4.1641 ± 0.9515, MAE of 3.1132 ± 0.7244, R2 of 0.9031 ± 0.0351, and sMAPE of 29.66 ± 4.08%. Compared with the baseline Gradient Boosting Regression configuration evaluated under the same experimental framework, GBR_Survival reduced mean RMSE by approximately 3.62%. SHAP analysis identified time after treatment as the most influential predictor, followed by application dose and pesticide formulation. Overall, the findings suggest that survival-rate-based target transformation provides a biologically interpretable and potentially useful strategy for modeling insect survival following pesticide application, although further independent validation is needed to establish its generalizability.

1. Introduction

The protection of stored agricultural commodities is essential for maintaining food quality, reducing postharvest losses, and supporting global food security. Insect infestation during storage can cause substantial quantitative and qualitative deterioration through feeding damage, contamination, and changes in the physical and commercial properties of agricultural products. Hagstrum and Phillips [1] emphasized the importance of stored-product entomology in protecting the global food supply and highlighted the need for effective monitoring and integrated pest management strategies. Among the insects associated with stored cereals and processed grain products, the confused flour beetle, Tribolium confusum Jacquelin du Val (Coleoptera: Tenebrionidae), is an important secondary stored-product pest. Both adults and larvae are associated with damaged grain and processed cereal products, including flour and bran. Infestation may contribute to product contamination, undesirable odors, and deterioration of flour quality. Consequently, effective management of T. confusum populations is important for protecting stored agricultural commodities and maintaining their commercial value [2].
The management of stored-product insects has traditionally relied on chemical insecticides and fumigants. Although these treatments can provide effective pest suppression, their repeated application has raised concerns regarding insecticide resistance, chemical residues, and the long-term sustainability of pest control strategies. Nayak et al. [3] reviewed the global development of phosphine resistance among stored-product insects and emphasized the challenges associated with maintaining the effectiveness of conventional fumigation treatments. These limitations have encouraged increasing interest in alternative insecticidal compounds and integrated pest management approaches. In particular, botanical insecticides derived from plant extracts and essential oils have received considerable attention because of their biological activity against insect pests. Isman [4] discussed the potential of botanical insecticides while emphasizing the challenges associated with formulation development, efficacy consistency, and practical application. Similarly, Gorišek and Trdan [5] reviewed the effectiveness and limitations of essential oils in plant protection, highlighting their potential as plant-derived pest control agents. Nevertheless, the effectiveness of botanical formulations may depend on their chemical composition, application concentration, exposure duration, and target insect species.
An important characteristic of insecticide treatment is that its biological effect may develop progressively rather than immediately after application. Insects exposed to a particular formulation may remain alive for different periods depending on the applied dose and the duration of exposure. Therefore, treatment effectiveness cannot always be adequately characterized by mortality measured at a single observation time. The temporal development of survival provides additional information about the speed and persistence of insecticidal activity. Moreover, the relationship between dose and survival may differ among formulations, indicating that treatment responses should be evaluated by considering multiple experimental factors simultaneously. For T. confusum, predicting the number of surviving insects at successive observation times could complement conventional mortality assessment by providing quantitative estimates of population persistence following insecticide application.
Experimental research has demonstrated the insecticidal potential of botanical formulations against T. confusum. Güral et al. [2] investigated four commercial plant-derived formulations, namely Grainpro AITC-Alpha, Grainpro AITC-Gamma, Grainpro Gamma-Eug, and Grainpro AITC-Euc, under controlled laboratory conditions. The experiments were conducted at 25 ± 2 °C and approximately 60% relative humidity, with insect survival monitored at 24-h intervals following treatment. The authors evaluated different application doses and employed analysis of variance and probit analysis to assess treatment effects and estimate time-dependent LD50 and LD90 values. Their findings demonstrated that insect survival varied according to formulation, application dose, and exposure duration. In particular, Grainpro AITC-Euc exhibited strong insecticidal activity, with no surviving insects observed by day 19 at the reported concentration of 1 µg/mL and by day 18 at 1.10 µg/mL. These findings highlight the importance of temporal survival patterns when evaluating botanical insecticides against T. confusum.
Related investigations have also evaluated the same botanical formulations against other stored-product insect species. Buran et al. [6] examined the insecticidal effects of Grainpro AITC-Alpha, Grainpro AITC-Gamma, Grainpro Gamma-Eug, and Grainpro AITC-Euc against the bean weevil, Acanthoscelides obtectus. The authors reported substantial insecticidal activity, with complete adult mortality observed within seven days across the tested concentrations. Considered together, the investigations by Güral et al. [2] and Buran et al. [6] demonstrate the importance of formulation composition, application dose, exposure duration, and target insect species in determining insecticidal outcomes. However, the two studies primarily characterized observed treatment effects through mortality measurements and lethal-dose analyses rather than developing machine learning models for predicting the number of insects remaining alive under different experimental conditions.
Conventional statistical methods have played an important role in insecticide efficacy assessment. Abbott [7] introduced a widely used approach for correcting observed mortality according to mortality in untreated control groups, while probit analysis has been extensively applied to estimate lethal-dose and lethal-time endpoints. Although these methods provide valuable information about insecticide effectiveness, their primary objectives differ from predicting insect survival under varying treatment conditions. Consequently, machine learning-based regression approaches may offer complementary opportunities for modeling complex relationships among formulation type, application dose, exposure duration, and survival outcomes.
Machine learning algorithms offer opportunities to model nonlinear relationships among experimental variables without requiring a predetermined functional relationship between treatment conditions and biological responses. Tree-based ensemble algorithms are particularly relevant for structured experimental data because they can capture complex associations and interactions among predictors. Gradient Boosting Regression (GBR), based on the gradient boosting framework introduced by Friedman [8], constructs predictive models through the sequential addition of regression trees that progressively reduce prediction errors. Other established regression approaches, including Random Forest [9], Extra Trees [10], XGBoost [11], CatBoost [12], Support Vector Regression [13], and Gaussian Process Regression [14], provide alternative strategies for representing nonlinear relationships. Nevertheless, predictive performance is influenced not only by the selected algorithm but also by the representation of the target variable and the structure of the experimental observations.
Recent studies have demonstrated the potential of machine learning techniques for predicting pesticide toxicity and insect population dynamics. Yang et al. [15] developed a Support Vector Machine-based approach for classifying pesticide toxicity to honey bees using molecular representations, demonstrating the applicability of machine learning to insect-related toxicological assessment. Singh et al. [16] investigated several ensemble learning algorithms, including Random Forest, XGBoost, Gradient Boosted Decision Trees, and CatBoost, for predicting pesticide toxicity indicators. Their results showed that a stacked Random Forest–XGBoost model achieved an R2 of 0.75 for LD50 prediction, highlighting the potential of ensemble methods for modeling pesticide-related outcomes. More recently, Adamczyk et al. [17] evaluated different machine learning approaches for predicting pesticide toxicity to honey bees and emphasized the importance of selecting models and molecular representations appropriate to agrochemical data.
Recent investigations have also demonstrated the applicability of machine learning and explainable artificial intelligence to agricultural pest management. Barut et al. [18] developed an explainable hybrid machine learning framework based on MPSO-XGBoost for predicting pest density in almond orchards, highlighting the potential of optimization-based ensemble learning for pest monitoring. This study demonstrates the potential of machine learning and explainable artificial intelligence for analyzing complex biological observations and supporting data-driven agricultural pest management.
To enhance model optimization, this study incorporates PSO, a population-based metaheuristic algorithm inspired by the collective behavior of bird flocking and fish schooling. PSO is employed to optimize the hyperparameters of the proposed survival-rate-based Gradient Boosting Regression framework. Its selection was supported by an equal-budget comparative evaluation against GWO, HHO, and Optuna-TPE. This approach combines biologically interpretable survival-rate-based prediction with metaheuristic hyperparameter optimization.
Although previous studies have demonstrated the potential of machine learning for pesticide toxicity assessment and agricultural pest population modeling, the prediction of surviving insect populations following botanical insecticide application remains a distinct and comparatively underexplored problem. Existing approaches have primarily focused on toxicity classification, lethal-dose estimation, or pest abundance prediction, whereas estimating the number of surviving insects under varying treatment conditions requires explicitly considering the relationship between the initial population and subsequent survival. In particular, directly predicting absolute surviving counts does not explicitly incorporate the biological constraint that the number of surviving insects must remain between zero and the initial population.
To address this gap, this study proposes a biologically informed survival-rate-based Gradient Boosting Regression framework, termed GBR_Survival, for predicting insect survival following botanical insecticide application. Instead of directly learning absolute surviving counts, the proposed framework models the proportion of surviving insects relative to the initial population. The predicted survival proportion is subsequently restricted to the biologically feasible interval [0, 1] and transformed back into an estimated surviving count using the initial population. This target representation provides an explicit connection between the prediction process and the underlying biological population constraint.
Despite the progress in botanical insecticide research and machine learning applications in pest management, several challenges remain in predicting insect survival following pesticide treatment. Previous experimental studies have primarily focused on evaluating insecticidal efficacy through mortality measurements, whereas the development of predictive models that explicitly represent survival as a proportion of the initial insect population has received limited attention. Furthermore, the integration of biologically interpretable target transformation with metaheuristic hyperparameter optimization and group-aware model evaluation remains insufficiently explored in this context. In particular, the potential benefits of survival-rate-based target representation compared with direct insect-count prediction have not been adequately investigated. These gaps highlight the need for predictive frameworks that jointly consider pesticide formulation, application dose, and exposure duration while providing biologically feasible estimates of insect survival.
To address these gaps, this study proposes a survival-rate-based Gradient Boosting Regression framework (GBR_Survival) for predicting surviving insect populations following botanical insecticide treatment. Unlike conventional count-based regression approaches that directly estimate absolute surviving insect counts, the proposed framework introduces a biologically informed target representation by modeling the proportion of surviving insects relative to the initial population. Importantly, the proposed framework does not modify the underlying Gradient Boosting algorithm; rather, its methodological contribution lies in integrating survival-rate-based target transformation with a biologically constrained prediction reconstruction mechanism. The predicted survival proportion is restricted to the feasible interval [0, 1] and subsequently converted into an estimated surviving insect count using the initial population. This formulation explicitly incorporates the biological constraint that the surviving population cannot exceed the initial population. The framework is investigated using 1040 experimental observations from 34 experimental series involving four botanical insecticide formulations against *Tribolium confusum*. Its hyperparameters are optimized using PSO, whose performance is evaluated against GWO, HHO, and Optuna-TPE under an equal optimization budget. Predictive performance is assessed against seven conventional machine learning regression algorithms using group-aware nested cross-validation. Furthermore, a four-configuration ablation analysis is conducted to distinguish the contribution of survival-rate-based target transformation from that of feature engineering. SHAP analysis is employed to interpret the influence of treatment-related variables on predicted insect survival. Accordingly, the primary objective of this study is to investigate the predictive utility of biologically informed target representation, combined with metaheuristic hyperparameter optimization, while ensuring biologically feasible population estimates.
The main contributions of this study are summarized as follows:
  • Survival-rate-based prediction framework: A biologically informed Gradient Boosting Regression framework, termed GBR_Survival, is developed to model the proportion of surviving insects relative to the initial population rather than directly predicting absolute surviving counts. Unlike conventional count-based regression, this formulation explicitly represents relative population survival as the learning target, providing a biologically meaningful basis for predicting insect survival under different botanical insecticide treatment conditions.
  • Biologically constrained prediction reconstruction: A prediction reconstruction mechanism is incorporated to constrain estimated survival proportions to the interval [0, 1] and convert them into surviving insect counts using the initial population. This ensures that the resulting predictions remain within biologically feasible population limits.
  • Systematic assessment of methodological contributions: A four-configuration ablation analysis is conducted to separately investigate the effects of survival-rate-based target transformation and feature engineering, allowing their individual and combined contributions to predictive performance to be examined.
  • Comparative predictive evaluation: The proposed GBR_Survival framework is evaluated against seven established machine learning regression algorithms to investigate its predictive effectiveness under different botanical insecticide treatment conditions.
  • Group-aware validation and model interpretation: A group-aware nested cross-validation strategy is employed to assess generalization across independent experimental series, while SHAP analysis is used to interpret the contributions of formulation type, application dose, and exposure duration to model predictions.

2. Materials and Methods

2.1. Experimental Dataset and Input Variables

The dataset comprised 1040 observations from 34 experimental series involving four botanical insecticide formulations against Tribolium confusum. The formulations were evaluated at nine distinct application doses ranging from 0.20 to 1.10 µL, although not all dose levels were represented for every formulation. Specifically, the dataset contained nine dose series for Grainpro AITC-Alpha, nine for Grainpro AITC-EUC, eight for Grainpro AITC-Gamma, and eight for Grainpro Gamma-EUG. Each experimental series started with an initial population of 50 insects. Insect survival was recorded at successive observation times following treatment, with the number of daily observations varying across series. Thus, the 1040 records represent repeated observations collected from 34 formulation–dose series rather than 1040 independent experimental replicates.
The four botanical insecticide formulations used in this study contained different combinations and proportions of active constituents. Their reported compositions, including the active ingredients and the methyl soyate ester component, are summarized in Table 1. These formulations were evaluated to investigate their effects on the survival of Tribolium confusum at different application doses and observation times.
Table 1. Composition and reported constituent percentages of the four botanical insecticide formulations used in this study.
Adult confused flour beetles, *Tribolium confusum* Jacquelin du Val (Coleoptera: Tenebrionidae), were reared on a flour and bran mixture under laboratory conditions at 25 ± 1 °C and approximately 65 ± 5% relative humidity. For the bioassays, cracked wheat was immersed in the diluted formulations and subsequently dried on drying paper. Five replicate containers were prepared for each formulation–dose combination, each containing 15 g of treated cracked wheat and 10 adult beetles. Insect survival was monitored daily after treatment until all insects had died, and the number of surviving insects was recorded at each observation time. At each observation time, the surviving insects in the five replicate containers were counted collectively to obtain the total number of survivors from the initial population of 50 insects (5 containers × 10 insects per container). Thus, the survival data for each formulation–dose combination were represented by a single aggregated count at each observation time.
Four variables were considered in the modeling framework: pesticide formulation, application dose (µL), day after treatment, and initial insect population. The observed number of surviving insects was used as the original response variable. For the proposed GBR_Survival framework, this response was transformed into a survival proportion by dividing the number of surviving insects by the corresponding initial population, as defined in Equation (1). The predicted survival proportion was constrained to the interval [0, 1] using a clipping operation and then multiplied by the initial insect population (50) to obtain the predicted number of surviving insects. No rounding was applied to the reconstructed predictions; therefore, predicted insect counts could contain decimal values. Since the initial population was constant (50 insects) across all observations, it had zero variance and therefore provided no additional discriminative information for model training. Nevertheless, it was retained in the model input feature vector and used in the survival-rate transformation and prediction reconstruction to maintain the biological interpretation of the proposed framework. Pesticide formulation was treated as a categorical variable, whereas application dose and time after treatment were treated as numerical variables. Experimental series identifiers were retained as grouping variables and were not included as predictive features.
Since multiple observations originated from the same experimental series, observations within a series could share experimental characteristics and were not assumed to be statistically independent. Accordingly, a group-aware nested cross-validation strategy was adopted to ensure that observations from the same experimental series were not distributed across training and validation subsets. This approach reduced the risk of information leakage and provided a more reliable assessment of model generalization to previously unseen experimental series.

2.2. Data Preprocessing and Target Transformation

Prior to model development, the dataset was examined to ensure the suitability of the experimental observations for regression analysis. Pesticide formulation was treated as a categorical predictor, whereas application dose, day after treatment, and initial insect population were considered numerical variables.
The use of survival proportions instead of absolute surviving insect counts was motivated by the need to reduce the dependence of the prediction target on the initial population size. Absolute surviving counts may differ considerably between experimental groups with different initial population sizes, even when they exhibit the same underlying survival response to a botanical insecticide treatment. For example, an identical survival proportion may correspond to different numbers of surviving insects depending on the initial population. By expressing survival as a proportion of the initial population, the target variable provides a normalized representation of insect survival and enables the model to learn relative survival responses rather than relying solely on population-specific absolute counts. This normalization may improve the applicability of the framework across experimental settings involving different initial population sizes. Importantly, the transformation does not eliminate the role of the initial population; instead, it separates the relative survival response from the population scale during target modeling. The predicted survival proportion is subsequently converted into an absolute surviving count using the corresponding initial population size.
For the proposed GBR_Survival approach, the original target variable was transformed into a survival rate. Specifically, the survival rate for each observation was calculated by dividing the number of surviving insects by the initial insect population, as expressed in Equation (1):
r i = S i N i
where ri represents the observed survival rate, Si denotes the number of surviving insects, and Ni indicates the initial insect population for observation i.
Unlike conventional regression approaches that directly predict surviving insect counts, the proposed model estimates survival rates. Following prediction, the estimated survival rate was constrained to the interval [0, 1] and converted into the corresponding number of surviving insects using Equation (2):
S ^ i = N i × min ( 1 , max ( 0 , r ^ i ) )
where r ^ i denotes the predicted survival rate and S ^ i represents the predicted number of surviving insects. The constraints in Equation (2) ensure that the predicted surviving insect count remains between zero and the initial population. It should be noted that the reconstructed values represent model-estimated expected numbers of surviving insects rather than actual observed insect counts. Since the GBR_Survival framework is a regression-based model, its predictions may take decimal values even though actual insect counts are discrete integers. These decimal predictions were retained without rounding during model evaluation to preserve the numerical precision of the model outputs. For conventional regression models, the original surviving insect counts were used as the prediction target. All models were evaluated on the original insect-count scale to ensure a consistent comparison of predictive performance. The overall workflow, including the target transformation and prediction procedure, is illustrated in Figure 1.
Figure 1. Schematic overview of the proposed PSO-optimized GBR_Survival framework for predicting insect survival following pesticide application. The workflow comprises five main stages: (1) experimental data collection, including 1040 observations from 34 experimental series; (2) transformation of surviving insect counts into survival rates relative to the initial population; (3) model training and hyperparameter optimization using group-aware nested cross-validation with five outer and four inner folds, including an equal-budget comparison of PSO, GWO, HHO, and Optuna-TPE, followed by the selection of PSO for the proposed model; (4) prediction of survival rates using the PSO-optimized Gradient Boosting Regression model and reconstruction of surviving insect counts; and (5) model interpretation using SHAP feature importance and predictive performance evaluation based on out-of-fold RMSE, MAE, R2, and sMAPE metrics.

2.3. Proposed GBR_Survival Framework

The proposed GBR_Survival framework was developed to predict the number of surviving insects following pesticide application by integrating a survival-rate-based target transformation with Gradient Boosting Regression (GBR) and PSO for hyperparameter tuning. Unlike conventional regression approaches that directly estimate surviving insect counts, the proposed framework models the proportion of surviving insects relative to the initial population. This target representation provides a biologically interpretable learning objective, while the prediction reconstruction procedure ensures that the estimated survival proportions are converted into surviving insect counts within the feasible range determined by the initial population. PSO is employed to optimize the GBR hyperparameters by minimizing the mean RMSE across the inner validation folds.
Gradient Boosting Regression is an ensemble learning algorithm that constructs a predictive model by sequentially combining multiple regression trees. At each iteration, a new regression tree is fitted to reduce the prediction errors of the current ensemble. The general prediction function of the GBR model can be expressed as Equation (3):
F M ( X i ) = F 0 ( X i ) + η ∑ m = 1 M h m ( X i )
where F M ( X i )   represents the final prediction for observation i, F 0 ( X i ) + denotes the initial prediction, M is the total number of boosting iterations, η represents the learning rate, and hm(Xi) is the regression tree added at iteration m.
In the proposed framework, the input feature vector consists of pesticide formulation, application dose, time after treatment, and initial insect population. The PSO-optimized GBR model is trained using the observed survival rates calculated according to Equation (1). Based on these input features, the model estimates the survival rate of the insect population, as expressed in Equation (4):
r ^ i = F M ( x i )
The estimated survival rate is subsequently converted into the predicted number of surviving insects using Equation (2). This conversion incorporates the initial population directly into the final prediction and prevents biologically implausible estimates exceeding the initial population or falling below zero.
The proposed framework therefore differs from conventional GBR primarily in its target representation and prediction reconstruction procedure rather than in the underlying boosting algorithm. By learning survival proportions instead of absolute insect counts, GBR_Survival aims to capture treatment-related survival patterns while maintaining a biologically constrained relationship between the predicted outcome and the initial population.
To evaluate the contribution of this strategy, the proposed approach was compared with conventional regression models and additional GBR configurations incorporating feature engineering. Furthermore, four hyperparameter optimization algorithms (PSO, GWO, HHO, and Optuna-TPE) were comparatively evaluated under an equal evaluation budget to identify the most effective optimization strategy for the proposed framework. Based on this comparison, PSO was selected for the subsequent GBR_Survival experiments. All configurations were assessed using a group-aware nested cross-validation framework to ensure a consistent and independent evaluation of predictive performance. The complete methodological workflow, including target transformation, model optimization, prediction reconstruction, and model evaluation, is illustrated in Figure 1.

2.4. Machine Learning Models and Hyperparameter Optimization

To evaluate the predictive effectiveness of the proposed GBR_Survival framework, seven machine learning regression algorithms were employed as benchmark models: Gradient Boosting Regression (GBR), Random Forest (RF), Extra Trees (ET), Extreme Gradient Boosting (XGBoost), CatBoost, Support Vector Regression (SVR), and Gaussian Process Regression (GPR). These algorithms were selected to represent different regression strategies, including ensemble learning, kernel-based regression, and probabilistic modeling, thereby enabling a comprehensive assessment of the proposed approach against established machine learning techniques.
GBR constructs an ensemble of regression trees sequentially, with each successive tree attempting to reduce the prediction errors of the preceding ensemble. RF combines multiple decision trees trained on bootstrap samples and aggregates their predictions to improve predictive stability. ET introduces additional randomness into the tree construction process through randomized split selection. XGBoost employs a regularized gradient boosting framework designed to improve predictive performance and computational efficiency, while CatBoost incorporates specialized boosting techniques to improve generalization and reduce prediction bias. SVR estimates a regression function by optimizing an ε-insensitive loss within a kernel-based learning framework. GPR provides a probabilistic approach to regression by modeling relationships between observations through a covariance function. To ensure a consistent comparison, all benchmark models were trained using the original number of surviving insects as the target variable, whereas the proposed GBR_Survival model was trained using the survival-rate-based target defined in Equation (1). The predicted survival rates were subsequently converted into surviving insect counts according to Equation (2). Consequently, the predictive performance of all models was evaluated on the same original response scale.
Hyperparameter optimization was performed using Optuna with the Tree-structured Parzen Estimator (TPE) sampler for the seven benchmark regression models. For each benchmark model, 35 optimization trials were conducted independently within each outer cross-validation fold. The hyperparameter search spaces were defined separately according to the characteristics of each regression algorithm, and the corresponding parameters and search ranges are presented in Table 2.
Table 2. Hyperparameter search spaces and sampling strategies used for the machine learning regression models.
For the proposed GBR_Survival framework, PSO was selected as the primary hyperparameter optimization algorithm based on a comparative evaluation of four optimization approaches: PSO, GWO, HHO, and Optuna-TPE. All four algorithms were evaluated using the same seven-dimensional GBR hyperparameter search space and an equal budget of 100 objective-function evaluations per outer fold. Their performance was compared under the same five-fold outer and four-fold inner group-aware nested cross-validation framework. PSO achieved the most favorable mean performance in three of the four evaluation metrics (RMSE, MAE, and R2), whereas Optuna-TPE yielded the lowest mean sMAPE. Based on its overall performance, PSO was selected for the subsequent experiments involving the proposed GBR_Survival framework. The optimization objective was to minimize the mean RMSE across the four inner validation folds.
In addition to the comparison with conventional regression algorithms, an ablation analysis was conducted to investigate the contributions of survival-rate-based target transformation and feature engineering. Four GBR configurations were examined: GBR_Baseline, GBR_Features, GBR_Survival, and GBR_Features_Survival. These configurations represented conventional GBR, GBR with engineered features, GBR with survival-rate transformation, and GBR combining engineered features with survival-rate transformation, respectively. All four configurations were optimized independently using PSO, with the same seven-dimensional hyperparameter search space and an equal optimization budget of 100 objective-function evaluations per configuration and outer fold. This consistent optimization strategy enabled an assessment of the individual and combined effects of the investigated methodological components. In the feature-engineering ablation, three additional numerical features and formulation–dose interaction terms were evaluated. These included the dose–time interaction (Dose × Day), the dose normalized by the initial insect population (Dose/Initial Population), and the logarithmic transformation of time [ln(1 + Day)]. The dose–time interaction was intended to represent the combined influence of application dose and exposure duration, while the logarithmic time feature allowed for potentially nonlinear temporal effects. Formulation–dose interactions were included to capture possible differences in dose–response relationships among formulations. Since the initial insect population was constant (50) across all observations, the normalized-dose feature did not introduce additional independent information. These features were assessed through the GBR_Features and GBR_Features_Survival configurations.
All models and GBR configurations were evaluated using a group-aware nested cross-validation framework consisting of five outer folds and four inner folds. The inner folds were used for hyperparameter selection, whereas the outer folds provided an independent assessment of predictive performance on held-out experimental series. Hyperparameter optimization was performed independently for each model and outer training partition to reduce the risk of optimistic performance estimates associated with model selection. The detailed validation procedure is described in Section 2.5.
The computational complexity of the proposed framework is mainly determined by GBR model training and PSO-based hyperparameter optimization. Let n denote the number of training observations, p the number of input features, T the number of boosting trees, and q the dimensionality of the hyperparameter search space (q = 7). Under standard tree-splitting assumptions, the approximate training complexity of one GBR model is O(T × p × n × log n).
Each PSO objective-function evaluation requires model training across four inner folds. With 100 evaluations per outer fold and five outer folds, the optimization of a single GBR configuration involves 2000 inner-loop model fits (5 × 100 × 4). Therefore, the dominant time complexity of the nested PSO–GBR optimization is O(F × B × K × T × p × n × log n), where F = 5, B = 100, and K = 4. The computational cost of PSO position updates is comparatively smaller than repeated GBR training. Thus, model fitting constitutes the main computational burden of the proposed framework.

2.5. Group-Aware Nested Cross-Validation

To obtain reliable estimates of predictive performance and minimize the risk of data leakage, a group-aware nested cross-validation strategy was employed for all regression models. The dataset contained multiple observations originating from the same experimental series, which could exhibit dependencies arising from shared experimental conditions. Consequently, conventional random splitting at the observation level could place related measurements in both training and test subsets, potentially resulting in overly optimistic performance estimates. To address this issue, the experimental series identifier (Seri_ID) was used as the grouping variable within a nested GroupKFold cross-validation framework. This approach ensured that all observations belonging to the same experimental series were assigned to a single partition during each cross-validation split. The series identifier was used exclusively for grouping and was not included among the predictive input features.
The nested cross-validation procedure consisted of five outer folds and four inner folds. In the outer loop, the experimental series were partitioned into five mutually exclusive test subsets. At each iteration, four subsets were used for model development, while the remaining subset was reserved for independent performance evaluation. The held-out outer test subset was not used during hyperparameter optimization. Within each outer training partition, four-fold GroupKFold cross-validation was performed to optimize model hyperparameters. For the seven benchmark regression models, candidate hyperparameter configurations were generated using Optuna with the TPE sampler, whereas PSO was employed for the proposed GBR_Survival framework. Each candidate configuration was evaluated using the corresponding inner training and validation subsets, with the mean RMSE across the four inner validation folds serving as the optimization objective. For the benchmark models, the best-performing configuration was selected after 35 Optuna trials. For GBR_Survival, the optimal hyperparameter configuration was selected based on the minimum inner-validation RMSE obtained during the PSO process.
In addition, PSO was compared with GWO, HHO, and Optuna-TPE under an equal optimization budget of 100 objective-function evaluations per outer fold. This comparison was conducted using the same seven-dimensional hyperparameter search space and the same inner cross-validation objective. Based on the comparative results, PSO was selected for the proposed GBR_Survival framework. The model with the selected hyperparameters was subsequently retrained using the entire outer training partition and evaluated on the corresponding held-out outer test subset. This process was repeated across all five outer folds, ensuring that every observation was evaluated once in an outer test partition. All preprocessing operations requiring parameter estimation, including missing-value imputation, categorical encoding, and feature scaling where applicable, were incorporated into the model pipelines and fitted using only the relevant training data.
The same outer and inner group-aware validation structure was applied to the benchmark algorithms and the four GBR configurations included in the ablation analysis. For the survival-rate-based configurations, model fitting was performed using survival proportions, whereas predictions were reconstructed as surviving insect counts before calculating validation errors. Therefore, hyperparameter selection and final performance assessment were consistently conducted on the original surviving-insect-count scale. Predictive performance was summarized using the mean and standard deviation of the evaluation metrics across the five outer folds. In addition, the predictions generated for the held-out outer test subsets were combined to obtain out-of-fold predictions for the complete dataset. These predictions were subsequently used to examine agreement between observed and predicted surviving insect counts and to analyze the distribution of prediction errors. By separating hyperparameter optimization from independent performance evaluation and preserving experimental-series boundaries throughout the validation process, the proposed strategy provided a more rigorous assessment of model generalization to previously unseen experimental series.

2.6. Performance Evaluation and Model Interpretability

The predictive performance of the proposed GBR_Survival framework and the benchmark regression models was evaluated using root mean squared error (RMSE), mean absolute error (MAE), coefficient of determination (R2), and symmetric mean absolute percentage error (sMAPE). All metrics were calculated on the original surviving-insect-count scale to ensure comparability across models. RMSE penalizes larger prediction errors more strongly, whereas MAE measures the average absolute deviation. RMSE and MAE were calculated using Equations (5) and (6), respectively:
RMSE   =   √ [ ( 1 / n )   ∑ i = 1 n   ( y i   −   y ^ i ) 2 ]
MAE = ( 1 / n )   ∑ i = 1 n   | y i − y ^ i |
The coefficient of determination (R2) expresses the reduction in squared prediction error relative to predicting the observed mean. It was calculated using Equation (7):
R 2   =   1   −   [ ∑ i = 1 n   ( y i   −   y ^ i ) 2 ]   /   [ ∑ i = 1 n   ( y i   − y - i ) 2 ]
The sMAPE metric quantifies relative prediction error as a percentage and was calculated using Equation (8):
sMAPE   =   ( 100 / n )   ∑ i = 1 n   [ 2 | y i   −   y - i |   /   ( | y i |   +   | y ^ i | ) ]
In Equations (5)–(8), n is the number of evaluated observations, yi is the observed surviving insect count, ŷi is the predicted count, and ȳ is the mean observed count. For sMAPE, a term was defined as zero when both its observed and predicted values were zero, avoiding division by zero. Lower RMSE, MAE, and sMAPE indicate smaller prediction errors, while higher R2 indicates better predictive agreement.
Each metric was calculated separately on the held-out test set of each of the five outer cross-validation folds. Results were summarized using the mean and standard deviation of the fold-level scores. In addition, the outer-fold predictions were pooled to construct out-of-fold (OOF) predictions for all observations. Observed and predicted counts were compared graphically, and residuals were calculated as observed minus predicted counts to assess the magnitude and distribution of errors.
Model interpretability was investigated using SHapley Additive exPlanations (SHAP). Global feature importance was summarized using the mean absolute SHAP contribution for each predictor, including time after treatment, pesticide dose, formulation, and initial population. Because GBR_Survival first predicts survival proportions and then reconstructs insect counts using the initial population, SHAP contributions for the survival-rate model should not be interpreted as direct measures of the variables’ effects on final count predictions. SHAP attributions describe model behavior rather than causal relationships. The interpretability results were considered alongside the descriptive temporal survival patterns across formulations.

2.7. Computational Environment

All experiments were implemented in Python (3.11.11) using the Spyder integrated development environment (IDE). The computations were performed on a workstation running 64-bit Windows 11 Pro. The hardware configuration included an Intel(R) Core(TM) i5-10400 CPU operating at 2.90 GHz, 8 GB of RAM, and integrated Intel(R) UHD Graphics 630. The experimental procedures, including model training, hyperparameter optimization, cross-validation, and performance evaluation, were carried out within this computational environment.

3. Results

3.1. Comparative Performance of Machine Learning Models

The comparative predictive performance of the PSO-optimized GBR_Survival framework and seven conventional machine learning regression models is presented in Figure 2. As illustrated in Figure 2a, the PSO-optimized GBR_Survival approach achieved the lowest mean RMSE (4.1580), followed by conventional GBR (4.1926), CatBoost (4.2068), and Random Forest (4.2498). A similar pattern was observed for MAE (Figure 2b), where the PSO-optimized GBR_Survival model achieved the lowest value (3.1458), followed by Random Forest (3.1515) and conventional GBR (3.1613). Furthermore, the proposed approach achieved the highest mean R2 value (0.9043), slightly exceeding conventional GBR (0.9024) and CatBoost (0.9018) (Figure 2c). Regarding sMAPE (Figure 2d), Random Forest achieved the lowest value (29.22%), followed by Extra Trees (29.53%) and conventional GBR (29.85%), whereas the PSO-optimized GBR_Survival model obtained a value of 30.61%. Overall, the PSO-optimized GBR_Survival framework achieved the most favorable mean performance in three of the four evaluation metrics (RMSE, MAE, and R2), while Random Forest performed best in terms of sMAPE. These findings indicate that the proposed framework provides competitive predictive performance compared with the conventional regression models.
Figure 2. Comparative predictive performance of the GBR_Survival framework optimized using PSO and seven conventional machine learning regression models based on (a) RMSE, (b) MAE, (c) R2, and (d) sMAPE. Bars represent mean values obtained across the five outer folds of group-aware nested cross-validation. The PSO-optimized GBR_Survival model is highlighted in dark blue, while the benchmark models are shown in gray.

3.2. Comparative Evaluation of Hyperparameter Optimization Algorithms

To further investigate the effect of hyperparameter optimization on the proposed GBR_Survival framework, four optimization algorithms were compared: PSO, GWO, HHO, and Optuna with TPE. All four approaches were evaluated using the same GBR_Survival model, identical search spaces, and an equal optimization budget of 100 objective-function evaluations per outer fold. The comparison was conducted using the same five-fold outer and four-fold inner group-aware nested cross-validation strategy.
As reported in Table 3, PSO achieved the lowest mean RMSE (4.1580 ± 0.6689) and MAE (3.1458 ± 0.4307), together with the highest mean R2 (0.9043 ± 0.0214). HHO ranked second in terms of mean RMSE (4.2543 ± 0.8495), followed by GWO and Optuna-TPE. However, Optuna-TPE achieved the lowest mean sMAPE (29.4924 ± 2.1619). Overall, PSO achieved the most favorable mean performance in three of the four evaluation metrics, namely RMSE, MAE, and R2. Although Optuna-TPE yielded a lower sMAPE, the results support the selection of PSO as the primary hyperparameter optimization algorithm for the GBR_Survival framework in terms of overall predictive performance.
Table 3. Comparative performance of GBR_Survival using different hyperparameter optimization algorithms.

3.3. Ablation Analysis of the Proposed GBR_Survival Approach

An ablation analysis was performed to investigate the individual and combined effects of survival-rate-based target transformation and feature engineering on the predictive performance of Gradient Boosting Regression. Four configurations were evaluated: GBR_Baseline, GBR_Features, GBR_Survival, and GBR_Features_Survival. All configurations were optimized independently using PSO with an equal optimization budget and were assessed using identical group-aware nested cross-validation partitions consisting of five outer folds and four inner folds.
As illustrated in Figure 3a, GBR_Survival achieved the lowest mean RMSE (4.1641 ± 0.9515), followed by GBR_Baseline (4.3203 ± 1.0349), GBR_Features_Survival (4.6181 ± 0.3110), and GBR_Features (4.8612 ± 0.2775). Compared with GBR_Baseline, GBR_Survival yielded a 3.62% reduction in mean RMSE. A similar pattern was observed for MAE, with GBR_Survival achieving the lowest value (3.1132 ± 0.7244), compared with 3.3525 ± 0.8411 for GBR_Baseline. The proposed configuration also achieved the highest mean R2 (0.9031 ± 0.0351) and the lowest mean sMAPE (29.66 ± 4.08%) among the four configurations.
Figure 3. Ablation analysis of the four PSO-optimized Gradient Boosting Regression configurations. (a) Mean RMSE values with standard deviations across the five outer folds of group-aware nested cross-validation. (b) Fold-wise RMSE differences between GBR_Baseline and GBR_Survival, calculated as RMSE(Baseline)—RMSE(Survival). Positive values indicate lower prediction errors for GBR_Survival, whereas negative values indicate lower prediction errors for GBR_Baseline.
The fold-level comparison presented in Figure 3b provides further insight into the effect of survival-rate-based target transformation. GBR_Survival achieved a lower RMSE than GBR_Baseline in two of the five outer folds (folds 4 and 5), whereas GBR_Baseline performed better in the remaining three folds. The largest improvement was observed in fold 4, where RMSE decreased by 1.2954. In contrast, GBR_Survival yielded higher RMSE values in folds 1–3. Although GBR_Survival achieved a lower mean RMSE across the five outer folds, the difference was not statistically significant in the exploratory paired comparisons (Wilcoxon signed-rank test: W = 7.00, p = 1.000; paired t-test: t(4) = 0.451, p = 0.676), with a small effect size (Cohen’s d = 0.20) and a 95% confidence interval for the mean RMSE difference of [−0.80, 1.11]. Therefore, this result should be interpreted as a modest observed improvement rather than a statistically established performance advantage.
The addition of engineered features did not improve the average predictive performance. GBR_Features exhibited a higher mean RMSE than GBR_Baseline, while GBR_Features_Survival also yielded a higher mean RMSE than GBR_Survival. Furthermore, the feature-engineered configurations did not improve the other evaluation metrics relative to their corresponding non-engineered counterparts. Overall, these findings suggest that survival-rate-based target transformation was associated with a modest improvement in predictive performance, whereas the investigated feature-engineering strategy provided no additional benefit.

3.4. Prediction Accuracy and Residual Analysis

To further assess the predictive performance of the PSO-optimized GBR_Survival model, out-of-fold (OOF) predictions and their corresponding residuals were examined, as illustrated in Figure 4.
Figure 4. Out-of-fold prediction accuracy and residual analysis of the PSO-optimized GBR_Survival model. (a) Observed versus predicted surviving insect counts, with the dashed diagonal line indicating perfect agreement (y = x). The pooled out-of-fold RMSE, MAE, and R2 values are reported in the panel. (b) Distribution of prediction residuals, calculated as observed minus predicted surviving insect counts. The black dashed line indicates zero error, while the red dotted line represents the mean residual. All predictions were obtained using group-aware nested cross-validation.
The scatter plot in Figure 4a demonstrates a generally close agreement between observed and predicted surviving insect counts, with most observations distributed around the ideal prediction line (y = x). Based on the pooled OOF predictions from 1040 observations, the model achieved an RMSE of 4.271, an MAE of 3.129, and an R2 of 0.9011. These results indicate that the model captured a substantial proportion of the variability in surviving insect counts. Nevertheless, deviations from the reference line were observed for some observations, indicating that prediction errors varied across experimental cases.
The residual distribution presented in Figure 4b shows that prediction errors were concentrated around zero, with both positive and negative residuals. Positive residuals indicate underestimation of surviving insect counts, whereas negative residuals indicate overestimation. The mean residual was close to zero (0.02), suggesting little overall systematic bias in the predictions. However, the distribution also contained observations with relatively large positive and negative residuals, indicating that the model encountered greater prediction difficulty in certain cases. Overall, these findings demonstrate that the PSO-optimized GBR_Survival model provided reasonably accurate out-of-fold predictions, although some prediction variability and individual large errors remained.

3.5. Feature Importance and Model Interpretability

To examine the relative contributions of the input variables to the predictions of the proposed PSO-optimized GBR_Survival model, SHapley Additive exPlanations (SHAP) analysis was performed. The global feature importance, summary, and dependence plots are presented in Figure 5.
Figure 5. SHAP interpretation of the PSO-optimized GBR_Survival model: (a) mean absolute feature importance, (b) SHAP summary (beeswarm) plot, and (c) dependence plots for (c1) time after treatment and (c2) application dose. Panels (a,b) show SHAP values on the survival-proportion scale, whereas panel (c) presents contributions on the surviving-count scale.
As shown in Figure 5a, days after treatment had the highest mean absolute SHAP value (0.2084), followed by application dose (0.0829). Formulation-related features showed comparatively smaller contributions, while initial population had a negligible mean absolute SHAP value (0.0000). This result should be interpreted in the context of the dataset, in which the initial population was constant at 50 insects across all observations. Thus, its negligible SHAP importance reflects the absence of variation in this input rather than its lack of relevance to the conversion of survival proportions into surviving insect counts.
The SHAP summary plot in Figure 5b further illustrates the distribution and direction of feature contributions. Days after treatment showed the widest distribution of SHAP values, indicating the strongest influence on the predicted survival proportion. Higher values of this feature were generally associated with negative SHAP contributions, whereas lower values tended to contribute positively. A similar pattern was observed for application dose, with higher dose values generally associated with negative contributions. The formulation-related features exhibited distinct contribution patterns: Grainpro AITC-Gamma was generally associated with positive SHAP values, whereas Grainpro Gamma-EUG and Grainpro AITC-EUC tended to show negative contributions. Grainpro AITC-Alpha also showed predominantly positive contributions, although its overall impact was smaller.
The dependence plots in Figure 5c provide a more detailed illustration of the relationships between treatment conditions and model predictions. As shown in Figure 5c1, SHAP contributions to the predicted surviving count progressively decrease with increasing time after treatment. Contributions are predominantly positive at shorter intervals and become increasingly negative at longer intervals. Similarly, Figure 5c2 shows that increasing application doses are generally associated with more negative SHAP contributions, indicating a progressively stronger reduction in the predicted surviving count. For these dependence plots, the SHAP contributions originally calculated on the survival-proportion scale were converted to the surviving-count scale by multiplying them by the constant initial population of 50 insects. Consequently, positive SHAP values indicate contributions that increase the predicted surviving count relative to the expected model output, whereas negative values indicate contributions that decrease it.
From a biological perspective, these patterns suggest that treatment duration and application dose are the dominant factors associated with predicted insect survival in the evaluated dataset. The negative contributions observed at higher time and dose values are consistent with lower predicted survival following longer exposure periods and higher application doses. The formulation-specific patterns also indicate differences in the model-learned contributions of the tested botanical formulations. Nevertheless, these SHAP results represent predictive associations learned by the model and should not be co-interpreted as evidence of causal biological mechanisms.

3.6. Comparison with Classical Dose–Response Models

To further evaluate the predictive performance of the proposed GBR_Survival framework, classical binomial Probit and Logit dose–response models were included as statistical baselines. Both models were evaluated using the same five-fold group-aware outer validation partitions, and their predictions were assessed on the original surviving-insect-count scale.
As presented in Table 4, the PSO-optimized GBR_Survival model achieved the lowest mean RMSE (4.1641 ± 0.9515) and MAE (3.1132 ± 0.7244), together with the highest mean R2 (0.9031 ± 0.0351) and the lowest mean sMAPE (29.66 ± 4.08%). In comparison, the Probit model yielded an RMSE of 5.1309 ± 0.6862, while the Logit model achieved an RMSE of 5.1344 ± 0.7103. Both classical models also showed higher MAE and sMAPE values and lower R2 values than GBR_Survival.
Table 4. Comparative performance of the PSO-optimized GBR_Survival model and classical binomial dose–response models.
Compared with the Probit and Logit baselines, GBR_Survival reduced the mean RMSE by approximately 18.84% and 18.90%, respectively. These results indicate that the proposed model provided better predictive performance than the evaluated parametric dose–response models under the applied group-aware validation protocol. The results suggest that the flexible tree-based ensemble can capture nonlinear relationships and feature interactions that may not be fully represented by the prespecified parametric dose–response structure.

4. Discussion

The present study investigated the applicability of a survival-rate-based Gradient Boosting Regression approach for predicting the number of surviving insects following botanical insecticide treatment. The proposed GBR_Survival model, optimized using PSO, demonstrated competitive predictive performance compared with seven conventional machine learning regression algorithms. In the comparative optimizer evaluation, PSO achieved the lowest mean RMSE (4.1580), the lowest mean MAE (3.1458), and the highest mean R2 (0.9043) among the four optimization algorithms, whereas Optuna-TPE achieved the lowest sMAPE. These findings indicate that PSO provided a favorable overall balance across the evaluated error and goodness-of-fit metrics, although its advantage was not consistent across all evaluation criteria.
An important aspect of the proposed approach is the representation of survival as a proportion of the initial insect population, followed by conversion of the predicted survival proportion into an estimated number of surviving insects. This formulation provides a biologically interpretable prediction target and constrains the reconstructed predictions according to the initial population size. The PSO-based ablation analysis further supported this modeling strategy. GBR_Survival achieved a mean RMSE of 4.1641 ± 0.9515, compared with 4.3203 ± 1.0349 for GBR_Baseline, corresponding to an approximately 3.62% reduction in mean RMSE. The survival-based configuration also achieved lower mean MAE and sMAPE values and a higher mean R2 than the baseline configuration. However, the fold-level results showed that GBR_Survival outperformed GBR_Baseline in only two of the five outer folds. This variation indicates that the benefit of survival-rate-based target transformation was not uniform across all experimental groups, despite its favorable overall mean performance.
The ablation results also showed that the investigated feature-engineering strategy did not improve predictive performance. GBR_Features exhibited a higher mean RMSE than GBR_Baseline, while GBR_Features_Survival also yielded a higher mean RMSE than GBR_Survival. One possible explanation is that Gradient Boosting Regression can capture nonlinear relationships and interactions among the original predictors without requiring additional derived features. Alternatively, the engineered features may have introduced redundant information or increased model complexity without providing sufficient additional predictive value. These explanations remain tentative and require further investigation.
The SHAP analysis of the PSO-optimized GBR_Survival model indicated that days after treatment made the largest contribution to the model output, followed by pesticide dose and formulation-related features. The SHAP summary plot further illustrated the direction and distribution of feature contributions across the out-of-fold observations. Higher values of days after treatment and dose were generally associated with negative SHAP contributions, indicating a tendency toward lower predicted survival proportions. Formulation-related features exhibited distinct contribution patterns, suggesting that the model captured differences associated with the tested formulations. In contrast, the initial population had SHAP values concentrated near zero, indicating a limited contribution to the model output within the evaluated dataset. These SHAP findings describe model behavior and should not be interpreted as evidence of causal effects or independent biological mechanisms.
The comparison with classical Probit and Logit dose–response models provided an additional assessment of the proposed framework against established parametric approaches. As summarized in Table 4, both classical models yielded higher prediction errors than GBR_Survival across all four evaluation metrics. Specifically, GBR_Survival reduced the mean RMSE by approximately 18.84% compared with Probit and 18.90% compared with Logit. It also achieved lower MAE and sMAPE values and a higher R2 than both classical baselines. These findings suggest that the flexible tree-based structure of GBR_Survival may capture additional nonlinear patterns and feature interactions beyond those represented by the prespecified parametric dose–response models. Thus, the added value of the machine learning approach lies in providing a flexible predictive framework for estimating surviving insect counts under different treatment conditions. Nevertheless, these results are specific to the evaluated dataset and validation setting and do not establish universal superiority over classical dose–response approaches.
The findings of the present study are generally consistent with previous experimental research on botanical insecticides against stored-product pests. Güral et al. [2] reported increased insecticidal efficacy with increasing application doses against T. confusum and identified the AITC-EUC formulation as one of the most effective treatments. Similarly, Işıkber et al. [19] demonstrated the fumigant toxicity of mustard essential oil and its main compound, allyl isothiocyanate, against different developmental stages of T. confusum. The importance of both concentration and exposure duration has also been reported by Khani and Rahdari [20], who observed increased mortality of T. confusum with increasing essential-oil concentration and exposure time. These experimental findings are consistent with the SHAP patterns observed in our study, in which application dose and days after treatment were the two most influential predictors of survival proportion. While these previous studies primarily investigated insecticidal efficacy through experimental mortality measurements, the present study extends this line of research by developing a machine-learning framework to predict survival proportions and reconstruct the corresponding numbers of surviving insects.
From a practical pest management perspective, the proposed GBR_Survival framework may support the evaluation of botanical insecticide treatments by estimating insect survival under different application doses, formulations, and post-treatment observation times. Such predictions could help researchers and pest management practitioners compare treatment outcomes, assess the potential effectiveness of alternative formulations, and monitor changes in expected insect survival over time. By converting predicted survival proportions into estimated insect counts, the framework also provides outputs that are directly interpretable in terms of insect population levels. However, the model should be considered a decision-support research tool rather than a system for prescribing application rates or making field-level recommendations, particularly until its performance has been validated using independent datasets and under practical storage or field conditions.
Several limitations should be considered when interpreting these findings. First, the dataset comprised 1040 observations obtained from 34 experimental series involving only one insect species, Tribolium confusum. Since insecticide susceptibility, physiological characteristics, and responses to botanical formulations may differ among insect species, the findings cannot be directly generalized to other insect pests. Furthermore, the use of a single dataset may limit the applicability of the proposed framework to other insect populations, botanical insecticide formulations, and experimental environments. Although group-aware nested cross-validation was used to reduce information leakage between training and evaluation sets, external validation using independent experiments and additional insect species is necessary to assess the generalizability and transferability of the proposed approach. However, no independent external dataset was available for validation in the present study.
Another limitation is the absence of an untreated control group, which prevented natural mortality from being distinguished from mortality associated with the botanical insecticide treatments. Consequently, Abbott’s correction could not be applied, and the observed survival patterns should be interpreted with this limitation in mind. Furthermore, there is a potential for within-series temporal autocorrelation, as survival was measured repeatedly on the same cohorts over time. To further examine the temporal prediction behavior of the proposed framework, an additional chronological evaluation was conducted by splitting each series into the first 70% of observations for training and the remaining 30% for testing. In this within-series forecasting scenario, a simple persistence baseline—which predicts the next observation based on the previously recorded surviving count—achieved an RMSE of 2.4275, whereas the GBR_Survival model yielded an RMSE of 9.1579. This result suggests that the persistence of insect survival counts provides valuable information for predicting subsequent observations within an ongoing experimental series. Although the persistence baseline performed better in this chronological evaluation, the GBR_Survival framework was primarily developed and evaluated to assess generalization across previously unseen experimental series using group-aware validation. Therefore, these findings highlight the distinction between predicting outcomes across independent experimental series and forecasting successive observations within an already observed series. Further studies incorporating temporal modeling approaches or lagged predictors may provide additional insights into improving chronological prediction performance.
A further limitation concerns the interpretation of sMAPE. Although this metric provides a scale-independent measure of relative prediction error, it may become sensitive when observed and predicted survival counts are close to zero. In such cases, even small absolute prediction errors can result in disproportionately large percentage errors because the denominator of the metric becomes small. Although a zero value was assigned when both observed and predicted counts were zero, this convention does not eliminate the sensitivity of sMAPE to near-zero values. Therefore, sMAPE values should be interpreted cautiously for observations with very low survival counts. In the present study, sMAPE was considered alongside RMSE and MAE to provide a more balanced assessment of predictive performance.
Second, the comparative performance of the optimization algorithms was assessed using five outer folds. Therefore, the observed differences in mean performance should be interpreted descriptively rather than as evidence of statistically significant superiority. Third, the proposed approach was evaluated using a specific dataset and regression framework; its potential benefits should be examined across additional datasets and modeling algorithms. Finally, SHAP importance values describe the contribution of predictors to model outputs rather than establishing causal relationships.
Overall, the findings suggest that survival-rate-based target transformation is a potentially useful modeling strategy for predicting insect survival following botanical insecticide application. The PSO-optimized GBR_Survival configuration showed favorable mean performance compared with its baseline counterpart in the ablation analysis. Nevertheless, the observed improvements were modest and were not consistent across all outer folds. Therefore, these findings suggest a potential benefit of survival-rate-based target transformation rather than establishing a consistent performance advantage. In addition, the fold-level variability and the absence of external validation indicate that further studies are needed to establish the robustness and broader applicability of the proposed framework. Its principal contribution lies in combining a biologically interpretable target representation with competitive predictive accuracy, rather than demonstrating a substantial or universally consistent performance advantage over all conventional regression approaches.

5. Conclusions

This study proposed a survival-rate-based Gradient Boosting Regression (GBR_Survival) approach for predicting the number of surviving insects following botanical insecticide application. The proposed framework transforms the prediction target into a survival proportion relative to the initial insect population and subsequently converts the predicted proportions into biologically bounded insect counts. This formulation provides a biologically meaningful representation of insect survival while retaining the flexibility of a regression-based prediction framework.
The experimental results demonstrated that GBR_Survival achieved competitive predictive performance compared with seven conventional machine learning regression models. In the optimizer comparison, PSO achieved the most favorable mean performance in three of the four evaluation metrics, yielding an RMSE of 4.1580, an MAE of 3.1458, and an R2 of 0.9043. Although Optuna-TPE obtained the lowest sMAPE, the overall results supported the selection of PSO as the primary hyperparameter optimization algorithm in terms of RMSE, MAE, and R2. The ablation analysis further indicated that GBR_Survival achieved the most favorable mean results among the four evaluated configurations. Compared with the baseline GBR configuration, the survival-rate-based transformation reduced mean RMSE by approximately 3.62%. However, this improvement was not consistent across all outer folds, indicating that its predictive benefit may depend on the composition of the experimental groups. The investigated feature-engineering strategy did not provide additional predictive improvement.
The SHAP analysis identified days after treatment as the most influential predictor, followed by pesticide dose and formulation-related features. The initial population had a negligible contribution to the model predictions in the evaluated dataset. These findings emphasize the importance of temporal and treatment-related variables in predicting insect survival following botanical insecticide application. Nevertheless, SHAP-based feature contributions describe the model’s learned associations and should not be interpreted as evidence of causal relationships.
Overall, the findings indicate that survival-rate-based target transformation is a promising approach for incorporating biological constraints into machine-learning-based insect survival prediction. The results also demonstrate the potential of combining this formulation with metaheuristic hyperparameter optimization, particularly PSO. However, the observed improvements should be interpreted cautiously because the evaluation was based on a limited number of experimental groups and five outer cross-validation folds. Further validation using independent experimental datasets, additional insect populations, different botanical insecticide formulations, and broader treatment conditions is necessary to assess the generalizability and practical applicability of the proposed framework. Future research may also investigate alternative survival-oriented modeling strategies, additional optimization algorithms, and their potential use in pesticide efficacy assessment and precision crop protection.

Supplementary Materials

The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/biomimetics11120877/s1, Dataset S1: The dataset used in this study, including the experimental observations and variables for predicting insect survival following botanical insecticide application.

Author Contributions

Conceptualization, C.B. and İ.Ö.; methodology, C.B. and T.Y.; software, C.B.; validation, C.B. and T.Y.; formal analysis, C.B. and T.Y.; investigation, T.Y. and İ.Ö.; resources, T.Y. and İ.Ö.; data curation, T.Y. and C.B.; writing—original draft preparation, C.B. and T.Y.; writing—review and editing, C.B., T.Y. and İ.Ö.; visualization, C.B. and T.Y.; supervision, İ.Ö.; project administration, İ.Ö. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Fırat University Scientific Research Projects Coordination Unit (FÜBAP), grant number MF.26.117. The APC was funded by the Fırat University Scientific Research Projects Coordination Unit (FÜBAP).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The dataset supporting the findings of this study is provided as Supplementary Materials accompanying this article.

Acknowledgments

The authors would like to express their sincere gratitude to the Errol Hassan for his valuable assistance in providing the botanical insecticides used in this study. During the preparation of this manuscript, the authors used ChatGPT (GPT-6, OpenAI) to assist with language editing and to improve the clarity and readability of the text. The authors carefully reviewed and edited the AI-assisted content and take full responsibility for the final content of the publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
GBRGradient Boosting Regression
GBR_SurvivalSurvival-Rate-Based Gradient Boosting Regression
GBR_BaselineConventional Gradient Boosting Regression
GBR_FeaturesGradient Boosting Regression with Engineered Features
GBR_Features_SurvivalGradient Boosting Regression with Engineered Features and Survival-Rate Transformation
RFRandom Forest
ETExtra Trees
XGBoostExtreme Gradient Boosting
SVRSupport Vector Regression
GPRGaussian Process Regression
SHAPSHapley Additive exPlanations
RMSERoot Mean Squared Error
MAEMean Absolute Error
R2Coefficient of Determination
sMAPESymmetric Mean Absolute Percentage Error
CVCross-Validation
OOFOut-of-Fold
TPETree-structured Parzen Estimator
LD50Median Lethal Dose
LD90Dose Causing 90% Mortality
RBFRadial Basis Function

References

  1. Hagstrum, D.W.; Phillips, T.W. Evolution of Stored-Product Entomology: Protecting the World Food Supply. Annu. Rev. Entomol. 2017, 62, 379–397. [Google Scholar] [CrossRef] [Scilit]
  2. Güral, Y.; Karaman, E.; Baydoğan, G.; Özgen, İ. The insecticidal effects of different plant extracts on confused flour beetle, Tribolium confusum Jacquelin du Val, 1863 (Coleoptera: Tenebrionidae). Int. J. Agric. Environ. Food Sci. 2023, 7, 887–899. [Google Scholar] [CrossRef] [Scilit]
  3. Nayak, M.K.; Daglish, G.J.; Phillips, T.W.; Ebert, P.R. Resistance to the fumigant phosphine and its management in insect pests of stored products: A global perspective. Annu. Rev. Entomol. 2020, 65, 333–350. [Google Scholar] [CrossRef] [Scilit]
  4. Isman, M.B. Botanical insecticides in the twenty-first century-fulfilling their promise? Annu. Rev. Entomol. 2020, 65, 233–249. [Google Scholar] [CrossRef] [Scilit]
  5. Gorišek, M.; Trdan, S. Essential Oils in Plant Protection in Europe: A Review of Efficacy and Limitations of Use. Sustainability 2026, 18, 7828. [Google Scholar] [CrossRef] [Scilit]
  6. Buran, A.; Özgen, İ.; Güral, Y.; Yilmaz, K.G. Determination of the insecticidal effects of four different insecticides against Acanthoscelides obtectus (Say) (Coleoptera: Bruchidae). J. Basic Appl. Zool. 2025, 86, 110. [Google Scholar] [CrossRef] [Scilit]
  7. Abbott, W.S. A Method of Computing the Effectiveness of an Insecticide. J. Econ. Entomol. 1925, 18, 265–267. [Google Scholar] [CrossRef] [Scilit]
  8. Friedman, J.H. Greedy function approximation: A gradient boosting machine. Ann. Stat. 2001, 29, 1189–1232. [Google Scholar] [CrossRef] [Scilit]
  9. Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
  10. Geurts, P.; Ernst, D.; Wehenkel, L. Extremely Randomized Trees. Mach. Learn. 2006, 63, 3–42. [Google Scholar] [CrossRef] [Scilit]
  11. Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
  12. Prokhorenkova, L.; Gusev, G.; Vorobev, A.; Dorogush, A.V.; Gulin, A. CatBoost: Unbiased boosting with categorical features. Adv. Neural Inf. Process. Syst. 2018, 31, 6638–6648. [Google Scholar]
  13. Drucker, H.; Burges, C.J.C.; Kaufman, L.; Smola, A.; Vapnik, V. Support vector regression machines. In Proceedings of the 10th International Conference on Neural Information Processing Systems, Denver, CO, USA, 3–5 December 1996; pp. 155–161. [Google Scholar]
  14. Rasmussen, C.E.; Williams, C.K.I. Gaussian Processes for Machine Learning; MIT Press: Cambridge, MA, USA, 2006. [Google Scholar]
  15. Yang, P.; Henle, E.A.; Fern, X.Z.; Simon, C.M. Classifying the toxicity of pesticides to honey bees via support vector machines with random walk graph kernels. J. Chem. Phys. 2022, 157, 34102. [Google Scholar] [CrossRef] [Scilit]
  16. Singh, P.; Gupta, C.P.; Namdeo, S.; Srivastava, V.C. Toxicity prediction of insecticides and pesticides via machine learning approach. Pestic. Biochem. Physiol. 2025, 215, 106652. [Google Scholar] [CrossRef] [Scilit]
  17. Adamczyk, J.; Poziemski, J.; Siedlecki, P. Evaluating machine learning models for predicting pesticide toxicity to honey bees. Ecotoxicol. Environ. Saf. 2026, 312, 119869. [Google Scholar] [CrossRef] [Scilit]
  18. Barut, C.; Demirol, D.; Bingöl, H.; Yüksel, H.; Alatas, B. An Explainable Hybrid Machine Learning Approach Based on MPSO-XGBoost for Pest Density Prediction in Almond Orchards. Insects 2026, 17, 996. [Google Scholar] [CrossRef] [Scilit]
  19. Işikber, A.A.; Tunaz, H.; Er, M.K.; Sağlam, Ö. Fumigant toxicity of mustard essential oil and its main compound alone and combinations with modified atmosphere treatments against Tribolium confusum du Val., 1863 (Coleoptera: Tenebrionidae). Turk. Entomoloji Derg. 2019, 43, 179–187. [Google Scholar] [CrossRef] [Scilit]
  20. Khani, A.; Rahdari, T. Chemical Composition and Insecticidal Activity of Essential Oil from Coriandrum sativum Seeds against Tribolium confusum and Callosobruchus maculatus. Int. Sch. Res. Not. 2012, 2012, 263517. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Article metric data becomes available approximately 24 hours after publication online.