# Probabilistic Shaping for Finite Blocklengths: Distribution Matching and Sphere Shaping
## 4 Distribution Matching and Sphere Shaping Architectures
### Distribution Matching Architectures (Direct Method)  
In the following, an overview of distribution matching architectures and algorithms is given. The difference between these two aspects was discussed in Section 2.4. All of the following schemes have in common that a certain probability mass function (PMF) is targeted explicitly. For finite-length DM, this means that some quantization might be required as to achieve an integer-valued composition. Possible quantization rules include a simple rounding operation (Section V-A2 in [28]), or minimizing the Kullback-Leibler divergence [93]. We note that neither of these approaches is necessarily optimal in achieving the maximum information rate for a given \(n\) and channel law. **Remark 1** (On the validity of targeting the capacity-achieving distribution at finite blocklengths). : _As discussed earlier in Section 2.2, MB-distributed ASK channel inputs do not maximize the AIR for the AWGN channel. Furthermore, the observation that the loss in AIR resulting from using a MB distribution instead of the AIR-maximizing distribution is negligible is only valid for asymptotically large signaling blocklengths. Accordingly, one can choose a target distribution that depends on the blocklength which may result in improved performance. Nevertheless, MB distributions have frequently been considered for shaping ASK constellations for finite (and short) blocklengths in the literature, and we take the same approach in this study._  
CCDM has been proposed in [52] and it was used as the amplitude shaping architecture for PAS in [28]. We speak of constant composition if all matcher output sequences are permutations of a particular base sequence, which is typically described by the composition \(C\) stating the number of occurrences of each amplitude. The number of output sequences of the corresponding matcher, i.e., the cardinality of the shaping set \(\mathcal{A}^{\circ}\subseteq\mathcal{A}^{n}\), is given by the multinomial coefficient \(\text{MC}(C)\)  
Figure 5: Channel input entropy vs. gap-to-capacity for 8-ASK at the target rate of \(R=2.25\) bit/1-D. The x-axis above shows the corresponding FEC code rates. as defined in (5). Each amplitude sequence in \(\mathcal{A}^{\circ}\) has the same energy \(E^{\circ}\), and consequently, they all are located on the \(n\)-shell of squared radius \(E^{\circ}\) as shown in Figure 6.  
**Example 4** (CCDM). : _We consider the target PMF \(P_{A}=[0.4378,0.3212,0.1728,0.0682]\) over \(\mathcal{A}=\{1,3,5,7\}\) with \(\mathbb{H}(A)=1.75\) bit. Combined with rate-5/6 FEC coding in PAS framework, an amplitude shaper with this entropy corresponds to a transmission rate of \(R=2.25\) bit/1-D from (14), which is a typical target rate with 8-ASK. The composition that is obtained for \(n=216\) with the quantization rule proposed in (Algorithm 2 in [93]) is \(C=[95,69,37,15]\). The shaping rate (7) of the matcher that produces sequences with composition \(C\) is \(R_{s}=1.6991\) bit/1-D. The input length (8) of this matcher is \(k=367\) bits._  
MPDM has been proposed in [55] as an extension to CCDM that lifts the constant-composition principle. MPDM is based on the idea that the target composition \(C\) need not be achieved in each output sequence; rather, it is sufficient if the ensemble average over all sequences gives the target composition. Considering the example of pairwise partitioning in [55], this means that each composition has a complement, both with the same number of occurrences, such that their average is the target composition. There are, however, no known constructive algorithm for this variable-composition mapping problem. This is circumvented by reducing the number of unique sequences of each composition to be a power of two, which can come at the expense of some small rate loss. This additional constraint enables Huffman coding on the compositions, i.e., we can build a tree where a variable-length prefix determines the node and thus, the composition to be used. The remaining binary payload is mapped with conventional CCDM techniques.