For learning, GPA maintains components of GIP [1]}, namely, GGNN [2]} and GAT-based attention mechanism [3]} (see Fig. 2).
GGNN [2]} is used to iteratively learn the relationships between the nodes given prior knowledge.
The hidden state matrix \(H^{(l)}\)  is updated through a GRU layer [5]} where messages from neighbouring nodes and previous iterations are aggregated to update the hidden state of each node for each iteration \(l\) .
The learned node states and edges at the output of the gated network are subsequently weighted with a graph attention mechanism that determines the most relevant output nodes based on their importance.
The edges between object node \(v_i\)  and object node \(v_j\)  are weighted with attention coefficients.
The coefficients are obtained by applying the attention mechanism \(\alpha (\cdot )\)  on the object nodes \(e_{ij} = \alpha (v_{ij})\)  and are normalised in \((0,1)\)  using the sigmoid function.
The resulting weighted feature vector \(w\)  is first reshaped with a linear layer and then fed through a classifier \(B(\cdot )\)  that yields a prediction score for each class.
