SGA: A Graph Augmentation Method for Signed Graph Neural Networks
Signed Graph Neural Networks (SGNNs) are vital for analyzing complex patterns
in real-world signed graphs containing positive and negative links. However,
three key challenges hinder current SGNN-based signed graph representation
learning: sparsity in signed graphs leaves latent structures undiscovered,
unbalanced triangles pose representation difficulties for SGNN models, and
real-world signed graph datasets often lack supplementary information like node
labels and features. These constraints limit the potential of SGNN-based
representation learning. We address these issues with data augmentation
techniques. Despite many graph data augmentation methods existing for unsigned
graphs, none are tailored for signed graphs. Our paper introduces the novel
Signed Graph Augmentation framework (SGA), comprising three main components.
First, we employ the SGNN model to encode the signed graph, extracting latent
structural information for candidate augmentation structures. Second, we
evaluate these candidate samples (edges) and select the most beneficial ones
for modifying the original training set. Third, we propose a novel augmentation
perspective that assigns varying training difficulty to training samples,
enabling the design of a new training strategy. Extensive experiments on six
real-world datasets (Bitcoin-alpha, Bitcoin-otc, Epinions, Slashdot, Wiki-elec,
and Wiki-RfA) demonstrate that SGA significantly improves performance across
multiple benchmarks. Our method outperforms baselines by up to 22.2% in AUC for
SGCN on Wiki-RfA, 33.3% in F1-binary, 48.8% in F1-micro, and 36.3% in F1-macro
for GAT on Bitcoin-alpha in link sign prediction.
Zeyu Zhang, Shuyan Wan, Sijie Wang, Xianda Zheng, Xinrui Zhang, Kaiqi Zhao, Jiamou Liu, Dong Hao
# SGA: A Graph Augmentation Method for Signed Graph Neural Networks

###### Abstract

Signed Graph Neural Networks (SGNNs) play a crucial role in the analysis of intricate patterns within real-world signed graphs, where both positive and negative links coexist. Nevertheless, there are three critical challenges in current signed graph representation learning using SGNNs. First, signed graphs exhibit significant sparsity, leaving numerous latent structures uncovered. Second, SGNN models encounter difficulties in deriving proper representations from unbalanced triangles. Finally, real-world signed graph datasets often lack supplementary information, such as node labels and node features. These challenges collectively constrain the representation learning potential of SGNN. We aim to address these issues through data augmentation techniques. However, the majority of graph data augmentation methods are designed for unsigned graphs, making them unsuitable for direct application to signed graphs. To the best of our knowledge, there are currently no data augmentation methods specifically tailored for signed graphs. In this paper, we propose a novel Signed Graph Augmentation framework, **SGA**. This framework primarily consists of three components. In the first part, we utilize the SGNN model to encode the signed graph, extracting latent structural information in the encoding space, which is then used as candidate augmentation structures. In the second part, we analyze these candidate samples (i.e., edges), selecting the most beneficial candidate edges to modify the original training set. In the third part, we introduce a new augmentation perspective, which assigns training samples different training difficulty, thus enabling the design of new training strategy. Extensive experiments on six real-world datasets, i.e., Bitcoin-alpha, Bitcoin-otc, Epinions, Slashdot, Wiki-elec and Wiki-RfA show that SGA improve the performance on multiple benchmarks. Our method outperforms baselines by up to 22.2% in terms of AUC for SGCN on Wiki-RfA, 33.3% in terms of F1-binary, 48.8% in terms of F1-micro, and 36.3% in terms of F1-macro for GAT on Bitcoin-alpha in link sign prediction. Our implementation is available in PyTorch1.

Footnote 1: [https://anonymous.4open.science/r/SGA-3127](https://anonymous.4open.science/r/SGA-3127)

Signed Graph, Graph Neural Networks, Graph Augmentation
## 1 Introduction

As social media continues to gain widespread popularity, it gives rise to a multitude of interactions among individuals, which are subsequently documented within social graphs [1; 2]. While many of these social interactions denote positive connections, such as liking, trust, and friendship, there are also instances of negative interactions, encompassing feelings of hatred, distrust, and more. In essence, graphs that encompass both positive and negative interactions or links are commonly termed as _signed graphs_[3; 4]. For instance, Slashdot [5], a tech-related news website, allows users to tag other users as either 'friends' or 'foes'. Such a situation can be naturally modeled as a _signed graph_. In recent years, there has been a growing interest among researchers in exploring network representation within the context of signed graphs [6; 7; 8]. Most of these methods are combined with Graph Neural Networks (GNN) [9; 10], and are therefore collectively referred to as Signed Graph Neural Networks (SGNN) [11; 12]. This endeavor is focused on acquiring low-dimensional representations of nodes, with the ultimate goal of facilitating subsequent network analysis tasks, especially _link sign prediction_.

There are three issues within signed graph representation learning, i.e., 1) real-world signed graph datasets are exceptionally sparse [4], with a significant amount of potential structure remaining uncollected or undiscovered, 2) according to the analysis in [13], SGNN fails to learn proper representations from unbalanced triangles, despite the prevalence of unbalanced triangles in real-world datasets, 3) real-world signed graph datasets only contain structural information and lack more side information. Data augmentation which has been well-studied in computer vision [14; 15; 16; 17] and natural language processing [18; 19; 20] holds promise for alleviating the three issues mentioned above.

In recent years, there have been significant advancements in graph data augmentation methods [21; 22; 23], including node perturbation [24; 25], edge perturbation [26] and sub-graph sampling [27]. _Yet_, current graph data augmentation (GDA) methods cannot be directly applied to signed graphs. The limitation of current GDA methods primarily include the following three aspects: 1) Some graph augmentation methods [21; 22] incorporate side information such as node features and node labels. However, real-world signed graph datasets lack this kind of information and only possess structural information. 2) Random structural perturbation [26] is not applicable to signed graph neural networks. As shown in Figure 1, we employed three different random methods (i.e., random addition/removal of positive edges, random addition/removal of negative edges, and random sign-flipping of existing edges) in conjunction with the classic SGNN model, SGCN [11]. The experimental results show that these random methods cannot enhance the performance of SGCN. The experiment results involving random edge flipping (Figure 1(c)) demonstrate that the data augmentation methods employed in signed graph contrastive learning model [8; 28] do not readily extend to general representation learning models. 3) Current data augmentation methods typically enhance data from aspects like node features and node labels, lacking novel augmentation perspectives [29].

