\section{0pt}{12pt plus 4pt minus 10pt}{0pt plus 2pt minus 2pt}

\pagestyle{empty}
\IEEEoverridecommandlockouts 
\setlength{\voffset}{0.3in}
\begin{document}
\title{Graph Neural Network Based Access Point Selection for Cell-Free Massive MIMO Systems}
\author{ \IEEEauthorblockN{Vismika Ranasinghe, Nandana~Rajatheva,  and Matti Latva-aho}

\thanks{This work was supported by the Academy of Finland 6Genesis Flagship (grant no. 318927).}

\IEEEauthorblockA{Centre for Wireless Communications,~~University of Oulu, Finland\\
E-mail: vismika.maduka@oulu.fi, nandana.rajatheva@oulu.fi, matti.latva-aho@oulu.fi}
}
\maketitle
\thispagestyle{empty}


 
\begin{abstract}
A graph neural network (GNN) based access point (AP) selection algorithm for cell-free massive multiple-input multiple-output (MIMO) is proposed. Two graphs, a homogeneous graph which includes only AP nodes representing the structure of the APs in the network, and a heterogeneous graph which includes both the AP nodes and user equipment (UE) nodes are constructed to represent a cell-free massive MIMO network. A GNN based on the inductive graph learning framework GraphSAGE is used to obtain the embeddings which are then used to predict the links between the nodes. Numerical results show that compared to proximity-based AP selection algorithms, the proposed GNN based algorithm predicts more potential links with a limited number of reference signal receive power (RSRP) measurements. Unlike the other AP selection algorithms in the literature, the proposed algorithm does not assume the knowledge of RSRP measurements of every AP-UE combination for optimal AP selection. Furthermore, the proposed algorithm is scalable in terms of the number of users in the cell-free system.





\emph{Index  Terms} - AP selection, cell-free massive MIMO, graph neural network
\end{abstract}

\section{Introduction}


For 5\textsuperscript{th} generation (5G) communication  and beyond, cell-free massive multiple input multiple output (MIMO)  has attracted the attention of the research community due to its higher spectral efficiency compared to the cellular counterpart \cite{cellFreeVsSmallCells,cellFreeEmilMakingCompetitive}. This higher spectral efficiency results from a small number of user equipment being jointly served by a large number of geographically distributed access points (AP) using the same time-frequency resources. This difference is more significant when APs are densely deployed as inter-cell interference in a cellular network is leveraged as diversity gain in cell-free massive MIMO.  

For cell-free massive MIMO systems to be practical, AP selection, pilot assignment and cluster formation algorithms need to be scalable. In \cite{scalableCellFreeEmil}, authors have presented a definition for a scalable cell-free massive MIMO system along with a scalable cell-free massive MIMO framework. Furthermore, they have proposed a scalable joint AP selection, pilot assignment and cluster formation algorithm that ensures all UEs are served. Here for each UE, the AP with the strongest large scale coefficient is selected as the master AP and then a pilot which results in minimal pilot contamination is assigned by the master AP. Depending on whether the neighbouring APs are vacant on the same pilot that is assigned to the UE, they decide whether to serve the UE or not. The distributed nature of the algorithm ensures scalability without any burden on the fronthaul links which connect APs and central processing unit (CPU). In \cite{effectiveChannelGainAccess} a centralized AP selection algorithm is presented based on effective channel quality metric which measures both the channel strength and interference. Due to the centralized nature of the algorithm, it does not fulfil the scalability criteria presented in \cite{scalableCellFreeEmil}. In \cite{greenEnergyEfficiencyAP} and \cite{graphColoringPilot}, for each UE, APs with the strongest large scale coefficients are selected before optimizing the cell-free system for energy efficiency and pilot contamination respectively.

