  Link prediction is one of the central problems in graph mining. However,
recent studies highlight the importance of higher-order network analysis, where
complex structures called motifs are the first-class citizens. We first show
that existing link prediction schemes fail to effectively predict motifs. To
alleviate this, we establish a general motif prediction problem and we propose
several heuristics that assess the chances for a specified motif to appear. To
make the scores realistic, our heuristics consider - among others -
correlations between links, i.e., the potential impact of some arriving links
on the appearance of other links in a given motif. Finally, for highest
accuracy, we develop a graph neural network (GNN) architecture for motif
prediction. Our architecture offers vertex features and sampling schemes that
capture the rich structural properties of motifs. While our heuristics are fast
and do not need any training, GNNs ensure highest accuracy of predicting
motifs, both for dense (e.g., k-cliques) and for sparse ones (e.g., k-stars).
We consistently outperform the best available competitor by more than 10% on
average and up to 32% in area under the curve. Importantly, the advantages of
our approach over schemes based on uncorrelated link prediction increase with
the increasing motif size and complexity. We also successfully apply our
architecture for predicting more arbitrary clusters and communities,
illustrating its potential for graph mining beyond motif analysis.