To the best of our knowledge, there currently exists no data augmentation solution tailored specifically for SGNN models. In this paper, we embark on the exploration of data augmentation methods for signed graph representation learning. The primary challenges are as follows:

1. Uncover potential structural information using only structural data.
2. Design a more refined and targeted approach to modify the existing structure in order to mitigate the adverse effects of unbalanced cycles on SGNN models [13].

Figure 1: Effectiveness of data augmentation through random structural perturbations (SGCN [11] as backbone model) on link sign prediction performance. (a) Randomly increasing or decreasing positive edges. (b) Randomly increasing or decreasing negative edges. (c) Randomly flipping the sign of edges.
3. Propose a new data augmentation perspective specifically tailored for signed graphs.

To address the aforementioned challenges, we propose a novel Signed Graph Augmentation framework, **SGA**. This framework primarily consists of three components which focuses on mining new structural information and edge features from the training samples (i.e., edges) with only structural information. In more details, to address the **first** challenge, we treat uncovering potential structural information as an edge prediction problem. We utilize a classic SGNN model, such as SGCN [11], to encode the nodes of the signed graph. In the encoding space, We consider the relationships between nodes that are close in proximity as potential positive edges, while we view the relationships between nodes that are farther apart as potential negative edges. The newly discovered structural information is treated as candidate training samples (i.e., edges). To address the **second** challenge, We do not directly insert these candidate training samples into the training set but adopt a more cautious approach to discern whether they introduce harmful information. We demonstrate that only candidate training samples that do not decrease the local balance of nodes (see Def. 2) are beneficial candidate training samples. Based on this conclusion, we select the beneficial candidate training samples to insert into the training set. To address the **third** challenge, we introduce a new data augmentation perspective: _training difficulty_ and assign different difficulty scores to various training samples. Differing from conventional training approaches that assign equal training weights to all samples, we have developed novel training schemes for SGNN models based on these varying difficulty levels.

To evaluate the effectiveness of SGA, we perform extensive experiments on six real-world datasets, i.e., Bitcoin-alpha, Bitcoin-otc, Epinions, Slashdot, Wiki-elec and Wiki-RfA. We verify that our proposed framework SGA can enhance model performance using the common SGNN model SGCN[11] as the encoding module. The experimental results show that SGA improves the link sign prediction accuracy of five base models, including two unsigned GNN models (GCN[9] and GAT[30]) and three signed GNN models (SGCN, SiGAT[31] and GS-GNN[32]). SGA boosts up to 22.2% in terms of AUC for SGCN on Wiki-RfA, 33.3% in terms of F1-binary, 48.8% in terms of F1-micro, and 36.3% in terms of F1-macro for GAT on Bitcoin-alpha in link sign prediction, at best. These experimental results demonstrate the effectiveness of SGA.

* We are the first to introduce the research on data augmentation for signed graph neural networks.
* We have proposed a novel signed graph augmentation framework which tries to alleviating the three issues existing in signed graph neural networks. This framework not only helps uncover potential training samples but also aids in selecting beneficial samples to mitigate the introduction of harmful structural information. Additionally, it enables the augmentation of training samples with new feature (i.e., training difficulty see Def. 3), which forms the basis for a new training strategy.
* Extensive experiments on six real-world datasets with five backbone models demonstrate the effectiveness of our framework.

## 2 Related Work

As described above, relevant topics about our paper is Signed Graph Neural Networks and Graph Augmentation. Next, we will discuss these two aspects separately.

### Signed Graph Neural Networks

Due to the widespread popularity of social media, signed graphs have garnered significant attention in the field of network representation [33; 34; 28; 13]. Existing research has predominantly concentrated on tasks related to _link sign prediction_, while overlooking other crucial tasks like node classification [35], node ranking [36], and community detection [37]. Some signed graph embedding techniques, such as SNE [38], SIDE [39], SGDN [40], and ROSE [41], rely on random walks and linear probabilistic methods. In recent years, neural networks have been employed for signed graph representation learning. The first Signed Graph Neural Network (SGNN), SGCN [11], generalizes GCN [9] to signed graphs by utilizing balance theory to ascertain the positive and negative relationships between nodes separated by multiple hops. Another noteworthy GCN-based approach is GS-GNN, which relaxes the balance theory assumption and typically assumes nodes can be grouped into multiple categories. Additionally, prominent SGNN models like SiGAT [31], SNEA [7], SDGNN [12], and SGCL [8] are based on GAT [42]. These efforts mainly revolve around the development of more advanced SGNN models. Our work diverges from these approaches as we introduce a novel signed graph augmentation to improve the performance of SGNNs
### Graph Data Augmentation

In response to the challenges posed by data noise and limited data availability in graph representation learning, there has been a recent surge in research focused on enhancing graph data augmentation techniques. [43; 22; 23]. According to a survey of graph data augmentation [29], graph augmentation methods can be classified into three types, i.e., feature-wise [23; 44; 45], structure-wise [46; 47; 48] and label-wise [49; 50]. For feature-wise type, LAGNN [23] enriches the node features by employing a generative model that takes as input the localized neighborhood information of the target node. Other feature-wise methods [51; 24] generate augmented node feature by random shuffling. Structure-wise augmentation methods target at modifying edges and nodes (e.g., randomly adding or deleting edges). GAUG [21] employs neural edge predictors can effectively encode class-homophilic structure to promote intra-class edges and demote inter-class edges in given graph structure. GraphSMOTE [52] insert nodes to enrich the minority classes. Graph diffusion method (GDC [53]) can generate an augmented graph by providing the global views of the underlying structure. Label-wise augmentation methods aim at augmenting the limited labeled training data. G-Mixup [22] augment graphs for graph classification by interpolating the generator (i.e., graphon) of different classes of graphs. It is worth noting that most of these data augmentation methods rely on additional information such as node features and node labels. However, for signed graphs, these types of information are absent, making these methods not directly applicable to data augmentation in signed networks.

## 3 Problem Statement

