{'fraction_non_alphanumeric': 0.03624992978448518, 'fraction_numerical': 0.00838841350384781, 'mean_word_length': 4.768848563404623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Binary Graph Convolutional Network with Capacity Exploration

The current success of Graph Neural Networks (GNNs) usually relies on loading the entire attributed graph for processing, which may not be satisfied with limited memory resources, especially when the attributed graph is large. This paper pioneers to propose a Binary Graph Convolutional Network (Bi-GCN), which binarizes both the network parameters and input node attributes and exploits binary operations instead of floating-point matrix multiplications for network compression and acceleration. Meanwhile, we also propose a new gradient approximation based back-propagation method to properly train our Bi-GCN. According to the theoretical analysis, our Bi-GCN can reduce the memory consumption by an average of ~31x for both the network parameters and input data, and accelerate the inference speed by an average of ~51x, on three citation networks, i.e., Cora, PubMed, and CiteSeer. Besides, we introduce a general approach to generalize our binarization method to other variants of GNNs, and achieve similar efficiencies. Although the proposed Bi-GCN and Bi-GNNs are simple yet efficient, these compressed networks may also possess a potential capacity problem, i.e., they may not have enough storage capacity to learn adequate representations for specific tasks. To tackle this capacity problem, an Entropy Cover Hypothesis is proposed to predict the lower bound of the width of Bi-GNN hidden layers. Extensive experiments have demonstrated that our Bi-GCN and Bi-GNNs can give comparable performances to the corresponding full-precision baselines on seven node classification datasets and verified the effectiveness of our Entropy Cover Hypothesis for solving the capacity problem.


INTRODUCTION
G RAPH, which represents data with complicated relationships, is extensively employed in real world applications. In recent years, Graph Neural Networks (GNNs) have achieved impressive performances in a wide variety of tasks, due to their superior representation abilities on irregular graph data. Examples include biology prediction [1], [2], social analysis [3], [4], traffic prediction [5], [6], etc.
Unfortunately, current GNNs are designed under an implicit assumption that the input of GNNs contains the entire attributed graph [7], [8], [9]. If the entire graph is too large to be fed into GNNs (due to limited memory resources), in both the training and inference process, which is highly likely when the scale of the graph increases, the performances of GNNs may degrade drastically.
To tackle this problem, an intuitive solution is sampling, i.e., sampling subgraphs with suitable sizes to be separately loaded into GNNs. Then, GNNs can be trained with subgraphs via a mini-batch scheme. The sampling-based methods can be classified into three categories, neighbor sampling [10], [11], [12], layer sampling [13], [14], and graph sampling [15], [16], [17]. Neighbor sampling selects a fixed number of neighbors for each node in the next layer to ensure that every node can be sampled. Thus, it can be utilized in both the training and inference process. Unfortunately, when the number of layers increases, the problem of neighbor explosion [17] arises, such that both the training and inference time (a) (b) Fig. 1. Performances on the Cora dataset. Note that the model size is measured in bits. The number of cycle operations, which will be introduced in Sec. 5, is employed to reflect the inference speed. Our Bi-GCN gives the fastest inference speed and the lowest memory consumption with comparable accuracy.
will increase exponentially. Different from neighbor sampling, layer sampling usually samples a subgraph in each layer, while graph sampling constructs a set of subgraphs and builds a full GNN on each subgraph. These two types of approaches directly sample subgraphs in the training process thus they can avoid the problem of neighbor explosion. However, they cannot guarantee that every node can be sampled for at least once in the whole training/inference process. Thus, they are only feasible for the training process, because the testing process usually requires GNNs to process every node in the graph. Another feasible solution is compression, i.e., compressing the size of the input graph data and the GNN model to better utilize the limited memory and computational resources. Certain approaches have been proposed to compress the convolutional neural networks (CNNs), such as designing shallow networks [18], arXiv:2210.13149v1 [cs.LG] 24 Oct 2022 pruning [19], designing compact layers [20], and quantizing the parameters [21]. Among these approaches, quantization has been widely employed in practice, due to its excellent performance in reducing memory consumption and computational complexity. Binarization [21], [22], [23], a special type of quantization-based methods, has achieved great success in many CNN-based vision tasks, when a faster speed and lower memory consumption is desired.
Unfortunately, compared to the compression of CNNs, the compression of GNNs possesses unique challenges. Firstly, since the input graph data is usually much larger than the GNN models, the compression of the loaded data demands more attention. Secondly, the nodes tend to be similar to their neighbors in the high-level semantic space, while they tend to be different in the low-level feature space. This characteristic is different from the grid-like data, such as images, videos, etc. It requires the compressed GNNs to possess sufficient parameters for the representation learning. At last, GNNs are generally shallow, e.g., the standard GCN [7] only has two layers, which contain fewer redundancies. Thus, the compression of GNNs is more challenging to be achieved.
To tackle the memory and complexity issues, SGC [24], an 1layered GNN, compresses GCN [7] by removing its nonlinearities and collapsing weight matrices between consecutive layers. This 1-layered GNN can accelerate both the training and inference processes with comparable performance. Although SGC compresses the network parameters, it does not compress the loaded data, which is the primary memory consumption when processing the graphs with GNNs.
In this paper, to alleviate the memory and complexity issue, we pioneer to propose a binarized GCN, named Binary Graph Convolutional Network (Bi-GCN), a simple yet efficient approximation of GCN [7], by binarizing the parameters and node attribute representations. Specifically, the binarization of the weights is performed, by splitting them into multiple feature selectors and maintaining a scalar per selector to reduce the quantization errors further. Similarly, the binarization of the node features can be carried out by splitting the node features and assigning an attention weight to each node. With the employment of these additional scalars, more efficient information can be learned and retained efficiently. After binarizing the weights and node features, the computational complexity and the memory consumptions, which are induced by the network parameters and input data, can be vastly reduced. Since the existing binary back propagation method [22] has not considered the relationships among the binary weights, we also design a new back propagation method by tackling this issue. An intuitive comparison between our Bi-GCN and the baseline methods is shown in Figure 1, which demonstrates that our Bi-GCN can achieve the fastest inference speed and lowest memory consumption with a comparable accuracy compared to the standard full-precision GNNs.
In general, our proposed Bi-GCN can reduce the redundancies in the node representations while maintaining the principle information. When the number of layers increases, Bi-GCN also gives a more obvious reduction of the memory consumptions of the parameters and effectively alleviates the overfitting problem. Besides, our binarization approach of Bi-GCN can be easily applied to other GNNs. We introduce a general binarization approach to binarize other variants of GNN. To combine the binarization with other efficient techniques, like attention and sampling, we give the detailed binarized version of three of the most popular GNNs, i.e., GAT, GraphSAGE, and GraphSAINT, followed by the general binarization approach. Experiments verify that these Bi-GNNs are also effective.
Similar to other compressed neural networks, our Bi-GCN and other Bi-GNNs may also meet the capacity problem. For example, we assume that a floating-point GCN achieves the peak performance for the semi-supervised classification task with exactly enough parameters, which indicates that the information storage capacity of this GCN is just appropriate for this task. Under such circumstance, a direct binarization of this specific floating-point GCN may not function decently, because the storage capacity is decreased after the binarization. To solve this problem, a practical solution is to increase the width of the hidden layer to empirically search for a suitable capacity. However, it is still unclear why the searched width is appropriate to approximate the storage capacity of the floating-point GCN.
To tackle this capacity problem theoretically, we propose an Entropy Cover Hypothesis to estimate the lower bound of the proper width of binary hidden layers of Bi-GNNs, compared to the floating-point GNNs. According to the information theory, entropy and maximum discrete entropy can represent the actual amount of information and the storage capacity [25]. The Entropy Cover Hypothesis assumes that the storage capacity of the hidden layer in Bi-GNN should be no smaller than the amount of information of the hidden layer in a well-trained GNN. Then, we can further conclude that the lower bound of the width of Bi-GNN hidden layers, which is equivalent to the storage capacity, should be no smaller than the maximum entropy of the hidden layers in the well-trained corresponding floating-point GNN. The effectiveness of the proposed hypothesis can be proven experimentally.
The contributions are summarized as follows: • We pioneer to propose a binarized GCN, named Binary Graph Convolutional Network (Bi-GCN), which can significantly reduce the memory consumptions by ∼31x for both the network parameters and input node attributes, and accelerate the inference by an average of ∼51x, on three citation networks, theoretically.
• We design a new back propagation method to effectively train our Bi-GCN, by considering the relationships among the binary weights in the back propagation process.

•
We introduce a general method to generalize our binarization approach to other GNNs. With respect to the significant memory reductions and accelerations, our binarized GNNs can also give comparable performance to the floating-point GNNs on seven node classification tasks.

•
We propose an Entropy Cover Hypothesis, which theoretically analyzes the capacity problem, to describe the lower bound of the proper width for binary hidden layers of Bi-GNNs.
A preliminary version of this paper was published in [26]. This paper significantly improves [26] in the following aspects. (i) We introduce a general binarization approach for other variants of GNNs to combine the advantages of binarization with other efficient techniques, while [26] mainly focuses on the design of Bi-GCN. (ii) The Entropy Cover Hypothesis, which gives a theoretical explanation for the capacity problem, is proposed to describe the lower bound of the proper width of binary hidden layers of Bi-GNN according to a well-trained floating-point GNN. (iii) More evaluations are conducted with the newly proposed benchmark, OGB [27], which further demonstrate the effectiveness of the proposed Bi-GCN and Bi-GNNs.
The rest of this paper is organized as follows. Section 2 reviews the related literatures of the sampling techniques for GNNs, as well as the binarization methods for CNNs. Section 3 defines the mathematical notations and introduces the popular Graph Convolution Network [7]. Section 4 presents the proposed Bi-GCN and the generalized binarization approach. Section 5 analyzes the efficiencies of the Bi-GNNs obtained via our binarization approach. Section 6 introduces the proposed Entropy Cover Hypothesis. Section 7 discusses the experimental results on seven node classification datasets. At last, section 8 concludes this paper.
As the first attempt, the neighbor sampling method in Graph-SAGE [10] samples a local neighborhood for each node and then aggregates the neighborhood to obtain its local features. PinSAGE [11] further improves the neighbor sampling of [10] by considering the importance of different neighbors, which is determined by the visit count of random walk. However, the total number of the sampled neighbors will grow exponentially when the depth of the GNN model grows, which is named as the neighbor explosion problem. To alleviate this issue, VRGCN [12] reduces the neighborhood size of [10] by selecting only two neighbors from the previous layer. The historical activations of each node are utilized to maintain the stability of the estimator.
Different from the neighbor sampling mechanism, FastGCN [13] directly samples a subgraph via an importance sampling strategy in each layer to accelerate the training process. Since this layer-wise graph sampling method does not obey the scheme of neighbor sampling, it can avoid neighbor explosion. However, the sampled nodes in FastGCN [13] are not necessarily connected. Therefore, the sampled subgraph may be too sparse to represent the local neighborhood and this strategy tends to sacrifice the classification accuracy. LADIES [14] further improves this strategy in FastGCN [13] by generating samples from the neighborhood of the node which is already sampled in the previous layer.
Instead of sampling the layer-wise subgraphs, graph sampling methods generate a set of subgraphs as mini-batches and train GNN directly on the sampled subgraphs. Frontier sampling method [15] generates subgraphs via a multi-dimensional random walk algorithm to ensure the connectivity in each subgraph. GraphSAINT [17] proposes an edge sampling method with low variance and a graph sampling training framework with unbiased estimators. However, in these graph sampling methods, local connections tend to be more sparse when the scale of the graph grows. On the contrary, graph clustering algorithms is utilized in ClusterGCN [16] to partition the graph into several subgraphs. To better utilize the between-subgraph links, subgraphs are randomly selected to form mini-batches. Unfortunately, this partition algorithm demands additional computations for the clustering.
Note that the idea of sampling is also utilized to alleviate oversmoothing. The over-smoothing phenomenon is firstly introduced in [30], i.e., the features of the nodes in a connected component will become indistinguishable when the depth of GCN increases. DropEdge [31] randomly drops out/removes edges at a specific rate in the training process. It makes the node connections more sparse and hence alleviates the potential over-smoothing.

Binarization Methods for CNNs
Despite achieving great successes in many fields, CNNs also suffer from specific issues such as over-parametrization and high computational costs. Binarization, which attempts to binarize the weights and/or the activations in the neural networks, is a promising network compression technique to reduce the consumptions of memory and computations. BinaryConnect [32] binarizes the network parameters and replaces most of the floating-point multiplications in the inference process with floating-point additions. BinaryNet [33] further binarizes the activation function and employes the XNOR (not-exclusive-OR) operations instead of the floating-point additions. XNOR-Net [22] proposes a binarization method with scalars and successfully applies it to the famous CNNs, such as Residual Networks [34] and GoogLeNet [35].

Notations
Here, we define the notations utilized in this paper. We denote an undirected attributed graph as G = {V, E, X } with a set of vertices, is the collection of all the features in all the nodes. A = [a ij ] ∈ R N ×N represents the adjacency matrix, which reveals the relationships between each pair of vertices, i.e., the topology information of G. d i = j a ij stands for the degree of node v i , and D = diag(d 1 , d 2 , . . . , d n ) represents the degree matrix corresponding to the adjacency matrix A. Then,Â = A + I is the adjacency matrix of the original topology with self-loops, andD is its corresponding degree matrix withD ii = jâ ij . Note that we employ the superscript "(l)" to represent the l-th layer, e.g., H (l) is the input node features to the l-th layer.

Graph Convolutional Network
Graph Convolutional Network (GCN) [7] has become the most popular graph neural network in the past few years. Since our binarization approach takes GCN as the basis GNN, we briefly review GCN here.
Given an undirected graph G, the graph convolution operation can be described as out contains the learnable parameters. Note that H (l+1) is the output of the l-th layer as well as the input of the (l + 1)-th layer, and H (0) = X. σ is the non-linear activation function, e.g., ReLU.
From the perspective of spatial methods, the graph convolution layer in GCN can be decomposed into two steps, whereÃH (l) is the aggregation step and H (l) W (l) is the feature extraction step. The aggregation step tends to constrain the node attributes in the local neighborhood to be similar. After the aggregation, the feature extraction step can easily extract the commonalities between the neighboring nodes. GCN typically utilizes a task-dependent loss function, e.g., the cross-entropy loss for the node classification tasks, which is defined as where V label stands for the set of the labeled nodes, C denotes the number of classes, Y represents the ground truth labels, and Y = sof tmax(H (L) ) are the predictions of the L-layered GCN.

BINARY GRAPH CONVOLUTIONAL NETWORK
This section presents the proposed Binary Graph Convolution Network (Bi-GCN), a binarized version of the standard GCN [7]. As mentioned in the previous section, a graph convolution layer can be decomposed into two steps, aggregation and feature extraction. In Bi-GCN, we only focus on binarizing the feature extraction step, because the aggregation step possesses no learnable parameters (which yields negligible memory consumption) and it only requires a few calculations (which can be neglected compared to the feature extraction step). Therefore, the aggregation step of the original GCN is maintained. For the feature extraction step, we binarize both the network parameters and node features to reduce the memory consumptions. To reduce the computational complexities and accelerate the inference process, the XNOR (notexclusive-OR) and bit count operations are utilized, instead of the traditional floating-point multiplications. Then, we design an effective back-propagation algorithm for training our binarized graph convolution layer. At last, we introduce a general method to apply our binarization approach to other GNNs and give examples of three commonly used GNNs, i.e., GAT, GraphSAGE, and GraphSAINT.

Vector Binarization
Firstly, we introduce the vector binarization approach, which is a vital part of our binarization process. Considering that there exists a vector V = (V 1 , V 2 , ..., V t ), we aim to obtain its binarized approximation with a binary vector V B = {−1, 1} t and a realvalued scalar α, such that V ≈ αV B . This approximation can be formulated as By minimizing the above optimization problem, the optimal solution [22] can be computed via where sign(·) is the signum function which extracts the sign of a real number. Then, if there exists another vector I = (I 1 , I 2 , ..., I t ), the inner product of I and V can be approximated via where · denotes the vector inner product. If a further binarization to the vector I is desired to compress this inner product, it can be achieved via binary vector and β is a scalar. If we intend to minimize the straightforward approximation error |I · V − αβI B · V B | and compute the optimal solution to this optimization problem, an optimal solution, |I B · V B | = 1 and αβ = sign(I B · V B )I · V , can easily be calculated. Unfortunately, this solution possesses a strong dependency on the value of I ·V , and it tends to lose a large amount of information of the original vectors. To alleviate this issue, we define the approximation problem of the inner product where denotes the element-wise product. Similar to Eq. 3, the optimal solution can be calculated via Then, Eq. 6 can be reformed to Eq. 12 is essentially the result of binarizing both I and V according to our vector binarizing algorithm.

Binarization of the Feature Extraction Step
Based on the vector binarization algorithm, we can perform the binarization to the feature extraction step Z (l) = H (l) W (l) in the graph convolution shown in Eq. 1. Note that for this feature extraction (matrix multiplication) step, we adopt the bucketing [36] method to generalize the binary inner product operation to the binary matrix multiplication operation. Specifically, we split the matrix into multiple buckets of consecutive values with a fixed size and perform the scaling operation separately.

Binarization of the Parameters
Since each column of the parameter matrix of the l-th layer W (l) serves as a feature selector in the computation of Z (l) , each column of W (l) is splitted as a bucket. Let ), which are the scalars for each bucket. Then, the binarization of W (l) can be achieved based on the buckets and their corresponding scalars. Note that the value of scalar α (l) actually determines the importance of each feature and can thus be considered as a feature attention.
out be the binarized buckets of W (l) . Then, based on the vector binarization algorithm, the optimal B (l) and α (l) can be easily calculated by where W :,j represents the j-th column of W (l) . It can be approximated via Based on Eq. 15, the graph convolution operation with binarized weights can then be described as where H (l+1) p is the binary approximation of H (l+1) with the binarized parametersW (l) . The binarization of the parameters can reduce the memory consumption by a factor of ∼30x, compared to the parameters with full precision.

