# Containment Control-Guided Boundary Information for Semantic Segmentation
## 3 Method  
### How Containment Control Guides Semantic Segmentation  
In this subsection, we will specifically introduce containment control and apply its ideas to semantic segmentation. Specifically, we consider image boundary features and internal features as \"leaders\" and \"followers\" in containment control, respectively; see Figure 2. And we use the containment control criterion to construct a unique loss function: boundary-internal containment loss function (BIC-loss). BIC-loss is used to quantify the connection between the boundary information and the internal information of the image, and to guide the updating of the weights of the features fusion matrix, which will be introduced below. Now, let us get started with the containment control. A multi-agent system (MAS) normally consists of several leaders and followers. Containment control is a prevalent issue in the multi-agent system study for designing controllers for the followers to ultimately reside within the convex hull formed by the leaders as shown in Figure 3. The topology of interactions among agents in a MAS can be represented using a graph \(\mathcal{G}=(\mathcal{V},\mathcal{E})\) with a set of \(N\) nodes \(\mathcal{V}=\{v_{1},v_{2},\ldots,v_{N}\}\) and a set of edges \(\mathcal{E}\subseteq\mathcal{V}\times\mathcal{V}\). \(v_{i},\forall i\in\{1,2,\ldots,N\}\), represents the agents in the MAS, while the edges represent the communication strength between the agents. The Laplacian matrix is defined as follows:  
\[\mathcal{L}= \begin{cases}-a_{ij}&i\
eq j,\\ \sum_{j=1}^{N}a_{ij}&i=j,\end{cases}  \tag{1}\]  
where \(\mathcal{L}\in\mathbb{R}^{N\times N}\) of \(\mathcal{G}\). \(a_{ij}\) signifies the weights of the edges, indicating that nodes \(j\) and \(i\) are adjacent if node \(i\) can directly receive information from node \(j\) for \((v_{j},v_{i})\in\mathcal{E}\). In this case, \(a_{ij}>0\); otherwise, \(a_{ij}=0\) means that there is no direct connection between \(i\) and \(j\), i.e., \((v_{j},v_{i})\
otin\mathcal{E}\). \(a_{ii}=0\), \(\forall i\in\{1,2,\ldots,N\}\) implies the absence of self-loops. The Laplacian matrix \(\mathcal{L}\) reflects the internal communication situation within the system, which inspires us to utilize it as a bridge for the fine fusion between image internal features and boundary features in semantic segmentation. In the containment control of the MAS containing \(N\) nodes, let \(\mathcal{G}\) be a topology of directed communication with \(M(M<N)\) followers and \((N-M)\) leaders. Note that the leaders have no neighbors. Thus, the Laplacian matrix \(\mathcal{L}\) associated with \(\mathcal{G}\) can be partitioned as  
\[\mathcal{L}=\left[ \begin{array}{cc}\mathcal{L}_{1}&\mathcal{L}_{2}\\ \mathbf{0}_{(N-M)\times M}&\mathbf{0}_{(N-M)\times(N-M)}\end{array} \right], \tag{2}\]  
in which \(\mathcal{L}_{1}\in\mathbb{R}^{M\times M}\) and \(\mathcal{L}_{2}\in\mathbb{R}^{M\times(N-M)}\). \(\mathcal{L}_{1}\) embodies the interaction among followers, while \(\mathcal{L}_{2}\) embodies the interaction between followers and leaders. It is evident in [25] that every element of \(-\mathcal{L}_{1}^{-1}\mathcal{L}_{2}\) possesses a non-negative value, while each row of \(-\mathcal{L}_{1}^{-1}\mathcal{L}_{2}\) exhibits a sum equal to one. This is the key to the containment control criterion, and it is with the help of the containment control criterion that we construct the link between the image boundary information and the internal information. Figure 2: The connection between semantic segmentation and containment control. Now, we will briefly introduce the containment control model to elicit the containment control criterion. Consider the following global linear MAS:  
\[\dot{x_{f}}(t)=(I_{M}\otimes A)x_{f}(t)+(I_{M}\otimes B)u(t) \tag{3}\] \[\dot{x_{l}}(t)=(I_{N-M}\otimes A)x_{l}(t)\]  
in which \(x_{f}(t)\in\mathbb{R}^{nM}\) is the global state of followers, \(x_{l}(t)\in\mathbb{R}^{n(N-M)}\) is the global state of leaders, and \(u(t)\in\mathbb{R}^{M}\) is the global control input.