3
$\begingroup$

I have a very large graph (about over a billion nodes) and I need to compute all the eigenvectors and eigenvalues of the graph (i.e., of the Laplacian of the adjacency matrix) for downstream analysis. Naively, this could take centuries to run and require petabytes of storage space. However, the graph is extremely locally connected (and symmetric). That is, I know that nodes are only connected to the few nodes around it. For example, node 5,000 would never be connected to node 10,000. Not only are the extreme vast majority of the values in the matrix zero, but all of the non-zero values are close to the diagonal (local connectivity).

How can I compute the eigendecomposition in a way that doesn’t take a very long time?

Related: Compute all eigenvalues of a very big and very sparse adjacency matrix

Potentially useful: DSBEVD, DSBTRD

I believe this is a "band matrix."

Here's about what the matrix would look like, except much larger:

Here's about what the matrix would look like, except it is much larger.

Note: I am wondering about an algorithm or method that will accomplish this, though a language-specific implementation is still fine, since I can at least read how it is implemented.

$\endgroup$
11
  • 1
    $\begingroup$ Regardless of speed, storing all of the eigenvectors will eat up a ton of storage. Is this a concern? $\endgroup$
    – whpowell96
    Commented Oct 17 at 3:27
  • 1
    $\begingroup$ @whpowell96 It would be, yes. Storing it uncompressed would be petabytes of storage. However, I think it will compress very substantially. If this doesn't work out as well as I hope, I will store the top k eigenvectors instead (though I would prefer not to, since I will have to re-work downstream analyses). $\endgroup$
    – BigMistake
    Commented Oct 17 at 4:07
  • 1
    $\begingroup$ You typically cannot “compress” eigenvectors in any meaningful sense. Depending on what sort of analysis you are doing, you can get the top or bottom $k$ eigenvectors. You may also be able to make a low-rank approximation if the approximate rank is small $\endgroup$
    – whpowell96
    Commented Oct 17 at 19:18
  • 1
    $\begingroup$ spectral clustering for graphs typically only uses the near-null eigenvectors no? Those correspond to connected components $\endgroup$
    – whpowell96
    Commented Oct 17 at 21:25
  • 1
    $\begingroup$ I would look into ARPACK or an equivalent in your programming environment $\endgroup$
    – whpowell96
    Commented Oct 18 at 3:19

1 Answer 1

4
$\begingroup$

The LAPACK function dsbevd does this. I will describe the general logic of what it is doing.

The band matrix is transformed into a tridiagonal matrix, which is one that has non-zero elements only on the diagonal and the first off-diagonals, making it much simpler to handle computationally.

Then, it uses a series of orthogonal transformations (Givens rotations or Householder reflections) to zero out elements outside the tridiagonal band in a way that preserves the matrix’s symmetry, so the that the eigenvalues remain consistent with the original matrix.

If only eigenvalues are needed, the algorithm uses an iterative method, (QL or QR algorithm), to find the eigenvalues of the tridiagonal matrix. These methods work by iteratively refining the matrix and ensuring that off-diagonal elements tend toward zero, leaving the diagonal elements as the eigenvalues.

If both eigenvalues and eigenvectors are required, a more advanced method called divide-and-conquer is used, which splits the matrix into smaller, independent submatrices (based on where off-diagonal elements are small or negligible) and solves each subproblem separately. The results from these subproblems are then combined to give the full set of eigenvalues and eigenvectors.

If eigenvectors are computed, they are initially found for the tridiagonal matrix. However, since the original matrix was transformed during the reduction to tridiagonal form, the eigenvectors must be transformed back to match the original matrix. This is done by applying the same orthogonal transformations used during the reduction step in reverse order.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.