Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2026 Jan 5;16:3537. doi: 10.1038/s41598-025-33532-3

Leveraging topological indices and machine learning for advanced prediction of antidepressant drug properties

Guoping Zhang 1, Sadia Noureen 2, Saood Azam 2, Manal Elzain Mohamed Abdalla 3, Mohammed E Dafaalla 4, Adnan Aslam 5, Keneni Abera Tola 6,✉
PMCID: PMC12848129  PMID: 41491376

Abstract

This study investigates the efficacy of eight multiplicative degree-based and three classical degree-based topological indices in Quantitative Structure-Property Relationship (QSPR) models for predicting critical physicochemical properties of 38 antidepressant drugs. Molecular structures of compounds including Bupropion, Amitriptyline, and Fluoxetine were translated into numerical descriptors using indices such as Multiplicative Sum Zagreb, Multiplicative Sombor, and the First Zagreb index. These descriptors were integrated with machine learning algorithms: Random Forest, XGBoost, and linear regression to forecast boiling points, melting points, critical temperature, critical volume, and molar refractivity. Results revealed that the XGBoost algorithm significantly outperformed other methods, achieving superior predictive accuracy with the lowest error metrics (e.g., for boiling point: MAE = 8.60, RMSE = 12.40, Inline graphic). Among the topological indices, the First Zagreb index (Inline graphic) emerged as the most robust descriptor, demonstrating the strongest correlations with key properties (e.g., Inline graphic with critical volume, Inline graphic with molar refractivity). Linear regression models further confirmed the significance of Inline graphic and other indices, with high statistical significance (Inline graphic) in most cases. This interdisciplinary approach demonstrates the potent synergy of graph-theoretic indices and advanced machine learning in pharmaceutical research, offering a powerful strategy to accelerate drug discovery and optimize the design of novel therapeutic agents.

Keywords: Topological indices, QSPR, Machine learning, Drug design, Antidepressants, XGBoost

Subject terms: Analytical chemistry, Theoretical chemistry

Introduction

Chemical graph theory provides a powerful framework for representing molecular structures as mathematical graphs, where atoms and bonds are denoted as vertices and edges, respectively 1–3. In this context, a molecular structure is abstracted as a mathematical graph G(V, E), where a set of vertices V represents atoms and a set of edges E represents chemical bonds between them. The degree of a vertex Inline graphic, a fundamental concept, is the number of edges incident to it, corresponding to the valency of an atom. A topological index is then a numerical descriptor, or a graph invariant, calculated from this graph G to encode its structural information such as molecular size, shape, branching, and cyclicity. The foundational work of Wiener, who linked molecular structure to alkane boiling points 4, ignited the field of Quantitative Structure-Property Relationship (QSPR) modeling. In QSPR, TIs serve as critical predictors for correlating molecular structure with physicochemical and biological properties, thereby offering a computational shortcut for expensive experimental measurements.

The evolution of TIs has been marked by continuous innovation to enhance their predictive power. The Randic index, introduced to quantify molecular branching 5, and the Zagreb indices, developed by Gutman and Trinajstic 6, are among the most influential classical descriptors. Recent advancements have focused on multiplicative variants of these indices, such as the multiplicative Zagreb indices proposed by Eliasi et al. 5, which have demonstrated improved adaptability and accuracy. This has been followed by the development of other multiplicative indices, including the Hyper Zagreb index for thermal predictions 7 and the Multiplicative Sombor index to expand the descriptor toolbox 8.

The topological indices considered in this work, summarized in Table 1, were selected to provide a comprehensive and modern characterization of molecular structure for QSPR modeling. This set includes both classical workhorses of chemical graph theory and their contemporary multiplicative variants. We examine the foundational First and Second Zagreb indices (Inline graphic, Inline graphic) and the First Hyper Zagreb index (Inline graphic), which are based on the sum of vertex degrees and their squares. Alongside these, we compute their multiplicative analogues: the Multiplicative Sum Zagreb (Inline graphic), Multiplicative Zagreb (Inline graphic), and Multiplicative First Hyper Zagreb (Inline graphic) indices which operate on the product of terms over edges, often yielding greater sensitivity to structural nuances. To further expand the descriptor space, we also include the generalized versions for Inline graphic (Inline graphic, Inline graphic), the recently introduced Multiplicative Sombor index (Inline graphic) based on Euclidean distances, and the multiplicative form of the seminal Randic index (MR(G)). The diverse portfolio of indices captures a wide spectrum of topological information, from basic connectivity and branching patterns to more complex electronic and steric influences, providing a robust foundation for predictive models 9–12.

Table 1.

Definitions and pioneers of the degree-based topological indices used in this study.

Names of indices Definitions of indices Pioneer’s names
Multiplicative Sum Zagreb(Inline graphic) Inline graphic Eliasi et al.5
Multiplicative First Hyper Zagreb(Inline graphic) Inline graphic Kulli7
Multiplicative Zagreb(Inline graphic) Inline graphic Gutman (2011)
Multiplicative Second Hyper Zagreb(Inline graphic) Inline graphic Kulli7
Generalized version of Multiplicative Sum ZI (Inline graphic)(Inline graphic) Inline graphic Sun and Du (2024)
Generalized version of Multiplicative ZI (Inline graphic)(Inline graphic) Inline graphic Alfuraidan et al. (2020)
Multiplicative Sombor(Inline graphic) Inline graphic Liu8
Multiplicative Randic(MR(G)) Inline graphic Gutman et al. (2016)
First Zagreb index(Inline graphic) Inline graphic Gutman and Trinajstic6
Second Zagreb index(Inline graphic) Inline graphic Gutman and Trinajstic6
First Hyper Zagreb index(Inline graphic) Inline graphic Shirdel et al. (2013)

Depression is a multifaceted neuropsychiatric disorder that is often treated with a wide spectrum of pharmacological agents, each targeting different neurotransmitter systems. The drugs studied in this work including Bupropion, Amitriptyline, Effexor (Venlafaxine), Fluoxetine, Nefazodone, Paxil (Paroxetine), Sertraline, and Trazodone primarily function by modulating monoamine levels such as serotonin, norepinephrine, and dopamine in the brain 13–15. Newer adjuncts like Gabapentin, Buspirone, and Risperidone have been employed to augment traditional antidepressants, especially in treatment-resistant cases 16. Compounds like L-tyrosine, L-theanine, Folate, and Dehydroepiandrosterone are emerging as nutraceuticals or hormonal adjuncts with mood-stabilizing or neuroprotective effects 17,18. Drugs like Amphetamine and Pregnenolone, though not primarily antidepressants, are under research for their potential in enhancing motivation and cognitive function in depressive disorders 19. This pharmacological diversity reflects the complexity of depression and underscores the importance of predictive tools, such as QSPR models, for better understanding drug behavior and optimizing therapeutic outcomes.

While Quantitative Structure-Property Relationship (QSPR) studies are well-established, and machine learning (ML) is increasingly applied in cheminformatics, the specific integration of a comprehensive set of modern multiplicative topological indices with state-of-the-art ML algorithms for the targeted prediction of antidepressant drug properties represents a significant and underexplored frontier. ML techniques like Random Forest and XGBoost excel at recognizing complex, non-linear patterns in high-dimensional data, offering a potent complement to traditional linear regression 20,21. Classical degree-based indices like the Zagreb and Randic indices have a long history in QSPR; however, their multiplicative variants offer enhanced sensitivity to nuanced structural patterns due to their product-based formulations, which may better capture complex molecular interactions. This study fills a critical gap by systematically evaluating the predictive power of eight multiplicative and three classical indices including recently proposed descriptors like the Multiplicative Sombor index when coupled with powerful non-linear ML models (Random Forest and XGBoost) specifically for a structurally diverse set of 38 antidepressant compounds. Our work thus provides a novel, interdisciplinary framework that uniquely leverages the synergy between advanced graph-theoretic descriptors and modern ML to optimize the predictive modeling of critical physicochemical properties in antidepressant research.

This study aims to bridge this gap by conducting a rigorous QSPR analysis on 38 depression-related compounds. We compute eight multiplicative and three classical degree-based TIs to serve as molecular descriptors. These indices are then employed within both linear regression and automated ML models (Random Forest and XGBoost) to predict key physicochemical properties. Our work demonstrates that this interdisciplinary methodology, marrying graph-theoretic concepts with advanced ML, provides a highly accurate and efficient framework for property prediction, ultimately contributing to the accelerated discovery and optimization of novel antidepressant therapeutics.

Computation of topological indices