One key practical limitation relevant to above mentioned AP selection, pilot assignment, and cluster formation algorithms is the requirement of accurate measurement of large scale fading values for each AP. In a cell-free massive MIMO system, since the UE is served in the same time-frequency resources, neighbouring APs should operate in the same frequency. As the synchronization signals (SS) and channel state information (CSI) reference signals which are used to measure reference signal received power (RSRP) are not $100\%$ orthogonal, intra-frequency RSRP measurements become inaccurate \cite{3gppMeasurement,3gppSignals}. This inaccuracy becomes more significant when UE tries to measure the RSRP of far away APs as the measurements are interfered by nearby APs. In this work we propose a novel graph neural network (GNN) based AP selection algorithm where a trained GNN is used to predict the APs with potential links with few RSRP measurements as the input. 

The remainder of the paper is organized as follows. In section II, a brief introduction to GNNs is given while the system model and the GNN model we propose are presented in section III. Finally, a discussion along with simulation results and a conclusion are given in section IV and section V respectively.


\section{Graph Neural Networks}

Graph neural networks are used to learn a representation of a given graph and perform machine learning tasks based on the learned representation. Given a set of input features per node or edge, graph convolution, a generalized version of the euclidean convolution is performed to obtain the embeddings. These can then be used for machine learning tasks like link prediction between the nodes, node clustering, or node classification.  There are two types of convolutions that can be performed on graphs. One is based on spectral graph theory and is called spectral convolutions while the other one, based on edges connecting the nodes, is called spatial convolutions. Since our model uses only spatial convolutions, in this section we limit our discussion to GNNs with only spatial convolutions.

 Formally, graph $\mathcal{G}$ is defined by $\mathcal{G} = (\mathcal{V}, \mathcal{E})$ where $\mathcal{V}$ is the set of nodes and $\mathcal{E}$ is the set of edges between the nodes. An edge going from node $u \in \mathcal{V}$ to node $v \in \mathcal{V}$ is denoted by $(u,v) \in \mathcal{E}$. In the case of a heterogeneous graph, we can partition nodes in to disjoint sets $\mathcal{V}_1, \mathcal{V}_2 \dots \mathcal{V}_k$ where $\mathcal{V} = \mathcal{V}_1 \cup \mathcal{V}_2 \cup \dots \bigcup \mathcal{V}_k$ and $\mathcal{V}_i \cap \mathcal{V}_j = \varnothing, \forall i \neq j$. Since edges connecting different types of nodes represent different relations, edge notation is also extended to include the edge type as $(u,v,\tau) \in \mathcal{E}$ where $\tau$ is the edge type connecting $u \in \mathcal{V}_i$ to $v \in \mathcal{V}_j$. Furthermore, we can represent each type of edge with a matrix called \textit{adjacency matrix} where $\mathrm{A}_\tau[u,v] = 1$ if $(u,v,\tau) \in \mathcal{E}$ and $\mathrm{A}_\tau[u,v] = 0$ otherwise. When the edges are all undirected then the adjacency matrix becomes symmetric. In some graphs, edges can have weights where adjacency matrix will have arbitrary real values rather than $\lbrace0,1\rbrace$.
 
 \begin{figure}[htbp]
  \centering
  \includegraphics[width=7cm, height=3cm]{images/graphDiag.pdf}
  \caption{Message passing framework}
  \label{graphConvo}
 
\end{figure}
 
 In order to incorporate domain specific information into a graph, nodes are represented with feature vectors. In this work we denote this feature set using $\mathrm{X} \in \mathbb{R}^{d\times\vert \mathcal{V}\vert}$, where we assume the ordering of the features of the nodes is consistent with ordering in the adjacency matrix. Here each node is represented with $m$ dimensional vector $x_i$ where $i \in \mathcal{V}$. Given a input graph $\mathcal{G}$ and node feature set $\mathrm{X}$, a GNN based on message passing framework \cite{graphbook} can be used to obtain the node embeddings $z_u, \forall u \in \mathcal{V}$ required for downstream machine learning tasks. During each message passing iteration a \textit{hidden embedding} ${h}_u^{(n)}$ corresponding to each node $u \in \mathcal{V}$ and iteration $n$ is updated using spatial convolution given by,
 \begin{equation}
      \begin{split}
      {h}_u^{(n)} = \text{UPDATE}^{(n)}\Big({h}_u^{(n-1)}, \text{AGGREGATE}^{(n)} \big(\\{h}_v^{(n-1)}, \forall v \in \mathcal{N}(u)\big) \Big),
      \label{spatialConvo}
 \end{split}
 \end{equation}


