Pose-Graph Attentional Graph Neural Network for Lidar Place Recognition
This paper proposes a pose-graph attentional graph neural network, called
P-GAT, which compares (key)nodes between sequential and non-sequential
sub-graphs for place recognition tasks as opposed to a common frame-to-frame
retrieval problem formulation currently implemented in SOTA place recognition
methods. P-GAT uses the maximum spatial and temporal information between
neighbour cloud descriptors -- generated by an existing encoder -- utilising
the concept of pose-graph SLAM. Leveraging intra- and inter-attention and graph
neural network, P-GAT relates point clouds captured in nearby locations in
Euclidean space and their embeddings in feature space. Experimental results on
the large-scale publically available datasets demonstrate the effectiveness of
our approach in scenes lacking distinct features and when training and testing
environments have different distributions (domain adaptation). Further, an
exhaustive comparison with the state-of-the-art shows improvements in
performance gains. Code is available at
https://github.com/csiro-robotics/P-GAT.
Milad Ramezani, Liang Wang, Joshua Knights, Zhibin Li, Pauline Pounds, Peyman Moghadam
# Pose-Graph Attentional Graph Neural Network

###### Abstract

This paper proposes a pose-graph attentional graph neural network, called P-GAT, which compares (key)nodes between sequential and non-sequential sub-graphs for place recognition tasks as opposed to a common frame-to-frame retrieval problem formulation currently implemented in SOTA place recognition methods. P-GAT uses the maximum spatial and temporal information between neighbour cloud descriptors -- generated by an existing encoder-- utilising the concept of pose-graph SLAM. Leveraging intra- and inter-attention and graph neural network, P-GAT relates point clouds captured in nearby locations in Euclidean space and their embeddings in feature space. Experimental results on the large-scale publically available datasets demonstrate the effectiveness of our approach in scenes lacking distinct features and when training and testing environments have different distributions (domain adaptation). Further, an exhaustive comparison with the state-of-the-art shows improvements in performance gains. Code is available at [https://github.com/csiro-robotics/P-GAT](https://github.com/csiro-robotics/P-GAT).

 place recognition, spatiotemporal attention, SLAM

## I Introduction

Accurate and drift-free (re)-localisation is critical for many robotic and computer vision applications, such as autonomous navigation [1] and augmented reality [2]. Achieving reliable (re)-localisation is challenging, particularly in GPS-denied environments, such as indoor, subterranean or dense vegetated environments [3, 4], due to occlusion, complex geometry, and dynamic objects in scenes.

One promising direction for addressing the challenges associated with reliable (re)-localisation is to utilise a Place Recognition (PR) method to predict the coarse location of an agent within a database of previously visited places. Place Recognition is commonly framed as a retrieval task in computer vision and robotics, either vision-based [5, 6, 7, 8] or lidar-based [9, 10, 11, 12, 13]. Given a query, the method involves retrieving the most similar key in the database by first encoding the input frame (image/point cloud) as a global descriptor and matching it against the global descriptors of previously visited places.

Despite remarkable improvements, visual PR is less robust against appearance, season, illumination and viewpoint variations in large-scale (_i.e._, city-scale) areas. In this paper, we consider the problem of lidar place recognition for large-scale environments. Despite all the progress in the field of lidar place recognition, most existing methods only encode a single lidar frame into a global descriptor, and hence, topological scene-level understanding is often neglected. There are few prior works [14, 15] that directly aggregate a sequence of lidar descriptors to generate one single global descriptor for each lidar sequence. However, these methods do not take advantage of the topological relationship between a sequence of point clouds in the context of a graph containing sets of nodes and edges.

To exploit the spatiotemporal information between neighbouring point clouds, we propose an attentional graph neural network called P-GAT, that uses topological information obtained by a pose-graph lidar SLAM system, between a set of point clouds to maximise the receptive field for training. Nodes and edges generated in a pose graph (as the robot explores the environment and pose-graph SLAM optimises robot poses) are further used to generate fully connected graphs (subgraphs) that contain positional information for a given robot travel distance. These subgraphs are further fed into our P-GAT model for place recognition by comparing a pair of subgraphs rather than just a pair of point clouds (Fig. 1). The communication between the nodes of the subgraph pairs is performed leveraging an attentional graph neural network. To address the dynamic properties of subgraphs (varying number of nodes) and the presence of nodes in multiple subgraphs (in contrast to comparing between pairs of point clouds/images), we develop a customised layer normalisation module using a boolean mask for padding nodes and develop an averaging scheme for efficiently computing similarity scores during inference. We demonstrate that P-GAT can be integrated into any

Fig. 1: P-GAT aims to optimise spatiotemporal information by relating point clouds within and across subgraphs leveraging an attentional graph neural network. If point clouds are captured in nearby locations (similar point clouds), our intra- (edges in black shades) and inter- (edges in blue shades) attention mechanism renewights their embeddings to bring them closer in feature space. Intra-attention enhances distant point cloud communication within subgraphs, while inter-attention facilitates potential place recognition in revisit areas.
global point cloud descriptors (_i.e._, cloud encoder agnostic), which greatly improves their robustness and generalisability. We extensively analyse and compare the performance of our network with the state-of-the-art over multiple large-scale public datasets. To characterise the properties of P-GAT in detail, we demonstrate the role of each component using numerous ablation studies. The proposed P-GAT can achieve the state-of-the art on various benchmark datasets for lidar place recognition tasks.

## II Related Work

This section reviews hand-crafted and learning-based lidar PR methods before introducing the attentional graph neural network and its applications.

### _Handcrafted Lidar Descriptors_

The purpose of lidar PR methods is to create distinctive descriptors, based on a Local Reference Frame (LRF), along the robot's path to recognise revisited places regardless of its pose. Two types of descriptors are used: signatures and histograms. Histogram-based methods such as PFH [16] and FPFH [17], describe the 3D surface neighbourhood of a point by encoding a few geometric features obtained individually at each point according to local coordinates. DELIGHT [18], instead of geometric properties, computes intensity histograms. Signature-based algorithms like Scan Context [19] or _Segmatch_[20] use descriptor-based features to improve place recognition. Additionally, algorithms such as SHOT [21] combine both histograms and signatures for robust place recognition. However, handcrafted lidar descriptors require careful tuning of feature extraction and matching parameters depending on the operating environment.

### _Learning-based Lidar Descriptors_

Recent advances in learning-based approaches have shown promising results in addressing the challenges mentioned earlier. CNN-based methods such as _Segmap_[22] or Efficient Segment Matching (ESM) [23] encode local patches of a point cloud into local embeddings. Local descriptors can later be used for localisation [24, 25]. These methods, however, are not defined in an end-to-end fashion to form a scene-level global descriptor for point clouds.

Using a convolutional bottom-up and top-down backbone, MinkLoc3D [10] and its variations [26, 27] extract local features and aggregate them into a global descriptor by a Generalised-Mean pooling (GeM) [28]. _LoGG3D-Net_[29] employs a sparse convolutional U-Net to encode point clouds into local features. During training, it ensures the maximum similarity of corresponding local features on a pair of neighbour point clouds by defining a local consistency loss. Unlike MinkLoc3D, LoGG3D-Net uses second-order pooling to aggregate local features to create global descriptors.

In contrast to convolutional models, methods have been proposed which are based on PointNet [30], an encoder which works directly on an unordered point cloud due to permutation invariance to points utilising a symmetry function. PointNetVLAD [9] is a seminal lidar PR work with a PoinNet-based backbone design. It uses NetVLAD [31] to aggregate local descriptors for the generation of global descriptors. To capture local contextual information, PCAN [11] adds an attention map mechanism for predicting the significance of point features. Re-weighted local features are further aggregated into a discriminative global descriptor using NetVLAD. Similarly, LPD-Net [32] aims to cover the limitation of PointNet in the extraction of local contextual information by aggregating neighbour features using a graph neural network. Global descriptors are finally generated using NetVLAD. In another effort, SOE-Net [12] adds an orientation-encoding unit in local descriptor extraction and a self-attention unit before the aggregation of local features through NetVLAD to improve the point-wise feature representation of PointNet. Recently, PPTNet [13], inspired by SOE-Net [12] and pyramid structure of PointNet++ [33], proposed a pyramid point transformer design to learn the regional contextual information of a point cloud at multiple levels leveraging a grouped self-attention mechanism for the extraction of discriminative local embeddings. Local embeddings are also aggregated using NetVLAD.

In all the lidar PR methods mentioned above, point clouds are compared pairwise and thus, the topological and sequential relationship between a set of point clouds are not explored. The work that attempts to leverage temporal information between point clouds is Locus [15] which aims to relate the local features of the current point cloud to their correspondences in the previous point clouds using second-order temporal feature pooling; however, within a short time window consisting of only three frames. This limits the generalisation of Locus [15] under test-time distribution shifts. SeqOT [14] was also proposed to benefit from temporal information, although using a sequence of range images. Moreover, it generates only a single descriptor for each sequence.

### _Attentional Graph Neural Network_

Attentional Graph Neural Network (AGNN) is designed to process data represented as a graph, using attention mechanisms [34] to selectively focus on nodes and edges. The attention mechanism helps reduce the graph's complexity and improves the effectiveness of local feature matching across nodes. AGNNs have been successfully applied to various tasks, such as image matching [35], object detection [36], and program re-identification [37]. To the best of our knowledge, AGNN has never been used in lidar PR tasks. We believe AGNN is well-suited for lidar PR (due to its efficiency in the aggregation of contextual information) when exploring spatiotemporal information existing between nearby point clouds.

## III The Proposed Method

Our goal is to enhance PR performance by increasing the spatiotemporal information on scenarios where a graph with nodes and edges represents robot poses and spatial constraints in between. Robot poses serve as positional information.
### _Overview_

P-GAT is defined based on a graph \(\mathcal{G}=(\mathcal{V},\mathcal{E})\), where \(\mathcal{V}\) and \(\mathcal{E}\) denote nodes and edges, respectively. The graph is inherently created by a SLAM system (pose-graph). For example, a lidar SLAM system registers consecutive lidar scans to create nodes and edges of the pose graph for further use in a back-end optimisation problem. Utilising pose-graph SLAM, we assume that accurate localisation is achievable within a local window of robot traversal, _e.g._, 200 m, for a vehicle travelling in a large-scale environment. However, no global localisation is provided to P-GAT.

Our network comprises three major blocks: positional encoding, graph-based attention mechanism and binary classification. Provided local robot poses by SLAM, we encode relative positional information into embeddings computed by a 3D backbone to maintain the topological relationship between a sequence of keynodes (selected robot poses associated with a point cloud and its corresponding descriptor). P-GAT utilises both graph structure and attention mechanism, described in Sec. III-C, to increase the distinctiveness of positional-aware embeddings. Inspired by SuperGlue [35], which uses an AGNN for image matching, we aim to relate the descriptors of point clouds captured in nearby locations by aggregating contextual and viewpoint information into point clouds' descriptors using an AGNN. Figure 2 depicts the overall architecture of P-GAT and its components.

### _Problem Formulation_

To formulate the problem, we consider two sets of point clouds as two subgraphs \(\mathcal{S}_{A}=\{V_{i}^{A}\}_{i=1}^{N}\), and \(\mathcal{S}_{B}=\{\mathcal{V}_{j}^{B}\}_{j=1}^{M}\), where \(M\) and \(N\) denote the number of keynodes in \(\mathcal{S}_{A}\) and \(\mathcal{S}_{B}\), respectively. Our PR problem is now defined between pairs of subgraphs instead of two individual point clouds, as is common in the literature. We also formulate the PR problem as a binary classification problem using a similarity measure computed from descriptors between every pair of \((\mathcal{V}_{i}^{A},\mathcal{V}_{j}^{B})\) in subgraphs \(\mathcal{S}_{A}\) and \(\mathcal{S}_{B}\).

All the pairs of keynodes from subgraphs \(\mathcal{S}_{A}\) and \(\mathcal{S}_{B}\) that are captured in the same place must be classified. As noted earlier, each keynode is associated with the robot position \(\mathbf{t}\) and a descriptor \(\mathbf{d}\), _i.e._, \(\mathcal{V}=\{\mathbf{t},\mathbf{d}\}\). The position \(\mathbf{t}\in\mathbb{R}^{3}\) is relative to the first node of the graph and normalised, _i.e._, \(\mathbf{p}=\frac{1}{\sigma}(\mathbf{t}-\mathbf{c})\), where \(\mathbf{c}\) is the centroid of the nodes' positions in a subgraph and \(\sigma\) is a scalar showing the scatteredness of the keynodes. This normalisation is essential to maintain the geometry consistency between keynodes and network generalisation when training and testing data have different distributions. The descriptor \(\mathbf{d}\in\mathbb{R}^{E}\) represents the input point cloud embedding as a fixed-size vector global descriptor at the time of keynode \(\mathcal{V}\), and \(E\) denotes the descriptor dimension.

### _Attentional Graph Neural Network_

To exploit the spatiotemporal information existing between keynodes in the pose graph created by SLAM, we build a fully-connected graph between the subgraph pairs \((\mathcal{S}_{A},\mathcal{S}_{B})\), _i.e._, \(\mathcal{G}_{AB}=(\mathcal{V}_{AB},\mathcal{E}_{AB})\) with \(N+M\) keynodes and \(\frac{1}{2}((N+M)^{2}-(N+M))\) undirected edges. Now, we can aggregate the relative positional and contextual constraints between the keynodes in \(\mathcal{G}_{AB}\) utilising an AGNN to enhance the descriptors' representation. Since \(\mathcal{G}_{AB}\) has two types of connections (multiplexity [38]), _i.e._, intra- and inter- subgraph edges, we effectively train the network to push the embeddings of the point clouds captured in nearby locations together. This allows embeddings to be invariant to dynamic and viewpoint changes resulting in more effective place recognition.

**Positional Encoding:** To embed the keynode relative position into the descriptor with a higher dimension \(E\) in each subgraph, we use Multi-Layer Perceptron (MLP) encoder to increase the dimension of the position \(\mathbf{p}\) to \(E\) and integrate it with the descriptor \(\mathbf{d}\) by element-wise addition \(\oplus\):

\[\mathcal{X}=\mathcal{D}\oplus\mathbf{MLP}_{\text{enc}}\left(\mathcal{P} \right), \tag{1}\]

where \(\mathcal{X}\in\mathbb{R}^{E\times N}\) is the matrix of positional-aware descriptors and \(\mathcal{D}\in\mathbb{R}^{E\times N}\) is the matrix consisting of original descriptors \(\mathbf{d}_{i},i\in\{1,...,N\}\). Position embedding is common in sequence-to-sequence learning problems [34, 39], enhancing the model's ability to capture contextual cues. In our case, it improves the embeddings' distinctiveness by allowing the GNN to distinguish between different embeddings of point clouds at different positions in the subgraph, thus capturing

Fig. 2: P-GAT employs a multi-head attentional graph neural network for contextual and viewpoint information aggregation of sequential point clouds, refining each point cloud’s descriptor. The network uses an MLP encoder that supplements descriptors with normalised positions. Intra- and inter-attention mechanisms infer relationships for all nodes simultaneously, updating the descriptors accordingly. P-GAT predicts whether the pair of two point clouds are captured from the same place by comparing their final descriptors with shifted cosine similarity.
the contextual and viewpoint information more effectively (See Sec. IV-E).

**Multi-head Attentional GNN:** As stated before, our graph between pairs of subgraphs is fully connected and multiplex, _i.e._, it comprises two types of edges: intra edges \(\mathcal{E}_{\text{intra}}\) which are the edges between the nodes within one subgraph and inter edges \(\mathcal{E}_{\text{inter}}\) which are the edges across the subgraphs in the input pair. Borrowing the terminology of _message passing_ in GNN from [40], we aggregate the messages carried through edges \(e_{ij}\in\mathcal{E}\) to keynote \(i\), _i.e._, \(\mathbf{m}_{e_{ij}}:=\{\mathbf{m}_{e_{ij}}|\ \forall j:e_{ij}\in\mathcal{E}\}\). The AGNN is composed of multiple layers. At each layer \(\ell\in\{1,...,L\}\), the message passing update, _i.e._, updating the intermediate feature \({}^{(\ell)}\mathbf{x}_{i}\) of keynote \(\mathcal{V}_{i}\), is concurrently conducted by aggregating messages across all the edges for all the keynodes once for subgraph \(\mathcal{S}_{A}\) and once for \(\mathcal{S}_{B}\) using:

\[{}^{(\ell+1)}\mathbf{x}_{i}={}^{(\ell)}\mathbf{x}_{i}+\mathcal{M}_{t}({}^{( \ell)}\mathbf{x}_{i},\mathbf{m}_{e_{i}}), \tag{2}\]

where \(\mathcal{M}_{t}\) is the message function. Following [35], we use a MLP, albeit modified (See Sec. IV-C), and concatenate messages with intermediate representations, _i.e._, \(\mathcal{M}_{t}(\mathbf{x},\mathbf{m}_{e})=\mathbf{MLP}([\mathbf{x}\|\mathbf{ m}_{e}])\), where \([.||.]\) denotes concatenation operator.

Following the attention mechanism described in [34], we aggregate messages received by each keynote through edges within (intra-attention) and across (inter-attention) subgraphs \(\mathcal{S}_{A}\) and \(\mathcal{S}_{B}\). To this end, we consider the receiver keynote to be in subgraph \(\mathcal{S}_{R}\) and the entire sender keynodes to be in \(\mathcal{S}_{S}\) such that \((\mathcal{S}_{R},\mathcal{S}_{S})\in\{\mathcal{S}_{A},\mathcal{S}_{B}\}^{2}\).

\[\begin{split}\mathbf{Q}&=\mathbf{W}_{Q}\ \mathcal{X}_{R}+\mathbf{b}_{Q},\\ \begin{bmatrix}\mathbf{K}\\ \mathbf{V}\end{bmatrix}&=\begin{bmatrix}\mathbf{W}_{K}\\ \mathbf{W}_{V}\end{bmatrix}\mathcal{X}_{S}+\begin{bmatrix}\mathbf{b}_{K}\\ \mathbf{b}_{V}\end{bmatrix},\end{split} \tag{3}\]

where matrices \(\mathbf{Q}\), \(\mathbf{K}\) and \(\mathbf{V}\) consist of query vectors (features of keynodes that are being attended to) in \(\mathcal{S}_{R}\), \(\mathbf{K}\) keys (features that are used to compute the attention scores) and \(\mathbf{V}\) values (features that are weighted by the attention scores to compute the output) in \(\mathcal{S}_{S}\), respectively. \(\mathcal{X}_{R}\) and \(\mathcal{X}_{S}\) are the matrices packing the intermediate features \(\mathbf{x}_{i}\) from \(\mathcal{S}_{R}\) and \(\mathbf{x}_{j}\) from \(\mathcal{S}_{S}\), respectively. Matrices \(\mathbf{W}_{Q}\), \(\mathbf{W}_{K}\) and \(\mathbf{W}_{V}\) are linear transformation weights computed within training along with biases \(\mathbf{b}_{Q}\), \(\mathbf{b}_{K}\) and \(\mathbf{b}_{V}\). The entire messages can now be computed by scaled-dot product attention as follows:

\[\mathbf{m}_{e}=\text{softmax}\left(\frac{\mathbf{Q}^{\top}\mathbf{K}}{\sqrt{ d_{k}}}\right)\mathbf{V}, \tag{4}\]

where \(d_{k}\) is the keys dimension. For large \(d_{k}\) values, the scaling is essential to avoid large magnitudes likely to cause minimal gradients when using a softmax function [34]. We use multi-head attention to capture different types of information and relationships within the input more effectively.

### _Classification Layer_

The output of the AGNN block is two tensors representing the final descriptors of subgraph \(\mathcal{S}_{A}\) and \(\mathcal{S}_{B}\), \(\mathcal{F}^{\text{A}}=\{\mathbf{f}_{i}^{\text{A}}\}_{i=1}^{N}\in\mathbb{R}^ {E\times N}\) and \(\mathcal{F}^{\text{B}}=\{\mathbf{f}_{j}^{\text{B}}\}_{j=1}^{M}\in\mathbb{R}^{ E\times M}\). The final prediction in P-GAT is performed using cosine similarity to produce a similarity matrix \(\mathbf{S}=\{s_{ij}\}\in\mathbb{R}^{N\times M}\). Element \(s_{ij}\) is obtained from:

\[s_{ij}=\frac{\langle\mathbf{f}_{i}^{\text{A}}\,\ \mathbf{f}_{j}^{\text{B}}\rangle}{ \|\mathbf{f}_{i}^{\text{A}}\|\|\mathbf{f}_{j}^{\text{B}}\|}, \tag{5}\]

where \(\langle.,.\rangle\) and \(\|.\|\) denote the inner product and the L2 norm, respectively.

Based on the definition of PR, the descriptors of two nearby point clouds should be similar, _i.e._, \(s_{ij}\) close to \(1\), while the descriptors of two dissimilar point clouds should be distinct, _i.e._, \(s_{ij}\) close to \(-1\). Since there can be multiple pairs of nearby point clouds on a given pair of two subgraphs, PR based on two subgraphs becomes a multi-label binary classification problem. Additionally, we map the scores in \(\mathbf{S}\) with the range \([-1,1]\) to \(\mathbf{P}=\{p_{ij}\}\) with the range \([0,1]\) using:

\[p_{ij}=s_{ij}\times 0.5+0.5, \tag{6}\]

and interpret it as the probability that point cloud \(\mathcal{P}_{i}\) from subgraph \(\mathcal{S}_{A}\) and point cloud \(\mathcal{P}_{j}\) from subgraph \(\mathcal{S}_{j}\) represent the same place. Our classification problem can now be defined as a stochastic optimisation problem measuring the similarity between two probabilities.

### _Loss_

Reformulating the binary classification problem as stochastic optimisation, we minimise the Kullback-Leibler (KL) divergence \(D_{KL}(\mathbf{y}\|\mathbf{P})=-\sum_{i=1}^{N}p_{i}\log(\frac{p_{i}}{y_{i}})\) between the predicted probabilities \(p_{i}\) and the true probabilities \(y_{i}\) (ground truth). The true probabilities follow the Bernoulli distribution, _i.e._, the probability that random variable \(x\in\{0,1\}\) belongs to a class (\(x=1\)) is \(p(x=1)=p\), otherwise \(p(x=0)=1-p\). Using the Bernoulli distribution properties, the KL divergence is converted into Binary Cross Entropy (BCE) [41]. Since we have multiple separate classifications to perform (between the keynodes in pairs of subgraphs), our final BCE loss is defined as follows:

\[\mathcal{L}\left(\mathbf{y},\mathbf{P}\right)=-\sum_{i=1}^{N}\sum_{j=1}^{M} \omega_{ij}\left(y_{ij}\cdot\log p_{ij}+(1-y_{ij})\cdot\log\left(1-p_{ij} \right)\right), \tag{7}\]

where \(y_{ij}\in\{0,1\}\) is the ground truth label. If point cloud \(\mathcal{P}_{i}\) and point cloud \(\mathcal{P}_{j}\) represent the same place \(y_{ij}=1\), otherwise, \(y_{ij}=0\). \(\omega_{ij}\) is a scalar hyperparameter to indicate whether the point clouds pair \((\mathcal{P}_{i},\mathcal{P}_{j})\) contributes in the loss function based on the conditions we follow to select positive and negative pairs (See Sec. IV-C).

## IV Experiments

We briefly introduce the datasets used, followed by evaluation settings and the implementation details. Comparisons are made between our proposed network and three state-of-the-art architectures with different backbones, serving as baselines. Additionally, we assess our network's performance in comparison to existing lidar PR approaches. We then provide detailed ablation studies to verify the network design and the impact of each component on performance gains.

### _Datasets_

We use three publicly-available large-scale datasets for evaluation. We detail the characteristics of each dataset below. **Oxford RobotCar dataset[42]** has been widely used for lidar PR, which is a processed subset of the overall Oxford RobotCar dataset [42]. It consists of point clouds captured
by travelling a route (\(\sim\)10 km) 44 times across Oxford, UK, over a year. To assess performance on the Oxford RobotCar dataset, point clouds from one trip are taken as queries and matched against point clouds from other trips in an iterative process [9]. The training and testing dataset split introduced by Uy _et al._[9] is followed in this work. In total, \(\sim\) 24.7k point clouds were used for training and testing.

**In-house dataset [9]** consists of data from three regions in Singapore - a University Sector (U.S.), a Residential Area (R.A.), and a Business District (B.D.). Similar to the evaluation on the Oxford dataset, we use the standard test dataset split described in [9]. Point clouds were collected on a car travelling a path in U.S. (\(\sim\) 10 km), R.A. (\(\sim\) 8 km) and B.D. (\(\sim\) 5 km) 5 times at different times. Point clouds from a single trip are used as queries and evaluated iteratively with point clouds from the remaining trips as database [9]. In-house dataset used at the test time only to demonstrate generalisability. In total, \(\sim\) 4.5k point clouds were used for testing.

**MulRan dataset [43]** consists of traversals of several environments in South Korea - the Daejeon Convention Center (DCC) (3 runs each \(\sim\) 5 km), the Riverside (3 runs each \(\sim\) 6 km) of Daejeon city, the Korea Advanced Institute of Science and Technology (KAIST) (3 runs each \(\sim\) 7 km) and Sejong city (Sejong) (3 runs each \(\sim\) 23 km). We use the DCC and Riverside environments, training with DCC sequences 1 and 2 and testing on sequence 3, and training with Riverside sequences 1 and 3 and testing on sequence 2. KAIST three sequences are used as unseen only for evaluation. Because the average distance of point clouds in the MulRan dataset is \(\sim\) 1 m, we only use the point clouds with a minimum of 20 m apart, resulting in a total of \(\sim\) 2.5k point clouds used for training and testing.

### _Evaluation Criteria_

The datasets described above include UTM coordinates, _i.e._, ground truth obtained from IMU/GPS for Oxford/in-house and IMU/GPS/SLAM for MulRan, for each point cloud. Using this ground truth, we select a 25 m threshold to classify successful place recognition events (retrievals). We compare the cosine similarity between the refined global descriptors of each query in a run with the refined global descriptors of the remaining point clouds covering the same region in the database. For comparison, we use AR@N (and its varieties, _i.e._, AR@1 and AR@1%), commonly used for lidar PR performance. This metric measures the percentage of correctly localised queries where at least one of the top-N database predictions matches the query. A perfect AR@N score would be 100%, meaning all the possible revisits are correctly identified.

### _Implementation Details_

We implemented P-GAT in PyTorch, and Adam optimiser was used. The learning rate was set to \(1e^{-4}\) without learning rate decay. Our model was trained with batch size 256 for 1500 epochs on Oxford and MulRan. The number of attention layers was set to 9 with four heads for multi-head AGNN, resulting in \(\sim 12\) million parameters (in total) for learning. We used this single configuration across all the experiments.

We create an adjacency matrix using a travel distance threshold to generate fully connected subgraphs. Using this matrix, we create subgraphs that include (key)nodes, each encompassing both the pose and its corresponding feature information. The adjacency matrix plays a crucial role in the training process for pairing subgraphs, ensuring that nodes within each subgraph are fully interconnected. Upon pairing subgraphs, we merge the nodes and features from both subgraphs, forming a fully connected graph. Nodes define edges in between, and features are populated with descriptors obtained from an existing PR method. We randomly pair subgraphs from the database to select two subgraphs as input. Because most of the pairs of subgraphs do not overlap, the ground truth of the similarity matrix is almost a zero matrix, not allowing the model to update the parameters properly. Therefore, we defined a positive rate and set it to 30%, forcing the model to have a 30% probability of having subgraph pairs with at least one pair of positive nodes.

Subgraph generation is based on the robot's travelling distance. A subgraph starts from node \(\mathcal{V}_{i}\) and stops at node \(\mathcal{V}_{i+n}\) when the travelling distance exceeds a threshold. The stride of the subgraph generation is one, _i.e._, the next subgraph starts from node \(\mathcal{V}_{i+1}\). Since the number of subgraph nodes can vary, we use a boolean mask to deal with padding nodes. Also, we implemented a customised version of layer normalisation (compatible with the dynamic behaviour of subgraphs) in the MLP blocks, calculating all nodes' mean and standard deviation except padding nodes. This approach effectively handles the dynamic node number within subgraphs.

During testing, because one query node can appear in multiple subgraphs (unlike point cloud pair-wise comparison), we implemented an average scheme in which the similarity scores related to a query node are averaged when the query node is compared against the entire nodes from the database, _i.e._, \(\overline{s}_{ij}=\frac{1}{C_{1}C_{2}}\sum_{n=1}^{C_{1}}\sum_{n=2}^{C_{2}}s_{ ij}(\mathbf{d}^{(n_{1})}_{1},\mathbf{d}^{(n_{2})}_{2})\), where \(C_{1}\) and \(C_{2}\) are the maximum numbers of subgraphs from which the \(i\)-th query node and \(j\)-th database node are seen, respectively.

### _Comparison to State-of-the-Art_

To show that P-GAT is backbone agnostic, we separately trained the model on Oxford RobotCar [42] and MulRan datasets [43] using descriptors \(\mathbf{d}\in\mathbb{R}^{256}\) obtained from the backbone models PointNetVLAD [9], MinkLoc3D [10], and PPT-Net [13]. Descriptors of these baselines were generated after training the models on the training splits described earlier.

Table I summarises the average recall@1% (AR@1%) and average recall@1 (AR@1) of the results of our P-GAT and three other baseline models. Across all the experiments, P-GAT displays substantial performance gains (on average above 10%) compared to the baselines, indicating that if P-GAT is integrated with any backbone, it improves the performance due to spatiotemporal information. Additionally, following the trend of models' performance when trained on Oxford and tested on MulRan/in-house or trained on MulRan and tested on Oxford/in-house, P-GAT demonstrates more consistent improvement in performance, showing that P-GAT enhances
the generalisation ability of the network when train and test data are from different distributions.

We further compare our P-GAT with the state-of-the-art methods listed in Table II. For this, P-GAT was trained using descriptors extracted from MinkLoc3D trained on the Oxford training subset. Comparing P-GAT and MinkLoc3D baseline, we observe that AR@1 for Oxford, U.S., R.A., and B.D. improves by 5%, 11.3%, 13.9%, and 16.5%, respectively. Additionally, although we used MinkLoc3D descriptors, the substantial gain obtained by P-GAT allows us to outperform the other state-of-the-art methods, such as PPT-Net, SVT-Net and PVT3D, which reported higher performance than that of vanilla MinkLoc3D. AR@1% scores for all datasets are all higher than 99%. High AR@1% indicates that P-GAT enables the identification of all possible revisits in a small subset of top candidates (1% of point clouds in the database).

To evaluate the performance variance of our model compared to the baselines, we trained P-GAT, PointNetVLAD, MinkLoc3D and PPT-Net 5 times on the Oxford training subset and tested on the Oxford/in-house testing subset using fixed settings. Fig. 3 shows mean AR@N recalls (average of AR@N over 5 experiments) and their standard deviations for all four models. The variance of our model is comparable with that of MinkLoc3D and PPT-Net, and it decreases by increasing the number of top candidates. PointNet-VLAD shows greater variance than the other methods indicating the network has more nondeterministic behaviour. The recall curves provide a visual representation of the superior performance of our P-GAT model, demonstrating the potential of our attention-based approach in improving the accuracy and stability of place recognition.

### _Ablation Studies_

We conducted ablation studies to validate our proposed method and the relative contribution of each component. For this purpose, we trained and evaluated P-GAT utilising the MinkLoc3D model trained on the Oxford dataset. This ensures a fair comparison with the results reported in Table II.

**Effects of Positional Encoding:** Table III compares the performance of our model with and without positional information. The model without positional information shows a negligible drop (2.2% in AR@1) in performance on the Oxford testing split. However, the model lacking positional information exhibited a considerably inferior performance on the in-house datasets. As seen, AR@1 and AR@1% decrease more than 40% and 10%, respectively, over R.A, U.S. and

\begin{table}
\begin{tabular}{l c c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{Offard} & \multicolumn{3}{c}{US} & \multicolumn{3}{c}{RA} & \multicolumn{3}{c}{BD} \\ \cline{3-10}  & AR@1 & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% \\ \hline \multicolumn{1}{l}{FointNetVLAD [9]} & 62.8 & 80.3 & 63.2 & 72.6 & 56.1 & 60.3 & 57.2 & 66.3 \\ PCAN [1] & 69.1 & 83.8 & 62.4 & 79.1 & 56.9 & 71.2 & 58.1 & 66.8 \\ LP-Net [32] & 86.3 & 94.9 & 87.0 & 96.0 & 83.1 & 90.5 & 82.5 & 89.1 \\ EC-Net [34] & 86.2 & 94.7 & — & 96.5 & — & 88.6 & — & 84.9 \\ HPTB [35] & 86.6 & 93.7 & 80.9 & 90.2 & 78.2 & 77.2 & 74.3 & 79.8 \\ SOE-Net [12] & 89.4 & 96.4 & 82.5 & 93.2 & 82.9 & 91.5 & 83.3 & 88.5 \\ MultiLoc3D [10] & 90.7 & 93.6 & 87.6 & 95.0 & 80.4 & 91.2 & 81.5 & 88.5 \\ NP-Transformer [46] & 93.8 & 97.7 & — & — & — & — & — & — \\ PPNetNet [13] & 93.5 & 98.1 & 90.1 & 97.5 & 84.1 & 93.3 & 84.6 & 90.0 \\ SVTNet [47] & 91.7 & 97.8 & 90.1 & 96.5 & 84.3 & 92.7 & 85.5 & 90.7 \\ MultiLoc3D [26] & 92.8 & 81.7 & 83.1 & 67.7 & 72.6 & 57.1 & 70.4 & 62.2 \\ PVT3D [48] & 95.6 & 98.5 & 92.9 & 97.9 & 89.5 & 94.8 & 87.9 & 92.1 \\ P-GAT (Ours) & **95.0** & **99.9** & **95.0** & **100.0** & **94.3** & **100.0** & **95.0** & **99.8** \\ \hline \hline \end{tabular}
\end{table} TABLE II: Average recall (%) at top 1% (AR@1%) and top 1 (AR@1%) for the state-of-the-art lidar-based PR models trained on the Oxford RobotCar. Our P-GAT (trained on top of MinkLoc3D) performs best on all benchmarks.

\begin{table}
\begin{tabular}{l l l l l l l l l l l l l l l l l l l} \hline \hline  & & \multicolumn{3}{c}{Offard} & \multicolumn{3}{c}{DCC} & \multicolumn{3}{c}{Riversible} & \multicolumn{3}{c}{R.A.} & \multicolumn{3}{c}{U.S.} & \multicolumn{3}{c}{KAIST} & \multicolumn{3}{c}{Average} \\ \cline{3-14}
**Trained one**: & & AR@1 & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% & AR@1\% \\ \hline \multirow{4}{*}{Oxford} & PointNetVLAD & Baseline & 62.8 & 83.8 & 69.3 & 81.6 & 37.0 & 36.6 & 56.2 & 65.3 & 52.3 & 68.4 & 63.1 & 79.0 & 57.2 & 73.1 & 56.8 & 72.5 \\  & P-GAT & **96.5** & **99.9** & **80.8** & **92.1** & **57.0** & **83.5** & **89.2** & **86.6** & **76.3** & **99.6** & **79.0** & **88.2** & **73.8** & **78.9** & **79.8** \\ \cline{2-14}  & MinkLoc3D & Baseline & 93.0 & 97.9 & 77.7 & 91.2 & 46.3 & 81.1 & 81.3 & 83.5 & 80.4 & 91.2 & 86.7 & 95.0 & 78.8 & 91.6 & 77.3 & 90.9 \\  & P-GAT & **98.0** & **99.9** & **93.9** & **94.7** & **75.6** & **86.4** & **98.0** & **99.8** & **94.3** & **100.0** & **98.0** & **98.1** & **94.2** & **92.4** & **96.4** \\ \cline{2-14}  & PPT-Net & Baseline & 93.5 & 98.1 & 76.0 & 89.6 & 39.4 & 84.2 & 84.6 & 90.0 & **84.1** & 93.1 & 90.1 & 97.5 & 77.4 & 88.3 & 77.9 & 61.6 \\  & P-GAT & **97.4** & **99.9** & **93.6** & **99.2** & **73.1** & **94.0** & **80.0** & **85.1** & 82.9 & **99.8** & **99.9** & **89.3** & **91.4** & **87.4** & **97.5** \\ \hline \multirow{4}{*}{DCC} & PointNetVLAD & Baseline & 40.5 & 77.6 & 75.3 & 90.9 & 52.3 & 81.8 & 52.2 & 60.5 & 45.0 & 58.5 & 49.1 & 60.5 & 64.9 & 78.9 & 54.8 & 70.3 \\  & P-GAT & **63.3** & **93.6** & **96.9** & **99.9** & **83.2** & **96.8** & **52.5** & **76.9** & **64.9** & **95.0** & **88.5** & **96.4** & **79.0** & **91.4** & **71.1** & **93.0** \\ \cline{2-14}  & MinkLoc3D & Baseline & 68.9 & 81.5 & **95.4** & **99.2** & 78.1 & 92.7 & 94.5 & 85.7 & 79.5 & 88.7 & 84.0 & 92.5 & **85.3** & **93.5** & **81.5** & 90.5 \\ \cline{2-14}  & P-GAT & **78.9** & **97.3** & 93.2 & 98.9 & **87.3** & **95.6** & **95.4** & **99.9** & **81.3** & **99.2** & **89.5** & **89.9** & 82.2 & 98.8 & **86.5** & **97.7** \\ \cline{2-14}  & B
B.D. These results demonstrate that positional information is critical for our model's performance, especially when testing in unseen environments.

**Intra- and Inter-Attention Mechanisms:** In this ablation study, we examine the impact of inter- and intra-attention mechanisms on our model's performance. Table IV displays the results, indicating that disabling intra-attention produces a slight decrease in performance across all datasets. On the other hand, disabling inter-attention results in a slight improvement in the AR@1 and AR@1% scores on the Oxford dataset but a significant decrease in AR@1 scores on the in-house datasets. The U.S. and R.A. datasets show a decrease of around 1% in AR@1% scores, whereas B.D. experiences a decrease of 10%. Notably, the model without the full attention mechanism demonstrates the lowest AR@1 and AR@1% scores on the Oxford dataset, while its performance on the in-house datasets is comparable and sometimes even better than the model without inter-attention. These findings suggest that both inter- and intra- attention mechanisms enhance place recognition accuracy. Moreover, disabling inter-attention may lead to overfitting on the training dataset, resulting in poor generalisation at test-time with distribution shifts.

**Travel Distance in Subgraphs:** We conducted an ablation study to investigate the impact of the robot's travelling distance within subgraphs on the performance of our model. Table V tabulates the performance results for varying travelling distances (50 m, 100 m, 200 m, and 300 m) in subgraphs. The model trained on subgraphs with a 50 m length exhibits the lowest AR@1 and AR@1% scores on all datasets. As travelling distances in subgraphs increase, the model performance also improves. The optimal results were obtained from the subgraphs with a travelling distance of 200 m. However, the model trained on subgraphs with a travelling distance of 300 m exhibits a slight performance drop. This ablation study demonstrates the importance of the subgraph length in aggregating information within and across subgraphs. Short subgraphs avoid proper receptive fields between similar and dissimilar point clouds. On the other hand, large subgraphs contain irrelevant information, biasing the model performance.

### _Runtime Analysis and Memory Usage_

We evaluated the computation time taken on average for each keynode in a subgraph and memory consumption to demonstrate that our presented system can run online. The timing results are collected by running the pre-trained models on a single NVIDIA RTX A3000 Mobile GPU with an Intel(R) Xeon(R) W-11855M CPU @ 3.20GHz CPU. Table VI reports P-GAT's runtime per frame using embeddings extracted by the baselines listed. Overall, P-GAT adds a constant memory of \(\sim 1.1\) GiB and \(\sim 20\) ms to the inference time, demonstrating that, in an end-to-end fashion, the total computation time allows online operation.

## V Conclusion

We proposed P-GAT for large-scale place recognition tasks. Through the attention mechanism and graph neural network, we increase the descriptors' distinctiveness by relating the entire point clouds collected in a sequence and in nearby locations in revisit areas. This design allows for exploiting spatiotemporal information. Extensive experiments on the Oxford dataset, the in-house dataset and the MulRan dataset demonstrate the effectiveness of the proposed method and its superiority compared to the state-of-the-art. Our proposed P-GAT's average performance across key benchmarks is superior by above 10% over the original baselines demonstrating that P-GAT can be incorporated into any global descriptors, substantially improving their robustness and generalisation ability. In future work, we would like to extend the P-GAT for point cloud registration task to accurately determine the position and orientation of retrieved places.

## VI Appendix

In addition to the quantitative results discussed earlier, in the following, we present qualitative examples of P-GAT in action, and visualisations and analysis of the learned attention patterns.

### _Qualitative Analysis on Retrieval_

Fig. 4, visualises some semantically poor point clouds from R.A. (top) and Riverside (bottom) that P-GAT successfully recognised, whereas vanilla MinkLoc3D [10] and PPTNet [13] failed in recognition. We show the query point clouds on the leftmost column and the top-1 retrieved point clouds from the three models on the following three columns. As seen, P-GAT correctly recognised the place and retrieved the most relevant point cloud despite poor features evidencing the benefit of the aggregation of spatiotemporal information. The third and fourth columns show the retrieval results from MinkLoc3D and PPT-Net. The comparison between our model and the baselines demonstrates the superiority of our model in challenging scenarios.

### _Qualitative Analysis of Intra- and Inter-mechanism_

Fig. 5 demonstrates the attention pattern between two subgraphs (keynodes are indicated by red and green dots) by focusing on a keynode (receiver node) from the query

\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline Distance & \multicolumn{3}{c}{Oxford} & \multicolumn{3}{c}{U.S.} & \multicolumn{3}{c}{R.A.} & \multicolumn{3}{c}{B.D.} \\ \hline nn & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 \\ \hline
50 & 74.3 & 99.2 & 97.1 & 89.3 & 2.2 & 52.7 & 76.2 & 2.1 & 73.3 \\
100 & 5 & 91.1 & 99.8 & 4 & 78.7 & 98.4 & 4.7 & 98.3 & 71.1 & 89.5 \\
200 & 10 & **98.8** & **99.3** & **98.0** & **100.0** & **9.3** & **100.0** & **9.3** & **88.0** & **98.3** \\
300 & 15 & 88.6 & 97.1 & 12 & 83.1 & 99.3 & 12 & 60.7 & 98.3 & 12 & 90.4 & 99.6 \\ \hline \end{tabular}
\end{table} TABLE V: Impact of the travel distance in the subgraphs.

\begin{table}
\begin{tabular}{c c c c} \hline
**Model** & Memory Usage & Runtime \\ \hline PointNetVLAD + P-GAT & (2.95±1.13±-0.08iGB & (22±18±40)ms \\ LPD-Net + P-GAT & (1.94±1.13±-0.07iGB & (35±18±53)ms \\ MinkLoc3D + P-GAT & (0.85±1.13±-19.09iGB & (29±18±47)ms \\ PPT-Net + P-GAT & (0.96±1.13±-2.09iGB & (30±18±48)ms \\ \hline \end{tabular}
\end{table} TABLE VI: Comparison of inference speed and memory consumption.

\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline Distance & \multicolumn{3}{c}{Oxford} & \multicolumn{3}{c}{U.S.} & \multicolumn{3}{c}{R.A.} & \multicolumn{3}{c}{B.D.} \\ \hline nn & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 & AR@1 \\ \hline
50 & 74.3 & 99.2 & 97.1 & 89.3 & 2.2 & 52.7 & 76.2 & 2.1 & 73.3 \\
100 & 5 & 91.1 & 99.8 & 4 & 78.7 & 98.4 & 4.7 & 98.3 & 71.1 & 89.5 \\
200 & 10 & **98.8** & **99.3** & **98.0** & **100.0** & **9.3** & **100.0** & **9.3** & **88.0** & **98.3** \\
300 & 15 & 88.6 & 97.1 & 12 & 83.1 & 99.3 & 12 & 60.7 & 98.3 & 12 & 90.4 & 99.6 \\ \hline \end{tabular}
\end{table} TABLE IV: Impact of intra- and inter-attention mechanisms.
subgraph. As seen in attention layer 0, P-GAT initially attends to all keynodes in the query and dataset subgraphs. By increasing the attention layers, P-GAT focuses on keynodes located nearby the receiver keynode. Intra-attention aggregates contextual information (in our case spatiotemporal) between point clouds captured consecutively, while inter-attention aggregates information between non-consecutive point clouds in revisited areas, increasing the distinctiveness of features and their invariance to viewpoints and temporal changes. Intermediate layers exhibit oscillating attention spans reflecting the complexity of the learned behaviour.

### _Average Scheme Implementation_

As described in the paper, one keynode can be seen from multiple subgraphs; therefore, more than a similarity score will be computed. This is only the case in inference when ground truth is unavailable. On the other hand, subgraphs in P-GAT are not fixed in length and can have varying numbers of keynodes. Hence we need to deal with this dynamic behaviour of subgraphs as well. To this end, we developed an average scheme to calculate the similarities between query and database keynodes.

Alg. 1 shows the pseudo-code of our average scheme. Our algorithm initialises two matrices, the similarity matrix \(\overline{\mathbf{S}}\in\mathbb{R}^{M\times N}\) and the counting matrix \(\mathbf{C}\in\mathbb{R}^{M\times N}\), with zeros matrices. We use the proposed P-GAT to calculate the similarity scores in matrix \(\mathbf{S}\in\mathbb{R}^{M\times N_{l}}\) for all pairs of keynodes within the given query and database subgraphs \((\mathcal{S}_{Q},\mathcal{S}_{D}^{l})\). We add the similarity score \(s_{ij}\) of two keynodes

Fig. 4: Retrieval examples of our model along with two baseline models (MinkLoc3D and PPT-Net) on R.A. (upper) and Riverside (lower) datasets. True-positive place recognition based on these point clouds is challenging due to the lack of distinct features. However, P-GAT can recognise similar places correctly, leveraging the spatiotemporal information between neighbour point clouds. The relative distance between the query point cloud and the top candidate selected by P-GAT, MinkLoc3D and PPT-Net is 3.16 m, 801.38 m and 1027.96 m, respectively, for the R.A. example, and 2.83 m, 114.62 m and 127.64 m, respectively, for the Riverside example.

Fig. 5: Intra- and Inter- attention pattern, in various layers, between a pair of subgraphs intersecting at a revisit area. Intra edges are colour coded by grey shades, whereas Inter edges by blue shades.
to the corresponding elements \(\overline{s}_{id}\) in the similarity matrix and record the number of added similarity scores for \(\overline{s}_{id}\) in the corresponding element \(c_{id}\) in the counting matrix. \(d\) is the global index of the \(j\)-th keynote in \(\mathcal{S}_{D}^{l}\). We map the local keynote index \(j\) to the global keynote index \(d\) by adding the subgraph's index \(l\), as we generated subgraphs using a stride of 1 and considering the incremental indexing of nodes in subgraphs in the database. Finally, we perform an element-wise division between the similarity matrix and the counting matrix to obtain a similarity matrix with elements corresponding to probabilities of whether pairs of keynotes represent the same place. The space complexity of Alg. 1 is \(\mathcal{O}(MN),M\ll N\), which is memory efficient. Once the similarity matrix is generated using Alg. 1, we follow the approach of other place recognition models and select the top K candidates based on their similarity scores.

```
Input: subgraph pairs \(\{\mathcal{S}_{Q},\mathcal{S}_{D}^{l}\}\) // \(\mathcal{S}_{Q}\) and \(\mathcal{S}_{D}^{l}\) are query and \(l\)-th database subgraphs, \(l\in\{1,\dots,L\}\) Output: updated similarity matrix \(\overline{\mathbf{S}}\in\mathbb{R}^{M\times N}\) // \(M\) is the number of keynodes in \(\mathcal{S}_{Q}\), and \(N\) is the total number of keynodes (counting duplicates only once in \(\{\mathcal{S}_{D}^{l}\}_{l=1}^{L}\)
1 Initialise similarity matrix \(\overline{\mathbf{S}}\) and counting matrix \(\mathbf{C}\in\mathbb{R}^{M\times N}\) with zeros for\(l=1:L\)do
2 S = P-GAT(\(\mathcal{S}_{Q},\mathcal{S}_{D}^{l}\)) for\(s_{ij}\) in S do // \(i\in\{1,\dots,M\},j\in\{1,\dots,N_{l}\}\), \(N_{l}\) is number of keynodes in \(\mathcal{S}_{D}^{l}\) \(d=j+1\) \(\overline{s}_{id}=\overline{s}_{id}+s_{ij}\) \(c_{id}=c_{id}+1\) // \(d\in\{1,\dots,N\}\)
3\(\overline{\mathbf{S}}=\overline{\mathbf{S}}\osim\mathbf{C}\) // \(\osim\) denotes element-wise division
```

**Algorithm 1**Average scheme algorithm

## Acknowledgements

This work was funded by CSIRO's Machine Learning and Artificial Intelligence Future Science Platform (MLAI FSP). P.P. and P.M. share senior authorship.
