# Prediction of Drug Interactions Using Graph-Topological Features and GNN

Navyasree Balamuralidhar, Pranav Surendran, Gaurav Singh, Shrutilipi Bhattacharjee, Ramya D. Shetty

<figure><img src="image_1.png" /></figure>

## To cite this version:

Navyasree Balamuralidhar, Pranav Surendran, Gaurav Singh, Shrutilipi Bhattacharjee, Ramya D. Shetty. Prediction of Drug Interactions Using Graph-Topological Features and GNN. 19th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI), Jun 2023, León, Spain. pp.135-144, 10.1007/978-3-031-34107-6_11. hal-05498088

HAL Id: hal-05498088

https://inria.hal.science/hal-05498088v1

Submitted on 6 Feb 2026

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>
<figure><img src="image_3.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
<figure><img src="image_4.png" /></figure>

# Prediction of Drug Interactions Using Graph-Topological Features and GNN

Navyasree Balamuralidhar, Pranav Surendran, Gaurav Singh(✉),
Shrutilipi Bhattacharjee, and Ramya D. Shetty

Department of Information Technology, National Institute of Technology Karnataka,
Surathkal Mangaluru, India

{navya.191it135,pranavsurendran.191it239,gauravsingh.191it218,
shrutilipi,ramyadshetty.207it004}@nitk.edu.in

**Abstract.** The risk of side effects is sometimes inevitable every time two or more drugs are prescribed together, and these side effects of varying adversity levels can be referred to as drug-drug interactions (DDI). Massive amounts of data and the constraints of experimental circumstances result in clinical trials for medication compatibility being time-consuming, risky, expensive, and impractical. Recent research has demonstrated that DDI can be modelled as graphs and experimentally shown that deep learning on graphs can be a practical choice for determining the correlation and side effects of taking multiple medications simultaneously. We propose a novel approach to use inductive graph learning with GraphSAGE, along with topological features, to leverage the structural information of a graph along with the node attributes. An experimental study of the approach is done on a publicly available subset of the DrugBank dataset. We achieve our best results that are comparable with state-of-the-art works using degree, closeness and PageRank centrality measures as additional features with less computational complexity. This study can provide a reliable and cost-effective alternative to clinical trials to predict dangerous side effects, ensuring the safety of patients.

**Keywords:** Graph Neural Network · centrality measures · drug-drug interaction · topological feature generation · GraphSAGE

## 1 Introduction

Experimentation on drug compatibility is time-consuming, expensive, infeasible for large-scale data, and sometimes dangerous [1]. While there exist significant amounts of biomedical data regarding the phenotypic structures of the drugs themselves, only a tiny percentage of the total combinations have known and recorded side effects [2]. To avoid risks of damage to humans and, at the same time, to maintain a high confidence level of interaction prediction, artificial intelligence and deep neural networks have made significant progress. Due to the critical need for accurate predictions of drug interaction events, the research area

© IFIP International Federation for Information Processing 2023

Published by Springer Nature Switzerland AG 2023

I. Maglogiannis et al. (Eds.): AIAI 2023, IFIP AICT 676, pp. 135–144, 2023.

https://doi.org/10.1007/978-3-031-34107-6_11
has been increasingly gaining focus. On the other hand, graph neural networks have been gaining popularity in various research domains. The edge classification tasks aim to predict the exact type of interaction or link that occurs between two entities. More crucial domains, such as the pharmacological field [4], also require a similar type of behavioural analysis on substances and compounds that are currently being prescribed to patients all over the world. The drug-drug interactions (DDI) can be modelled as a graph with each drug as a node and the edges connecting them representing side effects. Information about the drugs in node embedding can be given as input to the graph neural network. Node embeddings are the vectors that describe the node properties, here, drug features, in a network. An edge classification approach can be used to predict the edge type or interaction event between two drugs.

