# Reduction of the Rank Calculation of a High-Dimensional Sparse Matrix Based on Network Controllability Theory

Authors: Chen Zhao; Yuqing Liu; Li Hu; Zhengzhong Yuan
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Numerical computing of the rank of a matrix is a fundamental problem in scientific computation. The datasets generated by the Internet often correspond to the analysis of high-dimensional sparse matrices. Notwithstanding recent advances in the promotion of traditional singular value decomposition (SVD), an efficient estimation algorithm for the rank of a high-dimensional sparse matrix is still lacking. Inspired by the controllability theory of complex networks, we converted the rank of a matrix into maximum matching computing. Then, we established a fast rank estimation algorithm by using the cavity method, a powerful approximate technique for computing the maximum matching, to estimate the rank of a sparse matrix. In the merit of the natural low complexity of the cavity method, we showed that the rank of a high-dimensional sparse matrix can be estimated in a much faster way than SVD with high accuracy. Our method offers an efficient pathway to quickly estimate the rank of the high-dimensional sparse matrix when the time cost of computing the rank by SVD is unacceptable.


---

## Body

## 1. Introduction

With the development of online social networks, researchers often face complex networks composed of huge numbers of individuals and multiple relationships among them. For the analysis of these large complex networks, we need to convert the network into its corresponding matrix and obtain some characteristics of the original network from its matrix based on traditional matrix theory, such as the page-rank method [1], communities detective [2], and some dynamical problem [3, 4]. Rank is one of the most important numerical characteristics of a matrix. At present, a large number of researchers focus on the rank of the special matrix [5], low-rank problem [6–9], maximal rank problem [10], nullity of graphs [11, 12], and application in robust principal component analysis [13–15]. The most successful method of rank calculation is the traditional singular value decomposition (SVD), which computes the rank by decomposing the original matrix into singular values and computing the statistical properties of the decomposed matrix. However, the complexity of SVD is the cube of the matrix size (denoted as N), which makes the SVD numerically difficult to compute in high-dimensional situations. Therefore, several methods are developed to tackle the complexity problem based on the novel matrix decompositions [16, 17], Monte Carlo simulation [18], and multicomputing technologies [19–23]. However, all these methods cannot significantly improve the time complexity.Benefitting from the development of the control theory of complex networks, we know that the rank of the coupling matrix reflects the exact controllability of sparse complex networks. On the other hand, the structural controllability can be measured by the maximum matching of sparse complex networks. For sparse complex networks, the exact controllability is equivalent to the structural controllability [24, 25]. The cavity method, a powerful approximation method developed in statistical mechanics [26, 27], can be designed to calculate the maximum matching of complex networks. Therefore, the controllability of sparse complex networks builds a bridge between the cavity method and rank computation.In other words, for anN-dimensional sparse matrix, we can convert it into an N-node complex network and compute its structural controllability through the cavity method. Due to its sparsity, the structural controllability is equal to the exact controllability, and the rank of the input N-dimensional sparse matrix can be approximately estimated. This process, which is an fast estimation method for a sparse matrix rank called FER, can estimate the rank of a high-dimensional sparse matrix much faster than SVD. Therefore, we applied FER to randomly generalized sparse matrices and systematically compared FER with SVD in terms of efficiency, accuracy, and applicability in two typical distributions of nonzero elements of each row (denoted as k). We found that the time cost of FER does not significantly increase during N growing with a constant k, and the results estimated by FER maintained high accuracy, which confirms that FER is an efficient tool for estimating the rank of high-dimensional matrices. We also studied the impact of k on the time cost and accuracy of FER, and the performance of FER remained very good. Finally, we applied FER to the matrices with the identity of nonzero elements. The efficiency and accuracy of FER were still very high. All the results suggest that FER is a valid access for estimating the rank of a sparse matrix, especially for estimating the rank of a high-dimensional sparse matrix, which is almost unacceptable for computing the rank by SVD while considering the time cost.


## 2. Materials and Methods

