Can graph neural network-based detection mitigate the impact of hardware
  imperfections?
Until recently, researchers used machine learning methods to compensate for
hardware imperfections at the symbol level, indicating that optimum
radio-frequency transceiver performance is possible. Nevertheless, such
approaches neglect the error correcting codes used in wireless networks, which
inspires machine learning (ML)-approaches that learn and minimise hardware
imperfections at the bit level. In the present work, we evaluate a graph neural
network (GNN)-based intelligent detector's in-phase and quadrature imbalance
(IQI) mitigation capabilities. We focus on a high-frequency, high-directional
wireless system where IQI affects both the transmitter (TX) and the receiver
(RX). The TX uses a GNN-based decoder, whilst the RX uses a linear error
correcting algorithm. The bit error rate (BER) is computed using appropriate
Monte Carlo simulations to quantify performance. Finally, the outcomes are
compared to both traditional systems using conventional detectors and wireless
systems using belief propagation based detectors. Due to the utilization of
graph neural networks, the proposed algorithm is highly scalable with few
training parameters and is able to adapt to various code parameters.
Lamprini Mitsiou, Stylianos Trevlakis, Argiris Tsiolas, Dimitrios J. Vergados, Angelos Michalas, Alexandros-Apostolos A. Boulogeorgos
# Can graph neural network-based detection mitigate the impact of hardware imperfections?

###### Abstract

Until recently, researchers used machine learning methods to compensate for hardware imperfections at the symbol level, indicating that optimum radio-frequency transceiver performance is possible. Nevertheless, such approaches neglect the error correcting codes used in wireless networks, which inspires machine learning (ML)-approaches that learn and minimise hardware imperfections at the bit level. In the present work, we evaluate a graph neural network (GNN)-based intelligent detector's in-phase and quadrature imbalance (IQI) mitigation capabilities. We focus on a high-frequency, high-directional wireless system where IQI affects both the transmitter (TX) and the receiver (RX). The TX uses a GNN-based decoder, whilst the RX uses a linear error correcting algorithm. The bit error rate (BER) is computed using appropriate Monte Carlo simulations to quantify performance. Finally, the outcomes are compared to both traditional systems using conventional detectors and wireless systems using belief propagation based detectors. Due to the utilization of graph neural networks, the proposed algorithm is highly scalable with few training parameters and is able to adapt to various code parameters.

 Belief propagation, bit error rate, graph neural networks, hardware imperfection mitigation, in-phase and quadrature imbalance, machine learning.

## I Introduction

As the wireless world search for unexploited resources in higher frequency bands, like millimeter wave and terahertz, new challenges are identifies and call for novel solutions [1, 2, 3, 4, 5]. One of the most important challenges is dealing with the impact of transceiver hardware imperfections. As discussed in [6, 7, 8, 9, 10, 11, 12], hardware imperfections, such as local oscillators' phase noise, amplifier's non-linearity and especially up and down-converters in-phase and quadrature imbalance (IQI), significantly limit the reliability of high-frequency wireless systems. Note that, as described [13], the hardware imperfection of wireless systems in the higher frequency range cannot be completely avoided, even with new technological solutions supported by integrated microwave photonics.

Motivated by this, several researchers have presented hardware imperfections mitigation solutions [14, 15, 16, 17, 18]. In particular, in [14], the authors reported a widely linear IQI calibration structure that estimates the IQI parameters using either second-order statistics or least-square-based model fitting. The authors of [15] used higher order statistics-based approaches in order to estimate the amplifier non-linearity in the presence of IQI and documented an IQI parameter maximum-likelihood estimation approach. The aforementioned approaches are two-step processes that are usually energy consuming.

To counterbalance this, the authors of [16] presented a real-valued time-delay neural network that is used as an one-step mitigation process; thus, simplifies the compensation process. In [17], a shortcut real-valued time-delay neural network for compensating IQI and amplifiers non-linearity was introduced. Finally, in [18], a neural network-based digital predistortion as a solution to countermeasure the impact of cross-talk, amplifier non-linearity, IQI, and direct current offset was presented.

