  Spectral embedding is a procedure which can be used to obtain vector
representations of the nodes of a graph. This paper proposes a generalisation
of the latent position network model known as the random dot product graph, to
allow interpretation of those vector representations as latent position
estimates. The generalisation is needed to model heterophilic connectivity
(e.g., `opposites attract') and to cope with negative eigenvalues more
generally. We show that, whether the adjacency or normalised Laplacian matrix
is used, spectral embedding produces uniformly consistent latent position
estimates with asymptotically Gaussian error (up to identifiability). The
standard and mixed membership stochastic block models are special cases in
which the latent positions take only $K$ distinct vector values, representing
communities, or live in the $(K-1)$-simplex with those vertices, respectively.
Under the stochastic block model, our theory suggests spectral clustering using
a Gaussian mixture model (rather than $K$-means) and, under mixed membership,
fitting the minimum volume enclosing simplex, existing recommendations
previously only supported under non-negative-definite assumptions. Empirical
improvements in link prediction (over the random dot product graph), and the
potential to uncover richer latent structure (than posited under the standard
or mixed membership stochastic block models) are demonstrated in a
cyber-security example.