Binarization of the Node Features
Due to the over-smoothing issue [30] induced by the current graph convolution operation, current GNNs are usually shallow, e.g., the vanilla GCN only contains 2 graph convolution layers. Although the future GNNs may possess a larger model, the data sizes of commonly employed attributed graphs are usually much larger than the current model size. To reduce the memory consumption of the input data, which is mostly induced by the node features, we also perform binarization to the node features which will be processed by the graph convolutional layers.
To binarize the node features, we split H (l) into row buckets based on the constraints of the matrix multiplication to compute Z (l) , i.e., each row of H (l) will conduct an inner product with each column of W (l) . Let β (l) = (β in be the binarized buckets. Then, with the vector binarization algorithm, the optimal β and F can be computed by where H (l) i,: represents the i-th row of H (l) . Then, the binary approximation of H (l) can be obtained via Intuitively, β can be considered as the node-weights for the feature representations. At last, the graph convolution operation with binarized weights and node features can be formulated as Note that this binarization of the node features, i.e., the input of the graph convolutional layer, also possesses the ability of activation. Thus we do not employ specific activation functions (such as ReLU). Similar to the binarization of the weights, the memory consumption of the loaded attributed graph data can be reduced by a factor of ∼30x compared to the vanilla GCN.

Binary Operations
With the binarized graph convolutional layers, we can accelerate the calculations by employing the XNOR and bit-count operations instead of the floating-point additions and multiplications. Let ζ (l) represent the approximation of Z (l) . Then, Since each element of F (l) and B (l) is either -1 or 1, the inner product between these two binary vectors can be replaced by the binary operations, i.e., XNOR and bit count operations. Then, Eq. 21 can be re-written as where denotes a binary multiplication operation using the XNOR and a bit count operations. The detailed process is illustrated in Figure 2. Therefore, the graph convolution operation in the vanilla GCN can be approximated by where ζ (l) is calculated via Eq. 22 and H  It will significantly accelerate the processing speed of the graph convolutional layers.

Binary Gradient Approximation Based Back Propagation
The critical parts of our training process include the choice of the loss function and the back-propagation method for training the binarized graph convolutional layer. The loss function employed in our Bi-GCN is the same as the vanilla GCN, as shown in Eq. 2. Since the existing back-propagation method [22] has not considered the relationships among the binary weights, to perform back-propagation for the binarized graph convolutional layer, the gradient calculation is desired to be newly designed.
To calculate the actual propagated gradient for the l-th layer, the binary approximated gradient ∂L ∂H (l) is employed to approximate the gradient of the original one as [21], [22], Note that 1 |r|<1 is the indicator function, whose value is 1 when |r| < 1, and vice versa. This indicator function serves as a hard tanh function which preserves the gradient information. If the absolute value of the gradients becomes too large, the performance will be degraded. Thus, the indicator function also serves to kill certain gradients whose absolute value becomes too large.
The gradient of network parameters is computed via another gradient calculation approach. Here, a full-precision gradient is employed to preserve more gradient information. If the gradient of the binarized weights ∂L can then be calculated as To compute the gradient for the sign function sign(·), the straight-through estimator (STE) function [37] is employed, where ∂sign(r) ∂r = 1 |r|<1 . The back-propagation process is summarized in Algorithm 1.

Generalization to other Bi-GNNs
Here, we introduce the generalization of our binarization approach to other popular GNN variants. The general method to binarize a GNN layer consists of three steps. Firstly, a standard batch normalization [38] (with zero mean and variance being one) is utilized for the input of the layer to keep the balance of -1 and 1 after binarization. Then, the limited storage capacity can be utilized as much as possible. Secondly, the input H (l) and the parameters Θ (l) of the layer are binarized, where the binary operations are utilized instead of matrix multiplications. Thirdly, the original non-linear function, e.g., ReLU, is removed, because of two reasons. 1) The sign function in our binarization method already serves as a non-linear activation.
2) The family of ReLUlike activation functions tends to preserve the positive values and largely suppress the negative values, which obviously changes the distribution of positive and negative values and conflicts with the adopted sign function. Specifically, we will present three detailed examples, i.e., binarize three of the most famous GNN variants, including GAT, GraphSAGE and GraphSAINT. By binarizing these fundamental yet practical techniques, such as attention and sampling in GNNs, different Bi-GNNs can be constructed for different practical scenarios.