In other words, the authors of [15, 17, 18] aimed to employ machine learning methodologies in order to compensate the impact of hardware imperfections at a symbol-level, proving that with such approaches the ideal radio-frequency (RF) transceiver performance are reachable. However, following such approach, it is impossible to exploit the characteristics of the error correction codes that are employed in nowadays wireless systems. This observation motivates the design of machine learning (ML)-approaches that learn and de-emphasize the impact of hardware imperfections in a bit level. These approaches should be scalable and have a relatively low-number of training parameters in order to be adaptive in different code parameters. Motivated by this as well as the close relation between the Tanner graphs, which can be used to represent codes, and the graph neural networks (GNNs), in this paper, we assess the IQI mitigation capabilities of an intelligent detector that employs GNN. In particular, we consider a high-frequency and high-directional wireless system in which both the transmitter (TX) and the receiver (RX) suffer from IQI. A linear error correction code is employed by the TX, while a GNN-based decoder is used by the RX. To quantify the performance, the bit error rate (BER) is derived through respective Monte Carlo simulations. The results are benchmarked against conventional systems that employ traditional detectors, as well as wireless systems that use belief propagation (BF) based detectors.

The organization of the rest of the paper is as follows: The system model is described in Section II. Section III reports the operation and training procedures of the intelligent detectors.
Results and related discussions are documented in Section IV. Finally, the conclusions and main message of this contribution is summarized in Section V.

_Notations:_ In what follows, \(\left[\cdot||\cdot\right]\) stands for the concatenation operator. Moreover, \(\oplus\) represents the message aggregation function, which, for this contribution is the mean value. The logarithm to base \(2\) is denoted as \(\log_{2}\left(\cdot\right)\). The sum of \(x_{i}\) for \(i\in\left[1,N\right]\) is represented as \(\sum_{i=1}^{N}x_{i}\), while \(\prod_{i=1}^{N}x_{i}\) is the product of \(x_{i}\) for \(i\in\left[1,N\right]\). Finally, \(\Pr\left(\mathcal{E}\right)\) is the probability of the event \(\mathcal{E}\).

## II System model

As illustrated in Fig. 1, we consider a high-directional wireless system that consists of a TX and a RX. Both the TX and RX employ analog beamforming and their beams are assumed to be perfectly aligned.

The TX consists of a bit source that outputs a tuple of \(\mathbf{b}\) bits, i.e., the codeword, which is the input of a \((N,K,L)\) linear encoder, where \(N\) is the codeword length, while \(K\) and \(L\) are respectively the number of ones in each column and row of the parity check matrix, \(\mathbf{P}\). The linear encoder uses zero-padding in order to be able to support odd codeword lengths and outputs a bit tuple \(\mathbf{c}\). Let \(\mathcal{L}\) be the function that describes the operation of the linear encoder, then

\[\mathbf{c}=\mathcal{L}\{\mathbf{b}\}. \tag{1}\]

The output of the linear encoder is in turn inputted in a quadrature amplitude modulation (QAM) mapper. Let \(\mathcal{M}\{\cdot\}\) be the function that models the operation of the QAM mapper. Then, the output of the QAM mapper can be described as

\[\mathbf{x}=\mathcal{M}\{\mathbf{c}\}. \tag{2}\]

The symbol vector, \(\mathbf{x}\), is forwarded to the up-converter. We assume that the up-converter suffers from in-phase and quadrature imbalance. As a consequence, the baseband equivalent signal at the up-converter's output can be expressed as [19]

\[\mathbf{s}=K_{1}^{t}\,\mathbf{x}+K_{2}^{t}\,\mathbf{x}^{*}, \tag{3}\]

where \(K_{1}^{t}\) and \(K_{2}^{t}\) are the IQI coefficients that, based on [20], can be written as [21]

\[K_{1}^{t}=\frac{1+g_{t}}{2}\,\frac{\exp\left(j\,\theta_{t}\right)}{2} \tag{4}\]

and

\[K_{2}^{t}=\frac{1+g_{t}}{2}\,\frac{\exp\left(j\,\theta_{t}\right)}{2}, \tag{5}\]

with \(g_{t}\) and \(\theta_{t}\) denoting the IQI-infused amplitude and phase mismatched, respectively. Notice that

\[K_{1}^{t}=1-\left(K_{2}^{t}\right)^{*}. \tag{6}\]