This section details the computation of a suite of multiplicative and classical degree-based topological indices for a set of 38 antidepressant drugs. The analyzed compounds include widely used therapeutics such as Bupropion, Amitriptyline, Fluoxetine, and Sertraline, as well as nutraceutical adjuncts like L-tyrosine and L-theanine, providing a structurally diverse dataset for our QSPR study. The complete list of drugs considered in this study is: Bupropion, Amitriptyline, Effexor, Fluoxetine, Nefazodon, Paxil, Sertraline, Trazodone, Nomifensine, Valproate, Risperidone, Buspirone, Gabapentin, Dopamine, L-tyrosine, L-theanine, Mianserin, Folate, Meprobamate, Amphetamine, Dehydroepiandrosterone, Pregnenolone, Citalopram, Paroxetine, Duloxetine, Venlafaxine, Desvenlafaxine, Levomilnacipran, Clomipramine, Nortriptyline, Mirtazapine, Vilazodone, Tranylcypromine, Esketamine, Agomelatine, Moclobemide, Clorgiline, and Tianeptine. The molecular structures of these drugs are depicted in Figs. 1, 2, and 3 respectively.

Fig. 1.

Fig. 1

Molecular structures of antidepressant drugs (Bupropion to L-theanine).

Fig. 2.

Fig. 2

Molecular structures of antidepressant drugs (Mianserin to Clomipramine).

Fig. 3.

Fig. 3

Molecular structures of antidepressant drugs (Nortriptyline to Tianeptine).

The computation of topological indices first requires a systematic analysis of the molecular graph. For each compound, we identified its edge partition based on the degrees of the adjacent vertices Inline graphic for every edge Inline graphic in the graph G. This partition serves as the foundational data from which all indices are derived, as their formulas are applied by grouping edges of the same type. To illustrate this computational process, we consider Amitriptyline as a detailed example. Its molecular graph G consists of 21 vertices and 22 edges. The edge partition, categorized by the degree pairs Inline graphic of connected vertices, is as follows: 2 vertices of type (1, 3), 9 vertices of type (2, 2), 8 vertices of type (2, 3), and 4 vertices of type (3, 3).

Using this partition, the values for the topological indices defined in Table 1 are calculated by applying their respective formulas. For instance, the Multiplicative Sum Zagreb index Inline graphic is computed as the product of the sum of vertex degrees for each edge:

graphic file with name d33e690.gif

The calculations for the remaining indices for Amitriptyline, including the Multiplicative First Hyper Zagreb (Inline graphic), Multiplicative Zagreb (Inline graphic), and Multiplicative Randic (MR(G)), proceed analogously. The computed values for all indices for Amitriptyline are:

graphic file with name d33e730.gif

To ensure accuracy and efficiency in calculating indices for the entire set of 38 drugs, we developed a dedicated Python-based computational tool. This program automates the process of parsing molecular structures, determining edge partitions, and computing all defined indices. The resulting edge partition for every drug is tabulated in Table 2, providing a transparent record for verification and reproducibility. The final computed values of all eleven topological indices for all 38 antidepressant drugs are comprehensively presented in Table 3. These numerical descriptors serve as the feature set for the subsequent machine learning and QSPR modeling analyses detailed in the following sections.

Table 2.

Edge partition based on the degrees of adjacent vertices for the molecular graphs of the 38 antidepressant drugs.

Drugs Edge partition
(1,2) (1,3) (1,4) (2,2) (2,3) (2,4) (3,3) (3,4)
Bupropion 0 3 3 3 3 1 3 0
Amitriptyline 0 2 0 9 8 0 4 0
Effexor 1 2 1 6 7 2 1 1
Fluoxetine 1 0 3 8 9 0 1 1
Nefazodon 1 2 0 12 17 0 4 0
Paxil 0 1 0 9 14 0 3 0
Sertraline 1 2 0 5 9 0 5 0
Trazodone 0 2 0 9 14 0 4 0
Nomifensine 0 2 0 6 8 0 4 0
Valproate 2 2 0 2 2 0 1 0
Risperidone 0 3 0 8 16 0 7 0
Buspirone 0 2 0 12 10 4 3 0
Gabapentin 1 2 0 4 1 4 0 0
Dopamine 1 2 0 2 5 0 1 0
L-tyrosine 0 4 0 2 6 0 1 0
L-theanine 1 4 0 2 3 0 1 0
Mianserin 0 1 0 7 10 0 5 0
Folate 0 7 0 5 18 0 4 0
Meprobamate 1 5 0 1 5 0 1 0
Amphetamine 0 2 0 4 4 0 0 0
Dehydroepiandrosterone 0 2 2 4 8 2 2 4
Pregnenolone 0 3 2 4 8 2 3 4
Citalopram 0 4 0 6 10 2 1 2
Paroxetine 0 1 0 9 15 0 2 0
Duloxetine 1 0 0 10 10 0 3 1
Venlafaxine 0 2 1 8 6 3 0 0
Desvenlafaxine 0 4 1 2 6 3 1 1
Levomilnacipran 0 4 0 5 8 0 3 0
Clomipramine 0 3 0 7 10 0 4 0
Nortriptyline 1 0 0 7 5 0 2 0
Mirtazapine 0 1 0 5 8 0 3 0
Vilazodone 0 3 0 6 6 0 3 0
Tranylcypromine 0 0 0 7 4 0 1 0
Esketamine 0 3 0 6 4 0 4 0
Agomelatine 0 1 0 8 6 0 4 0
Moclobemide 1 2 0 4 11 0 1 0
Clorgiline 1 1 0 4 5 0 3 0
Tianeptine 0 2 0 8 8 0 1 0

Table 3.

Computed values of the eleven topological indices for all 38 antidepressant drug structures.

Drugs Topological indices
Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic MR(G) Inline graphic Inline graphic Inline graphic
Bupropion Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 78 86 390
Amitriptyline Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 108 126 520
Effexor Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 100 115 494
Fluoxetine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 108 121 522
Nefazodon Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 168 194 802
Paxil Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 128 150 618
Sertraline Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 106 127 526
Trazodone Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 138 162 670
Nomifensine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 96 114 472
Valproate Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 38 39 168
Risperidone Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 166 200 828
Buspirone Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 96 114 472
Gabapentin Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 56 62 274
Dopamine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 50 54 234
L-tyrosine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 60 64 282
L-theanine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 48 48 216
Mianserin Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 112 136 558
Folate Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 162 185 786
Meprobamate Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 58 60 266
Amphetamine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 44 46 196
Dehydroepiandrosterone Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 126 160 686
Pregnenolone Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 136 172 738
Citalopram Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 122 145 616
Paroxetine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 127 147 607
Duloxetine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 112 130 534
Venlafaxine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 93 102 443
Desvenlafaxine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 90 105 464
Levomilnacipran Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 94 107 452
Clomipramine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 114 133 554
Nortriptyline Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 69 79 325
Mirtazapine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 82 98 404
Vilazodone Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 84 96 402
Tranylcypromine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 54 61 248
Esketamine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 80 93 388
Agomelatine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 90 107 438
Moclobemide Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 88 99 416
Clorgiline Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 66 78 322
Tianeptine Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic 86 95 396

Predictive modeling using topological indices

The computed topological indices for the 38 antidepressant drugs serve as the feature set for constructing predictive Quantitative Structure-Property Relationship (QSPR) models. To comprehensively evaluate the predictive power of these indices, we employ a multi-faceted computational approach utilizing three distinct regression techniques: Linear Regression, Random Forest, and Extreme Gradient Boosting (XGBoost). Each method offers unique advantages. Linear Regression provides a transparent, interpretable baseline model, establishing fundamental linear relationships between the indices and the physicochemical properties. Random Forest, an ensemble learning method, enhances predictive accuracy by building a multitude of decision trees and aggregating their results, effectively capturing non-linear patterns and interactions within the data. Finally, XGBoost, a sophisticated gradient-boosting framework, is employed to optimize predictive performance further; it sequentially builds models that correct the errors of previous ones, often yielding state-of-the-art results in machine learning competitions and scientific applications. This progression from a simple linear model to complex, high-performance algorithms allows for a robust assessment of how well topological indices can predict drug properties under varying levels of model complexity.

Linear regression model

We begin our predictive analysis with Linear Regression, a fundamental and interpretable statistical method that models the linear relationship between a dependent variable and one or more independent variables. In the context of our QSPR study, the goal is to establish a direct linear relationship between each topological index (TI), serving as the independent variable, and the physicochemical properties (P) of the antidepressant drugs, which are the dependent variables.

The general form of the simple linear regression model used for each index-property pair is given by:

