## 3 Message Passing for JP-CoMP Clustering
### Message Passing Derivation
The relationship between the variable node and the function node for the diagonal variable is represented by six messages, i.e., messages \(\lambda_{ii}\), \(\mu_{ii}\), \(\beta_{ii}\), \(\eta_{ii}\), \(v_{ik}\), and \(\zeta_{ik}\). Therefore, based on the message passing principle, each message of the diagonal variable can be expressed as  
Figure 2:5  
Figure 2:6 Figure 2:7  
Figure 2:8 Figure 2:9  
\[\lambda_{ij}\left(m\right)=S_{ij}+\eta_{ij}\left(m\right), \tag{15}\]0  
The message values \(\lambda_{ii}\left(m\right)\), \(\mu_{ii}\left(m\right)\), \(\beta_{ii}\left(m\right)\), \(\eta_{ii}\left(m\right)\), \(v_{ik}\left(m\right)\), and \(\xi_{ik}\left(m\right)\) are utilized for setting hidden variable \(C_{ii}\) to \(m\in\left\{0,1,\ldots,N\right\}\). The finally derived messages are considered according to the values of \(m\). The final messages are defined as the message difference condition between \(m\
eq 0\) and \(m=0\). The final message from the variable node to the function node is the sum of all incoming messages from \(C_{ii}\), except for the message from the function itself. The final messages for \(\widetilde{\lambda}_{ii}^{m}\) and \(\widetilde{\beta}_{ii}^{m}\) can be represented as  
\[\lambda_{ij}\left(m\right)=S_{ij}+\eta_{ij}\left(m\right), \tag{15}\]1  
\[\lambda_{ij}\left(m\right)=S_{ij}+\eta_{ij}\left(m\right), \tag{15}\]2  
On the other hand, the message from \(H_{j}\) to \(C_{ii}\) is defined as the difference between message \(\mu_{ii}\left(m\right)\) and message \(\mu_{ii}\left(0\right)\). Message \(\mu_{ii}\left(m\right)\) indicates that, when the \(i\)th BS is an exemplar, there are two possible cases, i.e., neighboring BSs around the \(i\)th BS select the \(i\)th BS as an exemplar or neighboring BSs around the \(i\)th BS do not select the \(i\)th BS as an exemplar. Message \(\mu_{ii}\left(0\right)\) indicates that the \(i\)th BS is not an exemplar, none of the neighboring BSs around the \(i\)th BS select the \(i\)th BS (\(C_{i^{\prime}i}=0\)) as an exemplar. Therefore, message \(\widetilde{\mu}_{ii}\) can be defined as  
\[ \begin{split}\widetilde{\mu}_{ii}&=\mu_{ii}\ \left(m\right)-\mu_{ii}\left(0 \right)=\sum_{i^{\prime}\
eq i}\max_{C_{i^{\prime}i}}\lambda_{ji}\left(C_{i^ {\prime}i}\right)-\sum_{i^{\prime}\
eq i}\max_{C_{i^{\prime}i}}\lambda_{ji} \left(0\right)\\ &=\sum_{i^{\prime}\
eq i}max\left(\widetilde{\lambda}_{i^{\prime }i},0\right).\end{split}  \tag{31}\]  
For the message from \(F_{i}\) to \(C_{ii}\), the message is defined as the difference between message \(\eta_{ii}\left(m\right)\) and message \(\eta_{ii}\left(0\right)\). Message \(\eta_{ii}\left(m\right)\) indicates that when the \(i\)th BS is an exemplar, it should select itself as an exemplar and cannot possibly select other points as an exemplar (\(C_{ii^{\prime}}=0\)). Message \(\eta_{ii}\left(0\right)\) indicates that when the \(i\)th BS is not an exemplar, it should select other BSs as an exemplar (\(C_{ii^{\prime}}=0\)). Therefore, message \(\widetilde{\eta}_{ii}\) can be defined as  
\[ \begin{split}\widetilde{\eta}_{ii}=\eta_{ii}\left(m\right)-\eta_{ ii}\left(0\right)&=\sum_{i^{\prime}\
eq i}\left(\beta_{ii^{\prime}} \left(0\right)\right)-\max_{i^{\prime}\
eq i}\left(\beta_{ii^{\prime}}\left(1 \right)+\sum_{i^{\prime\prime}\
otin\left\{i^{\prime},i\right\}}\beta_{ii}^{ \prime\prime\prime\prime\prime\prime\prime\prime\prime\prime\prime\prime} \left(0\right)\right)\\ &=-\max\left(\widetilde{\beta}_{ii^{\prime}}\right).\end{split}  \tag{32}\]  
The message from \(C_{ii}\) to \(G_{k}\) is defined as the difference between the preference of the \(i\)th BS selecting the \(k\)th BS as a super-exemplar and the maximum preference value when the \(i\)th BS is not an exemplar. This message can be expressed as  
\[ \begin{split}\widetilde{v}_{ik}\left(k\right)&=v_{ ik}\left(m\right)-v_{ik}\left(0\right)\\ &=l_{ik}-\max\left[\max_{me\left\{0,k\right\}}\left(l_{im}+ \widetilde{\xi}_{im}\left(m\right)\right),-s_{ii}-\widetilde{\mu}_{ii}- \widetilde{\eta}_{ii}\right].\end{split}