Recent studies [2,3] have experimentally shown that deep learning on graphs can be a viable option when it comes to an understanding the correlation and side effects of taking different drugs concurrently and hence provide a degree of safety with fewer resources. Graph neural networks (GNNs) have been gaining popularity because graphs can easily represent different types of real world objects, such as images, text, object entities, and their inter-relationships with each other. Nguyen et al. [6] assumes the existence of latent features with latent interactions in a hypergraph created by linking two drugs and their associated side effect with one edge. The drug features and the hypergraph are encoded to preserve the sparsity of the data. Rohani et al. [2] selects the most informative and less redundant subset of similarity types by a heuristic process and is integrated by a non-linear similarity fusion method. Liu et al. [3] employs the attention neural network to learn attention vectors of each of the specific drug-drug pairs to predict interactions. Acharya et al. [5] extends the feature selection algorithm to GNNs with a ranking algorithm for extracted features. Lin. et al. [1] predicts DDI events based on multi-source drug fusion, multi-source feature fusion and a transformer self-attention mechanism with auto-encoders to learn latent representations of the drugs. Cui et al. [7] does an empirical study to shed light on the importance of artificial positional and structural node features in a GNN.

Most of the works [11,12] that have adopted graphical approaches for the DDI problem only deal with link prediction between two drugs using similarity measures. Our work provides a way to classify the interaction event into one of the hundred different interaction types recorded by DrugBank. Hypergraph link prediction [3] can also predict the side-effect between two drugs, however, the creation, manipulation and the learning of hypergraphs is more complex than that of regular graphs as is used in our study. We use the GraphSAGE model to learn the topological features (centrality measures) of the graph to predict interaction events [10]. Therefore, the main contributions of this study are as follows:

- This work effectively adds the topological features information of the graph into node embedding, which is learnt with a model that is compatible with dynamic data for when the need arises
- We propose a computationally efficient methodology using GraphSAGE to tackle the task of DDI prediction

- Our experiments conclusively prove that the use of topologically derived features improves the performance of the GraphSAGE model.

The rest of the paper is organized as follows. Section 2 describes the working of the GraphSAGE model. It also outlines the topological feature generation techniques experimented with in this work. In Sect. 3, we present the proposed model’s experimental results with each feature generation type and summarize our findings. Finally, we present our conclusions and future scope in Sect. 4.

<figure><img src="image_5.png" /><figcaption>**Fig. 1.** Architecture of the proposed model. Graph centrality measures are computed for each node in the graphical network to generate new features, provided as input to the GraphSAGE network to obtain the predicted edge class, which is the type of side-effect between the two drugs.</figcaption></figure>

## 2 Methodology

The diagrammatic representation of the methodology followed in this study is shown in Fig. 1. The following section deals with the details of each stage of the proposed model architecture.
## 2.1 Graph Neural Network for DDI Modeling

The primary motivation for using GNNs for the DDI analysis is their ability to represent real-world objects and behaviours in a way that their inherent structural properties can be leveraged. The interactions between drugs are represented as a graph with the drugs represented as nodes and the side-effect as the edges between the two drug nodes, as shown in Fig. 2. The ability to represent information about each drug as a low-dimensional node embedding is another merit of GNNs. Let $G = (V, E)$, where $V$ is the set of vertices representing the drug, and $E$ is the edges representing their mutual side effects. The features of a given node $v$ are represented as the vector $f_v$, and the complete set of node feature vectors as $\{f_v, \forall v \in V\}$.

<figure><img src="image_6.png" /><figcaption>Fig. 2. Modeling the datasets into a graph with the drugs as the nodes and the side effects as the edges. Every node has its respective node embeddings.</figcaption></figure>

## 2.2 GraphSAGE

GraphSAGE [10] is a representation learning algorithm useful for static and dynamic graphs as it can predict the embedding of a new node without retraining the model. It works on the assumption that the nodes that are in the neighbourhood will have similar embeddings. The main advantage of using GraphSAGE is that this model can be easily modified to work with dynamic graphs as and when the need to test new drugs arises. This paper focuses on the learning of static graphs, assuming that the nodes are the drugs and the interactions are the edges of the graphs. There are two major components of GraphSAGE, as follows:

