I want to multiply laplacian matrix of graph by a vector which is a graph signal, suppose I have a graph with N nodes and E edges, and I define a signal (vector) on graph nodes.
I want to multiply Lx where L is graph laplacian matrix and x is graph signal.
Given that graph is large, it is expensive to multiply dense L by x. so I am curious whether there is a way I can multiply sparse L by graph signal x?
Hi @alireza378,
Can you share a minimal reproducible example?
Also, if you’re trying to calculate a matrix-vector product, depending on how your matrix is computed you might be able to perform this matrix-vector product via a Jacobian-vector product (via torch.func.jvp
) without ever fully materializing the Laplacian matrix.