# Adaptive Bit-Labeling Design for Probabilistic Shaping Based on Residual Source Redundancy
## 3 Analysis and Design of Bit-Labeling
### An Adaptive Design Scheme of Bit-Labeling  
In this section, we consider the adaptive design procedure that optimizes the bit-labeling according to the source probability and the source code for a given target transmission rate by the achievable system rate analysis. For the reliable transmission of an asymmetric source with entropy \(H(p)\) over a memoryless AWGN channel with capacity \(C\) at a rate of \(R\) source bits per channel symbol, the Shannon limit can be expressed as [20]  
\[H(p)R<C, \tag{10}\]  
where \(C\) represents the capacity of two independent Gaussian channels in parallel given by \(\log_{2}(1+R\cdot E_{s}/N_{0})\), \(E_{s}\) is the average energy per source bit, and \(N_{0}\) is the one-sided noise power spectral density. Given \(p\) and \(R\), the Shannon limit can be interpreted by the smallest \(E_{s}/N_{0}\) satisfying (10) and expressed as  
\[\left.\frac{E_{s}}{N_{0}}\right|_{\text{Shannon}}=\frac{2^{H(p)R}-1}{R}. \tag{11}\]  
For the QAM-modulated AWGN channel with the alphabet \(\mathcal{X}\) and the input probability distribution \(P_{\mathbf{B}_{s}}(X,\phi)\) given by (9), the channel capacity is calculated as  
\[C_{\mathbf{B}_{s}}\Big{(}\frac{E_{s}}{N_{0}},\phi\Big{)}=\sum_{X\in\mathcal{X }}P(X,\phi)\int_{-\infty}^{+\infty}P_{a}(Y|X)\log_{2}\frac{P_{a}(Y|X)}{\sum \limits_{X^{\prime}\in\mathcal{X}}P(X^{\prime},\phi)P_{a}(Y|X^{\prime})}dY, \tag{12}\]  
where \(\alpha=\sqrt{\frac{E_{s}}{N_{0}}RN_{0}/\left(\sum_{X\in\mathcal{X}}P(X,\phi)|X |^{2}\right)}\) and \(P_{a}(Y|X)=\frac{1}{\pi N_{0}}\exp\Bigl{\{}-\frac{(Y-\alpha X)^{2}}{N_{0}} \Bigr{\}}\),  
According to (12), \(C_{\mathbf{B}_{s}}\Big{(}\frac{E_{s}}{N_{0}},\phi\Big{)}\) for a given source probability \(p\) and a source code matrix \(\mathbf{B}_{s}\) is conditional on \(E_{s}/N_{0}\) and the mapping function \(\phi\). Thus, by properly designing \(\phi\)  
Figure 3: BER performance of JSCCM system with two labelings. a shaping gain in \(E_{s}/N_{0}\) can be obtained. However, it is impossible to derive an analytical solution to \(\phi\), and the search for \(\phi\) has to resort to an exhaustive method. In Algorithm 1, an adaptive design procedure is proposed to search for the optimal mapping function \(\phi\), also known as the optimal bit-labeling, according to the given source probability \(p\) and the source code \(\mathbf{B}_{s}\) at a target transmission rate \(R\). For a practical search, we start from the smallest \(E_{s}/N_{0}\) satisfying (10), denoted by \(\frac{E}{N_{0}}\Big{|}_{\text{Shannon}}\), and gradually increase the value of \(E_{s}/N_{0}\) until the achievable system rates, denoted as \(C_{\mathbf{B}_{s}}\Big{(}\frac{E_{s}}{N_{0}},\phi\Big{)}/H(p)\), is around \(R\), at which point we wish to optimize the bit-labeling. Then, we evaluate the channel capacity \(C_{\mathbf{B}_{s}}\Big{(}\frac{E_{s}}{N_{0}},\phi\Big{)}\) for different mapping functions and select the mapping function which exhibits the highest capacity. Note that the number of different labelings is very large for the constellation with high-order modulations such as 16 QAM, so we focus on Gray codes due to their good error rate performance. Example: Consider \(p=0.05\), \(m=4\), \(R=6\) bits/symbol, \(\Delta=0.1\) dB. The source code is the \(1/2\)-rate-\(\mathbf{B}^{s,1}\) code [15]. In Figure 4, the achievable system rates \(R=C_{\mathbf{B}_{s}}\Big{(}\frac{E_{s}}{N_{0}},\phi\Big{)}/H(p)\) versus \(E_{s}/N_{0}\) for a 16 QAM constellation using the optimized labeling \(L_{opt1}\) and labeling \(L\) are provided. For comparison, the Shannon limits \(C/H(p)\) are also provided. Compared to labeling \(L\), when \(R\) is 6 bits/symbol, the JSCCM system with the optimized labeling can obtain 0.5 dB shaping gain, which reduces the gap to the Shannon limit.