graphic file with name d33e3497.gif 1

where:

  • P represents a physicochemical property (Boiling Point, Melting Point, Critical Temperature, Critical Volume, or Molar Refractivity).

  • a is the y-intercept of the regression line.

  • b is the regression coefficient (slope), indicating the change in the property for a unit change in the topological index.

  • TI represents the value of a topological index.

The experimental values for the five physicochemical properties (boiling points (BP), melting points (MW), critical temprature (CT), critical volume (CV) and molar refractivity (MR)) were sourced from ChemDraw and PubChem and are compiled in Table 4. Using the SPSS statistical software, we generated a distinct linear regression model for each combination of the eleven topological indices and the five properties, resulting in a comprehensive set of 55 models.

Table 4.

Experimentally determined physicochemical properties for the 38 antidepressant drugs.

Drugs Names Physiochemical properties
Boiling Point Melting Point Critical Temp. Critical Vol. MR
Bupropion 666.50 394.64 778.39 728.50 68.70
Amitriptyline 751.01 457.55 856.98 898.50 93.40
Effexor 766.61 451.59 812.60 859.50 83.18
Fluoxetine 713.63 410.29 803.42 861.50 81.04
Nefazodon 1092.30 812.28 1072.62 1308.50 132.29
Paxil 853.05 600.10 907.55 888.50 90.51
Sertraline 788.23 493.93 872.67 852.50 85.99
Trazodone 919.92 716.19 994.91 984.50 106.26
Nomifensine 735.32 481.13 874.37 719.50 77.56
Valproate 457.79 252.95 620.30 492.50 –
Risperidone 1068.52 822.57 1034.63 1144.50 114.21
Buspirone 1045.74 850.24 1065.22 1117.50 108.44
Gabapentin 643.35 465.83 784.09 523.50 45.22
Dopamine 643.09 512.54 800.17 436.50 42.63
L-tyrosine 730.42 557.69 831.85 494.50 46.62
L-theanine 702.27 563.22 872.17 502.50 42.53
Mianserin 713.52 478.58 865.92 786.50 85.92
Folate 1500.13 1358.86 1399.64 1186.50 –
Meprobamate 663.79 444.29 755.19 638.50 53.73
Amphetamine 504.29 285.37 700.68 454.50 43.69
Dehydroepiandrosterone 837.91 539.19 850.34 893.50 84.02
Pregnenolone 865.05 539.20 849.27 1003.50 93.11
Citalopram 873.22 571.52 890.36 977.50 94.41
Paroxetine 833.56 893.48 911.40 885.50 92.57
Duloxetine 805.31 536.28 906.24 864.50 89.70
Venlafaxine 674.87 405.77 809.54 846.50 82.01
Desvenlafaxine 738.02 504.79 817.09 701.50 68.50
Levomilnacipran 750.48 516.93 857.50 767.50 75.32
Clomipramine 754.45 479.31 861.87 960.50 97.93
Nortriptyline 597.85 360.07 803.75 612.50 61.17
Mirtazapine 691.85 566.66 853.81 588.50 59.84
Vilazodone 694.20 467.86 840.85 693.50 71.85
Tranylcypromine 483.20 279.51 734.59 455.50 47.78
Esketamine 682.82 440.65 847.57 650.50 70.88
Agomelatine 719.40 537.19 871.67 656.50 68.51
Moclobemide 754.38 548.22 928.78 733.50 74.24
Clorgiline 594.50 379.97 810.89 549.50 56.24
Tianeptine 713.06 437.54 833.21 734.50 69.75

The derived regression equations for all index property pairs are listed below.

  1. Multiplicative Sum Zagreb
    graphic file with name d33e4061.gif
  2. Multiplicative First Hyper Zagreb
    graphic file with name d33e4069.gif
  3. Multiplicative Zagreb
    graphic file with name d33e4077.gif
  4. Multiplicative Second Hyper Zagreb
    graphic file with name d33e4085.gif
  5. Generalized Version of Multiplicative Sum Zagreb Inline graphic
    graphic file with name d33e4096.gif
  6. Generalized Version of Multiplicative Zagreb Inline graphic
    graphic file with name d33e4107.gif
  7. Multiplicative Sombor
    graphic file with name d33e4115.gif
  8. Multiplicative Randic
    graphic file with name d33e4123.gif
  9. First Zagreb index
    graphic file with name d33e4131.gif
  10. Second Zagreb index
    graphic file with name d33e4139.gif
  11. First Hyper Zagreb index
    graphic file with name d33e4147.gif

The model performance and statistical significance were rigorously evaluated. A detailed statistical overview, including standard error of the estimate (SEE), F-statistic, t-statistic, and p-values for each model, is provided in Tables 7, 8, 9, 10, and 11. These results confirm that the majority of the models are statistically significant (Inline graphic). Notably, the First Zagreb index (Inline graphic) consistently emerged as the most powerful predictor across all properties, exhibiting the strongest linear correlations (e.g., Inline graphic with Critical Volume, Inline graphic with Molar Refractivity).

Table 7.

Statistical overview of the simple linear regression QSPR models for boiling point (BP).

Topological indices r r2 SEE F p t Indicator
Inline graphic 0.4167 0.1737 171.0836 7.56513 Inline graphic 2.75048 Significant
Inline graphic 0.3160 0.0998 178.5622 3.99235 Inline graphic 1.99809 Not significant
Inline graphic 0.4288 0.1838 170.0266 8.10849 Inline graphic 2.84754 Significant
Inline graphic 0.3921 0.1538 173.1313 6.54069 Inline graphic 2.55748 Significant
Inline graphic 0.2988 0.0893 179.6065 3.52862 Inline graphic 1.87846 Not significant
Inline graphic 0.3734 0.1395 174.5869 5.83432 Inline graphic 2.41543 Significant
Inline graphic 0.5786 0.3348 153.5027 18.1158 Inline graphic 4.25626 Significant
Inline graphic 0.3593 0.1291 175.6339 5.33701 Inline graphic Inline graphic2.31020 Significant
Inline graphic 0.8236 0.6783 106.7521 75.8931 Inline graphic 8.71166 Significant
Inline graphic 0.8009 0.6414 112.7050 64.3851 Inline graphic 8.02403 Significant
Inline graphic 0.8074 0.6519 111.0323 67.4324 Inline graphic 8.21173 Significant

Table 8.

Statistical overview of the simple linear regression QSPR models for melting point (MP).

Topological indices r r2 SEE F p t Indicator
Inline graphic 0.3466 0.1202 190.3268 4.91675 Inline graphic 2.21737 Significant
Inline graphic 0.2485 0.0618 196.5431 2.36946 Inline graphic 1.53931 Not significant
Inline graphic 0.3541 0.1254 189.7629 5.16031 Inline graphic 2.27163 Significant
Inline graphic 0.3163 0.1001 192.4895 4.00252 Inline graphic 2.00063 Not significant
Inline graphic 0.2325 0.0541 197.3469 2.05751 Inline graphic 1.43440 Not significant
Inline graphic 0.2986 0.0892 193.6481 3.52526 Inline graphic 1.87757 Not significant
Inline graphic 0.5130 0.2631 174.1793 12.8549 Inline graphic 3.58537 Significant
Inline graphic 0.2900 0.0841 194.1866 3.30634 Inline graphic Inline graphic1.81833 Not significant
Inline graphic 0.6890 0.4747 147.0673 32.5281 Inline graphic 5.70334 Significant
Inline graphic 0.6611 0.4370 152.2443 27.9468 Inline graphic 5.28647 Significant
Inline graphic 0.6624 0.4388 152.0085 28.1454 Inline graphic 5.30522 Significant

Table 9.

Statistical overview of the simple linear regression QSPR models for critical temperature (CT).

Topological indices r R2 SEE F p t Indicator
Inline graphic 0.1085 0.0118 345.0501 0.429215 Inline graphic 0.655145 Not significant
Inline graphic 0.0793 0.0063 346.0065 0.228106 Inline graphic 0.477604 Not significant
Inline graphic 0.1023 0.0105 345.2783 0.381082 Inline graphic 0.617319 Not significant
Inline graphic 0.0925 0.0086 345.6125 0.310767 Inline graphic 0.557465 Not significant
Inline graphic 0.0749 0.0056 346.1260 0.203100 Inline graphic 0.450666 Not significant
Inline graphic 0.0892 0.0080 345.7167 0.288873 Inline graphic 0.537469 Not significant
Inline graphic 0.1607 0.0258 342.5919 0.953873 Inline graphic 0.976664 Not significant
Inline graphic 0.1865 0.0348 341.0092 1.29769 Inline graphic Inline graphic1.13916 Not significant
Inline graphic 0.2242 0.0503 338.2622 Inline graphic 1.38056 Not significant
Inline graphic 0.1999 0.0400 340.0952 1.49844 Inline graphic 1.22411 Not significant
Inline graphic 0.1937 0.0375 340.5288 1.40301 Inline graphic 1.18449 Not significant

