I Introduction
Thanks to recent advancements of computer science and biomolecular technologies, molecular programming has been rapidly grown as an emerging topic. Chemical reaction networks (CRNs) are a useful descriptive programming language for modeling complex chemical systems. New possible applications with CRNs have been widely studied so far. For example, chemical implementation of neural networks has been studied in
[1, 2, 3]. Also digital logic [4, 5, 6, 7, 8] and belief propagation (BP) with CRNs have been proposed in [9, 10]. CRNs are a Turinguniversal model, with which we can perform arbitrary computation [11]. Although it is beyond our scope in this paper, deoxyribonucleic acid (DNA) has been extensively studied to translate CRNs in the literature [12]. In fact, designing DNA strands can realize the entire dynamic behaviors of CRNs [13].The proposed polar coding with chemical programming may be useful for intrabody communications, for human health monitoring and drug delivery [14]. In such applications, the transmitted data size is expected to be small. Therefore, short channel coding that has powerful error correcting capability may be required for such applications. As already shown in the literature [15, 16], polar codes concatenated with cyclic redundancy check (CRC) have an advantage over lowdensity paritycheck (LDPC) codes in short blocklength regime, which indicates that polar codes may be a potential candidate for errorcorrecting codes in molecular communication systems.
In this paper, we propose several chemical implementations of short polar codes. We investigate two decoding schemes of short polar codes: successive cancellation (SC) decoding and maximumlikelihood (ML) decoding. Our implementation does not rely on the specific rate constant of chemical reactions, and thus parallel implementation is possible. From simulation results, we show that performances of two decoding schemes in terms of the tradeoff between computation accuracy and speed are comparable, whereas ML decoder can be realized by using much smaller number of chemical species and reactions when the code length is very short. The main contributions of this paper are summarized as follows:

We propose a novel application of molecular computing to polar encoding and decoding;

We design two CRNbased decoding schemes of polar codes: SC and ML decoding; and

