{'fraction_non_alphanumeric': 0.030190650300339513, 'fraction_numerical': 0.01002872812744842, 'mean_word_length': 4.992488262910798, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SMARTQUERY: An Active Learning Framework for Graph Neural Networks through Hybrid Uncertainty Reduction

Graph neural networks have achieved significant success in representation learning. However, the performance gains come at a cost; acquiring comprehensive labeled data for training can be prohibitively expensive. Active learning mitigates this issue by searching the unexplored data space and prioritizing the selection of data to maximize model's performance gain. In this paper, we propose a novel method SMARTQUERY, a framework to learn a graph neural network with very few labeled nodes using a hybrid uncertainty reduction function. This is achieved using two key steps: (a) design a multi-stage active graph learning framework by exploiting diverse explicit graph information and (b) introduce label propagation to efficiently exploit known labels to assess the implicit embedding information. Using a comprehensive set of experiments on three network datasets, we demonstrate the competitive performance of our method against state-of-the-arts on very few labeled data (up to 5 labeled nodes per class).


INTRODUCTION
Graph neural networks (GNNs) have played a pivotal role in the success of graph representation learning where models can embed graph data into low-dimensional space [15,19,21,22]. Specifically, GNNs follow a well-designed message-passing scheme, where the nodes aggregate and transform the information from their neighbors in each layer [8]. However, gathering enough labeled data for training can be expensive in many practical applications, e.g., financial risk modeling and corporate security analytics [4]. One can manually label the objects, but this quickly becomes impractical for large volumes of data. Selecting a part of data for labeling is also non-trivial as different sets of training nodes can lead to very different graph representation results [7]. Consequentially, this challenges the feasibility of GNNs in real-world applications.
Active learning (AL) [1-3, 6, 7, 18, 20] is a popular technique to alleviate label sparsity issue. The general idea is to dynamically query the most informative instances from the unlabeled data. The queried data points are then labeled by an oracle and iteratively integrated to expand the pool of the training data [9]. The pool size is restrained by a given labeling budget. Traditional AL algorithms are designed for independent and identically distributed (i.i.d.) data such as natural language processing and computer vision. However, there are few studies that address the application of AL on graphstructured data where there are strong interactions between nodes.
Studies such as [3,7,9] and [1] integrate GNNs with AL to improve the representative power of graph embeddings. Some of the methods [3,7] combine AL metrics that work independently on different input spaces to compute the data informativeness and fail to interactively capture the knowledge. While [9] requires full labels of source graphs to learn a transferable network which is resource-consuming. Moreover, most of the mechanisms [1,3,7] overconfidently rely on the information of node embeddings which is known to be misleading especially when model is under-trained during AL [5,12]. In response to these challenges, we design a hybrid graph uncertainty reduction strategy to approximate the model performance measure of interest to select informative nodes. In particular, we introduce label propagation (LP) [13] to facilitate the training oracle without retraining the model when estimating the node informativeness. Label propagation [10,13,23,24] is a typical type of graph-based semi-supervised learning method where the model speedily diffuses the known label information to the graph based on node interactions. In addition, we extensively exploit the arXiv:2212.01440v1 [cs.
LG] 2 Dec 2022 graph explicit information from different perspectives to reduce model bias and narrow down the nodes selection pool for saving computation costs.
To this end, we focus on realistic AL cases where only very few labeled data are available to obtain in our study, and propose a multi-stage AL framework called SmartQuery for graph representation learning. In SmartQuery, we make most of the graph topological information in the beginning stage to sample centralized nodes as our candidates. It not only benefits from the explicit graph knowledge but also narrows down the candidates for computation efficiency. Then, we design a hybrid graph uncertainty reduction metric to approximately measure the implicit contribution of candidate nodes to the model performance. Since it is unrealistic to retrain the model every time to estimate the information gain for each new candidate node during the query procedure, we use LP [23] to simulate the GNN training in a feasible way and quickly assess the node informativeness in terms of the model's performance enhancement. We conduct comprehensive experiments to evaluate the performance of our framework on benchmark datasets and demonstrate its effectiveness.

PROBLEM STATEMENT
In this work, we focus on AL with limited labeling budget for node classification task where only a small number of nodes are available to annotate. Following the footsteps of [1,3,7,9], we adopt a graph convolutional network (GCN) [11] in our semi-supervised active graph learning framework.
Without loss of generality, we denote an undirected and unweighted graph to be = ( , , ), where ( = | |) is the set of graph nodes, is the set of edges specifying relationships, and ∈ R × is feature matrix. Nodes are divided into labeled node set ( = | |) and unlabeled node set ( = | |). The GCN model is trained to perform the node classification through AL. In the training oracle, the is randomly initialized with a small set of labeled nodes. The model starts with the regular training on the set in each iteration. Given the model trained in the iteration , a pool of unlabeled nodes and labeling budget , our framework proceeds to select one unlabeled node from to annotate, and update the to the next training oracle +1 . The node query procedure stops until reaches the budget and whole AL framework ends until finishing the training. Therefore, the objective of this work is to optimize the GCN's performance by integrating the designed AL query strategy to choose . The loss function is defined as the cross-entropy error over all labeled nodes, where is the trainable weight matrix, is the indices of training nodes , and is the hyperparameter. Notely, comes from two parts: the initialized labeled nodes ; and the queried set via our node query strategy .

Graph Uncertainty Reduction
In the beginning iteration, a base model is trained on the initial labeled set. Then the framework proceeds with annotating one more selected node each time and continuously train the model on updated labeled set . As one of the most common query criteria, uncertainty is widely used to measure the node informativeness [3,7]. The nodes with high uncertainty are considered to be more informative. Specifically, it is usually obtained via computing the entropy of node embedding results. However, the GCN model in AL tends to be highly under-trained and unreliable that might be overconfident about the nodes it knows nothing about [18]. Relying on singular node embedding to compute uncertainty can riskily introduce model biases [3,7]. To avoid that, we first compute the graph uncertainty to indicate the model's uncertain status by adding up the entropy of all node embeddings during training, where is the probability result of the classifier for node being classified as , and is the number of classes. Then we compute the graph uncertainty reduction Δ in two sequential training stages [ , ( +1) ] to approximately estimate the information gain of model by selecting different nodes for training.
However, there are two main challenges in such designs. First, measuring all unlabeled nodes to estimate the information gain is inapplicable as the size of unlabeled data pool can be very large. Moreover, it is infeasible to retrain the model step ahead with every new labeled candidate to calculate the graph uncertainty reduction. Second, the entropy overemphasizes implicit information from the embedding space which is inaccurate and untrustworthy in model's training stage, while the graph's explicit structural information is crucial for graph learning and should not be underrated. They can play a vital role in ruling out non-important nodes in model training and guide our node selections. Therefore, we delicately design Candidate Pooling and LP-based Hybrid Uncertainty Reduction to advance our method.

Candidate Pooling
In this step, we aim to design a pooling strategy to leverage more accurate explicit graph information to sample out more representative nodes at the beginning of node selection. By filtering out a large body of unlabeled candidates, we can also extremely reduce the following computation cost. Specifically, we utilize two types of informativeness measurements to sample nodes.
Degree informativeness: node locates at dense regions is considered to have more impact. Especially for GCN, node with more connections tends to have broader impact in information aggregation and thus are viewed to be more valuable to guide model training. In this step, we straightforwardly calculate the degree of each node as , where is the adjacency matrix of graph, = 1 if node connects with node , otherwise 0. PageRank informativeness: it focus on the number and the quality of node links within graph. PageRank [14] is a well-known metric in assessing node centrality in graph [3,7]. Unlike the degree metric, it weighs more emphasis on node interactions. The node with low degree can possibly have high PageRank value as  Figure 1: The SmartQuery conducts one-time candidate pooling to filter representative candidates. In each iteration, the GCN model trains on the updated labeled set, then LP is performed to approximately estimate the hybrid graph uncertainty reduction of each unlabeled candidate and select one to annotate. When reaching the labeling budget, the model continuously completes the regular training.
it may link with important nodes. It helps us explore the intrinsic graph structural information to measure the node information comprehensively. Specifically, it is calculated as follows, where is the damping parameter, indicates the degree of node in graph. We simply add the two normalized metric results as the pooling score and choose the top ones as final candidates for future node querying process.

Hybrid uncertainty Reduction through LP
Once we restrict our candidate pool to a reasonable size, we estimate the performance improvement that each candidate can bring to the model and choose the best one to annotate in each iteration. To simulate the GCN training, we choose LP [23] to efficiently compute the estimated graph uncertainty. LP is a traditional way of learning from labeled and unlabeled data. It focus on the known labels and can quickly spread the label information to its neighbors. In our case, we define the symmetrically normalized adjacency matrixâ s our label spreading matrix in LP. The label propagation rule is defined as, where is the parameter in (0, 1), which controls the percentage of information that node received from its neighbors and its initial label information. For each candidate , we annotate it with all possible classes and use LP to propagate the label information until converge for each class. Then we compute the approximated graph uncertainty reduction for as follows where ( ( , ) is the graph uncertainty after label propagation with the current labled set and labeled candidate node which is annotated as class .
For each candidate, we aim to label it all possible classes to compute the expected graph uncertainty reduction. However, different classses do not share the same annotation probabilities. Take binary classification as an example, if a node that tends to be classified as label 1 is labeled as 0, it won't contribute the performance gain but hurt the model performance. To handle this and take advantage of the implicit node embedding information, we introduce nodes' predicted class probabilities to our query criteria and design a hybrid graph uncertainty reduction as follows, where is the probability of node being class from current GCN model. According to the calculated hybrid graph uncertainty reduction, we select the node with largest value to annotate and add it to the labeled set for further training.

EXPERIMENTS 4.1 Experimental Setup
Datasets. We evaluate the performance of our proposed framework on three benchmark datasets: Cora, Citeseer, and Pubmed [16]. In these citation networks, each node represents a publication document and each edge indicates the citation relations between two works. Table 1 summarizes their basic properties.
Baselines. In our study, we choose six state-of-the-art GNN-based AL methods to be our baselines. (1) AGE [3]: It linearly combines three metrics, and then labelizes the node with highest score; (2) ABRMAB [7]: It upgrades AGE by learning the combination weights of metrics using an exponential MAB updating rule; (3) Coreset [17]: It performs a K-Center clustering over the node embeddings and tends to annotate those center nodes. (4) Degree: It iteratively annotates the node with the largest degree in graph; (5) Random [9]: It randomly chooses nodes from the unlabeled set to annotate; (6) Entropy [9]: It computes the entropy of nodes' predicted probability vector and annotate the one with the highest value.
Parameter settings. In our experiments, we set the training epoch as 300. We use 1, 000 labeled nodes as testing set, and sample 500 nodes from the non-testing nodes for validation. We run 10 times random sampling to generate different validation sets. For each setting, we repeat 20 times experiments for evaluation. Therefore, each evaluation is conducted 200 times and we obtain their average values as final results. In each dataset, we set the number of initialized labeled nodes to be = 1 per class and restrict the maximum number of labeled nodes to be = 5 per class. The labeling budget = − for each class. The label rate in Table 1 indicates the percentage of labeled nodes over the total number of nodes. In the candidate pooling, we set the pool size as 2 × per class. As evaluation metrics, we adopt Macro-F1 and Micro-F1 [15] to measure the node classification performance.

Evaluation
Effectiveness. In this section, we compare SmartQuery against baseline strategies and comprehensively analyze its performance over three datasets under different settings.

Comparisons with Baselines.
In this part, we compare our method with state-of-the-art strategies including AGE [3], ABRMAB [7], Coreset [17], Random [9] and Entropy [9] over three different datasets. Table 2 illustrates the evaluation results in a format of classification accuracy and its standard deviation. From the table, we surprisingly find that the Random can achieve comparable results with the Entropy which further verifies the randomness and unreliability of graph embeddings during AL, particularly for those training cases with few labeled data. From the results, we can also learn that our method outperforms all the baselines on Cora and Citeseer. To be specific, SmartQuery improves the classification accuracy on Cora to a scale of (4.89%-18.17%) on Macro-F1 and (4.30%-13.42%) on Micro-F1, and achieves an obvious performance increase on Macro-F1 (4.02%-31.78%) and Micro-F1 (3.26%-27.01%) for Citeseer. For Pubmed, SmartQuery obtains higher results than the majority of baselines except that it slightly underperforms AGE on Micro-F1. However, our method turns out to have better generalization than AGE over all datasets as it obtains more stabilized results (smaller invariants on average).

Effectiveness on Different Labeling Budgets.
In this experiment, we assess the model's performance in SmartQuery with different labeling budgets for each dataset. Specifically, we evaluate our AL-based GCN training framework with ∈ {2, 4, 6, 8, 10, 12} for each class of the dataset respectively, while the other parameters retain the same setting. The experimental results are presented in Figure 2. We can find that with the training size increases, the model performance improves gradually as more node information is exploited. But the upward speed slows down since the newlyadded nodes do not provide as much benefit as prior ones to the model information gains. The overall performance varies in different datasets due to various underlying distributions. Note that our method achieves intriguing results for Pubmed on both Macro-F1 and Micro-F1 even it has the smallest label rate.

Ablation Study
In this section, we conduct the ablation study to further investigate how different components contribute to the performance of our framework design. From its composition, we continuously add different components and formulate three types of workflows: (1) GCN: regular GCN training with randomly selected nodes for annotation; (2) GCN+Pool: annotate the node with the highest metric score from pooling procedure; (3) GCN+Pool+LP: the complete design of our method. To validate the benefit of leveraging graph explicit information in our pooling step, we add two variants: (4) GCN+LP: replace the original pooling with random sampling; (5) GCN+embedding+LP: followed by [3], we utilize Kmeans to compute the information density based on node embeddings as the pooling criteria. The results are reported in Table 3.   From the results, we can see that the pooling step plays an important role as it significantly upgrades the GCN performance by 16.39%. It proves that the explicit information we extract from graph can accurately lead us to find those more informative nodes in the early stage. In contrast, over-relying on embeddings from undertrained model can even degrade the results as the predicted results can be biased, e.g., + .+ underperforms + . The LP component can slightly improve the GCN training as it provides more insight towards information gain than random selections, our complete design can further advance the model performance to a high level. These observations reaffirm the superiority of our design on AL over GCNs within very few labeled data.

CONCLUSION
In this work, we design a practical AL framework for GNNs named SmartQuery. It calculates the implicit information gain from different nodes by utilizing a hybrid uncertainty reduction scheme to automatically select representative nodes and facilitate active graph learning. Moreover, we extract explicit graph structural information for node querying guidance to effectively reduce model uncertainty and expedite the training. We conduct extensive experiments and the ablation study to unveil the insight of integrating different sources of graph information for AL-based GNN training under very few labeled nodes. The state-of-the-art results validate its effectiveness and superiority against baselines.