Table 10.

Statistical overview of the simple linear regression QSPR models for critical volume (CV).

Topological indices r r2 SEE F p t Indicator
Inline graphic 0.4930 0.2431 192.5764 11.5622 Inline graphic 3.40032 Significant
Inline graphic 0.4248 0.1805 200.3838 7.92815 Inline graphic 2.81570 Significant
Inline graphic 0.5136 0.2638 189.9286 12.8976 Inline graphic 3.59132 Significant
Inline graphic 0.4965 0.2465 192.1418 11.7776 Inline graphic 3.43186 Significant
Inline graphic 0.4107 0.1687 201.8232 7.30383 Inline graphic 2.70256 Significant
Inline graphic 0.4827 0.2330 193.8533 10.9377 Inline graphic 3.30722 Significant
Inline graphic 0.5733 0.3287 181.3620 17.6260 Inline graphic 4.19834 Significant
Inline graphic 0.3544 0.1256 206.9849 5.17096 Inline graphic Inline graphic2.27397 Significant
Inline graphic 0.9317 0.8681 80.3816 236.995 Inline graphic 15.3946 Significant
Inline graphic 0.9179 0.8425 87.8328 192.641 Inline graphic 13.8795 Significant
Inline graphic 0.9201 0.8466 86.6989 198.661 Inline graphic 14.0947 Significant

Table 11.

Statistical overview of the simple linear regression QSPR models for Molar Refractivity (MR).

Topological indices r r2 SEE F p t Indicator
Inline graphic 0.4961 0.2461 19.1565 11.1014 Inline graphic 3.33187 Significant
Inline graphic 0.4536 0.2058 19.6629 8.80825 Inline graphic 2.96787 Significant
Inline graphic 0.5364 0.2877 18.6205 13.7357 Inline graphic 3.70617 Significant
Inline graphic 0.5312 0.2821 18.6938 13.3619 Inline graphic 3.65539 Significant
Inline graphic 0.4420 0.1954 19.7908 8.25672 Inline graphic 2.87345 Significant
Inline graphic 0.5177 0.2680 18.8762 12.4508 Inline graphic 3.52857 Significant
Inline graphic 0.5300 0.2808 18.7104 13.2780 Inline graphic 3.64390 Significant
Inline graphic 0.5350 0.2862 18.6406 13.6325 Inline graphic Inline graphic3.69222 Significant
Inline graphic 0.9382 0.8802 7.6376 249.732 Inline graphic 15.8029 Significant
Inline graphic 0.9237 0.8532 8.4522 197.675 Inline graphic 14.0597 Significant
Inline graphic 0.9164 0.8398 8.8314 178.211 Inline graphic 13.3496 Significant

A detailed comparison between the actual experimental values and the values predicted by the linear regression models is systematically presented in Tables 5 and 6. These predictions were derived using the most statistically significant regression model namely, the one based on the First Zagreb index which consistently demonstrated the strongest linear correlations across all physicochemical properties. The scatter plots in Fig. 4 visually reinforce these relationships by illustrating the correlation between the actual property values and the topological indices. While these linear models establish a robust and interpretable baseline, they also highlight the inherent limitations of linear approximations, thereby paving the way for the application of more sophisticated, non-linear machine learning techniques to further enhance predictive accuracy.

Table 5.

Comparison of actual values and linear regression predicted values for boiling point (BP), melting point (MP), and critical temperature (CT).

Drugs Properties
BP MP CT
Structures Name Actual Predicted Actual Predicted Actual Predicted
Bupropion 666.50 683.84 394.64 465.12 778.39 880.46
Amitriptyline 751.01 819.98 457.55 587.91 856.98 948.83
Effexor 766.61 783.68 451.59 555.16 812.60 930.60
Fluoxetine 713.63 819.98 410.29 587.91 803.42 948.83
Nefazodon 1092.30 1092.26 812.28 833.49 1072.62 1085.57
Paxil 853.05 910.74 600.10 669.77 907.55 994.41
Sertraline 788.23 810.91 493.93 579.72 872.67 944.27
Trazodone 919.92 956.12 716.19 710.70 994.91 1017.20
Nomifensine 735.32 765.53 481.13 538.79 874.37 921.48
Valproate 457.79 502.32 252.95 301.40 620.30 789.30
Risperidone 1068.52 1083.19 822.57 825.30 1034.63 1081.01
Buspirone 1045.74 765.53 850.24 538.79 1065.22 921.48
Gabapentin 643.35 584.01 465.83 375.07 784.09 830.32
Dopamine 643.09 556.78 512.54 350.51 800.17 816.65
L-tyrosine 730.42 602.16 557.69 391.44 831.85 839.44
L-theanine 702.27 547.70 563.22 342.33 872.17 812.09
Mianserin 713.52 838.13 478.58 604.28 865.92 957.95
Folate 1500.13 1065.04 1358.86 808.93 1399.64 1071.90
Meprobamate 663.79 593.08 444.29 383.26 755.19 834.88
Amphetamine 504.29 529.55 285.37 325.96 700.68 802.97
Dehydroepiandrosterone 837.91 901.67 539.19 661.58 850.34 989.85
Pregnenolone 865.05 947.05 539.20 702.51 849.27 1012.64
Citalopram 873.22 883.52 571.52 645.21 890.36 980.74
Paroxetine 833.56 906.21 893.48 665.68 911.40 992.13
Duloxetine 805.31 838.13 536.28 604.28 906.24 957.95
Venlafaxine 674.87 751.91 405.77 526.51 809.54 914.65
Desvenlafaxine 738.02 738.30 504.79 514.24 817.09 907.81
Levomilnacipran 750.48 756.45 516.93 530.61 857.50 916.92
Clomipramine 754.45 847.21 479.31 612.47 861.87 962.50
Nortriptyline 597.85 643.00 360.07 428.28 803.75 859.95
Mirtazapine 691.85 702.00 566.66 481.49 853.81 889.58
Vilazodone 694.20 711.07 467.86 489.68 840.85 894.13
Tranylcypromine 483.20 574.93 279.51 366.89 734.59 825.76
Esketamine 682.82 692.92 440.65 473.31 847.57 885.02
Agomelatine 719.40 738.30 537.19 514.24 871.67 907.81
Moclobemide 754.38 729.22 548.22 506.05 928.78 903.25
Clorgiline 594.50 629.39 379.97 416.00 810.89 853.11
Tianeptine 713.06 720.15 437.54 497.86 833.21 898.69

Table 6.

Comparison of actual values and linear regression-predicted values for critical volume (CV) and molar refractivity (MR).

Drugs Properties
CV MR
Structures Name Actual Predicted Actual Predicted
Bupropion 728.50 668.80 68.70 65.33
Amitriptyline 898.50 849.97 93.40 84.89
Effexor 859.50 801.65 83.18 79.68
Fluoxetine 861.50 849.97 81.04 84.89
Nefazodon 1308.50 1212.31 132.29 124.01
Paxil 888.50 970.75 90.51 97.93
Sertraline 852.50 837.89 85.99 83.59
Trazodone 984.50 1031.14 106.26 104.45
Nomifensine 719.50 777.50 77.56 77.07
Valproate 492.50 427.24 – 39.25
Risperidone 1144.50 1200.23 114.21 122.71
Buspirone 1117.50 777.50 108.44 77.07
Gabapentin 523.50 535.94 45.22 50.99
Dopamine 436.50 499.70 42.63 47.08
L-tyrosine 494.50 560.09 46.62 53.60
L-theanine 502.50 487.63 42.53 45.77
Mianserin 786.50 874.12 85.92 87.50
Folate 1186.50 1176.07 – 120.10
Meprobamate 638.50 548.02 53.73 52.29
Amphetamine 454.50 463.47 43.69 43.17
Dehydroepiandrosterone 893.50 958.67 84.02 96.63
Pregnenolone 1003.50 1019.06 93.11 103.15
Citalopram 977.50 934.51 94.41 94.02
Paroxetine 885.50 964.71 92.57 97.28
Duloxetine 864.50 874.12 89.70 87.50
Venlafaxine 846.50 759.38 82.01 75.11
Desvenlafaxine 701.50 741.26 68.50 73.16
Levomilnacipran 767.50 765.42 75.32 75.77
Clomipramine 960.50 886.20 97.93 88.81
Nortriptyline 612.50 614.44 61.17 59.47
Mirtazapine 588.50 692.95 59.84 67.94
Vilazodone 693.50 705.03 71.85 69.25
Tranylcypromine 455.50 523.86 47.78 49.69
Esketamine 650.50 680.87 70.88 66.64
Agomelatine 656.50 741.26 68.51 73.16
Moclobemide 733.50 729.19 74.24 71.85
Clorgiline 549.50 596.33 56.24 57.51
Tianeptine 734.50 717.11 69.75 70.55

