Variable-to-Fixed Length Homophonic Coding Suitable for Asymmetric Channel Coding
Junya Honda, Hirosuke Yamamoto

TL;DR
This paper introduces a new variable-to-fixed length homophonic coding scheme that adapts to asymmetric channels by allowing a one-symbol decoding delay, eliminating the need for prior probability gap knowledge.
Contribution
It proposes a novel VF homophonic code that does not require pre-known probability gaps, enhancing practicality for long block codes in asymmetric channels.
Findings
The new code achieves asymptotic optimality.
Theoretical analysis confirms the code's performance.
Experimental results validate the code's effectiveness.
Abstract
In communication through asymmetric channels the capacity-achieving input distribution is not uniform in general. Homophonic coding is a framework to invertibly convert a (usually uniform) message into a sequence with some target distribution, and is a promising candidate to generate codewords with the nonuniform target distribution for asymmetric channels. In particular, a Variable-to-Fixed length (VF) homophonic code can be used as a suitable component for channel codes to avoid decoding error propagation. However, the existing VF homophonic code requires the knowledge of the maximum relative gap of probabilities between two adjacent sequences beforehand, which is an unrealistic assumption for long block codes. In this paper we propose a new VF homophonic code without such a requirement by allowing one-symbol decoding delay. We evaluate this code theoretically and experimentally to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Wireless Communication Techniques · Error Correcting Code Techniques · Algorithms and Data Compression
Variable-to-Fixed Length Homophonic Coding Suitable for
Asymmetric Channel Coding
Junya Honda Hirosuke Yamamoto
Graduate School of Frontier Sciences,
The University of Tokyo,
Kashiwa-shi Chiba 277–8561, Japan
Email: [email protected], [email protected]
Abstract
In communication through asymmetric channels the capacity-achieving input distribution is not uniform in general. Homophonic coding is a framework to invertibly convert a (usually uniform) message into a sequence with some target distribution, and is a promising candidate to generate codewords with the nonuniform target distribution for asymmetric channels. In particular, a Variable-to-Fixed length (VF) homophonic code can be used as a suitable component for channel codes to avoid decoding error propagation. However, the existing VF homophonic code requires the knowledge of the maximum relative gap of probabilities between two adjacent sequences beforehand, which is an unrealistic assumption for long block codes. In this paper111This is the full version of the paper to appear in IEEE International Symposium on Information Theory (ISIT2017) with some minor corrections. we propose a new VF homophonic code without such a requirement by allowing one-symbol decoding delay. We evaluate this code theoretically and experimentally to verify its asymptotic optimality.
I Introduction
In communication through asymmetric channels the capacity-achieving input distribution is not uniform in general. On the other hand, in most practical codes such as linear codes all symbols appear with almost the same frequency and some modification is necessary to use them as optimal codebooks. Although it is known that biased codewords can be generated from an auxiliary code over an extended alphabet based on Gallager’s nonlinear mapping [1, p. 208], its complexity becomes very large when the target distribution is not expressed in simple rational numbers.
A promising solution to this problem is to generate such biased codewords by homophonic coding. Homophonic coding is a framework to invertibly convert a message with distribution into another sequence with target distribution . This framework is intuitively similar to a dual of lossless compression, where a biased source sequence is encoded into an almost uniform sequence. In fact, the inverse of a lossless code based on an LDPC matrix is used to construct capacity-achieving channel code in [2] although a practical algorithm for this code has not been known.
A homophonic code is called perfect if the generated sequence exactly follows the target distribution. A perfect Fixed-to-Variable length (FV) homophonic code222 A similar FV code is proposed in [3] later that is asymptotically perfect. can be constructed [4] based on an interval algorithm similar to a random number generator [5]. This code can actually be applied to generation of biased codewords for LDPC codes and polar codes [6][7] to achieve the capacity. These codes require a homophonic code applicable to a non-i.i.d. sequence to generate a codeword with some structure (such as parity-check constraints). On the other hand, a general channel coding framework is proposed in [8][9] where any homophonic code for i.i.d. sequences can be used at a cost that each codeword consists of some blocks and the entire code length becomes large.
Although the FV homophonic code in [4] is perfect and achieves the asymptotic bound on the coding rate, it is not appropriate to use this code as a component of a channel code. This is because an FV channel code is hard to run in parallel and suffers decoding error propagation, which is a serious problem for channel coding. Therefore it is desirable to use a Fixed-to-Fixed length (FF) or Variable-to-Fixed length (VF) homophonic code to avoid such error propagation.
Since it is difficult to construct a perfect homophonic code in the VF and FF frameworks333Although a perfect FF homophonic code is also constructed in [4], it suffers decoding errors with asymptotically vanishing but positive probability., there are some studies on homophonic codes whose output distribution asymptotically matches the target distribution. Such an asymptotically matching distribution is practically sufficient for the channel coding application, in contrast to the original motivation for homophonic coding [10][11] where an exactly matching random sequence is required to apply to cryptography.
Böcherer and Mathar considered homophonic coding with the name distribution matching and proposed a VF homophonic code based on Huffman coding with an approximation of the target distribution by a dyadic distribution [12][13]. This code requires -symbol extension to achieve redundancy even though the complexity does not scale with as in Huffman coding. Schulte and Böcherer [14] proposed an FF homophonic code which outputs sequences in a fixed type class, which has redundancy . Honda and Yamamoto [15] proposed a VF homophonic code with redundancy with linear complexity by combining Shannon-Fano-Elias code and Gray code. Whereas the code in [14] is easier to handle in real systems from the nature of FF codes, the VF code in [15] is easy to extend to non-i.i.d. processes. Thus this VF code can be applied to the coding framework in [8][9] even if the channel is not memoryless where the capacity achieving input distribution is not i.i.d. A drawback of the scheme in [15] is that an upper bound on the maximum relative probability gap
[TABLE]
has to be known beforehand. This value is easy to compute for Markov processes of (not very large) order but hard to compute for general block codes, which makes application to block codes with structures difficult.
In this paper we propose a new VF homophonic coding scheme, which encodes a variable-length uniform sequence into an -bit sequence with some target probability distribution . Here does not have to be i.i.d. and the only requirement is that, as in arithmetic coding, the conditional probability for each be computable for a given . The cost for this advantage is that the scheme requires one code-symbol decoding delay, but a decoding error propagates to at most one block with very high probability. We prove the asymptotic optimality of the scheme under some conditions and confirm its performance by simulations for asymmetric channel coding application.
II Preliminaries
We consider a VF homophonic coding problem to encode a uniform input sequence into a sequence where with target probability distribution . A random variable with distribution is denoted by . In a VF homophonic coding scheme, variable-length subsequences are invertibly encoded into fixed-length sequences , where a subsequence is denoted by, e.g., . We consider the case where blocks are i.i.d., whereas symbols in may be non-i.i.d. For this reason, we often write instead of . We discuss the extension to a general sequence in Remark 2.
Let be a (possibly random) encoding function of a homophonic code. This code is called perfect if the generated sequence exactly follows the distribution for the input sequence i.i.d. from . We measure the gap between the generated sequence and by the max-divergence per block, denoted by
[TABLE]
A homophonic code is perfect if and only if . Note that a codeword with decoding error probablity is generated with probability at most under the homophonic code . As a result, if the block decoding error probability of some block code is under the ideal distribution , the error probability generated by the homophonic code is bounded by .
Let denote the first bits of the binary expansion of . We sometimes identify with the real number . The real number corresponding to the -th bits is denoted by . Thus we have . We also define for any . We define the cumulative distribution function given and its inverse by
[TABLE]
where denotes the lexicographic order and is taken under this order. We write for the last sequence before , that is, the largest sequence such that .
III Delayed VF Homophonic Code
In this section we propose a Delayed VF Homophonic (DVFH) code, which is based on an interval partitioning as in the cases of arithmetic coding and the homophonic code in [4].
First we give an intuition for the DVFH code before its description. In a DVFH code, we do not assign the full information specifying the (variable-length) input sequence to , and instead, we assign the information that is required to specify if -bits of information were obtained in addition to . This additional information is assigned to the first element of the next encoding block, which causes the code to incur a one-symbol decoding delay. By this assignment of -bits of information, the distribution of becomes different from but the remaining sequence almost follows .
Let for an interval denote the largest integer such that
[TABLE]
In this way the lower and upper bounds of an interval are always denoted by and , respectively.
As detailed later, the encoder of a DVFH code sends such that . Therefore holds for . This implies that if the decoder gets additional -bits of information then can be recovered.
Let be a permutation of representing the descending order of , that is, we have . Here ties are broken arbitrarily in a unified manner between the encoder and decoder. The encoding and decoding algorithms of a DVFH code are given in Algorithms 1 and 2, where the input is decoded into . Here the length of an interval is expressed by . Step 2 of the decoding algorithm is exception handling and the condition is never satisfied if the decoder receives the generated sequence without error.
First we give a theorem on the unique decodability and the error propagation probability of a DVFH code.
Theorem 1**.**
(i) A DVFH code satisfies for all . (ii) Fix and arbitrarily. If the sequence of codewords is generated by the encoder from uniformly distributed and a sequence is parsed by the decoder, then
[TABLE]
where . (iii) The max-divergence between the target distribution and the distribution of the generated sequence satisfies
[TABLE]
where is the -th largest value in .
The first part of this theorem shows that this code is uniquely decodable. The second part shows that if an error occurred in the -th codeword block then the error may occur in the decoding of and , but propagates to that of with exponentially small probability if . Here note that itself is also a value exponentially small in for usual distributions . The last part shows that the max entropy is bounded by a constant independent of . This means that when a DVFH code is applied to the generation of biased codewords, the block decoding error probability is as most a constant times the error probability under the ideal codeword distribution as explained in the discussion around (1).
Unfortunately, we do not have a theoretical guarantee on the average input length of a DVFH code. This is because at each iteration is uniformly distributed over an interval rather than . For example, if for some then the distribution of becomes
[TABLE]
This problem can be avoided by, for example, adding a shared common random number to at each iteration, which makes uniformly distributed over . The problem can also be avoided by replacing the cumulative conditional distribution with , which is the technique used in [15]. However, this modification causes error propagation despite the use of a VF code since for the current loop depends on all the sequences sent in the previous loops.
In this paper we propose a modification of the code to guarantee a lower bound on the average input length without introducing common randomness and causing error propagation. This uses a “shifted” cumulative distribution given where an appropriately fixed value is added under the mod 1 operation (see (7) and (10) in the proof of Theorem 2 for the specific value of ), which is expressed as
[TABLE]
Theorem 2**.**
*Consider the homophonic code where and are replaced with and , respectively, Step 1 in the encoding is replaced with (with an arbitrary initial value ), and Step 2 in the decoding is replaced with . Then (i) and (ii) of Theorem 1 still hold and the max divergence satisfies *
[TABLE]
Furthermore, there exists such that the average input length for any satisfies
[TABLE]
The value that assures (5) is difficult to compute in practice (although we only have to compute this value once as preprocessing). Nevertheless, this theorem may become one reason for the near optimal empirical performance of the DVFH code (without modification) shown in the next section.
As shown in the above theorem, the average input length of the modified code is bounded in terms of . It must be noted that this value is much smaller than or for some , although does not heavily depend on in most “good” block codes. It is an important future work to devise a VF homophonic code which provably achieves the average input lengths for general distributions .
Remark 1**.**
In a DVFH code -bits of additional information is assigned to . We can also consider a code such that the additional information is assigned to by switching the role of to . Such a code does not suffer a decoding delay, but theoretical guarantees hold in terms of instead of in, e.g., (4). Thus it is inappropriate to use this code to generate sequences which heavily depend on past sequences. However it can be a promising candidate when is i.i.d. or a Markov process of order , which is the case when a homophonic code is applied to the framework of channel coding in [9].
Remark 2**.**
In the case where are not i.i.d., we can obtain a similar theoretical guarantee by replacing in the algorithms with , if
[TABLE]
However, error propagation inevitably occurs in the coding framework using probabilities depending on all the past generated blocks. Thus it is realistic to set the target probability distribution to be independent between blocks.
IV Numerical Results
In this section we first compare a DVFH code with other homophonic codes for i.i.d. target distributions. We next apply the DVFH code to polar coding for asymmetric channels. We used a DVFH code without introducing the modification considered in Theorem 2, which means that the theoretical guarantee on the coding rate in (5) does not hold.
Fig. 2 is the upper bound444We considered the theoretical upper bound instead of the empirical results for this point since it requires prohibitively large number of samples to estimate a distribution over . on max-divergence between the generated sequences and the target probability. The plots555The plots of the FF code in this figure is slightly different from the ISIT version that contained a bug. of the FF code in [14] are the exact ones rather than upper bounds. The sequences generated by the FV code in [4] exactly follow the target distribution and its plot is not shown in the figure. Max divergences per block of the code in [15] and the proposed one are bounded independent of whereas that of the FF code in [14] is . Fig. 2 shows the redundancy of the average coding rate which is for VF and FF codes where is the input length. For the FV code in [4], the redundancy is given by where and are the input and output length, respectively, and we set so that the output length becomes roughly the same as the FF and VF codes. Each plot is the average over 10,000 sequential encoding.
As we can see from these figures the DVFH code achieves a comparable divergence for most target distributions, whereas the redundancy is almost zero or below even for shorter block length. Here the negative redundancy of the DVFH code does not contradict the Shannon bound since the distribution of the generated sequence is slightly different from the target distribution.
Next, Figs. 4 and 4 show the upper bound on max-divergence and the redundancy of the average coding rate for i.i.d. quaternary sequences with , respectively. A tendency similar to the binary case can be seen from these figures.
Finally we consider an application of homophonic coding to polar codes for asymmetric channels, where capacity-achieving polar coding schemes are proposed in [16] and [7]. Whereas the former one is an FF code using a polar code for lossless compression to realize the optimal input distribution, the latter one is an FV code based on the FV homophonic code in [4] which is practically unrealistic because of the problem of error propagation. Based on this observation we compared the FF length code in [16] with the scheme in [7] by replacing the FV homophonic code with the DVFH code. Note that the FF homophonic code in [14] and the VF homophonic code in [15] are hard to apply since the target distribution is not i.i.d.
We considered AWGN channels with 4ASK modulation where input points are given by for . The Signal-to-Noise Ratio (SNR) is set to 10db. The optimal input distribution is . The mutual information between the input and output is 1.582 and 1.628 for the uniform and the above input distribution, respectively. Note that it is also possible to optimize the input points as well as the input distribution but we only considered optimization of the latter one for practicality. We used polar codes over , with block lengths and .
Fig. 5 shows the decoding error probabilities of the above two polar coding schemes and the original polar code with the uniform input distribution. Here note that there is some arbitrariness on the performance measure of the scheme using a DVFH code. First, decoding error propagates to roughly blocks (in the 4-ary case), that is, one decoding error of this code corresponds roughly to -block errors of other codes. Second, the input length for each codeword is variable and there exists a correlation between the message length and the error probability of the codeword. Based on this observation, we plotted twice the empirical decoding error probability to conservatively evaluate the scheme using a DVFH code.
As we can see from the figure the performance of the FF code in [16] is much worse than the performance of the uniform input polar code for moderate block lengths, although it is theoretically assured to be better than the uniform input asymptotically. On the other hand, the VF polar code using the DVFH code significantly outperforms the polar code with the uniform input.
V Proof of Theorem 2
In this section we prove Theorems 1 and 2. We prove these theorems based on the following lemma.
Lemma 1**.**
At Step 1 of the encoding, holds and is uniformly distributed over given .
Proof.
straightforwardly follows from Steps 1–1. The latter part is proved by induction. For this proposition holds from and the uniformity of . Next, assume that the proposition holds for . Then, given , is uniformly distributed over in Step 1. Thus, is uniformly distributed over , which implies that the proposition holds for . ∎
Proof of Theorem 1: (i) Construction of and is the same between the encoding and the decoding, provided that is the same between them. In addition, from relation between Steps 1 and 1 in the encoding and Steps 2 and 2 in the decoding, for each in the encoding is correctly recovered in the decoding at Step 2 for . Since holds from , is correctly recovered by Step 2 in the decoding,
(ii) A decoding error occurs only if after Step 1 of the encoding and after Step 2 of the decoding are different for . From Lemma 1, occurs in the encoding with probability at most given that are different between the encoding and decoding for . The same result holds for the decoding and therefore are different to each other with probability at most , which proves (3).
(iii) For each , if and only if from the encoding algorithm, which holds with probability from Lemma 1. Since , we have
[TABLE]
We also have
[TABLE]
from Lemma 1. Thus we obtain (4) by
[TABLE]
Proof of Theorem 2.
As the former part is almost the same as the proof of Theorem 1, we only prove (5). Since is the largest satisfying (2), we have
[TABLE]
which implies
[TABLE]
Therefore, the length of the assigned message is given by
[TABLE]
Now we consider the output distribution . Recall that is uniformly distributed over by Lemma 1. We have for some if holds, for some if holds and otherwise. Thus, in the case where we have
[TABLE]
for any and we consider the other case in the following.
Now consider the case . Let
[TABLE]
for . Then we have
[TABLE]
where (8) and (9) follow from and (7), respectively. In the case we obtain in the same way by letting
[TABLE]
We obtain (5) by combining this result with (6). ∎
VI Conclusion
In this paper we proposed a variable-to-fixed length homophonic code, DVFH code, which is easily applied to channel coding for asymmetric channels. This code can decode each block with one code-symbol decoding delay. The max-divergence of the generated sequence is bounded by a constant. The average input length of the code is very close the entropy in the simulation and it is shown to be asymptotically larger than the worst-case conditional entropy under a slight modification of the code. An important future work is to construct a code such that input length provably achieves the entropy rather than the conditional one.
Acknowledgment
This work was supported in part by JSPS KAKENHI Grant Number 16H00881,
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] R. G. Gallager, Information Theory and Reliable Communication . New York: Wiley, 1968.
- 2[2] S. Miyake and J. Muramatsu, “A construction of channel code, joint source-channel code, and universal code for arbitrary stationary memoryless channels using sparse matrices,” IEICE Trans. Fundam. , vol. 92-A, no. 9, pp. 2333–2344, 2009.
- 3[3] R. A. Amjad and G. Böcherer, “Fixed-to-variable length distribution matching,” in Proceedings of IEEE International Symposium on Information Theory (ISIT 13) , 2013, pp. 1511–1515.
- 4[4] M. Hoshi and T. S. Han, “Interval algorithm for homophonic coding,” IEEE Trans. Inform. Theory , vol. 47, no. 3, pp. 1021–1031, 2001.
- 5[5] T. S. Han and M. Hoshi, “Interval algorithm for random number generation,” IEEE Trans. Inform. Theory , vol. 43, no. 2, pp. 599–611, 1997.
- 6[6] J. Honda, “Efficient polar and LDPC coding for asymmetric channels and sources,” Ph.D. dissertation, The University of Tokyo, 2013. [Online]. Available: http://repository.dl.itc.u-tokyo.ac.jp/dspace/bitstream/2261/56414/1/K-04103.pdf
- 7[7] R. Wang, J. Honda, H. Yamamoto, R. Liu, and Y. Hou, “Construction of polar codes for channels with memory,” in IEEE ITW 2015 , 2015, pp. 187–191.
- 8[8] G. Böcherer and R. Mathar, “Operating LDPC codes with zero shaping gap,” in IEEE ITW 2011 , 2011, pp. 330–334.
