# Probabilistic Shaping for Finite Blocklengths: Distribution Matching and Sphere Shaping
## 1 Introduction
Although CCDM has vanishing rate loss for asymptotically large blocklengths [52], it has two fundamental drawbacks. First, as recently shown in [54] and (Figure 4 in [55]), CCDM suffers from high rate losses as the blocklength decreases. Second, CCDM is implemented based on AC which requires sequential processing [53] and (Chapter 5 in [56]). To replace CCDM in the short-to-moderate blocklength regime and to provide more hardware-friendly implementations, improved techniques have been devised. The most prominent DM examples other than CCDM include multiset-partition DM (MPDM) [55] and product DM (PDM) [51; 57]. Briefly stated, MPDM uses different compositions and expands the set of output sequences to achieve smaller rate losses than CCDM. With the same objective, PDM internally uses multiple binary matchers to generate the desired distribution as a product distribution (A symbol-level product distribution can be written as the product of bit-level distributions (Equation (14) in [51]). In the context of BICM, product distributions were studied extensively in [41]). In [58], a parallel-amplitude (PA) architecture is proposed for DM to enable even higher degrees of parallelization. Also in [58], subset ranking (SR) is introduced as an alternative to the conventional AC method for binary-output CCDM. As for direct shaping methods, enumerative sphere shaping (ESS) and shell mapping (SM) are notable SpSh algorithms which are initially proposed in [22; 59] respectively. ESS is recently considered in PAS framework [48; 60; 61; 62; 63], as well as SM in [64]. Furthermore, low-complexity implementation ideas for both of these algorithms have been presented in [65]. The fourth layer in Figure 1 which we call _transformation_ for DM and _ordering_ for SpSh designates the way a shaping algorithm formulates a solution to the problem defined by the shaping architecture. As an example, CCDM considers sequences having the same composition [52]. By realizing a binary-to-nonbinary transformation with AC [52; 53], CCDM can directly be used to produce amplitude sequences. On the other hand, separate binary-to-binary transformations can be employed for different bit-levels using AC [53] or SR [58]. Then these bit-levels can be combined such that the corresponding channel input distribution is close to the capacity-achieving distribution [51; 57]. As another example, SpSh considers amplitude sequences inside a sphere. ESS orders these sequences lexicographically [22], while SM and (Algorithm 1 in [23]) order them based on their energy. Other shaping schemes have been proposed that are briefly listed in the following. A detailed analysis of them is outside the scope of this manuscript. The concept of a \"mark ratio controller\" was proposed for low-complexity implementation of BL-DM in [66; 67]. In the streaming DM of [68] and the prefix-free code distribution matching with framing of [69; 70], switching is performed between two (or more) variable-length shaping codes such that the output is always of fixed length. In [71], a \"multi-composition\" idea similar to [55] was applied to BL-DM. The authors of [72] provided a finite-precision implementation for AC-CCDM. In [73], a sharper based on ESS was introduced to  
Figure 1: Taxonomy of shaping in the context of probabilistic amplitude shaping (PAS). We focus on the schemes that are evaluated in this work. Figure 2: (Top) Block diagram of the PAS architecture. Amplitude shaping blocks (green boxes) are examined in the current paper. (Bottom) The binary reflected Gray code (BRGC) for 8-ary amplitude-shift keying (8-ASK). A quadrature amplitude modulation (QAM) symbol is the concatenation of two ASK symbols. shape a subset of the amplitude bit-levels, which is referred to as partial ESS. The authors of [74] introduced the \"hierarchical\" DM which realizes a nonuniform distribution with hierarchical lookup tables (LUTs) [75]. An approximate sphere shaping implementation based on Huffman codes was proposed in [76]. In this work, we examine DM and SpSh methods.