Fig. 4.

Fig. 4

Scatter plots showing the correlation between the most predictive topological indices and the experimental physicochemical properties.

Random forest regression

To capture the potential non-linear relationships between the topological indices and the physicochemical properties, we employed a Random Forest (RF) regression algorithm. Random Forest is an ensemble learning method that operates by constructing a multitude of de-correlated decision trees during training and outputting the mean prediction of the individual trees for regression tasks 22. This approach effectively mitigates overfitting by introducing randomness through bootstrap aggregating (bagging) of data samples for each tree and random subset selection of features for splitting nodes.

The RF model was trained using the eleven topological indices as the input feature vector p to predict each of the five target physicochemical properties. The ensemble prediction for a property y is given by:

graphic file with name d33e6747.gif 2

where y is the predicted value, M is the total number of trees in the forest, and Inline graphic is the prediction of the i-th decision tree for the input feature vector p (containing the topological indices), and the summation is over all trees.

A key advantage of the Random Forest algorithm is its ability to quantify the relative importance of each feature in the predictive model. The importance is calculated as the total decrease in node impurity, measured by the Mean Squared Error (MSE), weighted by the probability of reaching that node, averaged over all trees.

The computed feature importance for each property are presented in Table 12. Analysis of this table reveals that the predictive utility of a topological index is highly property-specific, reflecting its ability to capture relevant aspects of molecular structure. Notably, the First Zagreb Index (Inline graphic) and the Multiplicative Randic Index (MR(G)) emerged as consistently powerful predictors across multiple properties, particularly for Critical Volume (CV) and Molar Refractivity (MR). This suggests a strong link between these degree-based connectivity indices and properties influenced by molecular size and electron density. The Multiplicative Sombor Index (Inline graphic) also demonstrated significant importance, especially for Boiling Point (BP) and Melting Point (MP), indicating its sensitivity to structural features governing intermolecular forces.

Table 12.

Feature importance scores of the topological indices for predicting each physicochemical property, as determined by the Random Forest algorithm.

Feature BP MP CT CV MR
Inline graphic 0.103 0.118 0.072 0.098 0.053
Inline graphic 0.035 0.020 0.017 0.009 0.004
Inline graphic 0.084 0.079 0.050 0.039 0.016
Inline graphic 0.043 0.059 0.082 0.011 0.018
Inline graphic 0.036 0.034 0.035 0.021 0.017
Inline graphic 0.012 0.026 0.011 0.006 0.005
Inline graphic 0.169 0.232 0.107 0.175 0.146
Inline graphic 0.135 0.147 0.302 0.211 0.275
Inline graphic 0.149 0.114 0.135 0.260 0.250
Inline graphic 0.107 0.076 0.113 0.062 0.103
Inline graphic 0.125 0.095 0.075 0.109 0.113

The superior predictive performance of the First Zagreb index (Inline graphic) and the Multiplicative Sombor index (Inline graphic) can be interpreted in structural terms. The First Zagreb index, defined as the sum of the squares of vertex degrees, effectively quantifies the overall molecular branching and connectivity density. In the context of drug molecules, this correlates strongly with properties like molecular volume, surface area, and polarizability, which directly influence boiling points, critical volumes, and molar refractivity. Conversely, the Multiplicative Sombor index, based on the Euclidean norm of vertex degrees (Inline graphic), provides a more nuanced descriptor that is sensitive to the heterogeneity of the atomic environment within a molecule. Its product-based formulation amplifies its sensitivity to localized structural features and steric effects, making it particularly powerful for capturing complexities that govern solid-state properties like melting point and interactions related to critical temperature.

The predictive performance of the trained Random Forest model is comprehensively summarized in Table 14. The model achieved high accuracy, with coefficients of determination (Inline graphic) ranging from 0.9154 (Melting Point) to 0.9791 (Critical Volume). The low error metrics, particularly for Molar Refractivity (MAE = 2.757, RMSE = 4.372), confirm the model’s robustness.

Table 14.

Performance metrics (MAE, MSE, RMSE, Inline graphic) of the Random Forest regression model for each property.

Drugs MAE MSE RMSE r2
BP 22.441 1557.217 39.462 0.9536
MP 36.350 3300.074 57.446 0.9154
CT 20.216 1070.460 32.718 0.9300
CV 25.044 968.141 31.115 0.9791
MR 2.757 19.111 4.372 0.9561

A detailed comparison between the actual experimental values and the RF predicted values for all 38 compounds is cataloged in Table 13. The close agreement between these values demonstrates the model’s exceptional ability to generalize across a structurally diverse set of antidepressant drugs. Figures 5, 6, 7, 8, and 9 illustrate representative decision trees from the ensemble for each of the five target properties. These trees exemplify the simple, rule based logic employed at each node, showcasing how the model recursively partitions the feature space based on the topological indices to arrive at a prediction.

Table 13.

Comparison of actual values and random forest-predicted values for all five physicochemical properties.

Drugs Properties
BP MP CT CV MR
Actual Predicted Actual Predicted Actual Predicted Actual Predicted Actual Predicted
Bupropion 666.50 669.627550 394.64 412.839575 778.39 798.127525 728.50 691.287500 68.70 67.464000
Amitriptyline 751.01 751.602875 457.55 460.507125 856.98 857.196500 898.50 882.562500 93.40 90.687600
Effexor 766.61 756.954875 451.59 461.094350 812.60 830.249975 859.50 821.275000 83.18 81.508850
Fluoxetine 713.63 734.056675 410.29 436.292825 803.42 828.988325 861.50 865.907500 81.04 84.567275
Nefazodon 1092.30 1119.777650 812.28 869.038825 1072.62 1095.743125 1308.50 1242.495000 132.29 124.284350
Paxil 853.05 853.059325 600.10 669.315850 907.55 903.355775 888.50 906.720000 90.51 91.533875
Sertraline 788.23 768.149775 493.93 473.718375 872.67 858.505925 852.50 860.235000 85.99 85.806300
Trazodone 919.92 932.176625 716.19 730.724950 994.91 995.068800 984.50 995.592500 106.26 104.006275
Nomifensine 735.32 742.031650 481.13 478.367100 874.37 858.365450 719.50 751.855000 77.56 78.592300
Valproate 457.79 495.511025 252.95 295.570675 620.30 668.237550 492.50 484.242500 – –
Risperidone 1068.52 1118.422250 822.57 888.288675 1034.63 1090.795375 1144.50 1171.090000 114.21 117.413950
Buspirone 1045.74 1010.537675 850.24 846.886075 1065.22 1056.589575 1117.50 1047.705000 108.44 106.625850
Gabapentin 643.35 621.692300 465.83 434.704250 784.09 775.325750 523.50 521.327500 45.22 46.965025
Dopamine 643.09 636.820800 512.54 475.292950 800.17 796.441725 436.50 460.497500 42.63 43.496250
L-tyrosine 730.42 675.451925 557.69 492.189375 831.85 808.475450 494.50 530.975000 46.62 48.860500
L-theanine 702.27 643.555875 563.22 487.172250 872.17 821.082800 502.50 483.542500 42.53 43.161825
Mianserin 713.52 737.346600 478.58 486.138225 865.92 870.562700 786.50 832.610000 85.92 88.874525
Folate 1500.13 1334.185650 1358.86 1149.858675 1399.64 1267.577525 1186.50 1180.590000 – –
Meprobamate 663.79 654.061075 444.29 446.033750 755.19 768.603850 638.50 588.855000 53.73 50.869250
Amphetamine 504.29 558.308025 285.37 366.358800 700.68 746.524475 454.50 467.865000 43.69 43.645025
Dehydroepiandrosterone 837.91 846.614150 539.19 569.093925 850.34 869.242025 893.50 914.657500 84.02 87.301025
Pregnenolone 865.05 878.077075 539.20 640.780675 849.27 891.837425 1003.50 976.787500 93.11 93.994850
Citalopram 873.22 859.066125 571.52 572.511625 890.36 887.187850 977.50 954.222500 94.41 92.391625
Paroxetine 833.56 842.251000 893.48 779.958850 911.40 905.194150 885.50 898.622500 92.57 92.275750
Duloxetine 805.31 784.322575 536.28 515.318900 906.24 890.772725 864.50 873.275000 89.70 90.677900
Venlafaxine 674.87 696.230650 405.77 446.819550 809.54 830.148925 846.50 801.887500 82.01 78.531750
Desvenlafaxine 738.02 732.767325 504.79 507.961350 817.09 836.245050 701.50 709.465000 68.50 69.996625
Levomilnacipran 750.48 739.555150 516.93 498.045000 857.50 854.988700 767.50 773.130000 75.32 76.298900
Clomipramine 754.45 763.250875 479.31 491.701200 861.87 872.462125 960.50 917.445000 97.93 94.598350
Nortriptyline 597.85 611.737275 360.07 374.033525 803.75 802.148800 612.50 616.187500 61.17 61.904800
Mirtazapine 691.85 694.623950 566.66 529.455700 853.81 846.732825 588.50 629.627500 59.84 63.741125
Vilazodone 694.20 696.963250 467.86 481.428400 840.85 842.159200 693.50 679.492500 71.85 68.880225
Tranylcypromine 483.20 543.906975 279.51 345.239850 734.59 750.837400 455.50 487.535000 47.78 48.053500
Esketamine 682.82 688.528600 440.65 447.088275 847.57 845.176850 650.50 665.785000 70.88 69.754325
Agomelatine 719.40 720.417300 537.19 518.807550 871.67 862.763725 656.50 698.237500 68.51 71.269775
Moclobemide 754.38 734.984425 548.22 529.713800 928.78 894.372150 733.50 718.972500 74.24 71.889300
Clorgiline 594.50 617.446450 379.97 398.764525 810.89 806.356750 549.50 572.272500 56.24 58.145450
Tianeptine 713.06 716.202750 437.54 462.190850 833.21 840.597000 734.50 718.355000 69.75 70.153550