A _signed graph_ is defined as \(\mathcal{G}=(\mathcal{V},\mathcal{E}^{+},\mathcal{E}^{-})\), where \(\mathcal{V}=\{v_{1},\ldots,v_{|\mathcal{V}|}\}\) represents the set of nodes, and \(\mathcal{E}^{+}\) and \(\mathcal{E}^{-}\) denote the positive and negative edges, respectively. Each edge \(e_{ij}\in\mathcal{E}^{+}\cup\mathcal{E}^{-}\) connecting two nodes \(v_{i}\) and \(v_{j}\) can be either positive or negative, but not both, meaning that \(\mathcal{E}^{+}\cap\mathcal{E}^{-}=\varnothing\). We use \(\sigma(e_{ij})\in\{+,-\}\) to denote the _sign_ of \(e_{ij}\). The structure of \(\mathcal{G}\) is represented by the adjacency matrix \(A\in\mathbb{R}^{|\mathcal{V}|\times|\mathcal{V}|}\), where each entry \(A_{ij}\in\{1,-1,0\}\) signifies the sign of the edge \(e_{ij}\). It's important to note that, unlike unsigned graph datasets, signed graphs typically do not provide node features, meaning there is no feature vector \(x_{i}\) associated with each node \(v_{i}\).

_Positive_ and _negative neighbors_ of \(v_{i}\) are denoted as \(\mathcal{N}_{i}^{+}=\{v_{j}\mid A_{ij}>0\}\) and \(\mathcal{N}_{i}^{-}=\{v_{j}\mid A_{ij}<0\}\), respectively. Let \(\mathcal{N}_{i}=\mathcal{N}_{i}^{+}\cup\mathcal{N}_{i}^{-}\) be the set of neighbors of node \(v_{i}\). \(\mathcal{O}_{3}\) represents the set of _triangles_ in the signed graph, i.e., \(\mathcal{O}_{3}=\{\{v_{i},v_{j},v_{k}\}\mid A_{ij}A_{jk}A_{ik}\neq 0\}\). A triangle \(\{v_{i},v_{j},v_{k}\}\) is called _balanced_ if \(A_{ij}A_{jk}A_{ik}>0\), and is called _unbalanced_ otherwise.

**Problem Definition**: \(D_{\text{train}}\cup D_{\text{test}}=\mathcal{E}^{+}\cup\mathcal{E}^{-}\), where \(D_{\text{train}}\) refers to the set of train samples (edges) and \(D_{\text{test}}\) refers to the set of test samples. When only given \(D_{\text{train}}\), our purpose is to design a graph augmentation strategy \(\psi:(D_{\text{train}})\rightarrow(D^{\prime}_{\text{train}},\mathcal{F})\), where \(D^{\prime}_{\text{train}}\) refers to augmented train edge set and \(\mathcal{F}\) refers to the newly generated edge features.

## 4 Proposed Method

In this section, we present a Signed Graph Augmentation framework, aiming to augment training samples (i.e., edges) from structure perspective (edge manipulation) to side information (edge feature). Figure shows the overall architecture. SGA encompasses three key elements: 1) generating new training candidate samples, 2) Selecting beneficial training samples, and 3) introducing new feature (training difficulty) for training samples. To be specific, we **first** utilize the SGNN model for encoding the nodes within the signed graph. Within this encoding space, our objective is to unearth latent relationships between nodes and produce fresh training candidate samples, specifically edges. On an intuitive level, we posit that nodes in close proximity within the encoding space are inclined to form positive relationships (positive edges), whereas nodes further apart are more likely to establish negative relationships (negative edges). **Subsequently**, we conduct a theoretical analysis, highlighting that only training samples that do not decrease the local balance of nodes (see Def. 2) are beneficial candidate training samples. **Lastly**, we propose a new graph augmentation perspective, assign a difficulty score to each training sample and use this feature to guide the training process. Intuitively, we aim for the backbone model to prioritize the retention of structural information with lower difficulty scores while downplaying the significance of structural information with higher difficulty scores.

### Generating Candidate Training Samples

Real-world signed graph datasets are extremely sparse, with many missing or uncollected relationships between nodes. In this subsection, we attempt to uncover the potential relationships between nodes. We first use SGNN model, e.g., SGCN [11], the classical SGNN model, as the encoder to project nodes from topological space to embedding space. Here, the node representations are updated by aggregating information from different types of neighbors as follows:
For the first aggregation layer \(\ell=1\):

\[\begin{split} H^{pos(1)}&=\sigma\left(\mathbf{W}^{pos(1 )}\left[A^{+}H^{(0)},H^{(0)}\right]\right)\\ H^{neg(1)}&=\sigma\left(\mathbf{W}^{neg(1)}\left[A ^{-}H^{(0)},H^{(0)}\right]\right)\end{split} \tag{1}\]

For the aggregation layer \(\ell>1\):

\[\begin{split} H^{pos(\ell)}&=\sigma\left(\mathbf{W}^{ pos(\ell)}\left[A^{+}H^{pos(\ell-1)},A^{-}H^{neg(\ell-1)},H^{pos(\ell-1)}\right] \right)\\ H^{neg(\ell)}&=\sigma\left(\mathbf{W}^{neg(\ell) }\left[A^{+}H^{neg(\ell-1)},A^{-}H^{pos(\ell-1)},H^{neg(\ell-1)}\right]\right),\end{split} \tag{2}\]

where \(H^{pos(\ell)}(H^{neg(\ell)})\) are positive (negative) part of representation matrix at the \(\ell\)th layer. \(A^{+}(A^{-})\) are the row normalized matrix of positive (negative) part of the adjacency matrix \(A\). \(\mathbf{W}^{pos(\ell)}(\mathbf{W}^{neg(\ell)})\) are learnable parameters of positive (negative) part, and \(\sigma(\cdot)\) is the activation function. \([.]\) is the concatenation operation. After conducting message-passing for \(L\) layers, the final node representation matrix is \(Z=H^{(L)}=\left[H^{pos(L)},H^{neg(L)}\right]\). For node \(v_{i}\), the node embedding is \(Z_{i}\). As we wish to classify whether a pair of node are with a positive, negative or no edge between them. We train a multinomial logistic regression classifier (MLG) [11]. The training loss is as follows:

Figure 2: The overall architecture of SGA. Green lines represent positive edges and red lines represent negative edges.
\[\mathcal{L}\left(\theta^{\text{MLG}}\right)=-\frac{1}{|D_{\text{train}}|}\sum_{ \left(v_{i},v_{j},\sigma(e_{ij})\right)\in D_{\text{train}}}\log\frac{\exp \left(\left[Z_{i},Z_{j}\right]\theta^{\text{MLG}}_{\sigma(e_{ij})}\right)}{ \Sigma_{q\in\{+,-,?\}}\exp\left(\left[Z_{i},Z_{j}\right]\theta^{\text{MLG}}_{q }\right)} \tag{3}\]

\(\theta^{\text{MLG}}\) refers to the parameter of the MLG classifier. Using this classifier, for any two node \(v_{i}\), \(v_{j}\) we can calculate the probability of forming a positive or negative edge between any two nodes, denoted as \(Pr_{e_{ij}}^{pos}\) and \(Pr_{e_{ij}}^{neg}\). We configure four probability threshold hyper-parameters, i.e., the probability threshold for adding positive edges (\(\epsilon^{+}_{add}\)), the probability threshold for adding negative edges (\(\epsilon^{-}_{add}\)), the probability threshold for deleting positive edges (\(\epsilon^{-}_{del}\)), the probability threshold for deleting negative edges (\(\epsilon^{-}_{del}\)), We adopt the following strategy to generate candidate training samples:

* \(\forall v_{i},v_{j}\in\mathcal{V}\), if \((v_{i},v_{j},\sigma(e_{ij}))\notin D_{\text{train}}\), \(Pr_{e_{ij}}^{pos}>\epsilon^{+}_{add}\lor Pr_{e_{ij}}^{neg}>\epsilon^{-}_{add}\), then \(D_{\text{train\_add}}^{\text{card}}\cup(v_{i},v_{j},\sigma(e_{ij}))\)
* \(\forall v_{i},v_{j}\in\mathcal{V}\), if \((v_{i},v_{j},\sigma(e_{ij}))\in D_{\text{train}}\), \(A_{ij}>0\), \(Pr_{e_{ij}}^{pos}<\epsilon^{+}_{del}\), then \(D_{\text{train\_del}}^{\text{card}}\cup(v_{i},v_{j},\sigma(e_{ij}))\)
* \(\forall v_{i},v_{j}\in\mathcal{V}\), if \((v_{i},v_{j},\sigma(e_{ij}))\in D_{\text{train}}\), \(A_{ij}<0\), \(Pr_{e_{ij}}^{neg}<\epsilon^{-}_{del}\), then \(D_{\text{train\_del}}^{\text{card}}\cup(v_{i},v_{j},\sigma(e_{ij}))\)

\(D_{\text{train\_add}}^{\text{card}}\) and \(D_{\text{train\_del}}^{\text{card}}\) respectively refer to the candidate training set for adding edges and the candidate training set for deleting edges.

### Selecting Beneficial Candidate Training Samples

After generating candidate training set \(D_{\text{train\_add}}^{\text{card}}\) and \(D_{\text{train\_del}}^{\text{card}}\), we next aim to incorporate these training candidates into the training sample set \(D_{\text{train}}\). One issue that needs to be addressed is that not all new generated training samples (i.e., edges) result in positive effects. Hence, we need to select beneficial candidate training samples.

According to [13; 28], SGNN models that rely on balance theory cannot learn a proper representation for nodes from unbalanced triangles, as is shown in Figure 3.

**Definition 1**.: Balanced (unbalanced) triangles _are cycles with 3 nodes containing even (odd) negative edges._

The addition of both positive and negative edges can result in changes in the local structure of nodes, potentially leading to unbalanced triangles. We provide a definition of local balance degree.

**Definition 2** (Local Balance Degree).: _For node \(v_{i}\), the local balance degree is defined by:_

\[D_{3}(v_{i})=\frac{|\mathcal{O}_{3}^{+}(v_{i})|-|\mathcal{O}_{3}^{-}(v_{i})|}{ |\mathcal{O}_{3}^{+}(v_{i})|+|\mathcal{O}_{3}^{-}(v_{i})|} \tag{4}\]

_where \(\mathcal{O}_{3}^{+}(v_{i})\) (\(\mathcal{O}_{3}^{-}(v_{i})\)) represents the set of balanced (unbalanced) triangles containing node \(v_{i}\). \(|\cdot|\) represents the set cardinal number._

From Def. 2, we can observe that the node's local balance degree is related to the count of balanced and unbalanced triangles that include this node. Based on this definition, we can conclude that beneficial candidate training samples does not decrease the local balance degree of target nodes.

### Introducing New feature for Training Samples

Based on the above analysis, it is apparent that unbalanced triangles pose a challenging task for SGNNs. Intuitively, when an edge is part of an unbalanced triangle, its level of difficulty in terms of representation learning should surpass that of edges not involved in such structures, as shown in Figure 4.

Figure 3: Four isomorphism types of triangles. Green and red lines represent positive and negative edges, resp.
**Definition 3** (Edge Difficulty Score).: _For edge \(e_{ij}\), the difficulty score is defined by:_

\[\text{Score}(e_{ij})=1-\frac{D_{3}(v_{i})+D_{3}(v_{j})}{2} \tag{5}\]