Bi-GAT
Graph Attention Network [39], which is a popular variant of GNNs, learns a weighted aggregation function by applying the self-attention strategy to node features. A typical GAT's convolutional layer is defined as where α ij is the attention score calculated via Then, by utilizing our binarization approach, the Bi-GAT's convolutional layer can be obtained as where α ij is calculated by replacing W h in Eq. 27 with its binary versionW h . Note that we do not binarize the attention parameters a T , since it is also efficient, i.e., the calculations and memory consumptions introduced by α are approximated to those of our binarization version of W and h.

Bi-GraphSAGE
GraphSAGE [10] proposes an inductive learning scheme, i.e., neighbor sampling and aggregation, for the GNN models. Four kinds of aggregators are utilized, i.e., mean, LSTM, pooling, and the aggregator in GCN, in its aggregation process. All of them tend to give similar performances in the evaluations. In the subsequent literatures, the mean aggregator is commonly utilized in GraphSAGE, which is constructed as where N i represents the set of neighbors of node v i , and |N i | denotes the total number of the neighbors. At last, for an L-layered GraphSAGE, h (L) i is utilized to generate the prediction of node v i . According to our binarization approach, the Bi-GraphSAGE's convolutional layer is formed as whereh l is the binary node representations,W θ , andW n are the parameters to be learned, and represents the binary operations in Sec 4.2. Similar to our Bi-GCN, we do not preserve the original non-linear function.