Fig. 5.

Fig. 5

A representative decision tree from the random forest ensemble model for predicting boiling point.

Fig. 6.

Fig. 6

A representative decision tree from the random forest ensemble model for predicting melting point.

Fig. 7.

Fig. 7

A representative decision tree from the random forest ensemble model for predicting critical temperature.

Fig. 8.

Fig. 8

A representative decision tree from the random forest ensemble model for predicting critical volume.

Fig. 9.

Fig. 9

A representative decision tree from the random forest ensemble model for predicting molar refractivity.

The overall efficacy of the model is further visualized in Fig. 11 through violin plots, which compare the distribution of actual values against the distribution of predictions for each property. The strong overlap in the shapes and positions of these distributions indicates that the RF algorithm successfully captured the underlying data trends without introducing significant bias. Finally, Fig. 10 provides a consolidated comparison of the correlation coefficients (r) achieved by the RF model for each property, offering a clear visual synopsis of its predictive strength across all endpoints.

Fig. 11.

Fig. 11

Violin plots comparing the distribution of actual values versus Random Forest predicted values for each physicochemical property.

Fig. 10.

Fig. 10

Correlation coefficients comparison.

In conclusion, the Random Forest regression model effectively leveraged the information encoded in the topological indices to build a highly accurate, non-linear predictive framework. Its performance represents a substantial improvement over the linear regression baseline, unequivocally demonstrating the value of integrating graph-theoretic descriptors with advanced machine learning ensembles for QSPR modeling.

Extreme gradient boosting (XGBoost) regression

To further optimize predictive performance and push the boundaries of model accuracy, we implemented the Extreme Gradient Boosting (XGBoost) algorithm. XGBoost is a highly sophisticated and computationally efficient variant of gradient-boosted decision trees, renowned for its state-of-the-art results in machine learning competitions and scientific applications 23. Unlike Random Forest, which builds trees in parallel, XGBoost employs a sequential, additive strategy where each new tree is constructed to correct the residual errors of the previous ensemble of trees. This iterative process of model refinement, combined with advanced regularization techniques to prevent overfitting, makes XGBoost exceptionally powerful for complex regression tasks.

The XGBoost model was trained using the same feature set of eleven topological indices to predict the five target properties. The core objective function that XGBoost optimizes is

graphic file with name d33e8140.gif

where l is a differentiable convex loss function (mean squared error in our case) measuring the difference between the actual value Inline graphic and the prediction Inline graphic from the previous iteration, Inline graphic is the new tree added at step t, and Inline graphic is a regularization term that penalizes the complexity of the model to ensure generality.

The predictive prowess of the XGBoost model is unequivocally demonstrated by the error metrics summarized in Table 16. The algorithm achieved near perfect fits, with coefficients of determination (Inline graphic) exceeding 0.99 for all five properties. Crucially, all error metrics Mean Absolute Error (MAE), Mean Squared Error (MSE), and Root Mean Squared Error (RMSE) were significantly lower than those produced by both the linear regression and Random Forest models. For instance, for Boiling Point prediction, XGBoost achieved an RMSE of 12.40 and an Inline graphic of 0.995, compared to the Random Forest’s RMSE of 39.46 and Inline graphic of 0.954. This represents a dramatic improvement in predictive precision.

Table 16.

Performance metrics (MAE, MSE, RMSE, Inline graphic) of the XGBoost regression model for each property.

Drugs MAE MSE RMSE r2
BP 8.59553 153.7925 12.40131 0.9954
MP 11.70513 278.1840 16.67885 0.9929
CT 8.22184 125.5067 11.20298 0.9918
CV 10.89980 207.6942 14.41160 0.9955
MR 0.78113 1.111332 1.05420 0.9976

A comprehensive comparison of the actual experimental values versus the values predicted by the optimized XGBoost model is presented in Table 15. The near one-to-one correspondence between these values for all 38 compounds underscores the model’s exceptional accuracy and its capacity to capture the underlying structure-property relationships with remarkable fidelity. The distribution of predictions is visually analyzed in Fig. 12 using violin plots. The near-perfect alignment between the shapes and densities of the actual and predicted value distributions for each property provides a powerful visual confirmation of the model’s lack of bias and its ability to accurately model the entire data distribution, not just its central tendency.

Table 15.

Comparison of actual values and XGBoost-predicted values for all five physicochemical properties.