Moreover, the TX image rejection ratio (IRR) can be obtained as

\[I_{t}=\frac{\left|K_{1}^{t}\right|^{2}}{\left|K_{2}^{t}\right|^{2}}. \tag{7}\]

The up-converter is followed by the analog beamformer. The baseband equivalent at the output of the TX can be written as

\[\mathbf{s}_{b}=\mathbf{u}\,\mathbf{s}, \tag{8}\]

where \(\mathbf{u}\) stands for the TX beamforming vector.

The baseband equivalent signal at the output of the RX beamformer can be expressed as

\[\mathbf{r}_{b}=\mathbf{v}\,\mathbf{H}\,\mathbf{s}_{b}+\mathbf{n}, \tag{9}\]

where \(\mathbf{v}\) and \(\mathbf{H}\) stands for the RX beam-vector and the channel matrix respectively, while \(\mathbf{n}\) is an additive white Gaussian noise vector. Each element of \(\mathbf{n}\) is modeled as an zero-mean complex Gaussian process of variance \(N_{o}\). Additionally, \(\mathbb{E}[n_{i}\,n_{j}]=0\), for \(i\neq j\).

With the aid of (8), (9) can be rewritten as

\[\mathbf{r}_{b}=\mathbf{v}\,\mathbf{H}\,\mathbf{u}\,\mathbf{s}+\mathbf{n}. \tag{10}\]

As reported in [22], since the TX and RX beams are perfectly aligned,

\[\mathbf{v}\,\mathbf{H}\,\mathbf{u}=h, \tag{11}\]

where \(h\) is a scalar that represents the channel coefficient. As a consequence, (10) yields

\[\mathbf{r}_{b}=h\,\mathbf{s}+\mathbf{n}. \tag{12}\]

Notice that the impact of multi-path fading is respectively low. Thus, the channel coefficient models only the deterministic path-gain.

The output of the RX beamformer is connected to a down-converter that suffers from IQI. The down-converter introduces IQI; as a result, the baseband equivalent signal at the output of the down-converter can be expressed as [20]

\[\mathbf{r}=K_{1}^{r}\,\mathbf{r}_{b}+K_{2}^{r}\,\mathbf{r}_{b}^{*}, \tag{13}\]

where

\[K_{1}^{r}=\frac{1+g_{r}\,\exp\left(-j\,\theta_{r}\right)}{2} \tag{14}\]

and

\[K_{2}^{r}=\frac{1-g_{r}\,\exp\left(j\,\theta_{r}\right)}{2}. \tag{15}\]

In (14) and (15), \(g_{r}\) and \(\theta_{r}\) are respectively the RX amplitude and phase mismatches. The RX IRR can be written as

\[\mathcal{I}_{r}=\frac{\left|K_{1}^{r}\right|^{2}}{\left|K_{2}^{r}\right|^{2}}. \tag{16}\]

From (12), (13) can be expressed as

\[\mathbf{r}=K_{1}^{r}\,\left(h\,\mathbf{s}+\mathbf{n}\right)+K_{2}^{r}\,\left( h\,\mathbf{s}+\mathbf{n}\right)^{*} \tag{17}\]

or

\[\mathbf{r}=K_{1}^{r}\,h\,\mathbf{s}+K_{2}^{r}\,h\,\mathbf{s}^{*}+K_{1}^{r}\, \mathbf{n}+K_{2}^{r}\mathbf{n}^{*}. \tag{18}\]
By applying (3) to (18), the baseband equivalent received signal at the output of the down-converter can be expressed as

\[\mathbf{r} =K_{1}^{r}\,h\,\left(K_{1}^{t}\,\mathbf{x}+K_{2}^{t}\,\mathbf{x}^{ *}\right)+K_{2}^{r}\,h\,\left(K_{1}^{t}\,\mathbf{x}+K_{2}^{t}\,\mathbf{x}^{*} \right)^{*}\] \[+K_{1}^{r}\,\mathbf{n}+K_{2}^{r}\mathbf{n}^{*}, \tag{19}\]

or equivalently