- Context Construction: GraphSAGE works under the assumption that the nodes present in the same neighbourhood are likely to have similar node embeddings. The definition of a neighbourhood in relation to GraphSAGE is a sample of a uniformly picked fixed number of nodes.
- Information Aggregation: Aggregation functions take the neighbourhood as input and combine the neighbours' embeddings with weights to create an embedding of the neighbourhood. The mean aggregator provides a nearly similar propagation rule as is currently prevalent in graph convolutional neural networks. The only difference being that it does not concatenate the previous node embeddings with the current embeddings generated after information aggregation from the neighbouring nodes. At the beginning of each iteration, the node's vicinity is sampled, and the data from the sampled nodes are combined into a single vector. Hence, at the $k^{th}$ layer, the node $v$ will have information aggregated as an embedding $h_N^t(v)$ given by:

$$h_N^t(v) = AGG_k(h_u^{(k-1)}) \quad (1)$$

$h_u^{(k-1)}$ represents the embeddings of node $u, \forall u \in U$, where $U$ is the set of all the sampled neighbouring nodes of the node $v$ and $AGG_k$ represents the aggregator function at the $k^{th}$ layer. This aggregated embedding is then combined with the embedding of the node from the previous layer $h_v^{(k-1)}$ which is then followed by applying the weights of the model and the result is passed through an activation function. The embedding is calculated for the layer $k$, node $v$ as:

$$h_v^k = \sigma(W^k \text{CONCAT}(h_v^{(k-1)}, h_N(v)^k)) \quad (2)$$

where $W^k$ is the weight matrix and $\sigma$ is the ReLU activation function. This work uses the mean aggregator due to its high performance with least expensive computational power and time complexity.

The RAdam Optimiser with focal loss is used due to its improved performance in cases of class imbalance. RAdam Optimiser is a variant of the Adam Optimiser as it rectifies the issue with variance and generalisation apparent with the Adam optimiser and other adaptive learning optimisers.

## 2.3 Feature Generation

Feature generation [7] techniques involve processing existing features and information to create more effective features that can help neural networks in their respective tasks. In graph analytics, centrality measures are used to find the degree of importance of a node in a network [15, 16]. These measures give meaningful insight into the structural and positional information of a node and hence can be used as node embeddings [7, 9]. Another node embedding technique, namely, DeepWalk, [13] has also been implemented and discussed below.

**Degree Centrality.** The degree centrality [14] of a node is the number of connections or edges it has. The degree of each node can also be assigned the fraction of edges it has compared to the node with the maximum number of connections. This centrality measure uses the intuitive principle that the more connections a node has, the more important it is.
**Closeness Centrality.** As the name suggests, closeness centrality [9] indicates how close a node is to the remaining nodes in the graph. It is inversely proportional to the sum of the shortest path lengths of the given node from the rest of the nodes in a connected graph. The formula for calculating the closeness centrality is given by,

$$Cx = \frac{1}{\sum_{y} d(x, y)} \qquad (3)$$

**Eigenvector Centrality.** Eigenvector centrality [7] allows us to measure the transitive influence of the nodes. A higher eigenvector score means that a node is in turn connected to several nodes who are themselves connected to many nodes, or have high scores. It is calculated as follows:

$$x_v = \frac{1}{\lambda} \sum_{t \in M(v)} x_t \qquad (4)$$

Here $M(v)$, is a set of the neighbours of node $v$, $\lambda$ is a constant and $x_v$, $x_t$ represent the relative centrality score for the vertex $v$ and $t$ respectively.

**PageRank.** PageRank [3] is a technique of using the incoming links in a directed graph to generate a ranking structure for the nodes in a graph. Furthermore, it takes into account the centrality or the importance of the nodes from which it receives incoming links. Let $A = (a_{i,j})$ be the adjacency matrix of a directed graph. The PageRank centrality $x_i$ of node $i$ is given by :

