# Robust Airport Surface Object Detection Based on Graph Neural Network
## 2 Materials and Methods
### ViGE Block2  
Our ViGE block is constructed based on the ViG's framework with three principal enhancements: graph construction, message passing, and model usage. Initially, in the graph construction phase, while ViG defines the k-nearest neighbors based on the feature proximity in the representation space and leverages position embedding to represent the position information, it overlooks the edge feature. In contrast, our ViGE defines neighbors in the pixel space and employs carefully designed edge features to represent two nodes' spatial relations more directly. After graph construction, we design a novel message-passing operation that leverages edge features to gather information from neighbors. Different from ViG, which stacks several ViG blocks as a backbone, our approach integrates a single ViGE block within the backbone of a one-stage detector, such as YOLOv5, to assess its compatibility with mainstream CNN architecture. The following sections will explain these differences in detail. Graph construction. Considering a feature map \(\mathbf{F}\) with dimensions \(H\times W\times C\), where \(H\), \(W\), and \(C\) represent height, width, and channel, respectively, we segment it into \(H\times W\) nodes, each representing a pixel and transforming \(\mathbf{F}\) into a node set \(\mathbf{\mathcal{V}}=[\mathbf{v_{1}},\mathbf{v_{2}},\cdots,\mathbf{v_{Hw}}]\) with each node feature \(\mathbf{v_{i}}\in\mathbb{R}^{C}\). The proximity between any two distinct nodes is determined by their Euclidean distance in the pixel space, representing the spatial separation of corresponding pixels in the feature map. The closer two nodes are in pixel space, the more likely they are neighbors in a graph. Based on the pixel Euclidean distance between nodes, we identify each node \(\mathbf{v_{i}}\), with its k-nearest neighbors \(\mathcal{N}(\mathbf{v_{i}})\) and add an edge \(\mathbf{e_{ji}}\in\mathbf{\mathcal{E}}\) from node \(\mathbf{v_{j}}\) to \(\mathbf{v_{i}}\), where \(\mathbf{v_{j}}\in\mathcal{N}(\mathbf{v_{i}})\). Furthermore, we employ the dilation number to integrate information from different distances. Based on the pairwise distances between nodes, a node is selected as a neighbor for every increment of \"dilation number\" in the sequence, thereby ensuring a systematic and sparse selection of neighboring nodes based on spatial proximity. A diagram of neighbor definition in pixel space is shown in the following Figure 2, where k is finally set to 12 and the dilation number is set to 3. After defining neighbors, we construct the edge feature according to the distance and direction between two nodes:  
\[\mathbf{e_{ji}}=Concat\left(RBF_{ji},\frac{\mathbf{x_{j}}-\mathbf{x_{i}}}{\left\lVert\mathbf{x _{j}}-\mathbf{x_{i}}\right\rVert_{2}}\right)\in\mathbb{R}^{3}\]  
where \(\mathbf{x_{i}}\in\mathbb{R}^{2}\) denotes the Cartesian coordinate vector of node \(\mathbf{v_{i}}\) in feature map \(\mathbf{F}\); \(\left\lVert\cdot\right\rVert_{2}\) denotes L-2 norm, which is usually used to calculate Euclidean distance; \(Concat(\cdot,\cdot)\) denotes  
Figure 2: Neighbor definition in pixel space. (Blue number denotes the corresponding neighbor of the center node). concatenation operation; \(RBF_{ji}\in\mathbb{R}\) is a radius basis function scalar between node \(\mathbf{v}_{j}\) and \(\mathbf{v}_{i}\) which is transformed from the distance in pixel space:  
\[RBF_{ji}=\exp\left(-\frac{\left\|\mathbf{v}_{j}-\mathbf{x}_{i}\right\|_{2}}{\sqrt{H^{2}+ W^{2}}}\right)\in\mathbb{R}\]  
By transforming the feature map \(\mathbf{F}\) into a graph \(\mathcal{G}(\mathbf{F})=(\mathbf{\mathcal{V}},\mathbf{\mathcal{E}})\), we enable the application of Graph Neural Network (GNN) methods for effective feature extraction. It is important to note that the vanilla ViG block does not define edge features as described previously but integrates position embedding to each node feature \(\mathbf{v}_{i}\) to encode positional information.