\[\mathbf{r} =\left(K_{1}^{r}\,K_{1}^{t}+K_{2}^{r}\,K_{2}^{t}\right)\,h\, \mathbf{x}+\left(K_{1}^{r}\,K_{2}^{t}+K_{2}^{r}\,K_{1}^{t}\right)\,h\,\mathbf{ x}^{*}\] \[+K_{1}^{r}\,\mathbf{n}+K_{2}^{r}\mathbf{n}^{*}. \tag{20}\]

Thus, the received signal-to-distortion-plus-noise-ratio (SDNR) is given by

\[\gamma=\frac{\left|K_{1}^{r}\,K_{1}^{t}+K_{2}^{r}\,K_{2}^{t}\right|^{2}\,\rho }{\left|K_{1}^{r}\,K_{2}^{t}+K_{2}^{r}\,K_{1}^{t}\right|^{2}\,\rho+\left|K_{1} ^{r}\right|^{2}+\left|K_{2}^{r}\right|^{2}}, \tag{21}\]

where \(\rho\) stands for the signal-to-noise-ratio (SNR) of the ideal wireless system, i.e., the one that does not suffer from IQI, and can be expressed as

\[\rho=\frac{h^{2}\,P_{x}}{N_{o}}. \tag{22}\]

In (22), \(P_{x}\) stands for the average transmission power.

The output of the down-converter is inserted to the QAM demapper, which returns the log-likelihood ratios (LLRs) of the received signals. Let \(\mathcal{D}\{\cdot\}\) represent the QAM demapper's operation. Then, the LLRs at the output of the QAM demapper can be written as

\[\mathbf{l}=\mathcal{D}\{\mathbf{r}\}, \tag{23}\]

where the \(k-\)th value of \(\mathbf{l}\) can be obtained as

\[l_{k,m}=\log_{2}\frac{\Pr\left(c_{k}=1\left|r_{m}\right.\right)}{\Pr\left(c_ {k}=0\left|r_{m}\right.\right)}. \tag{24}\]

Note that \(r_{m}\) stands for the \(m-\)th value of \(\mathbf{m}\) that carriers the \(c_{k}\) bit.

The LLR vector is inputted in the zero-padding remover that outputs only the LLR elements of that corresponds to the coded message. In turn, the output of the zero-padding remover is inserted in the decoder that provides an estimation of the transmitted codeword.

## III Intelligent detectors

This section focuses on presenting intelligent detectors. Specifically, Section III-A presents a BP-based detector, while Section III-B reports a graph neural network-based detector.

### _Belief propagation_

Let \(G_{P}=(\mathcal{V}\cup\mathcal{C},\mathcal{E})\) with \(\mathcal{V}\), \(\mathcal{C}\) and \(\mathcal{E}\) respectively stand for the variable nodes (VNs), check nodes (CNs), edge nodes (ENs) of the Tanner graph \(G_{P}\). Note that each row of \(\mathbf{P}\) stands for a CN and each column for a VN. The Tanner graph can be seen as a deep neural network, in which the input layer receives the LLRs. The nodes in the hidden layers represent processing nodes. Each processing node is connected with a number of edges of the Tanner graph. As a consequence, each hidden layer consists of \(E\) nodes. The number of nodes is equal to the size of \(\mathcal{E}\). The output layer has \(N\) processing elements and its responsibility is to provide an estimation of the transmitted codeword.

If the number of iterations is set to \(L\), then the number of hidden layer are \(2L\). The processing element \(p_{k}\) of the hidden layer \(k\) is associated with the VN, \(v_{k}\), and CN, \(c_{k}\), outputs [23]