$$x_i = \alpha \sum_k \frac{a_{k,i}}{d_k} x_k + \beta \qquad (5)$$

where $\alpha$ and $\beta$ are constants and $d_k$ is the out-degree of node $k$ if such degree is positive, or $d_k = 1$ if the out-degree of $k$ is null.

**DeepWalk.** DeepWalk [13] is a simple neural network that captures the co-interactions within graphs and encode them into node embeddings which can be used by GNNs to improve their performance. DeepWalk utilizes this for learning latent representations of the nodes in the graph.

These centrality measures are calculated for each node and appended to the list of node features before it is provided as input to GraphSAGE. Once the value for the particular centrality measure is obtained, it is added to the existing list of features. A different approach to incorporating the centrality measures is also implemented in which we consider one subgraph at a time. This subgraph consists of all the edges of a single type, and the centrality measures are calculated for each of these subgraphs. Hence, each node gets K generated
features where *K* is the number of edge types. Here, *K* = 100. These values form a vector of size *K* which is appended to the list of existing features. This method is hereby referred to as the 100-vector approach.

# 3 Experiments and Results

This section presents a detailed experimental analysis of the dataset used and the different feature generation techniques implemented and evaluated.

## 3.1 Dataset

A combination of two datasets [8] is used for evaluating the approach. The first dataset consists of drug information, such as drug ID, drug name, target, enzyme and the structure of chemical species of the drug, known as SMILE (Simplified Molecular Input Line Entry). The second dataset has the mechanism and action between different pairs of drugs. The combination of the mechanism and action indicates the side-effect between the pair of drugs and hence acts as the class label. The data consists of 1258 drugs and 100 interaction event types with a total of 323539 DDI information.

## 3.2 Experimental Setup

The train-val-test split of the data is 80%, 10% and 10%, respectively. The input features after centrality computation are passed to the GraphSAGE model which consists of one GraphSAGE block with two layers and an additional layer. The mean aggregator function used in all layers. RAdam optimizer is used with a learning rate of 0.01, and the focal loss function is used with a $\gamma$ value equal to 2. The training was carried on for 700 epochs; however the optimum results were reached at around 400-500 epochs. The evaluation metrics used are Area under ROC curve (AUC), F1 score, precision and recall. The evaluation of the experiments carried out is recorded in Table 1 and the variation of AUC scores with each epoch during training is shown in Fig. 3.

The initial stage of the experiment is carried out with default features available in the dataset (recorded as without feature generation experiment in Table 1). In further stages of the experiment, we incorporated the significant centrality measures such as degree, closeness, eigenvector and PageRank and another embedding technique, DeepWalk, along with its combinations. All these different experiment combinations have been conducted using the standard GraphSAGE model.

The 100-vector approach of incorporating centrality measures has also been implemented. Table 2 shows the results after running K-Fold cross validation on the dataset with $K = 5$.

The results in Table 2 show that degree centrality outperforms all other experiments. A rationale of why degree centrality is so high performing likely comes from how it relays information to the model about the nodes with high degree
<table><caption>**Table 1.** Evaluation metrics of experiments with and without feature generation techniques</caption><thead><tr><th>Experiment</th><th>AUC</th><th>F1 Score</th><th>Precision</th><th>Recall</th></tr></thead><tbody><tr><td>Without feature generation</td><td>0.9981</td><td>0.8772</td><td>0.8778</td><td>0.8785</td></tr><tr><td>Closeness centrality</td><td>0.9988</td><td>0.9003</td><td>0.9006</td><td>0.9011</td></tr><tr><td>Degree centrality</td><td>0.9995</td><td>0.9318</td><td>0.9320</td><td>0.9318</td></tr><tr><td>Degree + Closeness</td><td>0.9990</td><td>0.9090</td><td>0.9093</td><td>0.9098</td></tr><tr><td>Eigenvector Centrality</td><td>0.9965</td><td>0.8518</td><td>0.8531</td><td>0.8538</td></tr><tr><td>PageRank</td><td>0.9990</td><td>0.9104</td><td>0.9104</td><td>0.9109</td></tr><tr><td>Combined measures</td><td>0.9896</td><td>0.5869</td><td>0.6905</td><td>0.5959</td></tr><tr><td>DeepWalk</td><td>0.9982</td><td>0.8836</td><td>0.8839</td><td>0.8841</td></tr><tr><td>DeepWalk + PageRank</td><td>0.9968</td><td>0.8522</td><td>0.8545</td><td>0.8534</td></tr></tbody></table>

