# Towards Robust Representations of Spatial Networks Using Graph Neural Networks
## 1 Introduction  
The representation of any data fed to a machine learning model impacts the usefulness of that data [1]. The model cannot learn what it cannot see and a data representation will present its perspective of the data to the model [2]. A spatial network is defined as a network where the nodes and edges are spatial entities with a metric imposed on them [3]. Examples of spatial networks include street networks, rail networks, social networks. Spatial networks can be described through representations for a machine learning task. A type of representation is the homogeneous graph representation (we use the terms data representation and graph representation interchangeably). A homogeneous graph representation is defined as one where there is only one node and edge type in the graph [4]. For example, we can describe a street network using a homogeneous graph representation. Here, the graph nodes will denote street segments and the graph edges will denote adjacency or intersection. Nonetheless, homogeneous graph representations fail to capture the multi-type nature of spatial networks. Typically, spatial networks exist as a combination of objects with mixed types and relations. For example, the street network will exist alongside other spatial entities such as buildings or water bodies. We can address this limitation by describing spatial networks using heterogeneous graph representations. A heterogeneous graph representation is defined as one where there is at least two types of nodes or edges in the graph [4]. Thus, a heterogeneous graph representation offers a rich perspective of the data by describing the multi-type nature of spatial networks [4]. Machine learning models perform better when the choice of representation captures the explanatory factors of variation behind the data [2]. This is particularly important for spatial networks where entities exhibit inter-dependence. Let us take for example, a heterogeneous graph representation of a spatial network describing streets and buildings, where the nodes are street segments or buildings and the edges are spatial relations. There is a higher likelihood of a node being a _residential_ building if it is sufficiently connected toone or more _residential_ streets [5; 6]. Intuitively, residential streets are likely to be constructed near or around residential buildings. From the machine learning models' perspective, this is a better representation and could improve model performance. It follows then that the heterogeneous graph representation could improve model performance for machine learning tasks on spatial networks. See Figure 1 for an illustration of the heterogeneous graph representation of a spatial network. Graph Neural Networks (GNNs) are a type of artificial neural network that is designed to learn directly on graphs. In contrast to traditional machine learning methods which are designed to work on structured data, GNNs are capable of embedding both the relational and contextual information about spatial elements during the learning process [7; 8]. However, many applications of GNNs to spatial problems have been on homogeneous graph representations [8]. This may be due to the fact that deriving the homogeneous data representation typically only involves retrieving the physical representation [8]. Compared to deriving the heterogeneous graph representation which could easily be non-trivial, e.g., due to an arbitrary number of possible relations. We are of the opinion that learning on heterogeneous graph representations of spatial networks is an important direction, especially within the context of GNNs. Describing spatial entities closer to their true state using heterogeneous graph representations could present insights into the model that would otherwise be ignored. We posit that heterogeneous graph representations could improve model performance for spatial networks. Consequently, we adopt the GNN paradigm of learning for our experiments.