_where \(D_{3}(v_{i}\) and \(D_{3}(v_{j})\) refer to the local balance degree of node \(v_{i}\) and \(v_{j}\), respectively._

Upon quantifying the difficulty scores for each edge within the training set, a curriculum-based training approach is applied to enhance the performance of the SGNN model. This curriculum is fashioned following the principles set forth in [54], which enables the creation of a structured progression from easy to difficult. The process entails initially sorting the training set \(\mathcal{E}\) in ascending order based on their respective difficulty scores. Subsequently, a pacing function \(g(t)\) is employed to allocate these edges to distinct training epochs, transitioning from easier to more challenging instances, where \(t\) signifies the \(t\)-th epoch.we use linear pacing function as shown below:

## 5 Experiments

In this section, we commence by assessing the enhancements brought about by SGA in comparison to diverse backbone models for the link sign prediction task. We will answer the following questions:

* **Q1**: Can SGA framework increase the performance of backbone models?
* **Q2**: Do each part of the SGA framework play a positive role?
* **Q3**: Is the proposed method sensitive to hyper-parameters? How do key hyper-parameters impact the method performance?

### Datasets

We conduct experiments on six real-world datasets, i.e., Bitcoin-OTC, Bitcoin-Alpha, Wiki-elec, Wiki-RfA, Epinions, and Slashdot. The main statistics of each dataset are summarized in Table 1. In the following, we explain important characteristics of the datasets briefly.

**Bitcoin-OTC2**[55; 56] and **Bitcoin-Alpha3** are two datasets extracted from bitcoin trading platforms. Due to the fact Bitcoin accounts are anonymous, people give trust or not-trust tags to others in order to enhance security.

Footnote 2: [http://www.bitcoin-otc.com](http://www.bitcoin-otc.com)

Footnote 3: [http://www.btc-alpha.com](http://www.btc-alpha.com)

**Wiki-elec4**[57; 1] is a voting network in which users can choose trust or distrust to other users in administer elections.

**Wiki-RfA**[58] is a more recent version of Wiki-elec.

**Epinions5**[57] is a consumer review site with trust and distrust relationships between users.

Footnote 4: [https://www.wikipedia.org](https://www.wikipedia.org)

**Shashdot6**[57] is a technology-related news website in which users can tag each other as friends (trust) or enemies (distrust).

Figure 4: Illustration of node difficulty, where green lines represent positive edges and red lines represent negative edges.
Following the experimental settings in [11], We randomly split the edges into a training set and a testing set with a ratio 8:2. We run with different train-test splits for 5 times to get the average scores and standard deviation.

### Baselines and Experiment Setting

We use five popular graph representation learning models as backbones, including both unsigned GNN models and signed GNN models.

**Unsigned GNN**: We employ two classical GNN models (i.e., GCN [9] and GAT [30]). These methods are designed for unsigned graphs, thus, as mentioned before, we consider all edges as positive edges to learn node embeddings in the experiments.

**Signed Graph Neural Networks**: SGCN [11] and SiGAT [31] respectively generalize GCN [9] and GAT [30] to signed graphs based on message mechanism. Besides, SGCN integrates the balance theory. GS-GNN [32] adopts a more generalized assumption (than balance theory) that nodes can be divided into multiple latent groups. We use these signed graph representation models as baselines to explore whether **SGA** can enhance their performance.

We implement our SGA using PyTorch [59] and employ PyTorch Geometric [60] as its complementary graph library. The graph encoder, responsible for augmenting the graph, consists of a 2-layer SGCN with an embedding dimension of 64. This encoder is optimized using the Adam optimizer, set with a learning rate of 0.01 over 300 epochs. To ensure a consistent comparison, we randomly standardized the node embedding dimension at 64 across all embedding-based methods, matching the dimensionality used in GS-GNN [61]. For the baseline methods, we adhere to the parameter configurations as recommended in their originating papers. Specifically, for unsigned baseline models like GCN and GAT, we employ the Adam optimizer, with a learning rate of 1e-2, a weight decay of 5e-4, and span the training over 500 epochs. In contrast, signed baseline models are trained with an initial learning rate of 5e-3, a weight decay of 1e-5, and are run for 3000 epochs.

The experiments were performed on a Linux machine with eight 24GB NVIDIA GeForce RTX 3090 GPUs.

Our primary evaluation criterion is link sign prediction--a binary classification task. We assess the performance employing AUC, F1-binary, F1-macro, and F1-micro metrics, consistent with the established norms in related literature [61, 32]. It's imperative to note that across these evaluation metrics, a higher score directly translates to enhanced model performance.

### Performance on Link Sign Prediction (Q1)

To comprehensively evaluate the performance of our proposed SGA, we contrast it with several baseline configurations that exclude SGA integration. For a detailed view, AUC and F1-binary score results are presented in Table 2. Further, the F1-micro and F1-macro scores can be referenced in Table 3. For each model, the mean AUC and F1-binary scores, along with their respective standard deviations, are documented. These metrics are derived from five independent runs on each dataset, utilizing distinct, non-overlapping splits: 80% of the links are earmarked for training, while the residual 20% serve as the test set. Additionally, the table elucidates the percentage improvement in these metrics attributable to the integration of SGA, relative to the baseline models devoid of SGA. The results proffer several salient insights:

* Our investigations affirm that the SGA framework serves as a potent catalyst in augmenting the performance of both signed and unsigned graph neural networks. This underscores the efficacy of tailoring the inherent graph structure and the subsequent training regimen, enabling models to astutely discern intricate node relationships.
* Within the realm of unsigned graph neural networks, the GAT model exhibits a more pronounced enhancement in performance relative to the GCN in the majority of scenarios. This observation is attributable to GAT's comparatively modest baseline performance in relation to GCN, engendering a larger margin for refinement. This phenomenon

\begin{table}
\begin{tabular}{c c c c} \hline \hline Dataset & \# Links & \# Positive Links & \# Negative Links \\ \hline Bitcoin-OTC & 35,592 & 32,029 & 3,563 \\ Bitcoin-Alpha & 24.186 & 22,650 & 1,536 \\ Wiki-elec & 103,689 & 81,345 & 22,344 \\ Wiki-RFA & 170,335 & 133,330 & 37,005 \\ Epinions & 840,799 & 717,129 & 123,670 \\ Slashdot & 549,202 & 425,072 & 124,130 \\ \hline \hline \end{tabular}
\end{table}
Table 1: The statistics of datasets.
accentuates the potential of the SGA framework to stabilize the GAT's training dynamics by refining the graph topology and the associated training procedure.
* Among the signed neural networks we scrutinized--SGCN, SiGAT, and GS-GNN--it's pivotal to note that only SGCN integrates the balance theory. This strategic incorporation propels SGCN to manifest the most pronounced improvements across a majority of the datasets. Even though SGCN's performance tends to be lackluster when leveraging random embeddings for initial node representations, our findings suggest that aligning the dataset more closely with the model's intrinsic assumptions can pave the way for superior performance outcomes.
* A salient advantage conferred by the SGA framework is the enhanced stability observed in signed graph neural network models. This stability is palpable through reduced standard deviation in AUC and F1-binary scores across most datasets. Contrarily, unsigned baseline models, which inherently overlook the nuanced negative inter-node relationships, do not seem to reap similar stability dividends.

### Ablation Study (Q2)

To ascertain the contributions of various components of SGA towards the model's overall performance, we systematically dissect and evaluate the SGCN under different conditions. Below are the configurations we investigate:

* **SGCN:** This configuration deploys SGCN on the original graph, devoid of any curriculum learning integration.
* **+SA (Structure Augmentation, refer to Sec. 4.1 and Sec. 4.2):** SGCN operates on augmented datasets. This augmentation involves the addition or removal of edges from the initial graph.
* **+TP (Training Plan, refer to Sec. 4.3):** SGCN runs on the original graph, but with a modified training paradigm. Adopting a curriculum learning approach, we rank edges by their "difficulty". The model is then progressively exposed to these edges, transitioning from simpler to more challenging ones as training epochs progress.

\begin{table}
\begin{tabular}{l|c c|c c|c c|c c|c c|c c} \hline Datasets & \multicolumn{2}{c|}{Bitcoin-alpha} & \multicolumn{2}{c|}{Bitcoin-oc} & \multicolumn{2}{c|}{Epinions} & \multicolumn{2}{c|}{Slabdet} & \multicolumn{2}{c}{Wiki-elec} & \multicolumn{2}{c}{Wiki-RIA} \\ Methods & AUC & F1-binary & AUC & F1-binary & AUC & F1-binary & AUC & F1-binary & AUC & F1-binary & AUC & F1-binary \\ \hline GCN & 60.9\(\pm\)0.8 & 73.6\(\pm\)1.5 & 69.1\(\pm\)0.8 & 83.0\(\pm\)1.5 & 68.5\(\pm\)0.2 & 80.4\(\pm\)0.2 & 51.8\(\pm\)0.7 & 55.8\(\pm\)1.9 & 64.0\(\pm\)1.1 & 75.5\(\pm\)1.5 & 60.4\(\pm\)0.7 & 72.0\(\pm\)1.0 \\ +sGA & 64.5\(\pm\)1.4 & 80.7\(\pm\)2.5 & 69.3\(\pm\)1.0 & 89.0\(\pm\)0.9 & 69.3\(\pm\)0.2 & 82.5\(\pm\)0.4 & 51.5\(\pm\)2.0 & 61.9\(\pm\)1.0 & 64.8\(\pm\)0.3 & 75.0\(\pm\)1.7 & 60.9\(\pm\)0.3 & 72.9\(\pm\)1.6 \\ (Improv.) & 5.9\(\pm\) & 9.7\(\pm\) & 7.2\(\pm\) & 1.2\(\pm\) & 2.6\(\pm\) & - & 10.9\% & 1.3\% & - & 0.8\% & 1.3\% \\ \hline GAT & 59.3\(\pm\)1.6 & 68.0\(\pm\)19.3 & 67.2\(\pm\)2.1 & 84.6\(\pm\)5.9 & 53.1\(\pm\)1.7 & 68.0\(\pm\)19.0 & 51.4\(\pm\)1.6 & 61.0\(\pm\)18.5 & 54.6\(\pm\)2.3 & 69.8\(\pm\)15.1 & 51.9\(\pm\)1.1 & 72.8\(\pm\)4.5 \\ +sGA & 65.0\(\pm\)6.8 & 90.7\(\pm\)3.1 & 74.3\(\pm\)2.0 & 93.6\(\pm\)0.5 & 51.9\(\pm\)2.1 & 73.0\(\pm\)16.9 & 58.9\(\pm\)4.9 & 70.9\(\pm\)12.9 & 56.8\(\pm\)4.7 & 73.3\(\pm\)6.1 & 59.7\(\pm\)5.7 & 72.6\(\pm\)17.5 \\ (Improv.) & 0.6\(\pm\) & 33.3\% & 10.6\% & 10.6\% & - & 7.4\% & 14.6\% & 16.2\% & 4.7\% & 5\% & 15\% & \\ \hline SGCN & 75.3\(\pm\)0.2 & 90.5\(\pm\)0.8 & 79.4\(\pm\)1.5 & 92.3\(\pm\)1.2 & 68.6\(\pm\)4.4 & 90.5\(\pm\)1.4 & 61.0\(\pm\)1.6 & 67.3\(\pm\)3.3 & 66.9\(\pm\)3.7 & 77.4\(\pm\)8.2 & 62.2\(\pm\)6.9 & 71.3\(\pm\)3.9 \\ +sGA & 80.6\(\pm\)1.2 & 93.9\(\pm\)0.4 & 82.2\(\pm\)0.4 & 97.4\(\pm\)0.7 & 78.1\(\pm\)0.4 & 92.8\(\pm\)0.4 & 63.2\(\pm\)1.4 & 84.6\(\pm\)0.8 & 77.7\(\pm\)0.2 & 87.0\(\pm\)0.7 & 76.0\(\pm\)0.5 & 86.9\(\pm\)0.4 \\ (Improv.) & 7.1\% & 3.8\% & 3.4\% & 2.6\% & 14.9\% & 2.6\% & 3.6\% & 25.7\% & 16.1\% & 12.3\% & 22.2\% & 21.8\% \\ \hline SGAT & 79.7\(\pm\)4.0 & 96.7\(\pm\)0.4 & 87.7\(\pm\)0.8 & 95.2\(\pm\)0.2 & 82.8\(\pm\)4.3 & 93.4\(\pm\)0.7 & 80.6\(\pm\)2.1 & 86.7\(\pm\)2.1 & 87.0\(\pm\)0.3 & 90.3\(\pm\)0.1 & 87.1\(\pm\)0.1 & 90.3\(\pm\)0.0 \\ +sGA & 87.4\(\pm\)0.8 & 96.3\(\pm\)0.3 & 89.8\(\pm\)0.9 & 95.1\(\pm\)0.4 & 88.4\(\pm\)1.5 & 94.6\(\pm\)0.6 & 85.0\(\pm\)0.6 & 89.3\(\pm\)0.3 & 88.5\(\pm\)0.3 & 90.5\(\pm\)0.2 & 88.0\(\pm\)0.2 & 90.3\(\pm\)0.1 \\ (Improv.) & 9.7\% & - & 2.4\% & - & 6.8\% & 1.3\% & 5.5\% & 3\% & 1.6\% & 0.3\% & 1\% & - \\ \hline SGNN & 85.1\(\pm\)1.3 & 97.0\(\pm\)0.1 & 83.3\(\pm\)1.1 & 95.9\(\pm\)0.3 & 88.9\(\pm\)0.4 & 95.0\(\pm\)0.6 & 77.9\(\pm\)0.7 & 88.6\(\pm\)0.3 & 88.2\(\pm\)0.2 & 90.9\(\pm\)0.1 & 86.8\(\pm\)0.2 & 90.3\(\pm\)0.2 \\ +sGA & 89.9\(\pm\)0.7 & 96.4\(\pm\)0.2 & 90.7\(\pm\)0.9 & 96.0\(\pm\)0.2 & 90.1\(\pm\)0.3 & 95.1\(\pm\)0.4 & 81.3\(\pm\)0.5 & 88.0\(\pm\)0.5 & 89.1\(\pm\)0.1 & 91.1\(\pm\)0.1 & 87.6\(\pm\)0.2 & 90.5\(\pm\)0.1 \\ (Improv.) & 5.7\% & - & 2.8\% & 0.1\% & 1.4\% & 0.1\% & 4.3\% & - & 1\% & 0.1\% & 0.9\% & 0.3\% \\ \hline \end{tabular}
\end{table}
Table 2: Link sign prediction results (average \(\pm\) standard deviation) with AUC (%) and F1-binary (%) on six

\begin{table}
\begin{tabular}{l|c c c|c c c c|c c c|c c} \hline Datasets & \multicolumn{2}{c|}{Bitcoin-alpha} & \multicolumn{2}{c|}{Bitcoin-oc} & \multicolumn{2}{c|}{Epinions} & \multicolumn{2}{c|}{Slabdet} & \multicolumn{2}{c|}{Wiki-elec} & \multicolumn{2}{c}{Wiki-RIA} \\ Methods & F1-mirror & F1-macro & F1-micro & F1-micro & F1-micro & F1-micro & F1-micro & F1-micro & F1-micro & F1-micro & F1-micro & F1-micro & F1-macro \\ \hline GCN & 59.9\(\pm\)1.8 & 45.0\(\pm\)0.9 & 72.9\(\pm\)2.1 & 73.7\(\pm\)1.4 & 70.4\(\pm\)0.2 & 60.0\(\pm\)0.2 & 47.1\(\pm\)1.4 & 49.1\(\pm\)0.0 & 65.8\(\pm\)1.5 &
* **+SGA:** This is a holistic approach where SGCN operates on an augmented graph and also incorporates the aforementioned training plan. The model learns easier edges initially, gradually advancing to more intricate ones.

Our meticulous ablation study, encapsulated in Table 4 and executed across six benchmark datasets, bequeaths a panoply of profound revelations:

* **Significance of Data Augmentation:** Data Augmentation emerges as a pivotal component in enhancing the model's efficacy. Even when employed in isolation, it frequently outperforms the baseline model trained on the original graph without any specialized training strategy.
* **Isolated Impact of the Training Plan:** Introducing the Training Plan, devoid of concurrent modifications, occasionally offers subtle performance augmentations vis-a-vis Data Augmentation alone. An illustrative case is its behavior on the Bitcoin-alpha dataset: the Training Process modality engenders a decrement in AUC yet an ascendant trajectory in F1 score metrics.
* **Synergistic Benefits of Training Plan and Data Augmentation:** Melding the Training Plan with Data Augmentation orchestrates a synergy, frequently magnifying the individual benefits of Data Augmentation. A notable anomaly is discerned within the Slashdot dataset metrics: Data Augmentation in isolation showcases an elevated F1 score albeit a diminished AUC, in contrast even to the pristine SGCN technique. However, when the Training Plan is integrated, it champions superior AUC outcomes. Concurrently, the SGA strategy harmoniously amalgamates these attributes, delivering a commendable equilibrium of AUC and F1 scores, underscoring a symbiotic interplay between the methodologies.

### Parameter Sensitivity Analysis (Q3)

In this subsection, we undertake a sensitivity analysis focusing on six hyper-parameters: \(c^{+}_{del}\), \(\epsilon^{-}_{del}\), \(\epsilon^{+}_{add}\), \(\epsilon^{-}_{add}\) (these delineate the probability thresholds for adding or removing positive/negative edges); \(T\) represents the number of intervals during the training process where more challenging edges are incrementally added to the training set; and \(\lambda_{0}\) designates the initial fraction of the easiest examples. Performance metrics for the SGCN model within the SGA framework, as measured by AUC and F1-binary score across various hyper-parameter configurations, are illustrated in Figures 5 and 6 respectively.

\begin{table}
\begin{tabular}{c c|c c c c} \hline Dataset & Metric & SGCN & +SA & +TP & +SGA \\ \hline \multirow{4}{*}{Bitcoin-alpha} & AUC & 75.3\(\pm\)0.2 & 78.4\(\pm\)0.3 & 73.8\(\pm\)1.2 & **80.6\(\pm\)**1.0 \\  & F1-binary & 90.5\(\pm\)0.8 & 93.3\(\pm\)0.3 & 91.5\(\pm\)0.1 & **94.0\(\pm\)**0.3 \\  & F1-micro & 83.4\(\pm\)1.3 & 88.1\(\pm\)0.4 & 84.9\(\pm\)0.1 & **89.2\(\pm\)**0.6 \\  & F1-macro & 62.1\(\pm\)1.1 & 67.5\(\pm\)0.4 & 62.7\(\pm\)0.4 & **69.7\(\pm\)**0.5 \\ \hline \multirow{4}{*}{Bitcoin-oc} & AUC & 79.4\(\pm\)1.5 & 80.8\(\pm\)1.4 & 79.7\(\pm\)0.9 & **82.2\(\pm\)**0.7 \\  & F1-binary & 92.3\(\pm\)1.2 & 94.7\(\pm\)0.9 & 92.3\(\pm\)1.5 & **94.7\(\pm\)**0.7 \\  & F1-micro & 86.7\(\pm\)1.9 & 90.7\(\pm\)1.6 & 86.7\(\pm\)2.4 & **90.6\(\pm\)**1.1 \\  & F1-macro & 72.0\(\pm\)1.5 & 77.3\(\pm\)2.3 & 72.1\(\pm\)2.8 & **77.6\(\pm\)**1.7 \\ \hline \multirow{4}{*}{Epinions} & AUC & 68.6\(\pm\)4.4 & 75.5\(\pm\)2.2 & 75.0\(\pm\)0.5 & **78.1\(\pm\)**0.4 \\  & F1-binary & 90.5\(\pm\)1.4 & 91.6\(\pm\)0.3 & 88.6\(\pm\)2.6 & **92.8\(\pm\)**0.4 \\  & F1-micro & 83.9\(\pm\)2.0 & 85.9\(\pm\)0.5 & 81.7\(\pm\)3.5 & **87.9\(\pm\)**0.6 \\  & F1-macro & 68.0\(\pm\)2.9 & 73.7\(\pm\)1.3 & 70.1\(\pm\)2.5 & **76.9\(\pm\)**0.8 \\ \hline \multirow{4}{*}{Slashdot} & AUC & 61.0\(\pm\)1.6 & 58.8\(\pm\)5.1 & **63.3\(\pm\)**0.3 & 63.2\(\pm\)1.2 \\  & F1-binary & 67.3\(\pm\)3.3 & **85.7\(\pm\)**1.1 & 69.2\(\pm\)6.4 & 84.6\(\pm\)0.8 \\  & F1-micro & 58.2\(\pm\)3.1 & **76.6\(\pm\)**1.1 & 60.7\(\pm\)6.0 & 75.8\(\pm\)1.0 \\  & F1-macro & 54.6\(\pm\)2.4 & 58.2\(\pm\)7.6 & 56.6\(\pm\)3.2 & **63.8\(\pm\)**1.2 \\ \hline \multirow{4}{*}{Wiki-elec} & AUC & 66.9\(\pm\)3.7 & 77.5\(\pm\)0.4 & 70.4\(\pm\)2.6 & **77.7\(\pm\)**0.2 \\  & F1-binary & 77.4\(\pm\)8.2 & 86.7\(\pm\)0.7 & 74.5\(\pm\)9.2 & **87.0\(\pm\)**0.7 \\  & F1-micro & 69.2\(\pm\)7.6 & 80.3\(\pm\)0.8 & 67.2\(\pm\)8.1 & **80.6\(\pm\)**0.8 \\  & F1-macro & 61.8\(\pm\)3.9 & 74.1\(\pm\)0.5 & 62.3\(\pm\)5.1 & **74.3\(\pm\)**0.5 \\ \hline \multirow{4}{*}{Wiki-RfA} & AUC & 62.2\(\pm\)6.9 & 75.6\(\pm\)0.7 & 68.6\(\pm\)3.7 & **76.0\(\pm\)**0.5 \\  & F1-binary & 71.3\(\pm\)3.9 & 86.1\(\pm\)1.1 & 75.7\(\pm\)4.3 & **86.9\(\pm\)**0.4 \\ \cline{1-1}  & F1-micro & 61.7\(\pm\)4.1 & 79.4\(\pm\)1.3 & 67.2\(\pm\)3.9 & **80.2\(\pm\)**0.5 \\ \cline{1-1}  & F1-macro & 56.3\(\pm\)4.6 & 72.9\(\pm\)1.0 & 62.0\(\pm\)3.0 & **73.5\(\pm\)**0.5 \\ \hline \end{tabular}
\end{table}
Table 4: The ablation study results of using different component of SGA.
From the figures, it's evident that the patterns of AUC and F1 score diverge depending on the adjustments to the hyperparameters. Further, the SGCN performance on distinct datasets, like Slashdot, displays more pronounced variance in both AUC and F1 score relative to other datasets. On a broader scale, the AUC is fairly consistent with changes to \(\epsilon^{-}_{del}\), \(\epsilon^{+}_{add}\), and \(T\). Notably, as \(\epsilon^{+}_{del}\) or \(\epsilon^{-}_{add}\) values rise, there's a tendency for the AUC to augment. Interestingly, AUC initially increases and then undergoes a minor dip as \(\lambda_{0}\) rises. Regarding the F1 score, its sensitivity is limited concerning changes to \(\epsilon^{-}_{add}\), \(T\), and \(\lambda_{0}\)--with the Slashdot dataset being an outlier. In general, an increase in \(\epsilon^{-}_{del}\) and \(\epsilon^{+}_{add}\) boosts the F1 score. However, for \(\epsilon^{+}_{del}\), the optimal value can differ across datasets, typically lying between 0.1 and 0.3.

Figure 5: Performance of SGCN: AUC scores (with standard deviation) across six benchmark datasets, evaluated under variations in parameters \(\epsilon^{+}_{del}\), \(\epsilon^{-}_{del}\), \(\epsilon^{+}_{add}\), \(\epsilon^{-}_{add}\), \(T\) and \(\lambda_{0}\).
## 6 Conclusion

Data augmentation is a widely embraced technique for enhancing the generalization of machine learning models, but its application to Graph Neural Networks (GNNs) presents distinctive challenges due to graph irregularity. Our groundbreaking research focuses on data augmentation for signed graph neural networks, introducing a novel framework to alleviate three significant issues in this field: exceptionally sparse real-world signed graph datasets, the difficulty in learning from unbalanced triangles, and the absence of side information in these datasets. In this paper, we propose a novel Signed Graph Augmentation framework, SGA. This framework is primarily composed of three key components. In summary, this framework has three main components: encoding structural information using the SGNN model, selecting beneficial edges for modification, and introducing a new perspective on training difficulty for improved training strategies. Through extensive experiments on benchmark datasets, our Signed Graph Augmentation (SGA) framework proves its versatility in boosting various SGNN models. As a promising future direction, further exploration of the theoretical foundations of signed graph augmentation is warranted, alongside the development of more potent methods to analyze diverse downstream tasks on signed graphs.