<figure><img src="image_7.png" /><figcaption>**Fig. 3.** AUC score variation during training of GraphSAGE model</figcaption></figure>

<table><caption>**Table 2.** Averaged evaluation metrics of experiments with and without feature generation techniques for 5-fold crossvalidation training</caption><thead><tr><th>Experiment</th><th>AUC</th><th>F1 Score</th><th>Precision</th><th>Recall</th></tr></thead><tbody><tr><td>Without feature generation</td><td>0.9966</td><td>0.9077</td><td>0.9084</td><td>0.9085</td></tr><tr><td>Degree</td><td>0.9985</td><td>0.9162</td><td>0.9165</td><td>0.9165</td></tr><tr><td>Closeness</td><td>0.9980</td><td>0.8958</td><td>0.8962</td><td>0.8962</td></tr><tr><td>Degree + Closeness</td><td>0.9981</td><td>0.8817</td><td>0.8849</td><td>0.8823</td></tr><tr><td>PageRank</td><td>0.9982</td><td>0.8916</td><td>0.8942</td><td>0.8945</td></tr><tr><td>DeepWalk</td><td>0.9978</td><td>0.9294</td><td>0.9294</td><td>0.9297</td></tr><tr><td>Eigenvector</td><td>0.9982</td><td>0.8928</td><td>0.8935</td><td>0.8940</td></tr></tbody></table>
centrality. A high degree centrality of a node (drug) implies that there is a side effect for a wide range of drugs paired with the one in question which implies that a new unseen node in the network also has a strong probability of having a side effect with the high centrality node of that given interaction type (class label). The 100-vector approach provides similar results to that of the regular approach because while it provides more categorical context with respect to the edge type for the classification task, the limitation remains that the final vector is very sparse.

# 4 Conclusions

Prediction of side effects between medically prescribed drugs is highly critical for safe, effective treatment of patients globally. This study can offer a trustworthy and affordable substitute for clinical trials to forecast harmful side effects while maintaining patient safety. Predictive models with graph convolutional neural networks is an emerging field of interest that has not been intensively studied for drug-drug interactions. Graph centrality measures as new features in the DDI prediction task is one of the novel approach that has been studied here. Our work takes the interaction mechanism of various drugs and information about the enzyme, target and structural information of the drug compound to perform feature generation on this conceptualised graph. It is observed that the centrality measures play a crucial role in network analysis by which important nodes in a network are identified from a structural context. This work looks at closeness, degree, eigenvector and PageRank centrality along with DeepWalk to analyse a drug network where drugs as the nodes are connected based on their side effects. The empirical results show that centrality measures do play a critical role in determining drug-drug interactions. The performance of the proposed model with GraphSAGE has been validated on a subset of the standard Drug-Bank dataset and has achieved improved results for degree centrality measure. This work can provide significant contributions to the field and has a high scope for further research studies. Several improvements can be made on this approach, such as the use of data augmentation techniques and the classification of interaction events based on severity levels. We are currently working on implementing the Graph Attention Network (GAT) and Graph Convolutional Network (GCN) models and creating a comparative analysis to further our study.

# References

