  We study the evolution of networks through `triplets' - three-node graphlets.
We develop a method to compute a transition matrix to describe the evolution of
triplets in temporal networks. To identify the importance of higher-order
interactions in the evolution of networks, we compare both artificial and
real-world data to a model based on pairwise interactions only. The significant
differences between the computed matrix and the calculated matrix from the
fitted parameters demonstrate that non-pairwise interactions exist for various
real-world systems in space and time, such as our data sets. Furthermore, this
also reveals that different patterns of higher-order interaction are involved
in different real-world situations.
  To test our approach, we then use these transition matrices as the basis of a
link prediction algorithm. We investigate our algorithm's performance on four
temporal networks, comparing our approach against ten other link prediction
methods. Our results show that higher-order interactions in both space and time
play a crucial role in the evolution of networks as we find our method, along
with two other methods based on non-local interactions, give the best overall
performance. The results also confirm the concept that the higher-order
interaction patterns, i.e., triplet dynamics, can help us understand and
predict the evolution of different real-world systems.
