Understanding Truncated Positional Encodings for Graph Neural Networks
Abstract
Lay Summary
Graph neural networks (GNNs) are machine learning models designed to make predictions about graph-structured data, such as molecules or relational databases. One trick to improve the performance of GNNs is to augment them with extra information called encodings about the position of nodes in the graph. Two of the most common pieces of positional information come from the graph's spectra or its distribution of random walks. In theory, if you use sufficiently large versions of these encodings, they are equally powerful. However, in practice, these large version are far too expensive to use, so people use only a fraction of this information. Our paper studies what happens in this more realistic truncated setting. We show that once these encodings are truncated, they carry very different information about the graph from one another, even if their full versions are theoretically equivalent. Motivated by this, we also study a family of spectral encodings called the k-harmonic distances and show that even closely related truncated encodings can capture different kinds of graph structure. Finally, our experiments suggest that the best practical strategy is often to combine several truncated encodings from different families rather than rely on just one.