where UPDATE and AGGREGATE are arbitrary differentiable functions and  $\mathcal{N}(u) = \lbrace v \in \mathcal{V} : (u,v) \in \mathcal{E} \rbrace$ i.e., the neighborhood of node $u$ (Figure \ref{graphConvo}). The set of hidden embeddings after $n$ iterations are denoted by $\mathrm{H}^{(n)} \in \mathbb{R}^{d\times\vert \mathcal{V}\vert}$. In the first iteration, $h^{(0)}_u = x_u$ and after $N$ iterations we can use the final output $h^{(N)}_u = z_u$ as the embeddings for each node to use in downstream machine learning tasks.

 




\section{Graph neural network based access point selection}

\subsection{System Model}

We consider a cell-free system consisting of $L$ APs and $K_t$ UEs which are trying to establish a connection with the cell-free network at the time instance $t$. In order to predict the links between the AP nodes and UE nodes we consider two graphs where first one is formed using only the $L$ AP nodes and  second one is formed using both $L$ AP nodes and $K_t$ UE nodes. Since the algorithm can be repeated for each time instance henceforth, we denote number of UE in the graph as $K$. Furthermore, the set of APs and UEs represented by $\mathcal{L}$ and $\mathcal{K}$ respectively.

\subsection{Graph Construction}
\label{graphconstruction}
\subsubsection{AP graph}

In a given scenario, since the AP nodes are fixed it is important that the GNN is able to learn the structure of the AP placement. For a given AP node $l \in \mathcal{L}$, physical distance between other AP nodes are calculated and edges are created between  closest $c_{AP}$ AP nodes ($\mathcal{C}_l$) and AP node $l$. The feature vector $x_l^{AP} \in \mathbb{R}^L$ for AP node $l$ is  $x_l^{AP}(\hat{l}) = R_{l,\hat{l}} \text{ if } l \in \mathcal{C}_{ \hat{l}} \text{ otherwise } x_l^{AP}(\hat{l}) = 0$. Here, $ R_{l,\hat{l}}$ is the observed signal strength in dB measured from AP $\hat{l}$ when the signal is transmitted from AP $l$.  This results in a less sparser feature vector when an AP is closer to large number of APs as compared to a feature vector of an AP in a remote part of the map far away from other APs. This step is repeated for $\forall l \in \mathcal{L}$ forming the AP graph and feature set $\mathrm{X}_{AP}$ for AP nodes. Finally all the edges between APs are made undirected such that the adjacency matrix $\mathrm{A}_{AP}$ becomes symmetric. This graph is denoted by $\mathcal{G}_{AP} = (\mathcal{L}, \mathcal{E}_{AP})$ where $\mathcal{E}_{AP}$ is the set of bidirectional edges between AP nodes.

\subsubsection{AP UE graph}

Similar to the AP selection algorithm proposed in \cite{scalableCellFreeEmil}, UE $k \in \mathcal{K}$ first establish a connection with the AP $l_k \in \mathcal{L}$ which has the strongest signal to the UE $k$ (\textit{master AP}). For the link prediction task only the closest $c_{UE}$ APs to the $l_k$ AP are considered and directional edges from those APs to UE $k$ are created. This initial clustering based on physical distance or measure signal strength is done to avoid the class imbalance between positive edges and negative edges in classification task. Henceforth,  this initial set of APs is denoted by $\mathcal{C}^{cluster}_{l_k}$. After initial connection with the master AP $l_k$, it requests the UE $k$ to measure and report RSRPs for $\hat{c}_{UE}$ closest APs ($\mathcal{C}^{R}_{l_k}$) where $\hat{c}_{UE} \ll c_{UE}$. The feature vector $x_k^{UE} \in \mathbb{R}^L$ for the UE node $k$ is $x_k^{UE}(\hat{l}) = R_{\hat{l},k} \text{ if } \hat{l} \in \mathcal{C}^{R}_l \text{ otherwise } x_l^{UE}(\hat{l}) = 0$. Finally, this step is repeated for all $\forall k \in \mathcal{K}$ forming the AP-UE graph and feature set $\mathrm{X}_{UE}$ for UE nodes. This graph is denoted by $\mathcal{G}_{AP-UE} = (\mathcal{L} \cup \mathcal{K}, \mathcal{E}_{UE})$ where $\mathcal{E}_{UE}$ is the set of directional edges from AP nodes to UE nodes.





 
\subsection{Graph Neural Network Architecture}