We evaluate the performance tradeoff between accuracy and speed of the proposed CRNs, as well as the number of required chemical species and reactions.
Ii Preliminaries
Iia Chemical Reaction Networks (CRNs)
Consider an example of CRNs involving three chemical species , , and , which follow a chemical reaction as below:
(1) 
where and are reactants, is products, and is the rate constant that indicates how fast the reaction occurs. Species that participate in a reaction, but no consumption or production occurs are called catalysts. For example, the species in the following reaction is called catalyst
(2) 
In CRNs, empty set may be used as both reactants and products. In the following example, it is used as reactants
(3) 
where means the products are generated from a large or replenishable source. When appears as products as follows:
(4) 
this reaction means that species and cancel out equal concentrations by transferring them to an external sink. We design CRNs so that the equilibrium concentration of some species shows the result that we want to compute. Throughout this paper, we assume the reaction rate of , since our implementation does not depend on the specific rate.
IiB Basic Operations
In order for the chemical implementation of polar encoding and decoding, both bit and probability computation with CRNs are required. In this subsection, we review how bits or probabilities are represented using a molecular concentration and some basic computations with CRNs
[10] that we use in this work.IiB1 Bit Representation
In order to represent a bit with CRNs, we use a complementary representation [6], where two molecular and are used for a single bit . The presence of molecular indicates that , and vice versa. For this reason, molecular and should not exist at the same time. This is implemented by the following reaction set
(5)  
(6)  
(7) 
where in (5), and are consumed so they exist exclusively in steady states.
IiB2 Probability Expression
The probability is expressed by a ratio of concentrations of two molecules and ,
(8)  
(9) 
where denotes the concentration of the argument molecule.
IiB3 Probability Multiplication
IiB4 Probability Division
Suppose division of two probabilities , we initialize concentrations of two molecules as . Then division is performed by transferring and such that their ratio is equal to that of and , i.e., . The following set of reactions performs division of two probabilities, :
(14)  
(15) 
For simplicity, we use the following notation for this function
(16) 
Iii Chemical Polar Encoder
In this section, our proposed chemical implementation of polar encoding is described. The generator matrix of polar codes with a block length of is expressed as follows:
(17) 
where denotes the th Kronecker power with .
As we can see from (17), the polar encoder is constructed from basic two bitwise operations, which are copy and exclusiveOR (XOR). Suppose and are input bits, a chemical implementation of XOR operation is proposed in [6] as below:
(18)  
(19)  
(20)  
(21)  
(22)  
(23)  
(24)  
(25) 
where reactions in (18)–(21) will generate the molecular corresponding to and , and reactions (22)–(25) correspond to and . Copy operation can be performed by reusing XOR implementation. Specifically, we perform copy of by taking XOR with ”0”, i.e., .
Iv Chemical SC Decoding
In this section, we describe the proposed implementation of polar decoder based on factor graph. Fig. 2 shows the factor graph of polar codes with a block length of . As shown in this figure, SC decoding consists of two fundamental computations, which are ffunction and gfunction [17]. In what follows, we review these functions to propose efficient implementations with CRNs. Although f and gfunctions for LDPC BP decoders are proposed in [10], our approach is different from [10] in that our polar decoder is asynchronous and does not require chemical clock CRNs for circuit synchronization.
Iva The fFunction
The ffunction in SC decoding takes two probabilities and as its input, and outputs . As shown in [17], the probability and its complementary probability is calculated as
(26)  
(27) 
Initializing molecular concentrations as , the ffunction is implemented by the following set of reactions:
(28)  
(29)  
(30)  
(31)  
(32)  
(33)  
(34)  
(35) 
where , , , and correspond to , , , and , respectively. After that, reactions (32)–(35) transfer to and vice versa, and the resulting concentrations can realize the computations (26) and (27).
IvB The gFunction
In addition to two input probabilities and , the gfunction depends on the decision after the ffunction. We denote gfunction by , which is calculated as follows:
(36) 
The following set of reactions shows the computation of the gfunction when :
(37)  
(38)  
(39) 
Analogously, the gfunction with can be performed by replacing and in reactions (37) and (38).
Letting and denote outputs from the ffunction, we make a decision and set if and otherwise . This is implemented by following reactions:
(40)  
(41)  
(42)  
(43)  
(44) 
where initial concentrations of and are . Reactions (40) and (41) copy and to and , respectively, and (43) and (44) divides and according to the ratio . Reaction (42) consumes molecules and , such that either of them is completely consumed. The reactions (40)–(44) are not required for frozen bits, where we set .
IvC Parallel Asynchronous SC Decoding
For traditional SC decoding of polar codes, parallel implementation is difficult, since the ffunction should be calculated before the gfunction since the gfunction depends on the decision result from the ffunction. On the other hand, our chemical SC decoder performs asynchronous decoding operations fully in parallel, i.e., all the f and gfunctions are continuously calculated.
To do this, we continuously perform bit decision and polar encoding at the same time as decoding. This enables that the gfunction is automatically updated based on the intermediate decision result of the ffunction, and eventually decoding results are converged to the target results same as the conventional synchronouscircuit SC decoding.
V Chemical ML Decoding
In this section, we describe the CRN design for ML decoding. The objective of ML decoding is to maximize the following probability
(47) 
where and are the th transmitted and received codeword bits, respectively. While optimal ML decoder finds the mostlikely codeword that maximizes (47), since the efficient implementation of max function of multiple variables with CRNs is difficult. Instead, we propose the suboptimal ML decoding that maximizes the bitwise likelihood, rather than symbolwise likelihood in this paper.
The probability that the th bit is is calculated as follows:
(48) 
where is a set of codewords whose th element is . In what follows, we describe how to calculate (48) with CRNs.
Here we take (4, 2) polar codes as an example for simplicity of explanations, whose generator matrix is given by
(49) 
whose possible codewords are . We first consider computing (47). In order to compute multiplication of multiple variables (more than two), we recursively perform multiplication of two variables. More specifically, multiplication of variables consists of multiplications of two variables, i.e., . In this way, (47) is implemented as follows
(50)  
(51)  
(52)  
(53) 
where molecular concentrations correspond to the probability of each codeword, , respectively.
Finally, let correspond to the probability that th data bit is . Setting initial concentrations , the bitwise likelihood in (48) is calculated by the following reactions,
(54)  
(55)  
(56)  
(57)  
(58)  
(59)  
(60)  
(61) 
where reactions (54)–(57) correspond to the first data bit and those in (58)–(61) correspond to the second data bit. More specifically, a set of reactions (54)–(57) calculate , and (54)–(57) calculate .
Vi Simulation Results
In this section, we compare the performances of our chemical SC and ML decoders for short polar codes in terms of the number of required chemical species and reactions, and also the tradeoff between computation accuracy and speed. To do so, we analyze the time evolution of proposed chemical reactions governed by associated ordinary differential equations (ODE)[18]. We consider decoding polar codes with generator matrix of (49). This code can be derived from (17) by setting first and third rows to frozen indices.
Via Accuracy vs. Speed Tradeoff
Fig. 2
shows the result with the proposed SC decoder, where the probability vector
is fed into the decoder. The expected decoder output in this case is . From this figure, it is observed that molecular concentrations are converging to expected values, and hence it was demonstrated that our chemical polar decoder works well as intended.Fig. 3 shows the result with the proposed chemical ML decoder. From (47) and (48), the expected output vector is calculated as . We can verify that the molecular concentrations converge to the expected values in Fig. 3.
Table I summarizes the evolution of molecular concentration over time in SC and ML decoding. From this table, we observe that for both SC and ML decoding CRNs, molecular concentrations can converge to expected values as time proceeds. It is also observed that the convergence of molecule of SC decoding is slower than that of ML decoding, which stems from the delay associated with the decision of the previous bit used in the gfunction.
Molecule  0 [s]  10 [s]  20 [s]  30 [s]  Expected  
SC  C1  0.500  0.420  0.325  0.272  0.249 
C3  0.500  0.078  0.006  0.005  0.005  
ML  L1  0.500  0.042  0.027  0.027  0.027 
L2  0.500  0.174  0.143  0.143  0.143 
ViB Number of Chemical Species and Reactions
Finally, we briefly compare two decoding schemes in terms of the required number of chemical species and reactions. Table II shows the number of chemical reactions and species required in the proposed SC and ML decoding for halfrate polar codes with code lengths of . From these results, we can see that ML decoder requires much less chemical reactions and species even with the relatively higherspeed convergence when the code length is very short , whereas it increases exponentially as the code length increases. We conclude from this result that ML decoding is better when the code length is very small or faster processing speed is required, however, SC decoding may be suited when the code length is longer, e.g., greater than in terms of the CRNbased circuit size.
of Reactions ()  of Species ()  