Bi-GraphSAINT
GraphSAINT [17] proposes a graph sampling-based GNN training framework. It builds mini-batches with a set of subgraphs and constructs a full GNN model on each mini-batch. This graph sampling framework can be effectively applied to a variety of GNN models, e.g., GraphSAGE [10], GAT [39], JK-Net [40], etc. Since the binarization versions of GraphSAGE and GAT are already introduced, JK-Net is employed as the GNN model for GraphSAINT as our baselines, for the diversity of model selection.
Jumping knowledge networks (JK-Net) [40] proposes a layer aggregation operation to mix the representations of different hops in the local neighborhood. For an L-layered JK-Net, which is utilized to help the prediction of node v i . Note that h (l) i is the representation of the l-th GNN layer and LA(·) is the layer aggregation function, which can be implemented as concatenation, pooling, LSTM, etc. Here, the commonly used concatenation operation is utilized, i.e., where || represents the concatenation operation. Similar to the feature extraction step, the node features and weight parameters are binarized via In the employed GraphSAINT, the above version of JK-Net is utilized where h (l) i is calculated by the GraphSAGE layer introduced in Eq. 29.

ANALYSIS OF EFFICIENCY
In this section, we take our Bi-GCN as an example to provide a theoretical analysis of the efficiency of our Bi-GNNs, i.e., the compression ratio of the model size and the loaded data size, as well as the acceleration ratio, compared to the full-precision (32bit floating-point) GCN. The compression and acceleration ratios of other Bi-GNNs can be analyzed in a similar manner.