\[t_{k,e_{k}} =\left\{\begin{array}{ll}l_{v_{k}}+\sum_{e^{{}^{\prime}}_{k-1},c _{k-1}\neq c_{k}}t_{k-1,e^{{}^{\prime}}},&\text{for $k$ odd}\\ 2\,\tan^{-1}\left(\prod_{e^{{}^{\prime\prime}},v_{k-1}\neq v_{k}}\tanh\left( \frac{t_{k-1,e^{{}^{\prime\prime}}}}{2}\right)\right),&\text{for $k$ even} \end{array}\right. \tag{25}\]

where \(e^{{}^{\prime}}=(v_{k},c_{k-1})\), \(e^{{}^{\prime\prime}}=(v_{k-1},c_{k})\) and \(l_{v_{k}}\) is the self LLR message of \(v_{k}\). The \(k-\)th node of the output layer reports

\[o_{k}=l_{v_{2L}}+\sum_{e^{{}^{\prime}}}t_{2L,e^{{}^{\prime}}}. \tag{26}\]

Fig. 1: System model.
### _Graph neural network_

Similar to the BP approach, we consider a Tanner graph \(G_{g}=(\mathcal{V}_{g}\cup\mathcal{F}_{g},\mathcal{E}_{g})\), where \(\mathcal{V}_{g}\) is the set of the VNs. Each VN stands for a specific element of \(\mathbf{c}\). \(\mathcal{F}_{g}\) represents the set of the CNs, and \(\mathcal{E}_{g}\) is the set of ENs. If \(P_{i,j}=1\), then \(v_{g,i}\) is connected to \(f_{g,j}\), where \(P_{i,j}\) is the \(i,j\) element of \(\mathbf{P}\), \(v_{g,i}\) and \(f_{g,j}\) are the \(i\) and \(j\) elements of the sets \(\mathcal{V}_{g}\), and \(\mathcal{F}_{g}\), respectively. To denote the set of all VNs that are connected to the \(v_{g,i}\), we use \(\mathcal{V}_{g}\left(v_{g,i}\right)\). Similarly, the set of all the CNs that are associated with \(f_{g,j}\) is represented by \(\mathcal{F}_{g}\left(f_{g,j}\right)\).

To train the graph neural network, we use a function for the update of the edge messages and another one that update the nodes. Let \(m_{v,i,j}\) be the updated message from \(v_{i}\) to \(v_{j}\), then

\[\mathbf{m}_{v,i,j}=g^{m}\left(\left[\mathbf{w}_{v_{g,i}}||\mathbf{w}_{f_{g,j}} ||\mathbf{g}_{m_{g,i}f_{g,j}}\right],\mathbf{a}_{m_{v,f}}\right), \tag{27}\]

where \(\mathbf{w}_{v_{g,i}}\) and \(\mathbf{w}_{f_{g,j}}\) are vectors computed by each node for the VN \(v_{g,i}\) and the CN \(f_{g,j}\), respectively. Moreover, \(\mathbf{a}_{m_{v,f}}\) stands for the trainable parameters. Finally, \(g^{m}\left(\cdot\right)\) represents the parametrized function. Let \(m_{u,j,i}\) be the updated message value from the CN \(u_{j}\) to the VN \(v_{j}\). Thus, it can be obtain as

\[\mathbf{m}_{f,i,j}=g^{n}\left(\left[\mathbf{w}_{f_{g,j}}||\mathbf{w}_{v_{g,i}} ||\mathbf{g}_{m_{f_{g,j}}\cdot v_{g,i}}\right],\mathbf{a}_{m_{f_{v}}}\right), \tag{28}\]

To evaluate the updated value of \(\mathbf{w}_{v_{g,i}}\), we apply

\[\mathbf{w}_{v_{g,i}}^{{}^{\prime}}=g^{n}\left(\left[\mathbf{w}_{v_{g,i}}|| \oplus_{v_{i}\in\mathcal{V}_{g}}\mathbf{m}_{v,i,j}||\mathbf{g}_{v_{g,i}} \right]\mathbf{a}_{v}\right), \tag{29}\]

where \(\mathbf{a}_{v}\) stands for the trainable parameters of the VN. Following a similar approach, the CN values can be updated as

\[\mathbf{w}_{f_{g,j}}^{{}^{\prime}}=g^{n}\left(\left[\mathbf{w}_{f_{g,i}}|| \oplus_{f_{i}\in\mathcal{C}_{g}}\mathbf{m}_{f,i,j}||\mathbf{g}_{f_{g,i}} \right]\mathbf{a}_{f}\right), \tag{30}\]

where \(\mathbf{a}_{v}\) and \(\mathbf{a}_{f}\) are the VN and CN parameters, respectively.

The training process consists of two phases: i) initialization, and ii) iterative optimization. In this paper, we employ the Gloron uniform initalizer [24] to find the initial values of the trainable parameters, and the Adam optimizer to find their (sub)optimal values. As a loss function, the binary cross-entropy is applied.

