## 3 Preliminaries
### Graph Contrastive Model  
Let \(G=\{A,X\}\) represent a graph, with \(A\in\{0,1\}^{N\times N}\) and \(X\in\mathbb{R}^{N\times F}\) denoting the adjacency matrix and feature matrix, respectively. We denote \(\mathcal{V}=\{v_{1},v_{2},\ldots,v_{N}\}\) as the set with \(N\) nodes, and \(\mathcal{E}\subseteq\mathcal{V}\times\mathcal{V}\) represents the edge set. Specifically, \(x_{i}\in\mathbb{R}^{F}\) is the \(F\)-dimensional feature of node \(v_{i}\), and \(A_{ij}=1\) if \((v_{i},v_{j})\in\mathcal{E}\); otherwise, \(0\). The objective of the graph contrastive model is to learn a feature encoder \(E(A,X)\) in an unsupervised manner. The GCL model processes the input feature matrix and adjacency matrix to produce node embeddings. By aggregating the features of nodes with the features of their neighbors, the GCL model generates embeddings that are well-equipped for diverse downstream tasks, including node classification and link prediction.  
A typical graph contrastive framework encompasses three principal stages. Initially, two augmentation processes are applied to the original graph to yield two views. Subsequently, these views are fed into the encoder to generate node embeddings. Ultimately, a contrastive loss is computed and the encoder is optimized to enhance the similarity among positive sample pairs while diminishing the similarity among negative sample pairs. In node-level tasks, the most prevalent data augmentation techniques are feature masking and edge dropping (or insertion). During the feature masking procedure, the model generates a masking vector \(M_{F}\in\{0,1\}^{F}\) based on a predefined masking probability \(p_{F}\). Each element denotes whether the feature is masked or not. The masked feature matrix can be expressed as  
\[\tilde{X}=(1-M_{F})\odot X, \tag{1}\] \[s.t.\sum M_{F}=p_{F}\cdot F.\]  
Similarly, the edge dropping (or insertion) is performed through a masking matrix \(M_{A}\in\{0,1\}^{F\times F}\). The masked adjacency matrix can be expressed as  
\[\tilde{A}=A+(J-I-2A)\odot M_{A}, \tag{2}\] \[s.t.\sum M_{A}=p_{A}\cdot N,\]  
where \(p_{A}\) denotes the masking probability.  
By employing different masking rates and masking matrices, we can obtain two graph views, \(\widetilde{G}^{1}\) and \(\widetilde{G}^{2}\), with their respective node embeddings of \(E(\tilde{A}^{1},\tilde{X}^{1})\) and \(E(\tilde{A}^{2},\tilde{X}^{2})\). We denote the embedding of node \(v_{i}\) in \(\widetilde{G}^{1}\) and \(\widetilde{G}^{2}\) as \(e_{i}^{1}\) and \(e_{i}^{2}\), respectively.  
For a node \(v_{i}\), its embedding \(e_{i}^{1}\) in graph view \(\widetilde{G}^{1}\) is considered as the anchor, while its embedding \(e_{i}^{2}\) in the other view forms a positive sample. The embeddings of other nodes in both views are regarded as negative samples. The GCL model is trained to minimize the classical InfoNCE [30] objective:  
\[L(e_{i}^{1},e_{i}^{2})=-\log\frac{e^{\psi(e_{i}^{1}e_{i}^{2})/\tau}}{e^{\psi( e_{i}^{1},e_{i}^{2})/\tau}+\sum_{j\
eq i}(e^{\psi(e_{i}^{1},e_{i}^{2})})/\tau}+e^{ \psi(e_{i}^{1},e_{i}^{2})/\tau}), \tag{3}\]  
where \(\psi\) is the similarity function, such as cosine similarity, and \(\tau\) is a temperature parameter.  
The overall objective to be maximized is defined as the average over all positive pairs:  
\[\mathcal{L}=\sum_{i=1}^{N}\Bigl{(}L(e_{i}^{1},e_{i}^{2})+L(e_{i}^{2},e_{i}^{1} )\Bigr{)}. \tag{4}\]