Optimization algorithm for improving the prediction accuracy of API solubility in green solvent Authors: Ali Alasiri, Ahmed A. Lahiq, Abdullah A. Alshehri Published: 2026 ABSTRACT Supercritical carbon dioxide (SC-CO₂) is widely used as an environmentally friendly solvent in pharmaceutical processing, where accurate prediction of drug solubility is essential for efficient formulation design, extraction processes, and process optimization. However, predicting solubility behavior in supercritical systems remains challenging due to the nonlinear interactions between thermodynamic conditions and molecular properties. In this study, a hybrid artificial intelligence framework is developed to predict the solubility of active pharmaceutical ingredients (APIs) in SC-CO₂ using a curated dataset of more than 350 experimentally reported measurements. The proposed framework integrates interpretable deep learning (TabNet) and histogram-based gradient boosting (HGB) with three metaheuristic optimization algorithms, namely the Attack-Leave Optimizer (ALO), Energy Valley Optimizer (EVO), and Botox Optimization Algorithm (BOA), to improve hyperparameter tuning and predictive performance. Model evaluation was conducted using multiple statistical indicators, five-fold cross-validation, prediction interval bootstrapping, and multi-objective Pareto front analysis to assess accuracy and robustness. Among the evaluated configurations, the EVO-tuned TabNet model demonstrated the best predictive performance, achieving a coefficient of determination of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}=0.982$$\end{document}along with narrow prediction intervals, indicating strong generalization capability within the studied thermodynamic domain. Statistical analysis using the Kruskal–Wallis test confirmed significant differences between optimizer performances ( p<0.05). These findings demonstrate that the proposed hybrid pipeline enhances predictive accuracy and interpretability within the thermodynamic domain represented by the compiled dataset. The framework therefore provides a statistically supported computational tool for assisting solvent selection and formulation analysis in supercritical systems, while broader generalization would benefit from future expansion of experimental solubility datasets.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-026-51115-8. Introduction Drug solubility is a fundamental property in pharmaceutical sciences because it directly affects bioavailability, formulation strategies, and the overall success rate of drug development. Poor solubility has been repeatedly identified as a major reason for drug discovery failures and attrition during clinical development, as compounds with inadequate solubility often exhibit low absorption and reduced therapeutic effect. For this reason, solubility prediction and measurement have remained central challenges in medicinal chemistry, pharmaceutical analysis, and formulation design across decades of research1,2. Traditional solubility determination methods are broadly categorized into thermodynamic and kinetic approaches. Thermodynamic​‍​‌‍​‍‌ methods are used to quantify the maximum amount of solute that can dissolve in a solvent at equilibrium. Thus, they provide a direct measurement of solubility under specified ​‍​‌‍​‍‌conditions. Kinetic processes are directed to find the concentration at which precipitation starts, showing the limit of solubility since the system is still developing and not yet equilibrated3–5. Both methods have proven very useful in the discovery of drugs but are both very time-intensive and labor-intensive. They also require an enormous amount of material, which is not feasible for drug candidates that are expensive or hard to come by. Even with increased automation and throughput6,7, Classical approaches simply don’t scale well to the requirements of current high-throughput drug pipelines. To address these bottlenecks, computer modeling has come to the rescue as a worthwhile collaborator to experimental methods. Machine learning, in particular, stands out; it leverages existing data on solute-solvent interactions to uncover patterns and predict outcomes under new, untested conditions8,9. Initial applications have predominantly concentrated on aqueous solubility, leveraging the extensive availability of experimental datasets to create solvent-specific models with robust predictive capabilities10. More recently, there has been a growing interest in extending predictive frameworks beyond a single solvent, incorporating multiple solvents into training datasets to capture broader physicochemical variation and improve generalizability11,12. These advances signal a clear trend toward computational strategies becoming increasingly integrated with experimental solubility research13. Taken together, these developments underline the expanding role of computational approaches as a complement to traditional solubility measurements in pharmaceutical sciences. To contextualize the present study within recent advances, Table 1 summarizes representative research efforts on drug solubility prediction using computational and machine learning approaches. The listed studies cover aqueous, mixed, and supercritical solvent systems and collectively illustrate the transition from traditional descriptor-based regressors to more advanced ensemble and deep-learning architectures. In many of these investigations, model performance is further improved through systematic parameter tuning, hybrid modeling strategies, or optimization procedures aimed at enhancing convergence stability and predictive robustness when dealing with nonlinear thermodynamic systems. Each entry outlines the main methodology, data domain, and principal findings to highlight methodological evolution and performance trends across different solubility modeling paradigms14,15. Recent advances in artificial intelligence have further expanded the scope of solubility modeling beyond traditional descriptor-based approaches. Deep learning architectures, including attention-based and graph-based models, have demonstrated improved capability in capturing nonlinear relationships between molecular structure and thermodynamic conditions. In parallel, hybrid frameworks that combine machine learning with optimization algorithms have gained attention for their ability to enhance model calibration and convergence stability. Recent studies have also emphasized uncertainty quantification and model interpretability as critical components for practical deployment, particularly in chemical and pharmaceutical engineering applications. Table 1Summary of representative computational and machine learning studies on drug solubility prediction.Refs.Main methodologyKey conclusions and findings 16 Stacked statistical machine learning models on a large aqueous solubility dataset with application domain analysis.Stacked ensembles of statistical ML outperformed advanced deep learning on the drug domain due to data limits; applicability‑domain analysis enabled confident DrugBank population; experimental solubilities of 10 compounds validated model reliability. 17 XGBoost combined with ESP-map and Mordred descriptors.A simpler XGBoost model with ESP‑map and Mordred descriptors captured key molecular properties and gave strong predictive performance in comparative tests. 18 Hybrid COSMO-RS + ML regression workflow.Combining COSMO‑RS outputs with ML improved solubility predictions versus ML alone, supporting hybrid QM–ML as a viable strategy for aqueous solubility estimation. 19 Used ML and deep learning algorithms on curated multi-source datasets, utilizing descriptors and fingerprints.A model trained on the curated dataset achieved R²≈0.92 and MAE ≈ 0.40 on an external diverse test (Huuskonen), outperforming prior methods on that benchmark. 20 Comparison of tree-ensemble models (RF, XGB, LGBM, CatBoost).Traditional tree‑ensemble algorithms provide satisfactory accuracy and interpretable feature importance for aqueous solubility prediction in drug discovery contexts. 21 StackBoost ensemble compared with various boosting and bagging models.StackBoost achieved highest R² (~ 0.90), RMSE 0.29 and MAE 0.22, outperforming compared ensemble algorithms and showing transferability across datasets. 22 NODE and Bayesian neural networks that have undergone hyperparameter optimization.BNN gave best fit for rivaroxaban in mixed solvents (test R²=0.9926); NODE also performed strongly, indicating advanced ML can capture complex solvent‑composition and temperature effects. 23 Extra Trees, RF, and Gradient Boosting for predicting supercritical solubility and density.For raloxifene solubility ET gave best fit (R²≈0.949, RMSE ≈ 0.41); GB best predicted solvent density (R²≈0.986), indicating ensemble regressors can model supercritical solubility reliably. 24 Deep CNN (ResNet50 variants) based on molecular images.20‑layer ResNet50 produced best results (R²≈0.423, RMSE ≈ 0.678) and high ASP accuracy (90.6%) relative to shallower models and human experts, indicating deep image‑based approaches have utility though numerical gains vs. other methods vary. 25 PC-SAFT equation-of-state modeling using fitted parameters.Parameter‑fitted PC‑SAFT improved extrapolative capability for drug‑polymer solubility predictions, aiding formulation design where experimental data are sparse. Table 1Summary of representative computational and machine learning studies on drug solubility prediction.Refs.Main methodologyKey conclusions and findings 16 Stacked statistical machine learning models on a large aqueous solubility dataset with application domain analysis.Stacked ensembles of statistical ML outperformed advanced deep learning on the drug domain due to data limits; applicability‑domain analysis enabled confident DrugBank population; experimental solubilities of 10 compounds validated model reliability. 17 XGBoost combined with ESP-map and Mordred descriptors.A simpler XGBoost model with ESP‑map and Mordred descriptors captured key molecular properties and gave strong predictive performance in comparative tests. 18 Hybrid COSMO-RS + ML regression workflow.Combining COSMO‑RS outputs with ML improved solubility predictions versus ML alone, supporting hybrid QM–ML as a viable strategy for aqueous solubility estimation. 19 Used ML and deep learning algorithms on curated multi-source datasets, utilizing descriptors and fingerprints.A model trained on the curated dataset achieved R²≈0.92 and MAE ≈ 0.40 on an external diverse test (Huuskonen), outperforming prior methods on that benchmark. 20 Comparison of tree-ensemble models (RF, XGB, LGBM, CatBoost).Traditional tree‑ensemble algorithms provide satisfactory accuracy and interpretable feature importance for aqueous solubility prediction in drug discovery contexts. 21 StackBoost ensemble compared with various boosting and bagging models.StackBoost achieved highest R² (~ 0.90), RMSE 0.29 and MAE 0.22, outperforming compared ensemble algorithms and showing transferability across datasets. 22 NODE and Bayesian neural networks that have undergone hyperparameter optimization.BNN gave best fit for rivaroxaban in mixed solvents (test R²=0.9926); NODE also performed strongly, indicating advanced ML can capture complex solvent‑composition and temperature effects. 23 Extra Trees, RF, and Gradient Boosting for predicting supercritical solubility and density.For raloxifene solubility ET gave best fit (R²≈0.949, RMSE ≈ 0.41); GB best predicted solvent density (R²≈0.986), indicating ensemble regressors can model supercritical solubility reliably. 24 Deep CNN (ResNet50 variants) based on molecular images.20‑layer ResNet50 produced best results (R²≈0.423, RMSE ≈ 0.678) and high ASP accuracy (90.6%) relative to shallower models and human experts, indicating deep image‑based approaches have utility though numerical gains vs. other methods vary. 25 PC-SAFT equation-of-state modeling using fitted parameters.Parameter‑fitted PC‑SAFT improved extrapolative capability for drug‑polymer solubility predictions, aiding formulation design where experimental data are sparse. Summary of representative computational and machine learning studies on drug solubility prediction. While the studies summarized in Table 1 demonstrate significant progress in solubility prediction using machine learning and thermodynamic modeling, several distinctions can be identified in comparison with the present work. First, a large portion of prior research focuses on aqueous or mixed solvent systems, where relatively extensive datasets and well-established molecular descriptors are available. In contrast, the present study specifically addresses solubility in supercritical CO₂ systems, where experimental data are more limited and the underlying thermodynamic behavior is highly nonlinear. Second, many existing approaches rely either on standalone machine learning models or hybrid combinations with physics-based methods such as COSMO-RS or equation-of-state formulations. The framework proposed here differs by integrating an interpretable deep learning model (TabNet) with an ensemble learning algorithm (HGB) within a unified optimization-driven structure. This combination is designed to simultaneously capture nonlinear feature interactions and maintain stable generalization across structured thermodynamic data. Third, while previous studies primarily emphasize predictive accuracy, the present work incorporates a broader validation strategy, including cross-validation, nonparametric statistical testing, Pareto-based multi-objective optimization, and prediction-interval bootstrapping. This allows model performance to be assessed not only in terms of accuracy but also in terms of stability, uncertainty, and statistical significance. Finally, unlike equation-of-state models that are explicitly grounded in thermodynamic theory or deep learning models trained on large descriptor sets, the proposed approach remains a data-driven framework applied to a limited but diverse experimental dataset. Therefore, its contribution lies in demonstrating how hybrid machine learning and optimization techniques can provide consistent and interpretable predictions within the constrained domain of supercritical solubility data. Overall, this work aims to improve the reliability and interpretability of solubility prediction for pharmaceutical compounds in SC-CO₂ systems. While the proposed framework demonstrates strong predictive capability within the investigated dataset, methodological rigor is maintained through cross-validation, prediction-interval bootstrapping, and nonparametric statistical testing. Consequently, the reported performance should be interpreted within the thermodynamic domain covered by the compiled experimental data, while further dataset expansion would allow broader generalization across pharmaceutical compounds and operating conditions. The workflow of the present study is organized as follows. First, an experimental dataset of drug solubility in supercritical CO₂ is compiled and preprocessed to ensure consistency and reliability. Second, two predictive models, TabNet and histogram-based gradient boosting (HGB), are developed to capture nonlinear relationships between thermodynamic and physicochemical variables. Third, three metaheuristic optimization algorithms (ALO, EVO, and BOA) are applied for hyperparameter tuning within a cross-validation framework. Fourth, model performance is evaluated using multiple statistical metrics, along with prediction-interval bootstrapping and nonparametric statistical testing. Finally, the results are analyzed through comparative performance assessment, sensitivity analysis, and multi-objective optimization to provide insights into model behavior and practical applicability. Dataset A comprehensive dataset was collected from references26–35 to study the solubility behavior of pharmaceutically important compounds in supercritical CO₂ (SC-CO₂). This dataset brings together diverse experimental results, including more than 350 equilibrium data points, each representing carefully controlled measurements of solubility under high-pressure and high-temperature conditions. It covers a wide range of therapeutic classes such as antibiotics, immunosuppressants, antifungals, antivirals, and anticancer agents and includes both small-molecule drugs and large macrolide compounds. This diversity provides a solid foundation for developing data-driven solubility models. The experimental procedures generally used high-pressure equilibrium systems with magnetic stirring to ensure uniform mixing and proper equilibrium establishment. The solubility measurements were obtained using standard analytical techniques, including gravimetric and spectrophotometric methods, following strict replication and calibration procedures to minimize measurement uncertainty (Table 2). In some experiments, a small amount of cosolvent (ethanol, typically 1–3 mol%) was added to better simulate realistic formulation environments and to observe how solubility changes under near-critical conditions. However, this cosolvent condition is reported only for a subset of the experimental measurements and its concentration range remains relatively narrow. Because such limited variability provides insufficient statistical diversity for reliable feature learning, cosolvent concentration was not incorporated as an input variable in the present modeling framework. Instead, the dataset focuses on four physicochemical descriptors temperature (K), pressure (MPa), molecular weight (g/mol), and melting point (°C) which are consistently reported across all experiments and represent the primary thermodynamic and molecular factors governing solubility behavior in SC-CO₂ systems. Depending on the compound’s stability and the experimental setup, the temperature in the experiments ranges from about 308 K to 340 K, while the pressure varies from 12 MPa up to over 250 MPa. It encompasses molecules whose molecular weights vary from below 200 g/mol to near 950 g/mol, which indicates that there is a great deal of molecular diversity. Solubility values range over more than two orders of a factor, which highlights important nonlinear relations between molecule structure, thermodynamic properties, and solvent conditions. It provides a chemically varied and finished test standard suitable for testing prediction models of drug solubility in SC-CO₂ systems that has been carefully designed. It is particularly suitable for testing hybrid machine learning-optimization constructs aimed at deciphering complicated solvent-solute interactions and enhancing generalizability of the models. Table 2Summary of dataset characteristics for drug solubility in SC-CO2.CategoryDescriptionRange/DetailsTotal observationsNumber of experimental equilibrium data points> 350 measurementsCompound typesTherapeutic and chemical diversityAntibiotics, immunosuppressants, antifungals, antivirals, anticancer agentsSolvent systemExperimental mediumSC-CO2 (with optional 1–3 mol% ethanol cosolvent)Analytical methodsSolubility quantification techniquesGravimetric and UV–Vis spectrophotometry (calibrated and replicated)Input featuresPhysicochemical parametersTemperature (K), Pressure (MPa), Molecular Weight (g/mol), Melting Point (°C)Target variableResponse variableSolubility (g/L ×10)Temperature rangeExperimental condition range308–338 KPressure rangeExperimental condition range12 – > 300 MPaMolecular weight rangeMolecular diversity among solutes~ 157–950 g/molMelting point rangeCrystalline stability variation146–912 °CSolubility rangeObserved variation in output0.01 – > 9.0 (g/L ×10)Experimental setupEquipment and control methodHigh-pressure equilibrium cells with magnetic stirringDataset purposeModeling objectivePredictive modeling of nonlinear solubility behavior in SC-CO₂ systems Table 2Summary of dataset characteristics for drug solubility in SC-CO2.CategoryDescriptionRange/DetailsTotal observationsNumber of experimental equilibrium data points> 350 measurementsCompound typesTherapeutic and chemical diversityAntibiotics, immunosuppressants, antifungals, antivirals, anticancer agentsSolvent systemExperimental mediumSC-CO2 (with optional 1–3 mol% ethanol cosolvent)Analytical methodsSolubility quantification techniquesGravimetric and UV–Vis spectrophotometry (calibrated and replicated)Input featuresPhysicochemical parametersTemperature (K), Pressure (MPa), Molecular Weight (g/mol), Melting Point (°C)Target variableResponse variableSolubility (g/L ×10)Temperature rangeExperimental condition range308–338 KPressure rangeExperimental condition range12 – > 300 MPaMolecular weight rangeMolecular diversity among solutes~ 157–950 g/molMelting point rangeCrystalline stability variation146–912 °CSolubility rangeObserved variation in output0.01 – > 9.0 (g/L ×10)Experimental setupEquipment and control methodHigh-pressure equilibrium cells with magnetic stirringDataset purposeModeling objectivePredictive modeling of nonlinear solubility behavior in SC-CO₂ systems Summary of dataset characteristics for drug solubility in SC-CO2. Table 3 does something more than just a summary of statistics; it provides a background to select complex hybrid models. The variables have different sizes and are not symmetrical, which suggests that the chemicals are not all the same and that the statistics are not linear. The temperature doesn’t fluctuate significantly, therefore the experimental control is steady. The pressure, on the other hand, varies by two orders of magnitude and is slightly skewed to the right. By​‍​‌‍​‍‌ operating in the mid-range of the pressure-temperature diagram, these characteristics reflect the operational landscape of SC-CO₂ systems, where extreme pressures are not often ​‍​‌‍​‍‌tested. The melting point range and molecular weight vary significantly, including both lightweight and bulky macrolides. This scale variability of physical scale introduces nonlinear molecular structure-solvation energy interactions, which are precisely the sort that ensemble models are best equipped to address. Solubility displays significant asymmetry, characterized by the majority of the molecule exhibiting intermediate values, while a minority presents as extremely soluble outliers. This long-tailed distribution makes sure that the response surface is quite different from a straight line, which is why nonparametric, feature-adaptive learners are needed.‎‎. Table 3Overview of input features and output variables with their statistical properties.FeaturesUnitsStatistical propertiesMinMaxMedianMeanSkewnessKurtosisModeSt.DevTemperature(K)308338323322.90.02-1.3132811Molecular Weight(g/mol)12926.1315.7309.30.76-0.12586.2266.5Melting point(C)146914.2230332.31.370.03146265.7Pressure(MPa)123003097.40.59-1.1912891Solubility(g/L × 10)0.029.050.891.491.903.920.371.7 Table 3Overview of input features and output variables with their statistical properties.FeaturesUnitsStatistical propertiesMinMaxMedianMeanSkewnessKurtosisModeSt.DevTemperature(K)308338323322.90.02-1.3132811Molecular Weight(g/mol)12926.1315.7309.30.76-0.12586.2266.5Melting point(C)146914.2230332.31.370.03146265.7Pressure(MPa)123003097.40.59-1.1912891Solubility(g/L × 10)0.029.050.891.491.903.920.371.7 Overview of input features and output variables with their statistical properties. Figure 1 Investigation of pairwise correlations of the primary physicochemical and thermodynamic parameters to reveal intrinsic dependencies that affect drug solubility in supercritical CO₂. The correlation structure remains consistent across the training, validation, and testing subsets, confirming that data partitioning was statistically balanced and free from leakage, an essential prerequisite for generalizable modelling. Temperature and pressure both exhibit mild positive associations with solubility, reflecting the physical principle that higher thermal energy and greater CO₂ density facilitate molecular dispersion and dissolution. In contrast, molecular weight and melting point show moderate negative correlations, indicating that heavier or more crystalline compounds resist solvation due to stronger intermolecular forces and reduced diffusivity. The overall modest correlation magnitudes (< 0.6) suggest that solubility arises from nonlinear, multi-factor interactions rather than from any dominant single variable. This reinforces the need for advanced learning architectures, such as TabNet and HGB, capable of capturing higher-order feature interactions through attention and boosting mechanisms. The consistency of these correlation trends across data partitions further strengthens the dataset’s reliability, ensuring that subsequent optimization with ALO, EVO, and BOA operates on a stable, representative feature landscape. Fig. 1Correlation plot for pairwise relationships and distributions of the dataset variables. Correlation plot for pairwise relationships and distributions of the dataset variables. Modeling framework Choice of models TabNet TabNet TabNet TabNet temporal attention serves as a selector of intrinsic features that enable interpretation of which physicochemical parameters are the most dominating in drug solubility. Whilst regular networks set static importance, TabNet updates feature importance dynamically over the course of training. This dynamic prioritization proves to be particularly valuable when dealing with the highly divergent and heterogeneous chemical and molecular descriptors that are found in the task of predicting solubility36. Histogram-Based Gradient Boosting (HGB) Histogram-Based Gradient Boosting (HGB) Histogram-Based Gradient Boosting (HGB) HGB is chosen primarily due to being quick to compute and efficient in capturing complex, nonlinear feature interactions through the use of histogram binning and leaf-wise tree growth. It has a specific strength that makes it best suited to operate alongside tabular pharmaceutical datasets as it prevents overfitting but retains the predictive consistency across a variety of data splits37,38. Hybrid Justification Hybrid Justification Hybrid Justification Integration of TabNet and HGB brings together the best of both worlds: TabNet offers deep, interpretable feature extraction, and HGB offers aggressive generalization through ensemble learning. With both, the system effectively captures sophisticated chemical relationships and deals with variability present in structured table data. This integration boosts the reliability and accuracy of solubility prediction. Hyperparameter optimization algorithms Attack–leave optimizer (ALO) ALO draws inspiration from the dynamics of predator-prey interactions, where attackers pursue while defenders evade within a changing search space. This approach features a dual-phase strategy: it alternates between broad exploration and focused exploitation. Such balance enables effective navigation of complex hyperparameter landscapes, particularly in the context of solubility modeling39. Energy valley optimizer (EVO) EVO mimics the energy dissipation and descent behavior of particles in potential valleys, emphasizing rapid convergence and stability. It enhances local refinement in the search space and reduces the chance of premature convergence, ensuring high-fidelity parameter tuning for both TabNet and HGB40,41. Botox optimization algorithm (BOA) BOA, inspired by the diffusion and tension adjustment properties of botulinum toxin, focuses on precision-driven optimization. It systematically reduces redundant search paths, improving convergence toward the global optimum with minimal computational overhead42. Application of optimizers The optimizers are exclusively applied for hyperparameter tuning rather than direct model training. Each optimizer operates within a defined search space tailored to model-specific parameters (as outlined above). The performance of each optimizer is assessed through: Kruskal–Wallis nonparametric testing to statistically compare optimization outcomes.Prediction interval bootstrapping to quantify uncertainty and model reliability.Pareto front analysis to evaluate the trade-offs between accuracy, interpretability, and computational cost for each optimizer–model pair. Kruskal–Wallis nonparametric testing to statistically compare optimization outcomes. Kruskal–Wallis nonparametric testing to statistically compare optimization outcomes. Prediction interval bootstrapping to quantify uncertainty and model reliability. Prediction interval bootstrapping to quantify uncertainty and model reliability. Pareto front analysis to evaluate the trade-offs between accuracy, interpretability, and computational cost for each optimizer–model pair. Pareto front analysis to evaluate the trade-offs between accuracy, interpretability, and computational cost for each optimizer–model pair. This approach ensures that the final hybrid configuration not only achieves superior predictive accuracy but also maintains statistical significance, reproducibility, and interpretability, essential standards for pharmaceutical modeling studies. Performance metrics To comprehensively evaluate the predictive accuracy, reliability, and robustness of the proposed solubility modeling framework, six statistical indicators were employed: the coefficient of determination (R²), root mean squared error (RMSE), mean absolute percentage error (MAPE), ratio of RMSE to the standard deviation of observations (RSR), uncertainty at the 95% confidence level (U95), and fractional gross error (FGE). Together, these metrics quantify different aspects of model performance, including goodness of fit, absolute and relative error magnitude, predictive uncertainty, and systematic deviation. R² (Coefficient of Determination) measures the proportion of variance in the observed solubility values that is explained by the predictive model. Values approaching unity indicate that the model reproduces the experimental variability with high fidelity. 1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}=1-\frac{{\sum\:}_{i=1}^{n}{({y}_{i}-{\widehat{y}}_{i})}^{2}}{{\sum\:}_{i=1}^{n}{({y}_{i}-\stackrel{-}{y})}^{2}}$$\end{document} R² (Coefficient of Determination) measures the proportion of variance in the observed solubility values that is explained by the predictive model. Values approaching unity indicate that the model reproduces the experimental variability with high fidelity. R² (Coefficient of Determination) measures the proportion of variance in the observed solubility values that is explained by the predictive model. Values approaching unity indicate that the model reproduces the experimental variability with high fidelity. where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{y}_{i}$$\end{document}denotes the experimental solubility, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{y}}_{i}$$\end{document}the predicted value, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\stackrel{\prime }{y}$$\end{document} the mean of the observed values. RMSE (Root Mean Squared Error) evaluates the average magnitude of prediction errors and penalizes large deviations more strongly than small ones. Lower values indicate improved predictive accuracy. 2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:RMSE=\sqrt{\frac{1}{n}{\sum\:}_{i=1}^{n}{({y}_{i}-{\widehat{y}}_{i})}^{2}}$$\end{document} RMSE (Root Mean Squared Error) evaluates the average magnitude of prediction errors and penalizes large deviations more strongly than small ones. Lower values indicate improved predictive accuracy. RMSE (Root Mean Squared Error) evaluates the average magnitude of prediction errors and penalizes large deviations more strongly than small ones. Lower values indicate improved predictive accuracy. MAPE (Mean Absolute Percentage Error) expresses prediction error as a percentage of the observed value, allowing performance comparison across different solubility scales. 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:MAPE=\frac{100}{n}{\sum\:}_{i=1}^{n}\left|\frac{{y}_{i}-{\widehat{y}}_{i}}{{y}_{i}}\right|\:$$\end{document} MAPE (Mean Absolute Percentage Error) expresses prediction error as a percentage of the observed value, allowing performance comparison across different solubility scales. MAPE (Mean Absolute Percentage Error) expresses prediction error as a percentage of the observed value, allowing performance comparison across different solubility scales. RSR (Ratio of RMSE to Standard Deviation of Observations) normalizes RMSE by the standard deviation of the observed data, producing a dimensionless indicator that facilitates objective comparisons among models. 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:RSR=\frac{RMSE}{\sqrt{\frac{1}{n-1}{\sum\:}_{i=1}^{n}{({y}_{i}-\stackrel{-}{y})}^{2}}}$$\end{document} RSR (Ratio of RMSE to Standard Deviation of Observations) normalizes RMSE by the standard deviation of the observed data, producing a dimensionless indicator that facilitates objective comparisons among models. RSR (Ratio of RMSE to Standard Deviation of Observations) normalizes RMSE by the standard deviation of the observed data, producing a dimensionless indicator that facilitates objective comparisons among models. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{U}_{95}$$\end{document} (Uncertainty at 95% Confidence Interval) represents the predictive uncertainty estimated from the distribution of model residuals and provides an interval-based indicator of reliability. 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{U}_{95}=1.96\times\:\sqrt{\frac{1}{n}{\sum\:}_{i=1}^{n}{({y}_{i}-\widehat{{y}_{i}})}^{2}}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{U}_{95}$$\end{document} (Uncertainty at 95% Confidence Interval) represents the predictive uncertainty estimated from the distribution of model residuals and provides an interval-based indicator of reliability. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{U}_{95}$$\end{document} (Uncertainty at 95% Confidence Interval) represents the predictive uncertainty estimated from the distribution of model residuals and provides an interval-based indicator of reliability. FGE (Fractional Gross Error) measures the relative deviation between predicted and observed values while maintaining symmetry between overestimation and underestimation. 6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:FGE=\frac{1}{n}{\sum\:}_{i=1}^{n}\left|\frac{{y}_{i}-\widehat{{y}_{i}}}{({y}_{i}+\widehat{{y}_{i}})/2}\right|$$\end{document} FGE (Fractional Gross Error) measures the relative deviation between predicted and observed values while maintaining symmetry between overestimation and underestimation. FGE (Fractional Gross Error) measures the relative deviation between predicted and observed values while maintaining symmetry between overestimation and underestimation. Rationale: Using multiple complementary metrics provides a comprehensive assessment of model performance. R² and RMSE quantify global predictive accuracy, while MAPE and FGE provide interpretable measures of relative error and systematic bias. RSR enables objective comparison across datasets with different variance levels. Finally, U95 introduces an uncertainty-based perspective, reflecting the statistical confidence associated with model predictions. Collectively, these indicators establish a robust framework for evaluating both the accuracy and reliability of predictive models for drug solubility in supercritical CO₂ systems. Result and discussion Cross-validation reliability Table 4 shows the five-fold cross-validation results, assessing the reliability and generalizability of the TabNet and HGB models across different data splits. Both models performed well, with high determination coefficients (R² > 0.9) and low RMSE values across all folds, indicating reliable solubility predictions independent of training-test divisions. TabNet consistently outperformed HGB, achieving the lowest RMSE and highest R² in every fold, with approximately 8–10% higher accuracy than HGB. For example, TabNet reached R² = 0.949 and RMSE = 0.427 in Fold 5, demonstrating stable convergence even under challenging data distributions. HGB also performed reliably (R² = 0.917–0.931), though RMSE fluctuated slightly, suggesting limited adaptability to complex feature interactions. The low variation in RMSE and R² between folds (standard deviation RMSE ≈ 0.014 for TabNet, 0.056 for HGB) indicates minimal overfitting and confirms the effectiveness of K-fold validation in reducing sampling bias. In pharmaceutical terms, such reproducibility is essential for regulatory confidence and defensible solubility predictions in formulation development or safety evaluation dossiers according to FDA and EMA guidelines. To further reduce the potential risk of overfitting during hyperparameter optimization, candidate configurations were evaluated across cross-validation folds rather than a single data partition. This strategy improves robustness when working with moderately sized experimental datasets by ensuring that optimized parameters perform consistently across multiple training–validation splits. Table 4The result of the developed K-Fold.ModelsIndicatorNumber of K-Folds K1 K2 K3 K4 K5 TabnetRMSE0.4710.4580.4610.447 0.427 R20.9400.9430.9420.946 0.949 HGBRMSE0.4850.4600.5950.550 0.450 R20.9270.9300.9170.921 0.931 Table 4The result of the developed K-Fold.ModelsIndicatorNumber of K-Folds K1 K2 K3 K4 K5 TabnetRMSE0.4710.4580.4610.447 0.427 R20.9400.9430.9420.946 0.949 HGBRMSE0.4850.4600.5950.550 0.450 R20.9270.9300.9170.921 0.931 The result of the developed K-Fold. Optimized hyperparameters and learning dynamics Table 5 lists the optimized hyperparameters for TabNet- and HGB-based hybrid models, obtained using BOA, ALO, and EVO metaheuristic optimizers. These parameters balance model complexity and generalization, directly affecting predictive stability. For TabNet-based hybrids (TBBO, TBAO, TBEO), BOA selected deeper network architectures that capture strong nonlinear interactions between thermodynamic features. In contrast, ALO and EVO favored sparser settings, promoting smoother convergence and reduced overfitting. HGB-based hybrids (HGBO, HGAO, HGEO) used optimizers to adjust complementary properties, e.g., HGAO applied higher learning rates and shallower trees for faster convergence and regularization, while HGEO used deeper architectures to approximate subtle physicochemical gradients. Each optimizer demonstrates a distinct trade-off between exploration and exploitation, influencing both interpretability and prediction accuracy. In drug research, such hyperparameter tuning enhances generalizability, enabling reproducible solubility predictions across diverse compounds and solvent systems. To ensure reproducibility of the hyperparameter optimization process, predefined search ranges were specified for each model parameter prior to applying the ALO, EVO, and BOA algorithms. These ranges define the exploration boundaries within which the metaheuristic algorithms searched for optimal configurations. The selected intervals were based on commonly used parameter domains reported in the literature for TabNet and Histogram Gradient Boosting models, while allowing sufficient flexibility for the optimization algorithms to identify effective parameter combinations. Table 5Search space and optimized hyperparameters of the developed hybrid models.Hybrid modelsHyperparameterSearch rangeOptimized valueTBBON_d8–6433N_a8–6431N_steps3–1010Gamma1.0–2.02.0TBAON_d8–6427N_a8–6429N_steps3–106Gamma1.0–2.01.7TBEON_d8–6415N_a8–6415N_steps3–104Gamma1.0–2.01.5HGBOLearning rate0.01–1.00.295Max leaf nodes5–5013Max depth10–1000999Min samples leaf1–101Max bins64–255251HGAOLearning rate0.01–1.00.602Max leaf nodes5–507Max depth10–1000648Min samples leaf1–102Max bins64–255191HGEOLearning rate0.01–1.00.224Max leaf nodes5–5030Max depth10–1000346Min samples leaf1–102Max bins64–255187 Table 5Search space and optimized hyperparameters of the developed hybrid models.Hybrid modelsHyperparameterSearch rangeOptimized valueTBBON_d8–6433N_a8–6431N_steps3–1010Gamma1.0–2.02.0TBAON_d8–6427N_a8–6429N_steps3–106Gamma1.0–2.01.7TBEON_d8–6415N_a8–6415N_steps3–104Gamma1.0–2.01.5HGBOLearning rate0.01–1.00.295Max leaf nodes5–5013Max depth10–1000999Min samples leaf1–101Max bins64–255251HGAOLearning rate0.01–1.00.602Max leaf nodes5–507Max depth10–1000648Min samples leaf1–102Max bins64–255191HGEOLearning rate0.01–1.00.224Max leaf nodes5–5030Max depth10–1000346Min samples leaf1–102Max bins64–255187 Search space and optimized hyperparameters of the developed hybrid models. Convergence behavior of hybrid models Figure 2 presents a convergence heatmap of RMSE over 200 optimization steps for all TabNet- and HGB-based hybrid models. It indicates visible distinctions between how they learn and how fast they computerize. RMSE constantly lowers during these iterations, showing that each optimizer is successfully lowering prediction error, which is a hint that the parameters have been set correctly. The TabNet-based hybrids (TBBO, TBAO, TBEO) converge swiftly, usually stabilizing at low RMSE values around 40 to 60 iterations. This quick improvement is probably because TabNet uses attention-driven mechanisms and bio-inspired optimization to make it easier to concentrate on important elements and cut down on unnecessary ones. The HGB-based hybrids (HGAO, HGEO, HGBO), on the other hand, show a more gradual and smooth convergence trend. Their approach suggests a more cautious exploration of the error surface, which appears to provide greater control over local fluctuations during optimization. All models reached stable minima before 150 iterations, showing that the algorithm is strong and the training is quick. From a pharmaceutical point of view, faster convergence means less computational overhead and faster model deployment. This is a big benefit when screening large molecular libraries or optimizing formulation parameters. So, the TabNet-based hybrids not only have high predictive accuracy, but they also work well with large amounts of data, which helps speed up drug discovery and solubility testing pipelines in complex thermodynamic conditions. Fig. 2Heatmap for the convergence behavior of the models during optimization. Heatmap for the convergence behavior of the models during optimization. Model performance comparison Table 6 shows how well the baseline and hybrid models can predict, showing how metaheuristic optimization affects accuracy, generalization, and robustness. The hybrid architectures showed big improvements over their standalone versions on all metrics, which shows how useful optimizer-guided fine-tuning is. The TBBO configuration achieved the lowest RMSE (0.218) and one of the highest R² values (0.981) among the evaluated models during testing. However, the performance differences among several optimized configurations were relatively small across certain metrics, indicating that multiple optimizer–model combinations can achieve comparable predictive accuracy within the dataset. The Model’s stability and ability to make accurate predictions are further supported by a low RSR (0.141) and a high U₉₅ (0.933). From a pharmaceutical point of view, this level of accuracy directly leads to more accurate solubility estimates, which are important for predicting bioavailability, improving formulations, and reducing the need for experimental testing. Even minor reductions in RMSE or MAPE can have a notable impact on dosage accuracy and product efficacy, which highlights the necessity for evaluating models across multiple metrics. While all the optimized variants performed admirably, TabNet-based hybrids generally outperformed their HGB-based counterparts, suggesting that attention-driven architectures adapt more effectively to metaheuristic optimization. Table 6Performance measurements of the models, evaluating their predicted accuracy and efficacy using essential statistical measures.ProcessCategoryModelsEvaluation MetricsRMSER2MAPERSRU95FGETrainSingle ModelsTabnet0.4470.95123.4590.2531.2320.105HGB0.4710.93329.8770.2661.2980.002Hybrid ModelsTBBO0.1630.9929.2660.0920.4530.037TBAO0.2610.97913.7480.1480.7240.063TBEO0.3440.96817.6240.1950.9530.077HGBO0.2860.97527.3300.1620.7920.079HGAO0.3510.96130.0290.1990.9730.026HGEO0.3980.95033.5290.2251.1000.015ValidationSingle ModelsTabnet0.2890.91023.1260.3020.8010.093HGB0.2970.91330.1630.3100.8220.010Hybrid ModelsTBBO0.1650.97011.2560.1730.4580.032TBAO0.1840.96413.4990.1920.5090.037TBEO0.2250.94819.8970.2350.6200.068HGBO0.2250.94722.3460.2350.6220.049HGAO0.2730.93621.3740.2860.7350.088HGEO0.2930.90931.2230.3060.8060.042TestSingle ModelsTabnet0.3790.94525.5940.2741.0300.027HGB0.4060.92434.0960.2931.1030.082Hybrid ModelsTBBO0.1820.98316.0140.1310.5030.022TBAO0.2780.96321.0490.2010.7530.039TBEO0.3290.96326.4210.2380.8850.035HGBO0.2470.97227.4490.1780.6720.049HGAO0.2860.96023.3890.2070.7830.030HGEO0.3320.94735.2560.2400.9200.074 Table 6Performance measurements of the models, evaluating their predicted accuracy and efficacy using essential statistical measures.ProcessCategoryModelsEvaluation MetricsRMSER2MAPERSRU95FGETrainSingle ModelsTabnet0.4470.95123.4590.2531.2320.105HGB0.4710.93329.8770.2661.2980.002Hybrid ModelsTBBO0.1630.9929.2660.0920.4530.037TBAO0.2610.97913.7480.1480.7240.063TBEO0.3440.96817.6240.1950.9530.077HGBO0.2860.97527.3300.1620.7920.079HGAO0.3510.96130.0290.1990.9730.026HGEO0.3980.95033.5290.2251.1000.015ValidationSingle ModelsTabnet0.2890.91023.1260.3020.8010.093HGB0.2970.91330.1630.3100.8220.010Hybrid ModelsTBBO0.1650.97011.2560.1730.4580.032TBAO0.1840.96413.4990.1920.5090.037TBEO0.2250.94819.8970.2350.6200.068HGBO0.2250.94722.3460.2350.6220.049HGAO0.2730.93621.3740.2860.7350.088HGEO0.2930.90931.2230.3060.8060.042TestSingle ModelsTabnet0.3790.94525.5940.2741.0300.027HGB0.4060.92434.0960.2931.1030.082Hybrid ModelsTBBO0.1820.98316.0140.1310.5030.022TBAO0.2780.96321.0490.2010.7530.039TBEO0.3290.96326.4210.2380.8850.035HGBO0.2470.97227.4490.1780.6720.049HGAO0.2860.96023.3890.2070.7830.030HGEO0.3320.94735.2560.2400.9200.074 Performance measurements of the models, evaluating their predicted accuracy and efficacy using essential statistical measures. Correlation and variance consistency (Taylor diagram analysis) Figure 3 presents the Taylor diagram, summarizing correlation, standard deviation, and RMS deviation of predicted versus experimental data. Hybrid models cluster tightly near the reference point, indicating strong correlation and accurate variance reproduction. TabNet-based hybrids (TBBO, TBAO, TBEO) achieved correlation coefficients near 0.99, demonstrating precise predictions and minimal error variation. HGB-based hybrids also show high correlations (r > 0.97) but with broader deviations, reflecting slightly higher variance. Overall, the Taylor diagram confirms strong fidelity and generalization, with TBBO providing the most stable and balanced predictions. Fig. 3Taylor diagram for comparing model performance based on correlation and standard deviation. Taylor diagram for comparing model performance based on correlation and standard deviation. Error distribution and predictive stability (residual analysis) Figure 4 provides a residual-based perspective on model performance, illustrating how prediction errors are distributed around zero during the testing phase. This visualization complements numerical metrics by revealing each Model’s bias, variance, and generalization tendencies in predicting drug solubility under supercritical CO₂ conditions. The overall near-symmetric, Gaussian-like distribution across all models indicates that predictions are largely unbiased and centered around experimental values, confirming stable calibration. The HGB-based hybrids display narrower, smoother error curves with limited extreme deviations, signifying better generalization and consistent learning across diverse thermodynamic conditions. In contrast, the TabNet-based variants exhibit sharper but slightly broader peaks, reflecting strong local learning capacity with minor overfitting in specific parameter ranges. The application of bio-inspired optimizers, particularly the ALO, BOA, and EVO, visibly reduces high-magnitude residuals, leading to smoother, more symmetric error profiles. This distributional improvement highlights the effectiveness of optimization in refining model robustness and mitigating prediction bias. From a pharmaceutical modeling standpoint, the low and evenly distributed residuals demonstrate the model’s capability to reliably estimate solubility without systematic error. Such consistent predictive behavior underpins the practical potential of these hybrid frameworks to minimize experimental screening efforts and accelerate formulation design in SC-CO₂ systems. Fig. 4Histogram plot for error analysis, providing a general visualization of error distribution. Histogram plot for error analysis, providing a general visualization of error distribution. Feature influence and statistical sensitivity (Kruskal-Wallis analysis) Figure 5 presents the 2Ys plot from the Kruskal-Wallis sensitivity analysis, offering a nonparametric assessment of how each input variable contributes to the predictive reliability of the hybrid solubility models. This method was employed because it does not assume data normality and instead ranks variables based on statistical significance, providing an unbiased measure of feature influence. The analysis reveals that temperature and pressure exert the greatest impact on model performance, supported by high statistical values and correspondingly low p-values. This dominance aligns with established thermodynamic understanding, where both parameters govern CO₂ density and solute diffusivity, directly shaping solubility behavior. In contrast, molecular weight and melting point show moderate but consistent contributions, reflecting their role in molecular cohesion and sublimation resistance. The inverse relationship between the Kruskal-Wallis statistic and p-value confirms that features with higher predictive relevance maintain stronger, statistically reliable effects. Such coherence demonstrates the robustness of the hybrid framework, as model-driven importance rankings align closely with physical solvation principles. In summary, this work affirms that the machine learning-optimization models not just make precise predication but also stay rooted in interpretable, experimentally consistent relations in SC-CO₂ systems, and validate their credibility for pharmaceutical solubility prediction and formulation design diagnosis. Fig. 52Ys plot for Kruskal sensitivity analysis illustrating the relative impact of variables on model performance. 2Ys plot for Kruskal sensitivity analysis illustrating the relative impact of variables on model performance. Multi-objective trade-off optimization (Pareto front evaluation) Figure 6 indicates the resulting 3D Pareto front from the multi-objective optimization. It presents the trade-offs between other significant performance metrics: the root mean square error (RMSE), the coefficient of determination (R²), and the residual loss (R-1). This visualization allows for a comprehensive assessment of model performance, focusing on stability and generalization instead of a single accuracy metric. The position of the optimizers along the Pareto surface indicates various optimization dynamics. The Pareto front visualization illustrates the trade-offs between prediction accuracy and residual error across different optimizer–model configurations. Several hybrid models occupy regions of the Pareto surface corresponding to high R² values and relatively low RMSE. This distribution suggests that multiple optimization strategies can reach competitive performance levels under the evaluated objectives. The Pareto front therefore serves primarily as a visual diagnostic for examining trade-offs among metrics rather than as a definitive ranking tool. TBAO approach strikes a good balance between various goals and ensuring that the system remains stable. HGAO, in contrast, adopts a safer search strategy, and thus error rates become a little higher but are sure to converge. The fact that there is a smooth Pareto front and no abrupt changes or unusual points indicates that the optimization process is robust and reliable. The data as a whole have a bearing that highlights the importance of a multi-objective approach in achieving balanced behavior and improved generalization. Fig. 63D scatter plot for Pareto front illustrating the trade-offs between multiple objective functions in the optimization process. 3D scatter plot for Pareto front illustrating the trade-offs between multiple objective functions in the optimization process. Computational efficiency and scalability assessment Table 7 summarizes the computational runtime of the baseline models and the optimization-driven hybrid configurations across the complete modeling workflow. The reported runtimes primarily reflect the hyperparameter search procedure performed by the population-based optimizers rather than the intrinsic training time of the machine learning models themselves. Because these optimizers iteratively evaluate multiple candidate parameter configurations, the hybrid models require substantially longer runtimes than the baseline learners. The baseline models (TabNet and HGB) complete training in less than one second because they are executed using default or fixed hyperparameter settings. In contrast, the hybrid configurations require additional computational time due to the iterative exploration of the hyperparameter search space. Depending on the optimizer, the total runtime ranges from approximately 839 s to 1322 s, with TBEO exhibiting the longest runtime and HGAO the shortest among the optimized configurations. It should be emphasized that this computational cost corresponds to the model calibration stage, which is typically performed offline during model development. Once the optimal hyperparameters are identified, the final trained models can be executed for prediction with negligible computational cost comparable to the baseline learners. Therefore, the reported runtime reflects the additional effort required to explore the hyperparameter space rather than the operational cost of using the trained model. The inclusion of computational runtime statistics provides transparency regarding the computational demands of the optimization process and allows readers to assess the trade-offs between search effort and predictive performance within the evaluated modeling framework. Table 7Computation runtime of each model across all phases collectively (training, validation, and testing).ModelsRuntimeTBBO1210.4 sTBAO996.5 sTBEO1322 sTabnet0.93 sHGBO1018.4 sHGAO839 sHGEO1112 sHGB0.78 s Table 7Computation runtime of each model across all phases collectively (training, validation, and testing).ModelsRuntimeTBBO1210.4 sTBAO996.5 sTBEO1322 sTabnet0.93 sHGBO1018.4 sHGAO839 sHGEO1112 sHGB0.78 s Computation runtime of each model across all phases collectively (training, validation, and testing). Predictive interval validation (PIB) Table 8 illustrates the predicted solubility of Predictive Interval Band (PIB) under varying thermodynamic conditions, revealing a clear interplay between temperature, pressure, molecular weight, and melting point. The Model indicates that solubility rises with increasing pressure due to enhanced CO₂ density, which strengthens solvent-polymer interactions and weakens polymer-polymer cohesion, an effect well established in supercritical thermodynamics. Temperature exerts a dual influence: moderate heating enhances solubility by improving molecular mobility and diffusion, whereas excessive heating reduces it by lowering CO₂ density and solvent power. Molecular structure also governs solubility behavior; lower- and intermediate-weight PIBs (≈ 315–586 g/mol) dissolve more readily because their reduced cohesive energy facilitates penetration of CO₂ molecules, while very high molecular weights (> 900 g/mol) exhibit diffusion limitations and lower solubility. Notably, the Model reproduces nonlinear and coupled effects; for instance, pressure-driven gains diminish at extreme temperatures, highlighting its physical interpretability beyond statistical fitting. These patterns align closely with established experimental trends in SC-CO₂ systems, confirming model reliability. Table 8Predicted solubility values of pharmaceutical compounds in supercritical CO₂ using the optimized hybrid model within the Predictive Interval Band (PIB).Temperature (K)Molecular weight (g/mol)Melting point (C)Pressure (MPa)Prediction338157.1190150.37003318586.18146180.58002431824804.031280.156035328315.712391801.390003318926.09155180.7500232821822.951851.596997318157.1190244.289925328157.1190181.390003328393.44230271.237007328586.18146272.939961338385.372362400.43302831815270.212310.826018318393.44230210.73002318586.18146271.569998328393.44230180.36803308926.09155241.280005318157.1190150.800018308337.45163.5181.55299830827822.951852.170982338393.44230150.11903633830804.031280.235033338315.712392402.559971318385.372361200.03403932812822.951850.238033318157.1190120.3700330821822.951851.63699632320914.1721830.324031328315.712392101.909989328586.18146211.38000333818804.031280.096037308315.712392102.029986318385.372362700.41302831812822.951850.48202733827270.212312.712967318157.1190181.300005338315.712391200.110037328157.1190276.57986533818822.951851.0980131830822.951852.76596632815804.031280.076037318385.372363000.493026318315.712391801.539999318926.09155150.530025308157.1190150.870016328315.712391200.20003433821804.031280.184035338385.372361500.083037328337.45163.5120.120036338385.372361200.019039308393.44230120.27903232820914.1721830.381029338586.18146243.199954318315.712391200.690021318926.09155120.270032338586.18146211.80999130818822.951851.304005338393.44230241.049012318315.712393003.75994308586.18146210.48002732822.5914.1721830.407029308926.09155120.45002730824822.951851.84399328315.712392402.519973318926.09155211.020012318157.1190181.300005338157.1190213.919935318157.1190150.800018308337.45163.5120.770019318586.18146210.890016308926.09155180.920015318157.1190212.719967 Table 8Predicted solubility values of pharmaceutical compounds in supercritical CO₂ using the optimized hybrid model within the Predictive Interval Band (PIB).Temperature (K)Molecular weight (g/mol)Melting point (C)Pressure (MPa)Prediction338157.1190150.37003318586.18146180.58002431824804.031280.156035328315.712391801.390003318926.09155180.7500232821822.951851.596997318157.1190244.289925328157.1190181.390003328393.44230271.237007328586.18146272.939961338385.372362400.43302831815270.212310.826018318393.44230210.73002318586.18146271.569998328393.44230180.36803308926.09155241.280005318157.1190150.800018308337.45163.5181.55299830827822.951852.170982338393.44230150.11903633830804.031280.235033338315.712392402.559971318385.372361200.03403932812822.951850.238033318157.1190120.3700330821822.951851.63699632320914.1721830.324031328315.712392101.909989328586.18146211.38000333818804.031280.096037308315.712392102.029986318385.372362700.41302831812822.951850.48202733827270.212312.712967318157.1190181.300005338315.712391200.110037328157.1190276.57986533818822.951851.0980131830822.951852.76596632815804.031280.076037318385.372363000.493026318315.712391801.539999318926.09155150.530025308157.1190150.870016328315.712391200.20003433821804.031280.184035338385.372361500.083037328337.45163.5120.120036338385.372361200.019039308393.44230120.27903232820914.1721830.381029338586.18146243.199954318315.712391200.690021318926.09155120.270032338586.18146211.80999130818822.951851.304005338393.44230241.049012318315.712393003.75994308586.18146210.48002732822.5914.1721830.407029308926.09155120.45002730824822.951851.84399328315.712392402.519973318926.09155211.020012318157.1190181.300005338157.1190213.919935318157.1190150.800018308337.45163.5120.770019318586.18146210.890016308926.09155180.920015318157.1190212.719967 Predicted solubility values of pharmaceutical compounds in supercritical CO₂ using the optimized hybrid model within the Predictive Interval Band (PIB). Thermodynamic interaction mapping (temperature-pressure coupling analysis) Figure 7 depicts the multidimensional interplay between temperature and pressure on the predicted solubility. As temperature increases, solubility generally rises at fixed pressures, a trend driven by enhanced molecular motion and reduced cohesive energy within the polymer matrix. However, this effect is moderated at very high pressures, where elevated CO₂ density limits further solvation improvement. In contrast, when temperature is held constant, an inverse relationship between solubility and pressure emerges; this stems from the nonlinear compressibility of supercritical CO₂. For lower pressures, the CO₂ compresses normally, but as density approaches saturation, the compressibility decreases. The Model effectively reproduces the subtle curvature and crossover characteristics intrinsic to these systems, which effectively unveil nonlinear thermophysical connections that are normally missed by conventional linear regression approaches. These coupled dynamics validate that the Model conforms to known supercritical thermodynamics, which indicates that it can be interpreted physically and used to make reliable predictions. Fig. 73D line-symbol for showing the tendency and variation of features across different conditions. 3D line-symbol for showing the tendency and variation of features across different conditions. Discussion and practical applications The proposed hybrid architecture, integrating TabNet and HGB with three metaheuristic optimizers (ALO, EVO, and BOA), demonstrates the capability of data-driven models to capture nonlinear relationships governing drug solubility in supercritical CO₂ systems. Among the tested configurations, the TabNet–BOA combination (TBBO) achieved the highest predictive performance within the evaluated dataset, reaching R² = 0.981 and RMSE = 0.218. These results indicate that optimizer-assisted hyperparameter tuning can improve predictive consistency for structured thermodynamic data. However, it should be noted that such improvements may also reflect the influence of the optimization search process and the characteristics of the available dataset rather than an inherent superiority of a particular optimizer. The observed convergence patterns of the hybrid models suggest that different optimizers explore the hyperparameter space in distinct ways. For example, BOA and EVO tended to reach stable solutions more rapidly than some alternative configurations, while ALO demonstrated a more gradual search trajectory. Although faster convergence may indicate efficient exploration of the optimization landscape, it should not be interpreted as definitive evidence of better model generalization. Convergence speed can also be influenced by the structure of the search space, initialization conditions, or the relatively low dimensionality of the model parameter set. Similarly, the smooth Pareto fronts obtained during multi-objective optimization provide a useful visualization of the trade-offs among accuracy, residual error, and other performance metrics. Nevertheless, such patterns should be interpreted cautiously, as smooth Pareto structures may arise from stable optimization dynamics rather than uniquely superior predictive models. For this reason, model evaluation in the present study relies primarily on quantitative statistical indicators and cross-validation results rather than qualitative visual diagnostics alone. The hybrid models were also able to reproduce general thermodynamic trends consistent with established supercritical solubility behavior. In particular, solubility generally increased with temperature under moderate pressures and tended to exhibit saturation behavior at higher CO₂ densities. These patterns align with widely reported observations in supercritical fluid systems, where temperature influences both molecular diffusivity and solvent density. The Kruskal–Wallis sensitivity analysis further identified temperature and pressure as the most statistically influential variables, while molecular weight and melting point contributed secondary effects related to intermolecular cohesion and crystal stability. The correspondence between these feature importance patterns and established thermodynamic principles supports the physical plausibility of the learned relationships. Limitation of the study: At the same time, several limitations should be acknowledged. The dataset used in this study, while experimentally curated, contains approximately 350 observations and only four primary descriptors. Although cross-validation and statistical testing were applied to mitigate overfitting, models trained on datasets of this scale remain sensitive to potential hyperparameter tuning bias or dataset-specific correlations. Consequently, the reported predictive performance should be interpreted primarily within the thermodynamic domain represented by the compiled experimental data.Future research suggestion: Future research may address these limitations by incorporating larger and more diverse datasets, integrating physics-informed constraints or hybrid thermodynamic models, and validating performance on independent experimental datasets. The inclusion of advanced molecular descriptors and the exploration of transfer learning strategies may further improve model generalizability. Additionally, extending the framework to multicomponent systems and dynamic solubility behavior represents a valuable direction for future work.Application perspective: From an application perspective, the proposed framework may serve as a computational tool for preliminary solubility screening and formulation analysis in supercritical CO₂ environments. By providing rapid predictions across a range of temperature and pressure conditions, such models may assist in guiding experimental design and reducing the number of required laboratory trials. Potential applications include early-stage drug formulation studies, optimization of supercritical extraction processes, and evaluation of operating conditions in CO₂-based pharmaceutical processing. The integration of uncertainty-related metrics and cross-validation procedures further supports the framework’s use as a decision-support tool rather than a replacement for experimental validation.Advantages of the study: The proposed framework offers several advantages. It combines interpretable and ensemble learning methods to capture nonlinear solubility behavior while maintaining computational efficiency. The integration of metaheuristic optimization improves parameter tuning, and the use of multiple validation techniques enhances statistical reliability. In addition, the framework operates on a limited set of experimentally accessible variables, making it practical for real-world applications where extensive molecular descriptors may not be available. However, certain disadvantages should also be acknowledged. The reliance on a relatively small dataset may limit the robustness of the learned relationships. Furthermore, the absence of explicit molecular descriptors restricts the model’s ability to capture detailed chemical interactions. The use of metaheuristic optimization also increases computational cost compared to conventional tuning approaches. These factors indicate that while the framework is effective within the studied domain, its performance may vary under different data conditions. Limitation of the study: At the same time, several limitations should be acknowledged. The dataset used in this study, while experimentally curated, contains approximately 350 observations and only four primary descriptors. Although cross-validation and statistical testing were applied to mitigate overfitting, models trained on datasets of this scale remain sensitive to potential hyperparameter tuning bias or dataset-specific correlations. Consequently, the reported predictive performance should be interpreted primarily within the thermodynamic domain represented by the compiled experimental data. Limitation of the study: At the same time, several limitations should be acknowledged. The dataset used in this study, while experimentally curated, contains approximately 350 observations and only four primary descriptors. Although cross-validation and statistical testing were applied to mitigate overfitting, models trained on datasets of this scale remain sensitive to potential hyperparameter tuning bias or dataset-specific correlations. Consequently, the reported predictive performance should be interpreted primarily within the thermodynamic domain represented by the compiled experimental data. Future research suggestion: Future research may address these limitations by incorporating larger and more diverse datasets, integrating physics-informed constraints or hybrid thermodynamic models, and validating performance on independent experimental datasets. The inclusion of advanced molecular descriptors and the exploration of transfer learning strategies may further improve model generalizability. Additionally, extending the framework to multicomponent systems and dynamic solubility behavior represents a valuable direction for future work. Future research suggestion: Future research may address these limitations by incorporating larger and more diverse datasets, integrating physics-informed constraints or hybrid thermodynamic models, and validating performance on independent experimental datasets. The inclusion of advanced molecular descriptors and the exploration of transfer learning strategies may further improve model generalizability. Additionally, extending the framework to multicomponent systems and dynamic solubility behavior represents a valuable direction for future work. Application perspective: From an application perspective, the proposed framework may serve as a computational tool for preliminary solubility screening and formulation analysis in supercritical CO₂ environments. By providing rapid predictions across a range of temperature and pressure conditions, such models may assist in guiding experimental design and reducing the number of required laboratory trials. Potential applications include early-stage drug formulation studies, optimization of supercritical extraction processes, and evaluation of operating conditions in CO₂-based pharmaceutical processing. The integration of uncertainty-related metrics and cross-validation procedures further supports the framework’s use as a decision-support tool rather than a replacement for experimental validation. Application perspective: From an application perspective, the proposed framework may serve as a computational tool for preliminary solubility screening and formulation analysis in supercritical CO₂ environments. By providing rapid predictions across a range of temperature and pressure conditions, such models may assist in guiding experimental design and reducing the number of required laboratory trials. Potential applications include early-stage drug formulation studies, optimization of supercritical extraction processes, and evaluation of operating conditions in CO₂-based pharmaceutical processing. The integration of uncertainty-related metrics and cross-validation procedures further supports the framework’s use as a decision-support tool rather than a replacement for experimental validation. Advantages of the study: The proposed framework offers several advantages. It combines interpretable and ensemble learning methods to capture nonlinear solubility behavior while maintaining computational efficiency. The integration of metaheuristic optimization improves parameter tuning, and the use of multiple validation techniques enhances statistical reliability. In addition, the framework operates on a limited set of experimentally accessible variables, making it practical for real-world applications where extensive molecular descriptors may not be available. However, certain disadvantages should also be acknowledged. The reliance on a relatively small dataset may limit the robustness of the learned relationships. Furthermore, the absence of explicit molecular descriptors restricts the model’s ability to capture detailed chemical interactions. The use of metaheuristic optimization also increases computational cost compared to conventional tuning approaches. These factors indicate that while the framework is effective within the studied domain, its performance may vary under different data conditions. Advantages of the study: The proposed framework offers several advantages. It combines interpretable and ensemble learning methods to capture nonlinear solubility behavior while maintaining computational efficiency. The integration of metaheuristic optimization improves parameter tuning, and the use of multiple validation techniques enhances statistical reliability. In addition, the framework operates on a limited set of experimentally accessible variables, making it practical for real-world applications where extensive molecular descriptors may not be available. However, certain disadvantages should also be acknowledged. The reliance on a relatively small dataset may limit the robustness of the learned relationships. Furthermore, the absence of explicit molecular descriptors restricts the model’s ability to capture detailed chemical interactions. The use of metaheuristic optimization also increases computational cost compared to conventional tuning approaches. These factors indicate that while the framework is effective within the studied domain, its performance may vary under different data conditions. Summary and conclusion This study proposed a hybrid learning framework that bridges data-driven prediction and thermodynamic understanding for modeling drug solubility in supercritical carbon dioxide (SC-CO₂). By integrating the interpretable feature learning of TabNet, the gradient stability of HGB, and the adaptive search dynamics of three metaheuristic optimizers, ALO, EVO, and BOA, the framework establishes a transparent and robust alternative to conventional black-box or semi-empirical approaches. Its novelty lies not merely in algorithmic fusion but in creating a balanced system capable of achieving interpretability, generalizability, and predictive precision within a single modeling pipeline. Quantitative analyses demonstrated that the BOA-optimized hybrid achieved the most stable trade-off between accuracy and uncertainty, reaching an average \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}$$\end{document}≈0.98 and maintaining narrow prediction intervals (< 5%) across the 366 experimental samples. The results demonstrate that the model captures statistical relationships between temperature, pressure, and molecular descriptors that are consistent with widely reported thermodynamic trends in SC-CO₂ solubility systems. The Kruskal-Wallis test further reinforced these findings by highlighting temperature and pressure as statistically significant factors, in line with established solubility theory. Taken together, these findings indicate that the framework accurately captures real physicochemical relationships, rather than just statistical anomalies. This research connects artificial intelligence and physical chemistry by turning complicated solubility behavior into easy-to-understand predictive structures. The Model’s dependability, demonstrated through K-fold cross-validation and bootstrap uncertainty analysis, establishes it as a robust decision-support instrument for pharmaceutical process design, especially in supercritical extraction and formulation optimization. Building on the principles of green chemistry, this framework supports solvent-efficient process development and advances sustainable drug formulation, particularly within high-pressure CO₂ settings. While it demonstrates considerable versatility, there is potential for further expansion, such as application to multicomponent mixtures, mixed-solvent systems, and investigations into time-dependent solubility kinetics. Despite these encouraging results, several limitations should be considered. The dataset used in this study contains approximately 350 experimental observations and includes only four primary descriptors. Although cross-validation and statistical evaluation were applied to mitigate overfitting, models trained on datasets of this scale remain sensitive to dataset composition and hyperparameter optimization strategies. Furthermore, the present validation relies primarily on internal cross-validation rather than independent external datasets, which limits the ability to fully assess model generalization across broader chemical domains. For these reasons, the proposed framework should be interpreted as a data-driven predictive approach that complements, rather than replaces, traditional thermodynamic or semi-empirical modeling techniques. Its primary value lies in its ability to rapidly explore potential relationships within available experimental data and to support preliminary analysis of solubility behavior under different operating conditions. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1. Supplementary Material 1.