In order to learn the representation of $\mathcal{G}_{AP}$ and $\mathcal{G}_{AP-UE}$, we use GraphSAGE framework proposed in \cite{Graphsage}. GraphSAGE is a graph representation learning framework which can be used for inductive applications where the graphs are dynamic. 


 \begin{figure*}[htbp]
  \centering
  \includegraphics[width=1\textwidth]{images/graphSAGE.pdf}
  \caption{GNN architecture based on GraphSAGE \cite{Graphsage} framework}
  \label{graphSAGE}
 
\end{figure*}

As illustrated in Figure \ref{graphSAGE}, first $N$ iterations of the spatial graph convolutions based on  (\ref{spatialConvo}) is performed on  $\mathcal{G}_{AP}$ with feature set $\mathrm{X}_{AP}$ as the input. Then $M$ iterations of spatial convolutions are performed on $\mathcal{G}_{AP-UE}$ where $\mathrm{Z}_{AP}$ will be the input feature  set of the AP nodes while for the UE nodes $\mathrm{X}_{UE}$ will be the input feature set. The directional edges between the AP nodes and UE nodes ensure that AP embeddings are independent of the UE nodes in the graph as messages are not passed from UE nodes to AP nodes. In order to match the distributions of inputs $\mathrm{Z}_{AP}$ and $\mathrm{X}_{UE}$ to the $\mathcal{G}_{AP-UE}$, $\mathrm{X}_{UE}$ is passed through a single layer feed forward network. From the multiple aggregator functions proposed in \cite{Graphsage}, we use the pooling aggregator given by 


\begin{multline}
    \text{AGGREGATE}^{(n)} = \max\Big(\Psi_n(h_v^n), \\  \forall v \in \mathcal{N}(v)\Big),
\end{multline}
 
 where $\Psi_n$ represent a two layer feedforward network for $n^{\text{th}}$ iteration. The UPDATE function for the node $k \in \mathcal{L} \cup \mathcal{K}$ is given by
 
 \begin{multline}
    \text{UPDATE}^{(n)} = \mathrm{SELU} \Big( \mathbf{W}h_k^{(n)} + \\ \text{AGGREGATE}^{(n)} \big(h_v^{(n)}, \forall v \in \mathcal{N}(u)\big) \Big),
\end{multline}

where SELU is the scaled exponential linear unit.

\subsection{Training and Inference}
\label{trainingandinference}

In the training phase, after obtaining the final node embeddings $\mathrm{Z}_{AP-UE}$, the confidence of the link between UE $k \in \mathcal{K}$ and  AP $l \in \mathcal{C}^{cluster}_{l_k}$ is calculated using

\begin{equation}
     S_{l,k} = \sigma(\mathrm{z}_l^T\mathrm{z}_k),
\end{equation}

 
 where $\sigma$ is the sigmoid function and $\mathcal{C}^{cluster}_{l_k}$ is the initial cluster considered for the link prediction task. In order to train the GNN, training graphs with known positive and negative edges are provided. Here, the link $R_{l,k}$ where $R_{l_k,k} - R_{l,k} < D_{dB}$ is considered as a potential link and hence labeled as a positive edge. All the other links which do not meet above criterion in labeled as negative edges. Here $D_{dB}$ is a hyper parameter that needs be decided when creating the training dataset. The idea behind this criterion is that since $l_k$ is the AP with strongest signal to the UE $k$, closed loop power control is performed to ensure the receiver is not saturated. Therefore, selecting a fixed number of APs is not effective as if the difference in signal strength between strongest link and links to other APs are too significant.  After edges are labeled, the GNN is trained using the binary cross entropy as the loss function.
 
 In the inference stage, for a UE $\hat{k}$ that established a connection with a AP $l_{\hat{k}}$, as explained above $\mathcal{G}_{AP-UE}$ is constructed after obtaining $R_{l,\hat{k}} \text{ }\forall l \in \mathcal{C}^{R}_{l_{\hat{k}}}$ through RRC reconfiguration signalling. Then the embeddings for the nodes are obtained to calculate the confidence and classify the link. Since the AP node embeddings are independent from $X_{UE}$ and number of UE nodes, final node embeddings for the AP nodes can be cached to save computational power.
 
 