## IV Results & Discussion

This section presents Monte Carlo simulations that reveal the effectiveness of the ML-based detection approaches in the mitigating the impact of IQI and benchmarks GNN against BP and conventional approaches. The following scenario is considered. A wireless system that operates in the \(120\,\mathrm{GHz}\) band and employs low-density parity check code (LDPC) with code-rate equal to \(0.714\). The parity check code has \(63\times 45\) size. The zero-padding adds \(1\) bit if and only if the length of the codeword is odd. A quadrature phase shift keying modulator is used by the TX and the corresponding demodulator by the RX. Both the TX and RX suffer from IQI with phase error equal to \(5^{o}\). The BF and GNN respectively perform \(20\) and \(8\) iterations.

Figure 2 depicts the BER as a function of the SNR for different IQI levels and coding/decoding schemes. As benchmarks, the cases of conventional detectors and ideal RF front-end are considered. As expected, for given detector and level of IQI, as the SNR increases, the error performance improves. For example, for the ideal RF front-end with conventional detector case, as the SNR increases from \(7\) to \(9\,\mathrm{dB}\), the BER decreases for more than one order of magnitude. For the same SNR variation and for the case in which a conventional detector is employed, but both the TX and RX suffer of IQI with IRR equal to \(20\,\mathrm{dB}\), the BER decreases for about two orders of magnitude. Moreover, for conventional decoders and a SNR beyond \(3\,\mathrm{dB}\), as the level of IQI increases, i.e., as IRR decreases, the error performance degrades. For instance, for a SNR equal to \(7\,\mathrm{dB}\), as IRR increases from \(20\) to \(30\,\mathrm{dB}\), the BER decreases from \(1.17\times 10^{-3}\) to \(7.88\times 10^{-4}\). On the other hand, for either BF or GNN-based decoders and a fixed SNR, as the level of IQI increases, an error performance improvement is observed. For example, for BF-based detector and SNR equals \(7\,\mathrm{dB}\), the BER decreases from \(1.53\times 10^{-4}\) to \(4.45\times 10^{-5}\), as the the IRR decreases from \(30\) to \(20\,\mathrm{dB}\). For the same SNR, but GNN-based detector, the BER decreases from \(5.15\times 10^{-5}\) to \(3.52\times 10^{-6}\), as the IRR decreases from \(30\) to \(20\,\mathrm{dB}\). As explained in [25], this is due to the TX IQI induced diversity order that can be exploited by the intelligent detectors. Additionally, from this figure, we observe that for ideal RF and a given SNR that is beyond \(4.5\,\mathrm{dB}\), GNN-based detectors outperforms both BF-based and conventional detectors. On the other hand, in wireless systems in which their transceiver suffer from IQI, for any given SNR, GNN-based detectors outperforms both BF-based and conventional detectors. For instance, for SNR equals \(7\,\mathrm{dB}\) and both the IRR of the TX and and RX equal to \(20\,\mathrm{dB}\), the GNN-based detector achieves a BER that is equal to \(3.52\times 10^{-6}\), while, for the same SNR and IRR, BF-based detectors achieve a BER that equals \(4.65\times 10^{-5}\), and conventional detectors achieve a BER, which is equal to \(1.17\times 10^{-3}\). Notice that the GNN-based detectors uses \(8\) iterations, while the BF-based one \(20\). In other words, with less iterations the GNN-based detector achieves better performance than the BF-based detector.

Fig. 2: BER vs SNR for different coding schemes and levels of IQI.
## V Conclusions

In this paper, we presented a GNN-based intelligent detector and demonstrated its ability to prevent IQI. Specifically, we consider a two-way wireless system in which the TX and RX are both susceptible to IQI at high frequencies and in opposite directions. The transmitter uses a linear error correction code, while the receiver employs a GNN-based decoder. The BER is calculated via independent Monte Carlo simulations in order to quantify the system's performance. The results are compared against those wireless systems that rely on traditional and BF based detectors, and illustrate the performance improvements that can be achieved when employing the proposed GNN-based detector.

## Acknowledgement

This work has received funding from the European Union's Horizon-CL4-2021 research and innovation programme under grant agreement No. 101070181 (TALON).
