## 3 The Proposed Approach
### Other Features of LGA  
In Section 3.1, we discussed how the loss function of LGA is designed to not only help LGA learn but also to influence learning in the preceding or succeeding networks. In Section 4.1, we discussed how LGA can be easily incorporated in different architectures in a modular fashion. There are two other major benefits of LGA, namely efficiency and scalability, in comparison with globally connected graph and attention models.  
**Efficiency.** Constructing a globally connected graph, i.e., a graph where any node can be connected to any other node, is a computationally demanding task. For our LGA, we need only \(9\times N\) different \(1\times 1\) convolutional layers, where \(N\) is the number of nodes. This solution is more space- and time-efficient than most other approaches. LGA needs only \(\mathcal{O}(N)\) space for to store edge weights, whereas the spatial complexity is mostly of the order of \(\mathcal{O}(N^{2})\) in attention or globally connected graph models. CCNet attention [8] has a spatial complexity of \(\mathcal{O}(N^{1.5})\), which is still higher than that of our model. With respect to time complexity, most attention or globally connected graph models have a complexity of the order of \(\mathcal{O}(NC^{2}+N^{2}C)\), where \(NC^{2}\) corresponds to the application of convolution to the feature map for channel reduction and \(N^{2}C\) represent information propagation. The term \(NC^{2}\) can be reduced by a significant amount by applying depth-wise or group convolution. Hence, the best optimized complexity for such models is \(\mathcal{O}(N^{2}C)\). In the case of CCNet, the complexity is \(\mathcal{O}(NC^{2}+N^{1.5}C)\), and the optimized complexity is \(\mathcal{O}(N^{1.5}C)\). On the other hand for our network, the optimized time complexity is \(\mathcal{O}(NC)\) because our module's layer takes only \(\mathcal{O}(NC)\) for information propagation. As there are four layers in our LGA, the complexity is \(\mathcal{O}(4 NC)\), which is \(\sqrt{N}\) times smaller than that of the best light-weight attention model (CCNet). We also provide the derivation of the space-time complexity of LGA vs. CCNet in the Supplemental Materials.  
**Scalability.** Here, we use a \(1\times 1\) convolutional layer, assuming that a local edge (i.e., edge between spatially close nodes) can be constructed using the information of the node itself. However, incorporating information of a larger context is possible simply by using convolutional layers of larger sizes, for example, kernels with dimensions of \(2\times 2\) or higher. Similarly, although we used only four LGA layers, this can be easily extended to more layers such that a larger scale of global context can be included. In comparison, it is difficult to incorporate scalability and correlate features that are spatially far apart in attention models.  
**Effective scene context capture.** As our LGA module propagates information between two nodes by passing information via neighboring nodes, it gradually captures the context of surrounding nodes, i.e., non-local context, for information propagation. Our LGA module also automatically takes the distance between nodes into consideration, since more information from a node can reach its neighbor earlier and more effectively, thereby implying that that the nodes closer to each other are more likely to have a similar structure when LGA is included.