\section{Experimental Results and Analysis}

\subsection{Parameters and Setup}


For numerical simulation of the proposed algorithm we considered a cell-free systems with $L=50 \text{ and } 100$ APs which are independently and uniformly distributed in a $2 \times 2$ km and  $1 \times 1$ square respectively. In order to simulate the measured RSRP value between AP $l$ and UE $k$ we used the path loss model used in \cite{scalableCellFreeEmil} which is given by

\begin{equation}
    R_{l,k} = \Upsilon - 10\alpha\log_{10}\Big(\frac{d_{l,k}}{1 \text{km}}\Big) + F_{l,k},
    \label{RSRPsim}
\end{equation}

where $d_{l,k} \text{ }[km]$ is the distance between AP and UE, $\alpha = 3.76$ is the path loss exponent, $\Upsilon = -35.3 \text{dB}$ is the median channel gain at a reference distance of 1 km, and $F_{l,k}$ is the shadow fading. Here $F_{l,k}$ is obtained using correlated fading maps generated for each AP based on the algorithm proposed in \cite{FadingCorrelated}. 

To construct a training graph as explained in section \ref{graphconstruction}, $K_{train} = 100$ UEs are independently and uniformly placed in the map and the RSRP values are calculated according to (\ref{RSRPsim}) and then the links are labeled as positive or negative edges as described in section \ref{trainingandinference}. It was empirically observed that by setting $D_{dB} = 10$ all the positively labeled links represent on average 85\% of the total power received by all the APs.  100 such training graphs are used to train the network. In order to simulate an online training scenario where additional RSRP measurements are gathered while users are connected, we use batch size 1 such that after predetermined amount of data is gathered that data can be used to train the network.  For the validation, number of UEs ($K_{validate}$) in each graph is made random to simulate dynamic demand for the AP selection algorithm. As described in section \ref{graphconstruction}, the graph construction parameters along with GNN hyper parameters are tabulated in Table \ref{pramsCons}. In GNNs, size of the dimension of the hidden embeddings $h^{(n)}_u$ after every message passing iteration is set to $L$. For the implementation of the proposed GNN based algorithm, a geometric learning extension for the open source machine learning framework  PyTorch \cite{pytorch} called PyTorch geometric was used \cite{geometricpaper}.


\begin{table}[]
\begin{tabular}{|p{1.1cm}|p{4.9cm}|p{1cm}|}
\hline
Parameter & Description & Value \\ \hline
   $c_{AP}$    & Number of closest APs considered to create edges between APs             &   5    \\ \hline
    $c_{UE}$      & Number of APs closest to master AP considered for link prediction             &   10, 20    \\ \hline
     $\hat{c}_{UE}$     & Number of APs closest to master AP for which RSRP measurements are performed             &  2     \\ \hline
     $\mathrm{N}$     & Number of message passing iterations for $\mathcal{G}_{AP}$             &  2     \\ \hline
     $\hat{c}_{UE}$     & Number of message passing iterations for $\mathcal{G}_{AP-UE}$             &  2     \\ \hline
\end{tabular}

\caption{Graph construction parameters}
\label{pramsCons}
\end{table}

\begin{figure}[t]

  \includegraphics[width=8.5cm, height=16cm]{images/MergedPrecisionRecallFin.pdf}
  \caption{Precision and Recall when $L=100$ [(a)] and $L=50$ [(b)] }
  \label{results_precisionRecall}

\end{figure}


\begin{figure}[t]

  \includegraphics[width=8.5cm, height=16cm]{images/MergedAUC_AP.pdf}
  \caption{Area under curve and average precision when $L=100$ [(a)] and $L=50$ [(b)] }
  \label{results_aucap}