SC  222, 640, 1704  124, 356, 912 
ML  44, 224, 4352  36, 152, 2608 
Vii Conclusion
In this paper, we have proposed new polar coding scheme based on molecular programming. Our polar coding does not rely on clock, and thus enables highly parallel implementation. Two decoding schemes for short polar codes based on SC and ML decoding have been investigated. ODE simulation results demonstrated that our proposed CRNs of SC and ML decoders can realize fullyparallel and accurate decoding over chemical reactions without a need of power supply, while ML decoder requires much less chemical species and reactions when the code length is very short. To the best of our knowledge, our research is the first attempt to implement polar encoding and decoding via CRNs, which can be used for intrabody molecular communications without electric energy supplies.
We have focused on a specific short polar code and hence efficient generalization to longer codes should be studied. Future work also includes the design of DNA strands that realize our chemical polar decoder. The cello [19] may be useful for programming our chemical polar decoders using synthetic genetic circuits.
References

[1]
A. Hjelmfelt, E. D. Weinberger, and J. Ross, “Chemical implementation of neural networks and turing machines,”
Proceedings of the National Academy of Sciences, vol. 88, no. 24, pp. 10 983–10 987, 1991.  [2] J. Kim, J. Hopfield, and E. Winfree, “Neural network computation by in vitro transcriptional circuits,” in Advances in neural information processing systems, pp. 681–688, 2005.
 [3] L. Qian, E. Winfree, and J. Bruck, “Neural network computation with DNA strand displacement cascades,” Nature, vol. 475, no. 7356, p. 368, 2011.
 [4] A. Shea, B. Fett, M. D. Riedel, and K. Parhi, “Writing and compiling code into biochemistry,” in Proc. the Pacific Symposium on Biocomputing, pp. 456–464, 2010.
 [5] H. Jiang, M. Riedel, and K. Parhi, “Synchronous sequential computation with molecular reactions,” in Proceedings of the 48th Design Automation Conference, pp. 836–841. ACM, 2011.
 [6] H. Jiang, M. D. Riedel, and K. K. Parhi, “Digital logic with molecular reactions,” in Proceedings of the International Conference on ComputerAided Design, pp. 721–727, 2013.
 [7] P. Senum and M. Riedel, “Rateindependent constructs for chemical computation,” PloS one, vol. 6, no. 6, 2011.
 [8] L. Cardelli, M. Kwiatkowska, and M. Whitby, “Chemical reaction network designs for asynchronous logic circuits,” Natural computing, vol. 17, no. 1, pp. 109–130, 2018.
 [9] N. E. Napp and R. P. Adams, “Message passing inference with chemical reaction networks,” in Advances in Neural Information Processing Systems, pp. 2247–2255, 2013.
 [10] Z. Xingchi, G. Lulu, Y. Xiaohu, and Z. Chuan, “Synthesizing LDPC belief propagation decoding with molecular reactions,” in Proc. 2018 IEEE International Conference on Communications (ICC), Jul. 2018.
 [11] D. Soloveichik, M. Cook, E. Winfree, and J. Bruck, “Computation with finite stochastic chemical reaction networks,” natural computing, vol. 7, no. 4, pp. 615–633, 2008.
 [12] S. W. Shin, “Compiling and verifying DNAbased chemical reaction network implementations,” Ph.D. dissertation, California Institute of Technology, 2012.
 [13] D. Soloveichik, G. Seelig, and E. Winfree, “DNA as a universal substrate for chemical kinetics,” Proceedings of the National Academy of Sciences, vol. 107, no. 12, pp. 5393–5398, 2010.
 [14] T. Nakano, M. J. Moore, F. Wei, A. V. Vasilakos, and J. Shuai, “Molecular communication and networking: Opportunities and challenges,” IEEE Trans. Nanobiosci., vol. 11, no. 2, pp. 135–148, 2012.
 [15] G. Liva, L. Gaudio, T. Ninacs, and T. Jerkovits, “Code design for short blocks: A survey,” arXiv:1610.00873, Oct. 2016.
 [16] M. Shirvanimoghaddam, M. S. Mohamadi, R. Abbas, A. Minja, C. Yue, B. Matuz, G. Han, Z. Lin, Y. Li, S. Johnson, and B. Vucetic, “Short blocklength codes for ultrareliable lowlatency communications,” arXiv:1802.09166, Sep. 2018.
 [17] S. S. Tehrani, W. J. Gross, and S. Mannor, “Stochastic decoding of LDPC codes,” IEEE Commun. Lett., vol. 10, no. 10, pp. 716–718, 2006.
 [18] B. Dahlgren, “ChemPy: A package useful for chemistry written in Python,” Journal of Open Source Software, vol. 3, no. 24, p. 565, 2018.
 [19] A. A. Nielsen, B. S. Der, J. Shin, P. Vaidyanathan, V. Paralanov, E. A. Strychalski, D. Ross, D. Densmore, and C. A. Voigt, “Genetic circuit design automation,” Science, vol. 352, no. 6281, p. aac7341, 2016.
Comments
There are no comments yet.