1. Lin, S., et al.: MDF-SA-DDI: predicting drug-drug interaction events based on multi-source drug fusion, multi-source feature fusion and transformer self-attention mechanism. In: Briefings in Bioinformatics, vol. 23, January 2022. https://doi.org/10.1093/bib/bbab421

2. Rohani, N., Eslahchi, C.: Drug-drug interaction predicting by neural network using integrated similarity. Sci. Rep. 9, 13645 (2019). https://doi.org/10.1038/s41598-019-50121-3
3. Liu, S., et al.: Enhancing drug-drug interaction prediction using deep attention neural networks. IEEE/ACM Trans. Comput. Biol. Bioinform. 20, 976-985 (2022). https://doi.org/10.1109/TCBB.2022.3172421

4. Yan, C., Duan, G., Zhang, Y., Wu, F.-X., Pan, Y., Wang, J.: Predicting drug-drug interactions based on integrated similarity and semi-supervised learning. IEEE/ACM Trans. Comput. Biol. Bioinform. 19(1), 168-179 (2022). https://doi.org/10.1109/TCBB.2020.2988018

5. Acharya, D.B., Zhang, H.: Feature Selection and Extraction for Graph Neural Networks. In: Proceedings of the 2020 ACM Southeast Conference (ACM SE 2020), pp. 252-255 (2019)

6. Nguyen, D.A., Nguyen, C.H., Petschner, P., Mamitsuka, H.: SPARSE: a sparse hypergraph neural network for learning multiple types of latent combinations to accurately predict drug-drug interactions. Bioinformatics. 38, i333-i341 (2022). https://doi.org/10.1093/bioinformatics/btac250

7. Cui, H., Lu, Z., Li, P., Yang, C.: On positional and structural node features for graph neural networks on non-attributed graphs. In: Proceedings of the 31st ACM International Conference on Information & Knowledge Management, pp. 3898-3902 (2022). https://doi.org/10.1145/3511808.3557661

8. Zhou, J., et al.: Graph neural networks: a review of methods and applications. AI Open. 1, 57-81 (2020). https://doi.org/10.1016/j.aiopen.2021.01.001

9. Kenga, Y.Y., Kwa, K.H., Ratnavelu, K.: Centrality analysis in a drug network and its application to drug repositioning. In: Applied Mathematics and Computation, vol. 395 (2021)

10. Hamilton, W.L., Ying, R., Leskovec, J.: Inductive representation learning on large graphs. In: Proceedings of the 31st International Conference on Neural Information Processing Systems, pp. 1025-1035 (2017)

11. Abbas, K., et al.: Application of network link prediction in drug discovery. BMC Bioinform. 22, 187 (2021). https://doi.org/10.1186/s12859-021-04082-y

12. Lu, Y., Guo, Y., Korhonen, A.: Link prediction in drug-target interactions network using similarity indices. BMC Bioinform. 18, 1-9 (2017). https://doi.org/10.1186/s12859-017-1460-z

13. Perozzi, B., Al-Rfou, R., Skiena, S.: DeepWalk: online learning of social representations. In: Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 701-710 (2014). https://doi.org/10.1145/2623330.2623732

14. Powell, J., Hopkins, M.: Graph analytics techniques. in A Librarian's Guide to Graphs. Chandos Publishing, Data and the Semantic Web (2015). ch. 19

15. Shetty, R.D., Bhattacharjee, S., Dutta, A., Namtirtha, A.: GSI: an influential node detection approach in heterogeneous network using COVID-19 as use case. In: IEEE Transactions on Computational Social Systems, pp. 1-15 (2022). https://doi.org/10.1109/TCSS.2022.3180177

16. Shetty, R.D., Bhattacharjee, S.: Weighted GNN-based betweenness centrality considering stability and connection structure. In: 15th International Conference on Communication Systems & NETworkS (COMSNETS), Bangalore, India, 2023, pp. 304-308 (2023). https://doi.org/10.1109/COMSNETS56262.2023.10041296