Model Size Compression
Let the parameters of each layer in the full-precision GCN be denoted as W (l) ∈ R d (l) in ×d (l) out , which contains (d floating-point parameters. Therefore, the size of the parameters can be reduced by a factor of According to Eq. 34, the compression ratio of the parameters for the l-th layer depends on the dimension of the input node features. For example, a 2-layered Bi-GCN, whose hidden layer contains 64 neurons, can achieve a ∼31x model size compression ratio compared to the full-precision GCN on the Cora dataset. Although the memory consumption of the network parameters is smaller than the input data for the vanilla GCN, our binarization approach still contributes. Currently, many efforts have already been made to construct deeper GNNs [31], [41], [42]. As the number of layers increases, the reductions on the memory consumptions will become much larger, and this contribution will become more significant.

Data Size Compression
Currently, the loaded data tends to contribute the majority of the memory consumptions. In the commonly employed datasets, the node features tend to contribute the majority of the loaded data. Thus, a binarization of the loaded node features can largely reduce the memory consumptions when GNNs process the datasets. Note that the data size of the node features is employed as an approximation of the entire loaded data size in this paper, because the edges in commonly processed attribute graphs are usually sparse and the size of the division mask is also small. Let the loaded node features be denoted as X ∈ R N ×d , where N is the number of nodes and d is the number of features per node. Then, the full-precision X contains N × d floating-point values. In our Bi-GCN, the loaded data X can be binarized. Then, N × d binary values and N floating-point values can be obtained. Thus, the size of the loaded data X can be reduced by a factor of According to Eq. 35, the compression ratio of the loaded data size depends on the dimension of the node features. In practice, Bi-GCN can achieve an average reduction of memory consumption with a factor of ∼31x, which indicates that a much bigger attributed graph can be entirely loaded with identical memory consumption. For some inductive datasets, we can then successfully load the entire graph or utilize a bigger sub-graph than that in the full-precision GCN. The results of data size compression can be found in Tables 3 and 4.

Acceleration
After the analysis of memory consumptions, the analysis of acceleration of our Bi-GCN, compared to GCN, is performed. Let the input matrix and the parameters of the l-th layer possess the dimensions N × d out binary operations and 2N d out floating-point multiplication operations. According to [22], the processing time of performing one cycle operation, which contains one multiplication and one addition, can be utilized to perform 64 binary operations. Then, the acceleration ratio for the feature extraction step of the l-th layer can be calculated as As can be observed from Eq. 36, the dimension of the node features d (l) in determines the acceleration efficiency for the feature extraction step.
For the aggregation step, the sparse matrix multiplication contains |E|d Therefore, the complete acceleration ratio of the l-th graph convolutional layer can be approximately computed via Note that the average degree deg is usually small in the benchmark datasets, e.g., deg ≈ 2.0 in the Cora dataset. When processing a graph with a low average node degree, the computational cost for the aggregation step, i.e., 32deg, usually possesses negligible effect on the acceleration ratio. Thus, the acceleration ratio of the l-th layer can be approximately computed via Therefore, when deg is small, the acceleration ratio mainly depends on the input dimension of the binarized graph convolutional layers, according to Eqs. 36 and 38. The input dimension of the first graph convolutional layer equals to the dimension of the node features in the input graph. The input dimensions of the other graph convolutional layers equal to the dimensions of the hidden layers. Since the dimension of the input node features is usually large, the acceleration ratio tends to be high for the first layer, e.g., ∼59x on the Cora dataset. In general, the layer with a larger input dimension tends to require more calculations and can thus save more calculations with our binarization. For example, the acceleration ratio of a 2-layered Bi-GCN on the Cora dataset can achieve ∼59x acceleration ratio for the first layer and ∼21x for the second layer. In total, our 2-layered Bi-GCN can achieve ∼53x acceleration ratio on the Cora dataset.

CAPACITY EXPLORATION
The proposed Bi-GNNs intend to extract the critical information by using a much smaller network than the floating-point GNNs. Thus, they are more efficient in computational complexities and memory consumptions. Unfortunately, similar to other simple networks, Bi-GNNs can easily be bothered by the capacity problem when the storage capacity is less than demand in processing a certain task. For example, if a floating-point GCN is well-trained with exactly enough parameters for a task, a direct binarization of the original structure may meet the capacity problem, i.e., it may not possess enough representation ability to learn the task decently. To theoretically tackle this problem, we propose a simple yet effective Entropy Cover Hypothesis which explores the lower bound of the proper width of binary hidden layers of Bi-GNNs to the floating-point GNNs for a particular task. Note that we still take Bi-GCN as the example in this section.

Entropy Cover Hypothesis
Firstly, let us consider a 2-layered floating-point GCN in a node classification task, which is well-trained on a typical dataset, e.g., PubMed [43]. Assume the distribution of each hidden neuron is accessible. Let d in , d f p , d out be the dimensions of its input layer, hidden layer, and output layer, respectively, with Let H(x), H(h), H(ŷ) denote the entropies of the input layer, hidden layer, and output layer, respectively. Intuitively, the neural networks play a role as a semantic extractor, which gradually extracts the semantic-related information from the inputs. Apparently, the total information is expected to be decreasing, i.e., H(x) ≥ H(h) ≥ H(ŷ).
Then, if we directly binarize the above GCN, a straightforward 2-layered Bi-GCN can be obtained with the same input dimension d in and hidden dimension d f p , and an approximately identical outputŷ, because the identical representation ability with GCN is expected. Similarly, in Bi-GCN, the decreasing amount of information is also expected in ideal situation, i.e., where x b represents the binary input feature and h b is the binary intermediate feature with d f p binary neurons. However, since the expected outputŷ is a floating-point output vector, is not always guaranteed. If we directly utilize the binary hidden layers with the same dimension of the floatingpoint hidden layers in GCN, the capacity problem may be induced. Therefore, to achieve a comparable performance with the floatingpoint GCN, it is desired to explore the suitable number of binary hidden neurons, d bin .
To tackle this problem, an intuitional assumption is that the storage capacity of binary hidden layer should be able to contain (no smaller than) the amount of information in the floating-point hidden layer, i.e., H(h). The maximum entropy is utilized to represent the storage capacity [25], which is denoted as C(h b ). Then, the above assumption can be described as Under such circumstance, the number of binary hidden neurons should be no smaller than H(h). Then, our Entropy Cover Hypothesis is defined as below. Entropy Cover Hypothesis: If a L-layered GCN generates the peak performance with d f p neurons in each hidden layer, the peak performance of a L-layered Bi-GCN can be obtained when the number of binary hidden neurons satisfies Specifically, with respect to a 2-layered GCN, the width of the binary hidden layers of a 2-layered Bi-GCN should satisfies The proposed Entropy Cover Hypothesis introduces a lower bound of the width of Bi-GCN hidden layers. Note that its effectiveness will be verified experimentally in the latter section. Then, the Entropy Cover Hypothesis can be utilized to guide the construction of the corresponding Bi-GCN by estimating the lower bound of the storage capacity.

Entropy Estimation of Hidden Layers
In this subsection, we will introduce the adopted estimation method for the entropies of the hidden layers.
Firstly, for a floating-point neuron in the hidden layer, the binning methods [44], [45] is utilized here to estimate its entropy, which divides the continuous space of a floating-point valued neuron into certain intervals and discretizes it into a finite number, M . Then, given N input samples, the empirical distribution of any floating-point valued neuron, e.g., h i , can be formulated as where δ m denotes the probability measurement concentrated on m [46]. Then, the entropy of a floating-point valued neuron can be estimated [44], [47], i.e., According to the chain rule of conditional probability, the joint entropy of a hidden layer H(h) = H(h 1 , h 2 , ..., h d f p ) can be decomposed as where h 1 , h 2 , ..., h d f p are d f p neurons in the hidden layer h. Eq. 45 is the exact calculation formula for the entropy of the hidden layer H (h). However, it is difficult to directly compute H (h), due to the complicated dependencies among the hidden neurons.
Considering the situation that a GCN contains exactly enough parameters, the hidden representation of it may possess little redundancy. Under such circumstance, the hidden neuron tends to be independent to each others to fully utilize the limited storage capacity. Thus, is exploited to estimate the joint entropy H(h), which can be calculated by the binning [47] method. Then, the lower bound of the width of Bi-GNN hidden layers can be estimated according to our proposed Entropy Cover Hypothesis.

EVALUATIONS
In this section, we evaluate the proposed binarization approach and our Bi-GNNs on benchmark datasets for the node classification task, and verify the effectiveness of our Entropy Cover Hypothesis. Note that the memory consumptions and the number of cycle operations are theoretically estimated based on the specific settings of the methods and datasets. Our codes are available at https://github.com/bywmm/Bi-GCN.

Datasets
We conduct our experiments with both the transductive and inductive learning settings on seven commonly employed datasets. The datasets are summarized in Table 2. For the transductive learning task, four citation networks, i.e., Cora, PubMed, CiteSeer [43], and OGBN-Arxiv [27], are utilized. In these citation networks, nodes and edges represent the research papers (with the bag-of-words features) and citations (as undirected links), respectively. Articles are categorized into various classes according to the disciplines. We adopt the same data division strategy as OGB benchmarks [27] for OGBN-Arxiv, and that as Planetoid [48] for Cora, PubMed, and CiteSeer.
Three datasets, i.e., Flickr, Reddit, and OGBN-Products, are employed for the inductive learning task. Flickr is an image network collected by the SNAP website from four different sources. Each node represents an image uploaded to Flickr with 500dimensional bag-of-word features. Undirected edges are formed between each pair of images captured at the same location, each pair of images sharing common tags, etc. We adopt the same data division strategy as GraphSAINT [48]. Reddit is a post network constructed in [10]. Each node represents a post with a GloVe 300-Dimensional Word Vector [49]. A post-to-post connection is formed if the same user comments on both of the posts. The label represents the community to which a post belongs. The data division strategy in GraphSAGE [10] is adopted. OGBN-Products [27] is a co-purchasing network constructed on Amazon. Nodes and edges represent products and the co-purchasing relationships between products, respectively. Here, the node features are the bag-of-words features of the product descriptions [16]. The labels are the categories of the products. We adopt the same data division and evaluation strategy as OGB benchmarks [27].

Setups
For three commonly used citation networks, i.e., Cora, PubMed, and CiteSeer, we select a 2-layered GCN [7] with 64 neurons in the hidden layer as the baseline. Our Bi-GCN is obtained by binarizing this GCN. The evaluation protocol in [7] is applied to Bi-GCN. In the training process, GCN and Bi-GCN are both trained for a maximum of 1000 epochs with an early stopping condition at 100 epochs, by using the Adam [50] optimizer with a learning rate of 0.001. The dropout layers are utilized in the training process with a dropout rate of 0.4, after binarizing the input of the intermediate layer. We initialize the full-precision weights by Xavier initialization [51]. A standard batch normalization [38] (with zero mean and variance being one) is applied to the input feature vectors in Bi-GCN. Note that we also investigate the influences of different model depths on classification performance. All the hyperparameters are set to be identical to the 2-layered case.
For Reddit and Flickr, we select an inductive version of GCN [10], GraphSAGE [10], and GraphSAINT [17] as our baselines. Note that a 2-layered GraphSAINT model is employed for the fair comparisons. The settings from their literatures are employed. We will binarize all the feature extraction steps to generalize their corresponding binarized versions. The hyper-parameters in our binarized models are set to be identical to their full-precision versions.
For OGBN-Products and OGBN-Arxiv, GCN, GraphSAGE, and GAT are selected as the baselines. All of these GNNs are stacked with 3 layers. We utilize 256 hidden neurons for GCN and GraphSAGE, 128 hidden neurons and 2 heads for GAT, on OGBN-Arxiv. We set 512 hidden neurons for GCN and GraphSAGE, 256 hidden neurons and 2 heads for GAT, on OGBN-Products. All the models are initialized by Xavier initialization [51]. They are trained with 500 epochs on OGBN-Arxiv and 20 epochs on OGBN-Products, by employing the Adam optimizer [50] with a learning rate of 0.001. Dropout layers are utilized in the training process, with a dropout rate of 0.5 for the floating-point model. Batch normalization layers are utilized after each floating-point GNN layer, while they are utilized before each Bi-GNN layer. We adopt transductive learning settings for OGBN-Arxiv and inductive learning settings for OGBN-Products, which are commonly used in OGB benchmark evaluations. In the training process on OGBN-Products, neighbor sampling strategy [10] is utilized to generate their inductive versions, where the sampled neighbor size is set to 20 for GCN and GraphSAGE, 10 for GAT. The same hyper-parameters are adopted for their binarized versions.

Comparisons
The results on Cora, PubMed, and CiteSeer are shown in Table 3. As can be observed, our Bi-GCN gives a comparable performance compared to the full-precision GCN and other baselines. Meanwhile, our Bi-GCN can achieve an average of ∼51x faster inference speed and ∼30x lower memory consumption than the vanilla GCN, FastGCN, and GAT, on three citation datasets. Besides, the proposed Bi-GCN is more effective than SGC, especially in terms of the loaded data size. Note that the degradation of prediction accuracy on the CiteSeer dataset is worse than that on the other two datasets. It may be induced by its smaller average node degrees, i.e., |V| |E| , such that the node features appear to possess a larger portion of the total information in the input data. Table 4 and Table 5 show the results of our Bi-GNNs, i.e., Bi-GraphSAGE, Bi-GraphSAINT, and Bi-GAT on four benchmarks. Similar to our Bi-GCN, our binarized GNNs can also signifi- cantly alleviate the memory consumptions of both the loaded data and model parameters, and reduce the number of calculations, with comparable performances. The original data sizes of the Reddit and OGBN-Products datasets are 534.99M and 934.23M, respectively. In comparison, our binarized GNNs only respectively demand 17.61M and 38.54M to load the data, which proves the significance of our binarization approach. Note that the acceleration ratios of the binarized GNNs on the Reddit dataset are only ∼10x, because the average node degree is large, as discussed in Sec 5.3. In general, these results prove that our binarization approach is efficient and can be successfully generalized to various GNNs.

Ablation Study
Here, an ablation study is performed to verify the effectiveness of binarizing the network parameters and node features. As can be observed from Table 3, the prediction performances tend to vary less when the binarization is performed only to the node features. This phenomenon indicates that there exists many redundancies in the full-precision features and our binarization can maintain the majority portion of effective information for node classification. Meanwhile, the prediction results of binarizing the network parameters indicate that the binarized parameters cannot represent as much information as the full-precision parameters. However, if both the node attributes and parameters are binarized, a comparable performance can be achieved, compared to GCN. It reveals that the binarized network parameters can be effectively trained by the binarized features, i.e., Bi-GCN can successfully reduce the redundancies in the node representations, such that the useful cues can be learned well by a light-weighted binarized network. Besides, binarizing the parameters and features separately can both reduce the memory consumptions, while the inference accelerations only appear when both the parameters and features are binarized.

Effects of Different Model Depths
Here, we analyze the effects of different model depths in our Bi-GCN. Fig. 3(a) shows the transductive results of GCN and Bi-GCN on the Cora dataset with different model depths. As can be observed, Bi-GCN is more suitable for constructing a deeper GNN than the original GCN. The accuracy of GCN has dropped sharply when it consists of three or more graph convolutional layers. On the contrary, the performance of our Bi-GCN declines slowly. According to Figure 3(b), GCN will quickly be bothered by the overfitting issue, as the number of layers increases. However, our proposed Bi-GCN can effectively alleviate this overfitting problem. Figure 4 illustrates the comparisons of memory consumption and inference speed. Since SGC contains only one layer, its memory consumption will not change with the increase of the number of aggregations. When the number of layers increases, Bi-GCN can save more memories. For the acceleration results, the ratio between GCN and Bi-GCN tends to decrease slightly when the number of layers increases, while the actual reduced computational costs increases. Note that the required operations in SGC do not increase obviously because it only contains one feature extraction layer.

Capacity Analysis
In this subsection, three node classification datasets with different scales and types, i.e., PubMed, Reddit, and OGBN-Products, are utilized to validate the effectiveness of the proposed Entropy Cover Hypothesis. Fig. 5 shows the results of GNNs and Bi-GNNs with different numbers of hidden neurons on three datasets. As can be observed, the peak points, i.e., the minimum proper numbers of hidden neurons, are 16 for GCN on PubMed, 32 for GCN on Reddit, 128 for GCN on OGBN-Products, and 512 for GraphSAGE on OGBN-Products. Note that the proper number of hidden neurons is the number, with which a (Bi-)GNN can achieve at least 99% performance of its best performance. According to our Entropy Cover Hypothesis, the boundary shows the lower bound of the width of the corresponding Bi-GNN hidden layers. The detailed entropy estimation results are shown in Table 6. For example, 98 is the lower bound of the width of Bi-GCN hidden layer on the PubMed dataset, while the peak performance of Bi-GCN is achieved with 128 hidden neurons, which is slightly larger than the estimited lower bound. Similar observations can be found in the other three cases. According to the analysis in Sec. 5, Bi-GCN can achieve ∼31x compression ratio for the model parameters, compared to floating-point GCN with the same number of hidden neurons. Considering the extreme situation that both GCN and Bi-GCN achieve their peak performances with the minimum proper numbers of hidden neurons, Bi-GCN can also be ∼4x better on PubMed and ∼8x better on Reddit and OGBN-Products in terms of the model size. Besides, the compression efficiency of the loaded data does not vary with the changes of the width of hidden layers. Since the size of typical data (graphs) is usually much larger than the model size, our Bi-GNN can still achieve ∼30x overall compression ratio on these three datasets.

CONCLUSION
This paper proposes a binarized version of GCN, named Bi-GCN, by binarizing the network parameters and the node attributes (input data). The floating-point operations have been replaced by binary operations for inference acceleration. Besides, we design a new gradient approximation based back-propagation method to train the binarized graph convolutional layers. Based on our theoretical analysis, Bi-GCN can reduce the memory consumptions by an average of ∼31x for both the network parameters and node attributes, and accelerate the inference speed by an average of ∼51x, on three citation networks, i.e., Cora, PubMed, and CiteSeer. Moreover, we introduce a general binarization approach applied to other GNNs, and the binarized GNNs (Bi-GNNs) can also obtain similar significant memory reductions and accelerations. At last, an intuitive Entropy Cover Hypothesis is proposed to tackle the capacity problem of Bi-GNNs by estimating the lower bound of the width of Bi-GNN hidden layers. Extensive experiments have demonstrated that our Bi-GCN and Bi-GNNs can give comparable performance to the corresponding graph networks in both the transductive and inductive tasks and verified the effectiveness of our Entropy Cover Hypothesis for solving the capacity problem.