FER is based on the development of the controllability theory of complex networks. Two existing theoretical frameworks for quantifying the controllability of a complex network are structural controllability theory (SCT) and exact controllability theory (ECT) [28]. SCT claims that the structural controllability of any directed network is determined by the maximum matching. The maximum matching can be solved by the cavity method when the network is directed with a structural matrix. The exact controllability obtained by ECT is determined by the maximum multiplicity of eigenvalues of the coupling matrix. In sparse situation, ECT is an efficient tool to obtain the controllability of the networks by calculating the rank of the coupling matrix. When the network is sparse and the weights of links are weakly correlated, the structural controllability and the exact controllability are theoretically equivalent [24]. Therefore, computing the rank of a sparse matrix can be converted into a maximum matching problem; then, we can estimate the rank by solving the corresponding coupling equations of the cavity method in an efficient way. This is the core of FER.Without loss of generality, we consider an arbitrary sparse input matrixA with weakly correlated nonzero elements, as shown in Figure 1(a), where only the white grids represent the zero elements and the darker color represents the larger value of the nonzero elements. Then, we apply FER to the input matrix A, and the procedure of FER can be described as the following five steps:Figure 1
Illustration of the fast estimation algorithm for matrix rank. (a) MatrixA represents a general sparse matrix as the input matrix, and each grid represents an element in the matrix, in which white grids denote zeros and darker grids represent the nonzero elements. (b) The structural matrix of the input matrix A. (c) Transfers the structural matrix B to a directed network. (d) The statistics for the in-degree and out-degree distributions of the complex network, where the horizontal axis represents the degrees and the vertical axis represents the relative frequency of the corresponding degree. (e) inputs the degree distributions of the network into the coupling equations of the cavity method and solves the values of four coupling parameters. Following equation (1), the structural controllability NC can be calculated. According to NC, (f) obtains the rank approximation of the input matrix A.
(a)(b)(c)(d)(e)(f)Step 1.
Transfer the input matrixA into a structural matrix B, in which the elements can only be 0 or 1.0 s represent the zero elements denoted as white grids, and 1s represent the nonzero elements denoted as black grids, as shown in Figure 1(a) and 1(b);Step 2.
Consider the structural matrixB as a coupling matrix of a complex network and construct a directed network, as shown in Figures 1(b)–1(c);Step 3.
Obtain the in-degreePink and out-degree Poutk distributions of the directed network, where Pinoutk=ninoutk/N. ninoutk is the number of nodes with the in(out)-degree value k in the whole network, as illustrated in Figures 1(c)–1(d);Step 4.
Calculate the structural controllabilityNC of the directed network according to the degree distribution by the cavity method [25], which is illustrated in Figures 1(d)–1(e),(1)NC=N−12Gω^2+G1−ω^1−1+G^ω2+G^1−ω1−1+k2ω^11−ω2+ω11−ω^2,where Gx and G^x are ordered by the following equations:(2)Gx=∑k=0∞Poutxxk,G^x=∑k=0∞Pinkxk,and ω1,ω2,ω^1,ω^2 are the solutions of the following coupling equations:(3)ω1=Hω^2,ω2=1−H1−ω^1,ω^1=H^ω2,ω^2=1−H^1−ω1.
In the above equations, the functions ofH∗ and H^∗ are shown as(4)Hx=∑k=0∞k+1Poutk+1∑k=0∞kPoutkxk,H^x=∑k=0∞k+1Pink+1∑k=0∞kPinkxk.
According to (4), Hx and H^x can be calculated by the degree distribution (Pout and Pin). In most cases, the degree distribution, a primary statistical property, can be easily obtained from the empirical data as described in step 3. The above coupling equations are transcendental equations, and the solutions of ω1, ω2, ω^1, and ω^2 can be obtained by numerically solving equation (3). Finally, we obtain the structural controllability NC from equation (1).Step 5.
As the SCT and the ECT are equivalent when the input matrixA is sparse, the structural controllability NC is equal to the exact controllability N−RankA. Thus, we can estimate the rank of the input sparse matrix A as illustrated in Figures 1(e)–1(f):(5)RankA≈N−NC.
It is worth noting that, first,NC can be directly calculated by maximum matching based on SCT [28]. The cavity method is an efficient tool based on statistical physics for estimating the maximum matching, which can be obtained just by the degree distribution. That is, the complexity of the FER method is determined by the complexity of the statistics on the degree distribution and the accuracy of the numerical solution. Second, if a matrix contains totally irrelevant element values (every nonzero element is a real random number), RankA is theoretically equal to RankB based on the SCT and ECT. However, the assumption is too strict for general cases, which means the result of FER is just an estimation tool for the rank of the input matrix. The correlation strength of nonzero elements in the input matrix indeed affects the accuracy of FER.


