# Probabilistic Shaping for Finite Blocklengths: Distribution Matching and Sphere Shaping
## 5 Performance Comparison
### Rate Loss Analysis  
The methodology of computing the rate loss for DM and SpSh schemes in a fair manner is illustrated in Figure 7. For the DM schemes of Section 4.1, the following steps are carried out in order to obtain the rate loss for a particular \(n\). First, the target distribution \(P_{A}\) (and thus the modulation order \(2^{m}\)) is fixed. The target distribution is MB, optimized for a particular SNR. We then quantize \(P_{A}\) to \(P_{A}\) to get the integer-valued target composition \(C=nP_{A}\), where the quantization criterion is to minimize the Kullback-Leibler divergence between \(P_{A}\) and \(P_{A}\)[93]. For CCDM, \(k=\lfloor\log_{2}\operatorname{MC}(C)\rfloor\) bits can be addressed where the multinomial coefficient \(\operatorname{MC}(\cdot)\) is as defined in (5). For nonconstant composition DMs such as MPDM [55], the number of addressable bits \(k\) depends on the addressable bits of all constituent compositions, considering the specific constraints of the DM construction such as pairwise partitioning (Section III-A in [55]). The rate loss is finally computed as \(R_{\text{loss}}=\mathbb{H}(\bar{A})-k/n\), as defined in (10). Figure 6: The illustration of the employed \(n\)-dimensional signal points by CCDM (**left**), MPDM (**middle**) and SpSh (**right**). Each circle represents an \(n\)-dimensional shell. Darker portions of the shells indicate the signal points on them which are utilized by the corresponding shaping approach. For the SpSh schemes of Section 4.2, the approach must be different since it is not possible to explicitly target a certain distribution or composition. From the above methodology, we obtain the number of input bits \(k_{\text{mpdm}}\) for MPDM at a given \(n\). For each \(n\), we find the smallest \(\mathbb{E}^{\bullet}\), i.e., the squared radius of the sphere, such that the number of sequences inside the \(n\)-sphere \(\mathcal{A}^{\bullet}\) satisfies \(\log_{2}(|\mathcal{A}^{\bullet}|)\geq k_{\text{mpdm}}\). We compute the average distribution \(P_{\tilde{A}}\) (Equation (17) in [48]). The rate loss is again obtained as \(R_{\text{loss}}=\mathbb{H}(\tilde{A})-k/n\). For SpSh schemes, the input length \(k_{\text{ccdm}}\) of CCDM can also be targeted during the rate loss computation. However, we prefer to use input length of MPDM since in general, \(k_{\text{mpdm}}\geq k_{\text{ccdm}}\). **Example 8** (Rate loss comparison). : _We consider the target distribution \(P_{A}=[0.438,0.321,0.173,0.068]\) with entropy \(\mathbb{H}(A)=1.75\). The \(n\)-type distribution that has the minimum informational divergence from \(P_{A}\) for \(n=216\) is \(P_{A}=[0.440,0.320,0.171,0.069]\). The corresponding composition is \(\mathcal{C}=[95,69,37,15]\). Starting with the same target distribution, i.e., with the same composition, the number of compositions that are employed by MPDM is 945 (Section III in [55]). Since MPDM's set of compositions consists of pairs whose average is \(\mathcal{C}\), the average distribution \(P_{A}\), its entropy \(\mathbb{H}(\tilde{A})\) and the average symbol energy \(E\) are the same as CCDM's. The smallest \(\mathbb{E}^{\bullet}\) that gives \(|\mathcal{A}^{\bullet}|\geq 2^{k}\) is \(\mathbb{E}^{\bullet}=2376\) where \(k\) is the input length of MPDM. The corresponding average distribution is \(P_{\tilde{A}}=[0.439,0.322,0.172,0.067]\). Table 2 shows the input length \(k\), average symbol energy \(E\) and rate loss \(R_{\text{loss}}\) of CCDM, MPDM and SpSh for these parameters. We see that MPDM is able to address a larger set of sequences than CCDM, leading to a 7 bit increase in the input length. Since the corresponding average distributions are the same, this is reflected as a decrease in rate loss. Then starting with the same target \(k\), SpSh employs a set of sequences with smaller average energy. This is also translated to a decrease in rate loss as shown in Table 2._  
**Remark 3** (Targeting a rate with DM).