## 3 Methods
### Substructure Graph Convolution Operator  
[PERSON] [41] and [PERSON] et al. [42] have shown that learning features from chemical entity molecules provides more information than manually extracting molecule representations (e.g., molecular fingerprints). Conventional techniques include graph neural networks (GNNs)--deep learning methodologies tailored for data with a graph-oriented structure. Predominantly, GNNs comprise layers of graph convolutional operators. In these layers, node attributes are refreshed by amalgamating features from adjacent nodes [43]. In this work, graph attention network (GAT) layers [29] are used as the convolutional operator for node feature updating. Attention mechanisms allow the model to handle inputs of variable sizes and focus on the parts of the features that are highly correlated. A linear transformation is applied to all node features in the graph:  
\[\mathbf{\hat{h}}_{s}^{(l+1)}=\mathbf{W}^{(l+1)}\mathbf{h}_{s}^{(l)},s=1,...,n, \tag{1}\]  
where \(\mathbf{W}^{(l+1)}\in\mathbf{R}^{F\times F}\) is a learnable transformation matrix from the \(l\)-th GAT layer to the \((l+1)\)-th GAT layer. They determine the subspaces of node features and the interactions between subspaces. We use attention mechanisms [44] to determine the importance of each (neighboring) node \(j\) in neighborhood \(N_{(l)}\) of node \(i\) and represent it as \(\alpha_{ij}\in\mathbf{R}\). This importance indicates that every node \(j\in N_{(l)}\) does not hold consistent significance when revising the feature vector of node \(i\). Consequently, each node is endowed with a mutable significance weight \(\alpha_{ij}\). The self-importance of node \(i\), denoted as \(\alpha_{ii}\), is also factored in to preserve intrinsic information. The significance of node \(j\) relative to node \(i\), represented by \(\alpha_{ij}\), is calculated in the ensuing manner:  
\[\alpha_{ij}=\frac{exp(leakyRelu(e_{ij}))}{\sum_{s\in\mathcal{A}_{ij}\cup i} exp(LeakyRelu(e_{is}))} \tag{2}\]  
In this equation, \(LeakyRelu\) is an activation function (used to mitigate the zero-gradient problem that may occur with the ReLU activation function) and \(e_{ij}\) is a learnable weight,  
Figure 1: DDI-SSL model framework.  
the inner product of which is \(\mathbf{a}\in\mathbf{R}^{2\mathcal{B}^{\prime}}\). We concatenate \(\mathbf{\hat{h}}_{i}^{(l+1)}\) and \(\mathbf{\hat{h}}_{j}^{(l+1)}\) using Equation (1) to obtain the following equation:  
\[\mathbf{e}_{ij}=\mathbf{a}^{T}(\mathbf{\hat{h}}_{i}^{l+1}||\mathbf{\hat{h}}_{j }^{l+1}) \tag{3}\]  
\(T\) is the transpose operator, which can also be computed as the dot product, \(|\ |\) or concatenation. The framework refreshes node \(i\) by amalgamating all nodes encompassed within \(\mathcal{N}i\cup i\), where each node is scaled by its importance weight \(\alpha ij\) according to Equation (3). This produces a preactivated feature vector:  
\[\mathbf{z}_{i}^{(l+1)}=\sum_{j\in\mathcal{N}_{i}\cup i}\alpha_{is}\mathbf{\hat {h}}_{s}^{(l+1)} \tag{4}\]  
In order to feed this feature vector into the subsequent GAT layer, an activation function is engaged to harness intricate nonlinear cues, yielding the activated feature vector for node \(i\). This is demonstrated as follows:  
\[\mathbf{h}_{i}^{(l+1)}=\sigma(\mathbf{z}_{i}^{(l+1)}) \tag{5}\]  
Here, \(\sigma\) is the activation function. We use the \(ELU\)[45] activation function, similar to [29]; based on empirical evidence, it even outshines the widely recognized \(ReLU\) activation function in performance.