SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Haoyu Han $^{1}$ , Xiaorui Liu $^{2}$ , Feng Shi $^{3}$ , MohamadAli Torkamani $^{4*}$ , Charu C. Aggarwal $^{5}$ , Jiliang Tang $^{1}$ $^{1}$ Michigan State University  $^{2}$ North Carolina State University  $^{3}$ TigerGraph  
 $^{4}$ Amazon  $^{5}$ IBM T.J. Watson Research Center  
{hanhaoy1,tangjili}  $@$  msu.edu, xliu96@ncsu.edu  
bill.shi@tigergraph.com, alitor@amazon.com, charu@us.ibm.com
Graph Neural Networks (GNNs) have emerged as a powerful tool for semi-supervised node classification tasks. However, recent studies have revealed various biases in GNNs stemming from both node features and graph topology. In this work, we uncover a new bias - label position bias, which indicates that the node closer to the labeled nodes tends to perform better. We introduce a new metric, the Label Proximity Score, to quantify this bias, and find that it is closely related to performance disparities. To address the label position bias, we propose a novel optimization framework for learning a label position unbiased graph structure, which can be applied to existing GNNs. Extensive experiments demonstrate that our proposed method not only outperforms backbone methods but also significantly mitigates the issue of label position bias in GNNs.
Graph is a foundational data structure, denoting pairwise relationships between entities. It finds applications across a range of domains, such as social networks, transportation, and biology. [1, 2] Among these diverse applications, semi-supervised node classification has emerged as a crucial and challenging task, attracting significant attention from researchers. Given the graph structure, node features, and a subset of labels, the semi-supervised node classification task aims to predict the labels of unlabeled nodes. In recent years, Graph Neural Networks (GNNs) have demonstrated remarkable success in addressing this task due to their exceptional ability to model both the graph structure and node features [3]. A typical GNN model usually follows the message-passing scheme [4], which mainly contains two operators, i.e., feature transformation and feature propagation, to exploit node features, graph structure, and label information.
Despite the great success, recent studies have shown that GNNs could introduce various biases from the perspectives of node features and graph topology. In terms of node features, Jiang et al. [5] demonstrated that the message-passing scheme could amplify sensitive node attribute bias. A series of studies [6, 7, 8] have endeavored to mitigate this sensitive attribute bias in GNNs and ensure fair classification. In terms of graph topology, Tang et al. [9] investigated the degree bias in GNNs, signifying that high-degree nodes typically outperform low-degree nodes. This degree bias has also been addressed by several recent studies [10, 11, 12].
In addition to node features and graph topology, the label information, especially the position of labeled nodes, also plays a crucial role in GNNs. However, the potential bias in label information has been largely overlooked. In practice, with an equal number of training nodes, different labeling can result in significant discrepancies in test performance [13, 14, 15]. For instance, Ma et al. [16] study
*This work does not relate to the author's position at Amazon
the subgroup generalization of GNNs and find that the shortest path distance to labeled nodes can also affect the GNNs' performance, but they haven't provided deep understanding or solutions. The investigation of the influence of labeled nodes' position on unlabeled nodes remains under-explored.
In this work, we discover the presence of a new bias in GNNs, namely the label position bias, which indicates that the nodes "closer" to the labeled nodes tend to receive better prediction accuracy. We propose a novel metric called Label Proximity Score (LPS) to quantify and measure this bias. Our study shows that different node groups with varied LPSs can result in a significant performance gap, which showcases the existence of label position bias. More importantly, this new metric has a much stronger correlation with performance disparity than existing metrics such as degree [9] and shortest path distance [16], which suggests that the proposed Label Proximity Score might be a more intrinsic measurement of label position bias.
Addressing the label position bias in GNNs is greatly desired. First, the label position bias would cause the fairness issue to nodes that are distant from the labeled nodes. For instance, in a financial system, label position bias could result in unfair assessments for individuals far from labeled ones, potentially denying them access to financial resources. Second, mitigating this bias has the potential to enhance the performance of GNNs, especially if nodes that are distant can be correctly classified. In this work, we propose a Label Position unbiased Structure Learning method (LPSL) to derive a graph structure that mitigates the label position bias. Specifically, our goal is to learn a new graph structure in which each node exhibits similar Label Proximity Scores. The learned graph structure can then be applied across various GNNs. Extensive experiments demonstrate that our proposed LPSL not only outperforms backbone methods but also significantly mitigates the issue of label position bias in GNNs.
2 Label Position Bias
In this section, we provide an insightful preliminary study to reveal the existence of label position bias in GNNs. Before that, we first define the notations used in this paper.
Notations. We use bold upper-case letters such as  $\mathbf{X}$  to denote matrices.  $\mathbf{X}_i$  denotes its  $i$ -th row and  $\mathbf{X}_{ij}$  indicates the  $i$ -th row and  $j$ -th column element. We use bold lower-case letters such as  $\mathbf{x}$  to denote vectors.  $\mathbf{1}_{\mathbf{n}} \in \mathbb{R}^{n \times 1}$  is all-ones column vector. The Frobenius norm and the trace of a matrix  $\mathbf{X}$  are defined as  $\| \mathbf{X} \|_F = \sqrt{\sum_{ij} \mathbf{X}_{ij}^2}$  and  $tr(\mathbf{X}) = \sum_i \mathbf{X}_{ii}$ , respectively. Let  $\mathcal{G} = (\mathcal{V}, \mathcal{E})$  be a graph, where  $\mathcal{V}$  is the node set and  $\mathcal{E}$  is the edge set.  $\mathcal{N}_i$  denotes the neighborhood node set for node  $v_i$ . The graph can be represented by an adjacency matrix  $\mathbf{A} \in \mathbb{R}^{n \times n}$ , where  $\mathbf{A}_{ij} > 0$  indices that there exists an edge between nodes  $v_i$  and  $v_j$  in  $\mathcal{G}$ , or otherwise  $\mathbf{A}_{ij} = 0$ . Let  $\mathbf{D} = \text{diag}(d_1, d_2, \ldots, d_n)$  be the degree matrix, where  $d_i = \sum_j \mathbf{A}_{ij}$  is the degree of node  $v_i$ . The graph Laplacian matrix is defined as  $\mathbf{L} = \mathbf{D} - \mathbf{A}$ . We define the normalized adjacency matrix as  $\tilde{\mathbf{A}} = \mathbf{D}^{-\frac{1}{2}} \mathbf{A} \mathbf{D}^{-\frac{1}{2}}$  and the normalized Laplacian matrix as  $\tilde{\mathbf{L}} = \mathbf{I} - \tilde{\mathbf{A}}$ . Furthermore, suppose that each node is associated with a  $d$ -dimensional feature  $\mathbf{x}$  and we use  $\mathbf{X} = [\mathbf{x}_1, \ldots, \mathbf{x}_n]^\top \in \mathbb{R}^{n \times d}$  to denote the feature matrix. In this work, we focus on the node classification task on graphs. Given a graph  $\mathcal{G} = \{\mathbf{A}, \mathbf{X}\}$  and a partial set of labels  $\mathcal{Y}_L = \{\mathbf{y}_1, \ldots, \mathbf{y}_l\}$  for node set  $\mathcal{V}_L = \{v_1, \ldots, v_l\}$ , where  $\mathbf{y}_i \in \mathbb{R}^c$  is a one-hot vector with  $c$  classes, our goal is to predict labels of unlabeled nodes. For convenience, we reorder the index of nodes and use a mask matrix  $\mathbf{T} = \begin{bmatrix} \mathbf{I}_l & 0 \\ 0 & 0 \end{bmatrix}$  to represent the indices of labeled nodes.
Label Proximity Score. In this study, we aim to study the bias caused by label positions. When studying prediction bias, we first need to define the sensitive groups based on certain attributes or metrics. Therefore, we propose a novel metric, namely the Label Proximity Score, to quantify the closeness between test nodes and training nodes with label information. Specifically, the proposed Label Proximity Score (LPS) is defined as follows:
$$
L P S = \mathbf {P T 1} _ {\mathbf {n}}, \text {a n d} \mathbf {P} = \left(\mathbf {I} - (1 - \alpha) \tilde {\mathbf {A}}\right) ^ {- 1}, \tag {1}
$$
where  $\mathbf{P}$  represents the Personalized PageRank matrix,  $\mathbf{T}$  is the label mask matrix,  $\mathbf{1}_{\mathbf{n}}$  is an all-ones column vector, and  $\alpha \in (0,1]$  stands for the teleport probability.  $\mathbf{P}_{ij}$  represents the pairwise node proximity between node  $i$  and node  $j$ . For each test node  $i$ , its LPS represents the sum of its node proximity values to all labeled nodes, i.e.,  $(\mathbf{PT1}_n)_i = \mathbf{P}_{i;\mathbf{T1}_n} = \sum_{j\in \mathcal{V}_L}\mathbf{P}_{ij}$ .
Sensitive Groups. In addition to the proposed LPS, we also explore two existing metrics such as node degree [9] and shortest path distance to label nodes [16] for comparison since they could be related to the label position bias. For instance, the node with a high degree is more likely to connect with labeled nodes, and the node with a small shortest path to a labeled node is also likely "closer" to all labeled nodes if the number of labeled nodes is small. According to these metrics, we split test nodes into different sensitive groups. Specifically, for node degree and shortest path distance to label nodes, we use their actual values to split them into seven sensitive groups, as there are only very few nodes whose degrees or shortest path distances are larger than seven. For the proposed LPS, we first calculate its value and subsequently partition the test nodes evenly into seven sensitive groups, each having an identical range of LPS values.
Experimental Setup. We conduct the experiments on three representative datasets used in semi-supervised node classification tasks, namely Cora, CiteSeer, and PubMed. We also experiment with three different labeling rates: 5 labels per class, 20 labels per class, and  $60\%$  labels per class. The experiments are performed using two representative GNN models, GCN [17] and APPNP [18], which cover both coupled and decoupled architectures. We also provide the evaluation on Label Propagation (LP) [19] to exclude the potential bias caused by node features. For GCN and APPNP, we adopt the same hyperparameter setting with their original papers. The node classification accuracy on different sensitive groups  $\{1,2,3,4,5,6,7\}$  with the labeling rate of 20 labeled nodes per class under APPNP, GCN, and LP models is illustrated in Figure 1, 2, and 3 respectively. Due to the space limitation, we put more details and results of other models, datasets, and labeling rates into Appendix A.
(b) Shortest Path Distance
(c) Label Proximity Score
Figure 1: APPNP with 20 labeled nodes per class on Cora and CiteSeer datasets.
(a) Degree
Figure 2: GCN with 20 labeled nodes per class on Cora and CiteSeer datasets.
(a) Degree
Figure 3: LP with 20 labeled nodes per class on Cora and CiteSeer datasets.
Observations. From the results presented in Figure 1, 2, and 3, we can observe the following:
- Label Position bias is prevalent across all GNN models and datasets. The classification accuracy can notably vary between different sensitive groups, and certain trends are discernible. To
ensure fairness and improve performance, addressing this bias is a crucial step in improving GNN models.
- While Degree and Shortest Path Distance (SPD) can somewhat reflect disparate performance, indicating that nodes with higher degrees and shorter SPDs tend to perform better, these trends lack consistency, and they can't fully reflect the Label Position bias. For instance, degree bias is not pronounced in the APPNP model as shown in Figure 1, as APPNP can capture the global structure. Moreover, SPD fails to effectively evaluate relatively low homophily graphs, such as CiteSeer [20]. Consequently, there is a need to identify a more reliable metric.
- The Label Proximity Score (LPS) consistently exhibits a strong correlation with performance disparity across all datasets and models. Typically, nodes with higher LPS scores perform better. In addition, nodes with high degrees and low Shortest Path Distance (SPD) often have higher LPS, as previously analyzed. Therefore, LPS is highly correlated with label position bias.
- The Label Propagation, which solely relies on the graph structure, demonstrates a stronger label position bias compared to GNNs as shown in Figure 3. Moreover, the label position bias becomes less noticeable in all models when the labeling rate is high, as there typically exist labeled nodes within the two-hop neighborhood of each test node (detailed in Appendix A). These observations suggest that the label position bias is predominantly influenced by the graph structure. Consequently, this insight motivates us to address the Label Position bias from the perspective of the graph structure.
In conclusion, label position bias is indeed present in GNN models, and the proposed Label Proximity Score accurately and consistently reflects the performance disparity over different sensitive groups for different models across various datasets. Overall, the label proximity score exhibits more consistent and stronger correlations with performance disparity compared with node degree and shortest path distance, which suggests that LPS serves as a better metric for label position bias. Further, through the analysis of the Label Propagation method and the effects of different labeling rates, we deduce that the label position bias is primarily influenced by the graph structure. This understanding paves us a way to mitigate label position bias.
3 The Proposed Framework
The studies in Section 2 suggest that Label Position bias is a prevalent issue in GNNs. In other words, nodes far away from labeled nodes tend to yield subpar performance. Such unfairness could be problematic, especially in real-world applications where decisions based on these predictions can have substantial implications. As a result, mitigating label position bias has the potential to enhance the fairness of GNNs in real-world applications, as well as improve overall model performance. Typically, there are two ways to address this problem, i.e., from a model-centric or a data-centric perspective. In this work, we opt for a data-centric perspective for two primary reasons: (1) The wide variety of GNN models in use in real-world scenarios, each with its unique architecture, makes it challenging to design a universal component that can be seamlessly integrated into all GNNs to mitigate the label position bias. Instead, the graph structure is universal and can be applied to any existing GNNs. (2) Our preliminary studies indicate that the graph structure is the primary factor contributing to the label position bias. Therefore, it is more rational to address the bias by learning a label position unbiased graph structure.
However, there are mainly two challenges: (1) How can we define a label position unbiased graph structure, and how can we learn this structure based on the original graph? (2) Given that existing graphs are typically sparse, how can we ensure that the learned data structure is also sparse to avoid excessive memory consumption? In the following subsections, we aim to address these challenges.
3.1 Label Position Unbiased Graph Structure Learning
Based on our preliminary studies, the Label Proximity Score (LPS) can consistently reflect performance disparity across various GNNs and indicate the label position bias. Therefore, to mitigate the label position bias from the structural perspective, our objective is to learn a new graph structure in which each node exhibits similar LPSs. Meanwhile, this learned unbiased graph structure should maintain certain properties of the original graph. To achieve this goal, we formulate the Label Position
Unbiased Structure Learning (LPSL) problem as follows:
$$
\underset {\mathbf {B}} {\arg \min } \| \mathbf {I} - \mathbf {B} \| _ {F} ^ {2} + \lambda \operatorname {t r} \left(\mathbf {B} ^ {\top} \tilde {\mathbf {L}} \mathbf {B}\right) \tag {2}
$$
$$
\mathrm {s . t .} \quad \mathbf {B T 1} _ {n} = c \mathbf {1} _ {n}, \mathbf {B} _ {i j} \geq 0 \quad \forall i, j
$$
where  $\mathbf{B} \in \mathbb{R}^{n \times n}$  represents the debiased graph structure matrix.  $\mathrm{tr}(\mathbf{B}^{\top} \tilde{\mathbf{L}} \mathbf{B}) = \sum_{(v_i, v_j) \in \mathcal{E}} \| \mathbf{B}_i / \sqrt{d_i} - \mathbf{B}_j / \sqrt{d_j} \|_2^2$  measures the smoothness of the new structure based on the original graph structure. The proximity to identity matrix  $\mathbf{I} \in \mathbb{R}^{n \times n}$  encourages self-loops and avoids trivial over-smoothed structures.  $\lambda$  is a hyperparameter that controls the balance between smoothness and self-loop.  $\mathbf{T}$  is the mask matrix indicating the labeled nodes,  $\mathbf{1}_{\mathbf{n}}$  is the all-ones vector, and  $c$  is a hyperparameter serving as the uniform Label Proximity Score for all nodes. Due to the  $\mathbf{B}$  represents the graph structure, we have the constraint that all elements in  $\mathbf{B}$  should be non-negative.
Notably, if we ignore the constraint, then the optimal solution for this primary problem is given by  $\mathbf{B} = (\mathbf{I} + \lambda \mathbf{L})^{-1} = \alpha (\mathbf{I} - (1 - \alpha \tilde{\mathbf{A}}))^{-1}$ , where  $\alpha = \frac{1}{1 + \lambda}$ . This solution recovers the Personalized PageRank (PPR) matrix which measures pairwise node proximity. Furthermore, the constraint in Eq. (2) ensures that all nodes have the same Label Proximity Score, denoted as  $c$ . The constraint encourages fair label proximity scores for all nodes so that the learned graph structure mitigates the label position bias.
The constrained optimization problem in Eq. (2) is a convex optimization problem, and it can be solved by the Lagrange Multiplier method with the projected gradient descent [21]. The augmented Lagrange function can be written as:
$$
L _ {\rho} (\mathbf {B}, \mathbf {y}) = \| \mathbf {I} - \mathbf {B} \| _ {F} ^ {2} + \lambda \mathrm {t r} (\mathbf {B} ^ {\top} \tilde {\mathbf {L}} \mathbf {B}) + \mathbf {y} ^ {\top} (\mathbf {B T 1} _ {n} - c \mathbf {1} _ {n}) + \frac {\rho}{2} \| \mathbf {B T 1} _ {n} - c \mathbf {1} _ {n} \| _ {2} ^ {2}, \qquad (3)
$$
where  $\mathbf{y} \in \mathbb{R}^{n \times 1}$  is the introduced Lagrange multiplier, and  $\rho > 0$  represents the augmented Lagrangian parameter. The gradient of  $L_{\rho}(\mathbf{B}, \mathbf{y})$  to  $\mathbf{B}$  can be represented as:
$$
\frac {\partial L _ {\rho}}{\partial \mathbf {B}} = 2 (\mathbf {B} - \mathbf {I}) + 2 \lambda \tilde {\mathbf {L}} \mathbf {B} + \mathbf {y} (\mathbf {T} \mathbf {1} _ {n}) ^ {\top} + \rho (\mathbf {B T} \mathbf {1} _ {n} - c \mathbf {1} _ {n}) (\mathbf {T} \mathbf {1} _ {n}) ^ {\top}. \tag {4}
$$
Then, the problem can be solved by dual ascent algorithm [22] as follows:
$$
\mathbf {B} ^ {k + 1} = \underset {\mathbf {B}} {\arg \min } L _ {\rho} (\mathbf {B} ^ {k}, \mathbf {y} ^ {k})
$$
$$
\mathbf {B} _ {i j} ^ {k + 1} = \max  (0, \mathbf {B} _ {i j} ^ {k + 1})
$$
$$
\mathbf {y} ^ {k + 1} = \mathbf {y} ^ {k} + \rho (\mathbf {B} ^ {k} \mathbf {T} \mathbf {1} _ {n} - c \mathbf {1} _ {n}),
$$
where  $k$  is the current optimization step, and  $\mathbf{B}^{k + 1}$  can be obtained by multiple steps of gradient descent using the gradient in Eq. (4).
3.2 Understandings
In this subsection, we provide the understanding and interpretation of our proposed LPSL, establishing its connections with the message passing in GNNs.
Remark 3.1. The feature aggregation using the learned graph structure  $\mathbf{B}$  directly as a propagation matrix, i.e.,  $\mathbf{F} = \mathbf{B}\mathbf{X}$ , is equivalent to applying the message passing in GNNs using the original graph if  $\mathbf{B}$  is the approximate or exact solution to the primary problem defined in Eq. 2 without constraints.
The detailed proof can be found in Appendix B. Remark 3.1 suggests that we can directly substitute the propagation matrix in GNNs with the learned structure  $\mathbf{B}$ . The GNNs are trained based on the labeled nodes, and the labeled nodes would influence the prediction of unlabeled nodes because of the message-passing scheme. Following the definition in [23], the influence of node  $j$  on node  $i$  can be represented by  $I_{i}(j) = \text{sum}\left[\frac{\partial\mathbf{h}_{i}}{\partial\mathbf{x}_{j}}\right]$ , where  $\mathbf{h}_i$  is the representation of node  $i$ ,  $\mathbf{x}_j$  is the input feature of node  $j$ , and  $\left[\frac{\partial\mathbf{h}_i}{\partial\mathbf{x}_j}\right]$  represents the Jacobian matrix. Afterward, we have the following Proposition based on the influence scores:
Proposition 3.1. The influence scores from all labeled nodes to any unlabeled node  $i$  will be the equal, i.e.,  $\sum_{j \in \mathcal{V}_L} I_i(j) = c$ , when using the unbiased graph structure  $\mathbf{B}$  obtained from the optimization problem in Eq. (2) as the propagation matrix in GNNs.
The proof can be found in Appendix B. Proposition 3.1 suggests that by using the unbiased graph structure for feature propagation, each node can receive an equivalent influence from all the labeled nodes, thereby mitigating the label position bias issue.
3.3  $\ell_1$ -regularized Label Position Unbiased Sparse Structure Learning
One challenge of solving the graph structure learning problem in Eq. (2) is that it could result in a dense structure matrix  $\mathbf{B} \in \mathbb{R}^{n \times n}$ . This is a memory-intensive outcome, especially when the number of nodes  $n$  is large. Furthermore, applying this dense matrix to GNNs can be time-consuming for downstream tasks, which makes it less practical for real-world applications. To make the learned graph structure sparse, we propose the following  $\ell_1$ -regularized Label Position Unbiased Sparse Structure Learning optimization problem:
$$
\underset {B} {\arg \min } \| \mathbf {I} - \mathbf {B} \| _ {F} ^ {2} + \lambda \operatorname {t r} \left(\mathbf {B} ^ {\top} \mathbf {L B}\right) + \beta \| \mathbf {B} \| _ {1} \tag {5}
$$
$$
\begin{array}{l l} \text {s . t .} & \mathbf {B T 1} _ {n} = c \mathbf {1} _ {n}, \mathbf {B} _ {i j} \geq 0 \quad \forall i, j, \end{array}
$$
where  $\| \mathbf{B}\| _1$  represents the  $\ell_1$  regularization that encourages zero values in  $\mathbf{B}$ .  $\beta >0$  is a hyperparameter to control the sparsity of  $\mathbf{B}$ . The primary problem in Eq. (5) is proved to have a strong localization property and can guarantee the sparsity [24, 25]. The problem in Eq. (5) can also be solved by the Lagrange Multiplier method. However, when the number of nodes  $n$  is large, solving this problem using conventional gradient descent methods becomes computationally challenging. Therefore, we propose to solve the problem in Eq. (5) efficiently by Block Coordinate Descent (BCD) method [26] in conjunction with the proximal gradient approach, particularly due to the presence of the  $\ell_1$  regularization. Specifically, we split  $\mathbf{B}$  into column blocks, and  $\mathbf{B}_{:,j}$  represents the  $j$ -th block. The gradient of  $L_{\rho}$  with respect to  $\mathbf{B}_{:,j}$  can be written as:
$$
\frac {\partial L _ {\rho}}{\partial \mathbf {B} _ {: , j}} = 2 (\mathbf {B} _ {:, j} - \mathbf {I} _ {:, j}) + 2 \lambda \tilde {\mathbf {L}} \mathbf {B} _ {:, j} + \mathbf {y} (\mathbf {T} \mathbf {1} _ {n}) _ {j} ^ {\top} + \rho (\mathbf {B T} \mathbf {1} _ {n} - c \mathbf {1} _ {n}) (\mathbf {T} \mathbf {1} _ {n}) _ {j} ^ {\top}, \tag {6}
$$
where  $(\mathbf{T1}_n)_j \in \mathbb{R}^{d \times 1}$  is the corresponding block part with block size  $d$ . After updating the current block  $\mathbf{B}_{\cdot,j}$ , we apply a soft thresholding operator  $S_{\beta/\rho}(\cdot)$  based on the proximal mapping. The full algorithm is detailed in Algorithm 1. Notably, lines 6-8 handle the block updates, line 9 performs the soft thresholding operation, and line 11 updates Lagrange multiplier  $\mathbf{y}$  through dual ascent update.
3.4 The Model Architecture