## 3. Results

Some comparisons between FER and SVD are exhibited from the efficiency and accuracy aspects in some typical situations. To analyze the impact of the matrix sizeN, we generate some matrices randomly with a fixed sparsity, i.e., the average number of nonzero elements in each row k. The nonzero elements are generated following two typical distributions: random distribution and power-law distribution. Then, we apply FER and SVD to the generated matrices, and the results of comparing the efficiency and the accuracy are shown in Figure 2. The efficiency of the algorithm is defined by the time cost of solving the task, denoted as Tcost. As Figures 2(a) and 2(c) show, if N increases, Tcost of SVD increases following its theoretical computational complexity ON3. Although we can use a GPU for acceleration, the Tcost of SVD increases beyond ON2 as N increases. In contrast, Tcost of FER increases very little as N increases, which suggests that its computational complexity is determined by the size of the matrix and the average number of nonzero elements in each row together.Figure 2
The impact ofN on the efficiency and accuracy of FER. The changes of Tcost to compute the rank of the input matrix using SVD and FER, when input matrix size N increases. k follows two typical distributions: random distribution (a) and power-law distribution γ=3 (c). The results of the rank calculated by SVD and the rank estimated by FER in random distribution (b) and power-law distribution (d) follow equation (6). The inset figures in (b) and (d) show the relative errors of FER calculated by equation (5). k is kept at 2, and all the nonzero elements are random in the generated matrices. The results of N≤5000 are averaged over 50 independent calculations, and the results of 5000<N≤10000 are averaged over 20 independent calculations.
(a)(b)(c)(d)The rank estimated by FER (denoted asrMFER) and SVD (denoted as rMSVD) almost overlap, as shown in both Figures 2(b) and 2(d), which implies that these two methods obtain a similar result no matter how N increases. To explain the high accuracy of FER in more detail, we treat the rank computed by SVD as the ground truth and define the relative error as:(6)ΔrM=rMFER−rMSVDrMSVD.On the other hand, to compare the FER accuracy asN increases, we define a normalized rank (denoted as rM) as the following equation:(7)rM≡RankAN.The inset figures in Figures2(b) and 2(d) show the relative error ΔrM in random distribution and power-law situations, respectively. ΔrM is quite small with fluctuations as N increases and remains below 0.003 and 0.001 in random and power-law situations, respectively. The results indicate that FER has good performance in both typical scenarios. When N grows larger, ΔrM has a downward trend in both distributions, which implies that the relative error between FER and SVD should be very small when N is sufficiently large. In summary, for a high-dimensional sparse matrix, we can use FER to obtain an accurate estimation of rank efficiently with a similar accuracy as that obtained by SVD, regardless of the random or power-law distribution.As shown in Figure3, we checked how the sparsity of the input matrix, measured by k, affects the efficiency and accuracy of FER when the matrix size is fixed as N=3000. It is shown that TcostSVD and TcostFER are functions of k in random situations (Figure 3(a)) and power-law situations (Figure 3(c)). TcostFER is much smaller than TcostSVD in each situation. In Figures 3(b) and 3(d), we analyzed the accuracy of FER as k increased. There are almost no differences between the FER and SVD results, and the scatters in the main figures almost overlap. Then, we consider the relative error of FER, as shown in the inset figures of Figures 3(b) and 3(d).Figure 3
The impact ofk on FER when N is fixed. The impact of k on TcostSVD and TcostFER in random distribution (a) and power-law distribution γ=3 (c). The comparison between the rank calculated by SVD and FER on generated matrices with random distribution (b) or power-law distributions (d) for different k. The inset figures in (b) and (d) show the relative errors of FER versus k. The fixed size of all the simulated networks is N=3000, and all the results are averaged over 100 independent calculations.
(a)(b)(c)(d)Ifk increases, the values of ΔrM are both much smaller in the two situations, which fluctuates obviously in random situations. ΔrM remains almost constant and is smaller than 5×10−5, in the power-law situation. In summary, we find that FER is much more efficient than SVD, no matter when k increases, and the impact of k on the efficiency and accuracy of FER is quite small in both situations.FER works only if all the nonzero elements in the sparse matrix are uncorrelated. However, there are many relevant elements in the real data, which means that errors are unavoidable if the nonzero elements are correlated. Thus, we discuss whether the result obtained approximately by FER is acceptable when the nonzero elements of the input matrix are correlated. In Figure4, we consider an extreme case where all the nonzero elements in the input matrix are identical (set as 1), which means that all the nonzero elements are strongly correlated. The strong correlation has a negative effect on Tcost in both random situations (Figure 4(a)) and power-law situations (Figure 4(c)). TcostFER is still much smaller than TcostSVD. However, the results shown in Figures 4(b) and 4(d) indicate that the accuracy of FER has a significant decline compared with Figures 3(b) and 3(d). This means that the correlation of the input matrix does affect the accuracy of FER, which agrees with the limitation of structural controllability as well as the cavity method. Although the accuracy of FER has decreased, we can also learn from the inset figures that the relative error of FER is still very small in both situations. Especially when k increases over 4, ΔrM has an obvious descent. In other words, even though the nonzero elements in the sparse matrix are strongly correlated, the performance of FER is also acceptable in terms of efficiency and accuracy. The robustness of FER suggests its effectiveness in estimating the rank of a more general matrix extracted from the empirical data set.Figure 4
The efficiency and accuracy of FER when the nonzero elements of the input matrix are all strongly correlated.TcostSVD and TcostFER on input matrices with random (a) or power-law (c) distributions for different k. (b, d) The ranks obtained by SVD and FER on generated matrices with random distribution and power-law distributions (d) for different average degrees. All the nonzero elements in the generated matrices are set as 1. The size of all the simulated networks is N=3000, and all the results are averaged over 100 independent calculations.
(a)(b)(c)(d)


