1. A computer-implemented method, comprising: approximating, by a processing device, a product of a matrix exponential and a random probe vector of an adjacency matrix, the adjacency matrix representing a graph; computing a diagonal of the adjacency matrix based on the product of the matrix exponential and the random probe vector; and calculating node centralities based on the computed diagonal of the adjacency matrix until a designated number of central nodes are detected.