Graphs Properties
Drugs BP MP CT CV MR
Structures Name Actual Predicted Actual Predicted Actual Predicted Actual Predicted Actual Predicted
Bupropion 666.50 666.5317 394.64 394.6552 778.39 778.6478 728.50 727.9913 68.70 68.6869
Amitriptyline 751.01 751.0388 457.55 457.5875 856.98 857.0193 898.50 897.9124 93.40 93.3821
Effexor 766.61 766.1779 451.59 451.7574 812.60 812.6411 859.50 859.6270 83.18 83.1761
Fluoxetine 713.63 713.8526 410.29 410.6014 803.42 803.6005 861.50 861.4367 81.04 81.0400
Nefazodon 1092.30 1092.2930 812.28 812.4066 1072.62 1072.5872 1308.50 1308.5006 132.29 132.2820
Paxil 853.05 853.0968 600.10 600.0571 907.55 907.5279 888.50 888.9536 90.51 90.5134
Sertraline 788.23 788.2437 493.93 493.8382 872.67 872.6605 852.50 852.5325 85.99 85.9913
Trazodone 919.92 919.9562 716.19 716.2708 994.91 994.9431 984.50 984.6302 106.26 106.2504
Nomifensine 735.32 735.7570 481.13 481.0310 874.37 873.9747 719.50 720.0745 77.56 77.5652
Valproate 457.79 457.9774 252.95 253.1431 620.30 620.4323 492.50 492.2214 – 43.6822
Risperidone 1068.52 1068.6509 822.57 822.5342 1034.63 1034.7020 1144.50 1144.7823 114.21 114.2194
Buspirone 1045.74 1045.7694 850.24 850.2981 1065.22 1065.2697 1117.50 1117.6051 108.44 108.4407
Gabapentin 643.35 643.4077 465.83 465.8810 784.09 784.1264 523.50 523.4375 45.22 45.2176
Dopamine 643.09 643.0272 512.54 512.4622 800.17 800.1103 436.50 436.9966 42.63 42.6489
L-tyrosine 730.42 729.9401 557.69 557.2011 831.85 831.5355 494.50 495.1339 46.62 46.6413
L-theanine 702.27 701.9200 563.22 562.8556 872.17 871.9004 502.50 502.1482 42.53 42.5286
Mianserin 713.52 713.5710 478.58 478.6441 865.92 865.9796 786.50 787.1010 85.92 85.9206
Folate 1500.13 1499.7179 1358.86 1358.4829 1399.64 1399.4009 1186.50 1186.0114 – 107.2616
Meprobamate 663.79 663.8794 444.29 444.3555 755.19 755.2429 638.50 637.9984 53.73 53.7134
Amphetamine 504.29 504.3177 285.37 285.4157 700.68 700.7059 454.50 454.8996 43.69 43.6822
Dehydroepiandrosterone 837.91 838.1828 539.19 539.1700 850.34 850.3903 893.50 893.5867 84.02 84.0351
Pregnenolone 865.05 865.0406 539.20 539.5748 849.27 849.5446 1003.50 1003.5129 93.11 93.1070
Citalopram 873.22 872.8798 571.52 571.4445 890.36 890.2676 977.50 976.8000 94.41 94.4051
Paroxetine 833.56 833.4883 893.48 893.2295 911.40 911.2128 885.50 885.3615 92.57 92.5721
Duloxetine 805.31 804.9014 536.28 535.7065 906.24 905.8825 864.50 864.5922 89.70 89.7206
Venlafaxine 674.87 675.2484 405.77 406.2054 809.54 809.8925 846.50 846.6295 82.01 81.9891
Desvenlafaxine 738.02 738.0596 504.79 504.8771 817.09 817.1414 701.50 701.4644 68.50 68.4998
Levomilnacipran 750.48 750.0231 516.93 516.4423 857.50 857.5543 767.50 766.6555 75.32 75.3423
Clomipramine 754.45 754.8616 479.31 479.7987 861.87 862.1710 960.50 960.6238 97.93 97.9124
Nortriptyline 597.85 597.8602 360.07 359.9925 803.75 803.7602 612.50 612.5038 61.17 61.1695
Mirtazapine 691.85 691.8172 566.66 566.3538 853.81 853.7427 588.50 588.9933 59.84 59.8599
Vilazodone 694.20 694.2600 467.86 467.8459 840.85 840.8160 693.50 693.5289 71.85 71.8490
Tranylcypromine 483.20 483.5710 279.51 279.8251 734.59 734.8457 455.50 455.4069 47.78 47.7764
Esketamine 682.82 682.8347 440.65 440.6061 847.57 847.5918 650.50 650.4558 70.88 70.8773
Agomelatine 719.40 719.4717 537.19 537.2916 871.67 871.7058 656.50 657.1031 68.51 68.5067
Moclobemide 754.38 753.9449 548.22 547.9759 928.78 928.4456 733.50 732.7550 74.24 74.2360
Clorgiline 594.50 594.7835 379.97 380.4126 810.89 810.8322 549.50 549.6376 56.24 56.2416
Tianeptine 713.06 713.0833 437.54 437.8108 833.21 833.2880 734.50 734.6199 69.75 69.7550

Fig. 12.

Fig. 12

Violin plots comparing the distribution of actual values versus XGBoost predicted values for each physicochemical property.

Comparative model analysis

A direct comparison of the error metrics from all three employed algorithms (Random Forest, and XGBoost) is graphically presented in Fig. 13 via a heatmap. This visualization allows for an immediate and intuitive assessment of relative model performance. The results clearly establish a performance hierarchy: XGBoost consistently outperformed Random Forest, which in turn significantly outperformed the linear regression baseline.

Fig. 13.

Fig. 13

Heatmap comparing the error metrics (MAE, MSE, RMSE, Inline graphic) of Random Forest, and XGBoost models across all properties.

This superiority can be attributed to XGBoost’s inherent advantages: its gradient boosting framework is specifically designed to minimize errors sequentially, its regularization controls complexity, and its handling of sparse data is highly efficient. These features make it ideally suited for learning the complex, non-linear mappings between the multidimensional topological descriptor space and the physicochemical properties.

Final comparisons between the actual values and the predictions from both ensemble methods are displayed in Figs. 14 and 15 for Random Forest and XGBoost, respectively. The superior convergence of the XGBoost-predicted data points (Fig. 15) onto the ideal Inline graphic line, compared to the greater spread seen in the Random Forest results (Fig. 14), offers a definitive visual proof of its enhanced predictive capability.

Fig. 14.

Fig. 14

Scatter plots of actual vs. random forest-predicted values for all five properties.

Fig. 15.

Fig. 15

Scatter plots of actual vs. XGBoost-predicted values for all five properties.

In summary, the XGBoost algorithm demonstrated itself as the most powerful predictive tool in this study. Its implementation resulted in a highly accurate, robust, and generalizable QSPR model that effectively translates graph-theoretic molecular descriptors into precise estimations of critical physicochemical properties, setting a new benchmark for computational efficiency and predictive accuracy in this domain.

Data splitting and validation strategy

To reduce overfitting and obtain an unbiased estimate of predictive performance, we used a deterministic 80/20 train test split on the full set of 38 antidepressant drugs. The training set contains the drugs from Bupropion to Nortriptyline, and the blind test set contains the drugs from Mirtazapine to Tianeptine. The blind set was kept completely unseen during descriptor processing, model fitting, and any performance based selection. Each drug was described by the 11 degree-based topological indices listed in Table 3. The predicted properties were boiling point (BP), melting point (MP), critical temperature (CT), critical volume (CV), and molar refractivity (MR) (see Table 4).

Model development was performed exclusively on the training set using 5-fold cross-validation (i.e., Inline graphic). For both the Random Forest and XGBoost algorithms, we utilized the default hyperparameters provided by their standard implementations (in Python’s scikit-learn and xgboost libraries, respectively), and no additional hyperparameter tuning was conducted. This approach was chosen to ensure a straightforward comparative analysis and to mitigate the risk of overfitting given the dataset size. We report fold-averaged Inline graphic, RMSE, and MAE in Table 17. After model selection, the models were refit on the full training set and evaluated once on the held-out blind test (Table 18). Two learners were considered Random Forest and XGBoost. No tuning was performed on the test set, and no information from the blind set was used during cross-validation or model selection. The outcomes from training cross-validation and blind testing align for MR and CV, indicating that the degree-based indices capture structural features relevant to molar refractivity and critical volume. These results provide a consistent account across cross-validated training measures and blind-test measures.

Table 17.

Five-fold cross-validation (training-only) mean performance with topological indices.

Property Model Inline graphic RMSE MAE
BP Random Forest 0.750 84.700 62.068
BP XGBoost 0.500 111.324 74.347
CT Random Forest -0.066 73.379 59.693
CT XGBoost -0.017 86.582 67.062
CV Random Forest 0.844 76.953 66.489
CV XGBoost 0.807 83.932 72.394
MP Random Forest -0.052 131.278 100.811
MP XGBoost -0.492 160.337 114.932
MR Random Forest 0.844 7.812 6.510
MR XGBoost 0.839 7.658 6.337

Table 18.

Blind test (held-out Mirtazapine to Tianeptine) performance with topological indices.

Property Model Inline graphic RMSE MAE
BP Random Forest 0.226 71.715 42.348
BP XGBoost 0.003 81.395 61.969
CT Random Forest -0.057 52.838 45.238
CT XGBoost -1.157 75.486 67.979
CV Random Forest 0.064 87.482 75.958
CV XGBoost 0.495 64.238 48.750
MP Random Forest -0.073 93.354 72.917
MP XGBoost -1.156 132.342 112.829
MR Random Forest 0.645 5.166 3.633
MR XGBoost 0.636 5.233 4.158

Concluding remarks

This study successfully demonstrates the potent synergy between graph-theoretic molecular descriptors and modern machine learning algorithms for advanced Quantitative Structure-Property Relationship (QSPR) modeling. We computed a comprehensive set of eleven topological indices, encompassing both classical and novel multiplicative variants, for 38 diverse antidepressant compounds. These indices served as robust numerical descriptors encoding key aspects of molecular structure.

Our investigation reveals that while simple linear regression models established statistically significant baseline relationships with the First Zagreb index (Inline graphic) emerging as a particularly strong linear predictor their performance was substantially surpassed by non-linear ensemble methods. The Random Forest algorithm provided a significant boost in predictive accuracy by effectively capturing complex, non-linear interactions within the descriptor space. Ultimately, the Extreme Gradient Boosting (XGBoost) algorithm delivered state-of-the-art performance, achieving exceptional predictive accuracy for all five physicochemical properties boiling point, melting point, critical temperature, critical volume, and molar refractivity as evidenced by near-perfect coefficients of determination (Inline graphic) and minimal error metrics (e.g., Inline graphic for boiling point).