\end{figure}

Figure \ref{results_precisionRecall} illustrates precision and recall for the two cell-free networks with $L=100$ and $L=50$. Here, we used the threshold 0.5 to classify the edges on the graph in order to calculate precision and recall values. When only the 10 APs closest to master AP ($c_{UE}=10$) are considered for AP selection, in each cell-free network with $L=100$ and $L=50$ about 16\% and 13\% positive links are ignored. These initial recall values drop to 9\% and 6\% when $c_{UE}=20$. Therefore, the maximum recall that can be achieved by the GNN is limited by the resultant recall after the initial clustering procedure. From Figure \ref{results_precisionRecall}(a), it can be observed that when  $L=100$ and $c_{UE} = 10$ proposed method achieves a precision and a recall up to 0.83 and 0.68 respectively. This recall value reflects the recall due to GNNs inaccuracy and the recall due to initial clustering. When $c_{UE} = 20$, it can be observed that recall is improved slightly at the expense of precision. This is due to fact that as we increase $c_{UE}$ the number of APs considered for link prediction, we increase the negative edges in the graph resulting a class imbalance between positive and negative edges. From Figure \ref{results_precisionRecall}(b) similar effects  on precision and recall can be observed when $c_{UE}$ is increased in the simulation of the cell-free network with $L=50$.

In Figure \ref{results_aucap}, we present two additional binary classification evaluation metrics, area under the curve (AUC) and average precision (AP). Both AUC and AP metrics are able to show the discriminative  capability of the proposed model independent of the decision threshold unlike in the case of precision and recall. From Figure \ref{results_aucap} it can be observed that in the case where $c_{UE}=10$, AUC is above 0.9 and AP is above 0.8 for both simulations with $L=100$ and $L=50$. When increasing $c_{UE}$ it can be observed that AP is affected significantly similar to the effect observed on precision when $c_{UE}$ is increased. Regarding the scalability of the proposed GNN method, as feature vectors of APs and UEs are represented using $L$ dimensional vector, increasing number of APs increases the complexity of the GNN model. As a result, the proposed algorithm is scalable only in terms of number of UEs in the network. 

From generated validation data sets for the cell-free system with $L=100$, it was observed that on average only 33\% of the closest 3 APs to the master AP have a positive link to the UE that meets the criterion described in section \ref{trainingandinference}. Furthermore, the probability that the closest AP to the master AP having a positive link to the UE is on average 42\%. Compared to metrics of the proximity based algorithms presented in \cite{scalableCellFreeEmil} our algorithm achieves a precision and a recall up to 0.83 and 0.68. Hence, it can be concluded that compared to proximity based AP selection algorithms, our proposed method is capable of predicting more potential links with limited RSRP measurements. Furthermore, from the presented results, it can be observed that the different AP densities of the two networks (25 APs per 1 $\text{km}^2$ and 50 APs per 1 $\text{km}^2$) doesn't affect the performance of the proposed algorithm. 



 


\section{Conclusions}

To overcome the practical limitation of acquiring RSRP values for every AP to select APs with strongest links in a cell-free massive MIMO network, we proposed a GNN based link prediction algorithm where potential links are predicted with limited number of RSRP measurements. The proposed method is capable of predicting the potential links to the UE, up to a precision and a recall of 0.83 and 0.68, based on three RSRP measurements including the RSRP of AP with the strongest link to the UE. Furthermore, results show that the proposed GNN architecture outperforms proximity based AP selection algorithms as shadowing significantly affects the accuracy of proximity based AP selection algorithms. Compared to selecting APs based on proximity, proposed algorithm leverage the knowledge of correlated fading and AP placement to predict the APs with strongest links. Even though the proposed algorithm is scalable as the number of UEs in the network increases, scalability in terms of number of APs is limited compared to proximity based distributed AP selection algorithms proposed in \cite{scalableCellFreeEmil}. 


 \IEEEpubidadjcol 

\renewcommand*{\bibfont}{\footnotesize }

\printbibliography


\end{document}