## 4. Discussion

In summary, we utilized the cavity method to estimate the maximum matching. Based on controllability theory of complex networks, we know that the rank of the matrix is theoretically equal to the maximum matching of the network when the network is sparse and the weights of links are weakly correlated. Then, we established an efficient estimation tool for analyzing the rank of a high-dimensional sparse matrix by the cavity method, which is called FER. We discussed the impact of the input matrix sizeN, the sparsity of the matrix (measured by k), and the correlation of nonzero elements on the efficiency (measured by Tcost) and accuracy (measured by ΔrM) of FER in random situations and power-law situations. We found that FER has remarkable performance in terms of both efficiency and accuracy in random distribution and power-law distribution. Although the characteristics of nonzero elements affect the results, FER can still be applied to most sparse matrices to estimate their rank with fast speed and high accuracy. It can significantly outperform SVD in terms of the time cost and has a similar accuracy to SVD. Therefore, FER provides an efficient and accurate method for estimating the rank of a sparse matrix. Especially for dealing with a large real network by some algorithms with its matrix rank, FER can do a good job to estimate the rank directly by its degree distribution obtained from the raw data, while SVD is inapplicable due to its excessive time cost. Furthermore, in some special situations, where only the structural information of a social network can be detected, such as degree distribution or partially missing degree distribution, FER is still applicable to estimate the rank of its corresponding matrix. This means that FER can potentially be used in some algorithms designed for incomplete data or data polluted by interference noise.



---

*Source: 5448123-2022-04-21.xml*