While this study demonstrates a powerful and highly accurate predictive framework, it is important to acknowledge that the model was trained on a dataset of 38 antidepressant drugs. Although this represents a meaningful expansion from earlier studies and encompasses significant structural diversity, the dataset size remains a limitation from a machine learning perspective. The exceptional performance metrics (e.g., Inline graphic) indicate a strong learned relationship, but the generalizability of the model would be further strengthened by applying this methodology to larger and more diverse chemical datasets in future work. Such expansion would serve to rigorously validate the robustness of the identified structure-property relationships and enhance the model’s predictive power across a broader chemical space.

This work underscores that multiplicative topological indices are not merely mathematical abstractions but practical and powerful tools for computational pharmaceutical science. The proposed interdisciplinary framework, integrating concepts from chemical graph theory, statistics, and machine learning, offers a highly accurate and efficient strategy for predicting critical drug properties. This approach can significantly accelerate the preliminary stages of drug discovery and design by reducing the reliance on costly and time-consuming experimental measurements. Future work will focus on extending this methodology to a broader range of compound classes and biological endpoints, further validating its utility as a cornerstone of modern computational chemistry.

Acknowledgements

This work is partially supported by the Key Scientific and Technological Project of Henan Province, China (grant No. 242102521023).The authors extend their appreciation to the Deanship of Research and Graduate Studies at King Khalid University for funding this work through Large Research Project under grant number RGP2/437/46

Author contributions

Conceptualization: S. N, S. A, M. E. M. A, M. E. D, A. A, K. A. T Methodology: S. N, S. A, A. A Formal Analysis: G. Z, S. A, M. E. M. A, M. E. D, K. A. T Validation: G.Z, S. N, S. A, M. E. M. A, M. E. D, A. A, K. A. T Writing original draft: S. N, S. A, A. A Writing review and editing: G. Z, M. E. M. A, M. E. D, K. A. T

Data availability

All data generated or analysed during this study are included in this published article

Declarations

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Ahmed, W. et al. Molecular insights into anti-Alzheimers drugs through eccentricity-based predictive mathematical modeling using regression and QSPR analysis. J. Mol. Eng. Mater2024, 2450016 (2024). [Google Scholar]
  • 2.Almohanna, N. et al. Characterization of entropy measures with connection number based indices of boric acid hydrogen-bonded 2D lattice sheets. Sci. Rep.14(1), 27807 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Ahmed, W. et al. A Python based algorithmic approach to optimize sulfonamide drugs via mathematical modeling. Sci. Rep.14(1), 12264 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Wiener, H. Structural determination of paraffin boiling points. J. Am. Chem. Soc.69(1), 17–20 (1947). [DOI] [PubMed] [Google Scholar]
  • 5.Eliasi, M., Iranmanesh, A. & Gutman, I. Multiplicative versions of the first Zagreb index. MATCH Commun. Math. Comput. Chem.68, 217–230 (2012). [Google Scholar]
  • 6.Gutman, I. & Trinajstic, N. Graph theory and molecular orbitals. Total -electron energy of alternant hydrocarbons. Chem. Phys. Lett.17(4), 535–538 (1972). [Google Scholar]
  • 7.Kulli, V. R. Hyper Zagreb index of a graph. Int. J. Chem. Graph Theory1(1), 9–16 (2016). [Google Scholar]
  • 8.Liu, H. Multiplicative Sombor indices and their chemical applicability. J. Comput. Chem.43(2), 120–127 (2022). [Google Scholar]
  • 9.Wang, W., Nisar, A., Fahad, A., Qureshi, M. I. & Alameri, A. Modified Zagreb connection indices for benes network and related classes. J. Math., 2022, 8547332 10.1155/2022/8547332 (2022) [DOI]
  • 10.Lee, J. R. et al. On ev and ve-degree based topological indices of silicon carbides. Comput. Model. Eng. Sci.130(2), 871–885. 10.32604/cmes.2022.016836 (2022). [Google Scholar]
  • 11.Tang, J. H., Abid, M., Ali, K., Fahad, A., Chaudhry, M. A., Qureshi, M. I. & Liu, J. B. On computation of edge degree‐based banhatti indices of a certain molecular. J. Math.2021, 5185270. 10.1155/2021/5185270 (2021). [DOI]
  • 12.Yang, Y., Jin, B. B., Sun, X., Zhang, X. D., Li, B., Zhao, K. & Wang, H. Exact counting of subtrees with diameter no more than d in trees: A generating function approach, Inf. Comput., 307, 105353. (2025).
  • 13.Delgado, P. L. Depression: The case for a monoamine deficiency. J. Clin. Psychiatry61(Suppl 6), 7–11 (2000). [PubMed] [Google Scholar]
  • 14.Krishnan, V. & Nestler, E. J. The molecular neurobiology of depression. Nature455(7215), 894–902 (2008). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Rush, A. J. et al. Acute and longer-term outcomes in depressed outpatients requiring one or several treatment steps: A STAR*D report. Am. J. Psychiatry163(11), 1905–1917 (2006). [DOI] [PubMed] [Google Scholar]
  • 16.Papakostas, G. I. et al. Augmentation of antidepressants with atypical antipsychotics for treatment-resistant major depressive disorder: A meta-analysis. J. Clin. Psychiatry68(6), 826–831 (2007). [DOI] [PubMed] [Google Scholar]
  • 17.Mischoulon, D. & Fava, M. Role of S-adenosyl-L-methionine in the treatment of depression: A review of the evidence. Am. J. Clin. Nutr.76(5), 1158S-1161S (2002). [DOI] [PubMed] [Google Scholar]
  • 18.Young, S. N. Folate and depression a neglected problem. J. Psychiatry Neurosci.32(2), 80–82 (2007). [PMC free article] [PubMed] [Google Scholar]
  • 19.Schmidt, P. J. & Rubinow, D. R. Sex hormones and mood in the perimenopause. Ann. N. Y. Acad. Sci.1052(1), 27–44 (2005). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Sheridan, R. P. Time-split cross-validation as a method for estimating the goodness of prospective prediction. J. Chem. Inf. Model.53(4), 783–790 (2013). [DOI] [PubMed] [Google Scholar]
  • 21.Svetnik, V. et al. Random forest: a classification and regression tool for compound classification and QSAR modeling. J. Chem. Inf. Comput. Sci.43(6), 1947–1958 (2003). [DOI] [PubMed] [Google Scholar]
  • 22.Osisanwo, F. et al. Supervised machine learning algorithms: Classification and comparison. Int. J. Comput. Trends Technol.48(3), 128–138 (2017). [Google Scholar]
  • 23.Chen, J. et al. Improved XGBoost model based on genetic algorithm. Int. J. Comput. Appl. Technol.62(3), 240–245 (2020). [Google Scholar]
  • 24.Ahmed, W. et al. Molecular insights into anti-Alzheimers drugs through predictive modeling using linear regression and QSPR analysis. Mod. Phys. Lett. B2024, 2450260 (2024). [Google Scholar]
  • 25.Ahmed, W. et al. Exploring the role of topological descriptors to predict physicochemical properties of anti-HIV drugs by using supervised machine learning algorithms. BMC Chem.18(1), 167 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Ahmed, W., Zaman, S. & Khalid, F. Analyzing polycyclic aromatic hydrocarbons using topological indices and QSPR analysis to reveal molecular complexity. J. Micromech. Mol. Phys.2024, 2450006 (2024). [Google Scholar]
  • 27.Cherkasov, A. et al. QSAR modeling: where have you been? Where are you going to?. J. Med. Chem.57(12), 4977–5010 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Hosamani, S. M. & Gutman, I. Eccentric connectivity index: Chemical applications. Indian J. Chem.53A, 505–508 (2014). [Google Scholar]
  • 29.Hayat, S. et al. Optimizing predictive models for evaluating the F-temperature index in predicting the -electron energy of polycyclic hydrocarbons, applicable to carbon nanocones. Sci. Rep.14(1), 25494 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Kier, L. B. & Hall, L. H. Molecular connectivity in structure-activity analysis (John Wiley & Sons, 1986). [Google Scholar]
  • 31.Randic, M. Characterization of molecular branching. J. Am. Chem. Soc.97(23), 6609–6615 (1975). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

All data generated or analysed during this study are included in this published article


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES