{'fraction_non_alphanumeric': 0.04136376444068752, 'fraction_numerical': 0.008622147083685545, 'mean_word_length': 4.5998737772167875, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Opening the Black Box of Deep Neural Networks in Physical Layer Communication

Deep Neural Network (DNN)-based physical layer techniques are attracting considerable interest due to their potential to enhance communication systems. However, most studies in the physical layer have tended to focus on the application of DNN models to wireless communication problems but not to theoretically understand how does a DNN work in a communication system. In this paper, we aim to quantitatively analyze why DNNs can achieve comparable performance in the physical layer comparing with traditional techniques and their cost in terms of computational complexity. We further investigate and also experimentally validate how information is flown in a DNN-based communication system under the information theoretic concepts.


I. INTRODUCTION
D EEP neural networks (DNN) have recently drawn a lot of attention as a powerful tool in science and engineering problems such as protein structure prediction, image recognition, speech recognition and natural language processing that are virtually impossible to explicitly formulate. Although the mathematical theories of communication systems have been developed dramatically since Claude Elwood Shannon's monograph "A mathematical theory of communication" [1] provides the foundation of digital communication, the wireless channel-related gap between theory and practice motivates researchers to implement DNNs in existing physical layer communication. In order to mitigate the gap, a natural thought is to let a DNN to jointly optimize a transmitter and a receiver for a given channel model without being limited to componentwise optimization. In [2], a pure data-driven end-to-end communication system is proposed to jointly optimize transmitter and receiver components. Then, the authors consider the linear and nonlinear steps of processing the received signal as a radio transformer network (RTN) which can be integrated into the end-to-end training process. The ideas of end-to-end learning of communication system and RTN through DNN are extended to orthogonal frequency division multiplexing (OFDM) in [3]. Another natural idea is to recover channel state information (CSI) and estimate the channel as accurate as possible by implementing a DNN so that the effects of fading could be reduced. The authors of [4] propose an end-to-end DNN-based CSI compression feedback and recovery mechanism which is This work was supported in part by National Natural Science Foundation of China (NSFC) under Grant 61931020, 61372099 and 61601480. further extended with long short-term memory (LSTM) [5]. In [6], a residual learning based DNN designed for OFDM channel estimation is introduced. Furthermore, in order to mitigate the disturbances, in addition to Gaussian noise, such as channel fading and nonlinear distortion, [7] proposes an online fully complex extreme learning machine-based symbol detection scheme.
Comparing with traditional physical layer communication systems, the above-mentioned DNN-based techniques show competitive performance. However, what has been missing is to understand the dynamics behind the DNN in physical layer communication.
In this paper, we attempt to first give a mathematical explanation to reveal the mechanism of end-to-end DNN-based communication systems. Then, we try to unveil the role of the DNNs in the tasks of CSI recovery, channel estimation and symbol detection. We believe that we have developed a concise way to open as well as understand the "black box" of DNNs in physical layer communication. To summarize, our main contributions of this paper are twofold: • Instead of proposing a scheme combining a DNN with a typical communication system, we analyze the behaviours of a DNN-based communication system from the perspectives of the whole DNN (communication system), encoder (transmitter) and decoder (receiver). Our simulation results verify that the constellations produced by autoencoders are equivalent to the (locally) optimum constellations obtained by the gradient-search algorithm which minimize the asymptotic probability of error in Gaussian noise under an average power constraint. • We consider the tasks of CSI recovery, channel estimation and symbol detection as a typical inference problem. The information flow in the DNNs of these tasks is estimated by using matrix-based functional of Renyi's -entropy to approximate Shannon's entropy. The remainder of this paper is organized as follows. In Section II, we give the system model and formulate the problem. Next, simulation results are presented in Section III. Finally, the conclusions are drawn in Section IV.
Notations: The notations adopted in the paper are as follows. We use boldface lowercase x, capital letters X and calligraphic letters X to denote column vectors, matrices and sets respectively. In addition, and E [·] denote respectively the Hadamard product and the expectation operation.  Fig. 1. Schematic diagram of a general communication system and its corresponding autoencoder representation.

II. SYSTEM MODEL AND PROBLEM FORMULATION
In this section, we first describe the considered system model and then provide a detailed explanation of the problem formulation from three different perspectives.

A. System Model
As shown in the upper part of Fig. 1, let's consider the process of message transmission from the perspectives of a typical communication system and an autoencoder, respectively. We assume that an information source generates a sequence ofbit message symbols ∈ {1, 2, · · · , } to be communicated to the destination, where = 2 . Then the modulation modules inside the transmitter map each symbol to a signal x ∈ R , where denoted the dimension of the signal space. The signal alphabet is denoted by x 1 , x 2 , · · · , x . During channel transmission, -dimensional signal x is corrupted to y ∈ R with conditional probability density function (PDF) (y|x) = =1 ( | ). In this paper, we use /2 bandpass channels, each with separately modulated inphase and quadrature components to transmit the -dimensional signal [8]. Finally, the received signal is mapped by the demodulation module inside the receiver toˆwhich is an estimate of the transmitted symbol . The procedures mentioned above have been exhaustively presented by Shannon. From the point of view of filtering or signal inference, the idea of autoencoder-based communication system matches Norbert Wiener's perspective [9]. As shown in the lower part of the Fig. 1, the autoencoder consists of an encoder and a decoder and each of them is a feedforward neural network (NN) with parameters (weights and biases) and , respectively. Note that each symbol from information source usually needs to be encoded to a one-hot vector s ∈ R and then is fed into the encoder. Under a given constraint (e.g., average signal power constraint), the PDF of a wireless channel and a loss function to minimize error symbol probability, the encoder and decoder are respectively able to learn to appropriately represent s as z = (s) and to map the corrupted signal v to an estimate of transmitted symbolŝ = (v) where z, v ∈ R . Here, we use z 1 , z 2 , · · · , z denoted the transmitted signals from the encoder in order to distinguish it from the transmitted signals from the transmitter.

B. Understanding Autoencoders on Message Transmission
From the prospective of the whole autoencoder (communication system), it aims to transmit information to destination with low error probability. The symbol error probability, i.e., the probability that the wireless channel has shifted a signal point into another signal's decision region, is The autoencoder can use the cross-entropy loss function to represent the price paid for inaccuracy of prediction where s ( ) [ ] denotes the -th element of the -th symbol in a training set with symbols. In order to train the autoencoder to minimize the symbol error probability, the optimal parameters could be found by optimizing the loss function * , * = arg min ( , ) L log ŝ, s; , where av denotes the average power. In this paper, we set av = 1/ . Now, we must be very curious about how does the mapping z = (s) look like after the training was done.

C. Encoder: Finding a Good Representation
Let's pay attention to the encoder (transmitter). In the domain of communication, an encoder needs to learn a robust representation z = (s) to transmit s against channel disturbances, such as thermal noise, channel fading, nonlinear distortion, phase jitter, etc. This is equivalent to find a coded (or uncoded) modulation scheme with the signal set of size to map a symbol s to a point z for a given transmitted power, which maximizes the minimum distance between any two constellation points. Usually the problem of finding good signal constellations for a Gaussian channel 1 is associated with the search for lattices with high packing density which is an old and well-studied problem in the mathematical literature [11].
We use the algorithm proposed in [12] to obtain the optimum constellations. Consider a zero-mean stationary additive white Gaussian noise (AWGN) channel with one-sided spectral density 2 0 . For large signal-to-noise ratio (SNR), the asymptotic approximation of the (1) can be written as To minimize , the problem can be formulated as where z * =1 denotes the optimal signal set. This optimization problem can be solved by using a constrained gradientsearch algorithm. We denote {z } =1 as an × matrix Then, the -th step of the constrained gradient-search algorithm can be described by where denotes step size and ∇ (Z ) ∈ R × denotes the gradient of respect to the current constellation points. It can be written as where The vector 1 z −z denotes -dimensional unit vector in the direction of z − z .
Comparing (3) to (5), the mechanism of the encoder in an autoencoder-based communication system has been unveiled. The mapping function of encoder can be represented as * (s ) when the PDF used for generating training samples is multivariate zero-mean normal distributionẑ − z ∼ N (0, ) where 0 denotes -dimensional zero vector and = (2 0 / ) I is an × diagonal matrix.

D. Decoder: Inference
Finally, it is the time to zoom in the lower right corner of the Fig. 1 to investigate what happens inside the decoder (receiver). As Fig. 2(a) shown, for the tasks of DNN-based CSI recovery, channel estimate and symbol detection, the problem can be formulated as an inference model. For the sake of convenience, we can denote the target output of the decoder as z instead of s because we can assume z = (s) is bijection. If the decoder is symmetric, the decoder also can be seen as a sub autoencoder which consists of a sub encoder and decoder. Its bottleneck (or middlemost) layer codes is denoted as u.
Here we use z to denote CSI or transmitted symbol which we desire to predict. The decoder infers a predictionẑ = (v) according to its corresponding measurable variable v.
If the joint distribution (v, z) is known, the expected (population) risk C (v,z) , L log can be written as where (·|v) = (v) ∈ (Z) and KL ( (z|v) || (z|v)) denotes Kullback-Leibler divergence between (z|v) and (z|v) [13] 2 . If and only if the decoder is given by the conditional posterior (v) = (z|v), the expected (population) risk reaches the minimum min C (v,z) , L log = (z|v).
In physical layer communication, instead of perfectly knowing the channel-related joint distribution (v, z), we only have In this case, the empirical risk is defined aŝ Practically, the D from (v, z) usually is a finite set. This leads the difference between the empirical and expected (population) risks which can be defined as We now can preliminarily conclude that the DNN-based receiver is an estimator with minimum empirical risk for a given set D , whereas its performance is inferior to the optimal with minimum expected (population) risk under a given joint distribution (v, z).
Furthermore, it is necessary to quantitatively understand how information flows inside the decoder. Fig. 2(b) shows the graph representation of the decoder where t and t (1 ≤ ≤ ) denote -th hidden layer representations starting from the input layer and the output layer, respectively. Here, we use the method proposed in [14] to illustrate layer-wise mutual information by three kinds of information planes (IPs) where the Shannon's entropy is estimated by matrix-based functional of Renyi's -entropy [15]. Its details are given in Appendix.

III. SIMULATION RESULTS
In this section, we provide simulation results to illustrate the behavior of DNN in physical layer communication. Fig. 3(a) shows the optimum constellations obtained by gradient-search technique proposed in [12]. When = 2 and 3, the algorithm was run allowing for 1000 and 3000 steps, respectively. The step size = 2 × 10 −4 . Fig. 3(b) shows the constellations produced by autoencoders which have the same network structures and hyperparameters with the autoencoders mentioned in [2]. The autoencoders were trained with 10 6 epochs, each of which contains different symbols. When = 2, the two-dimensional constellations produced by autoencoders have a similar pattern to the optimum constellations which form a lattice of (almost) hexagonal. Specifically, in the case of ( = 8, found by the autoencoder can be obtained by rotating the optimum constellation found by gradient-search technique. In the case of ( = 16, = 2), the constellation found by the autoencoder is different from the optimum constellation but it still forms a lattice of (almost) equilateral triangles. In the case of ( = 16, = 3), one signal point of the optimum constellation is almost at the origin while the other 15 signal points are almost at the surface of a sphere with radius av and center 0. This pattern is similar to the surface of a truncated icosahedron which is composed of pentagonal and hexagonal faces. However, the three-dimensional constellation produced by an autoencoder is a local optima which is form by 16 signal points almost in a plane.

A. Constellation Comparison
From the perspective of computational complexity, the cost to train an autoencoder is significantly higher than the cost of traditional algorithm. Specifically, an autoencoder which has 4 dense layers respectively with , , and neurons needs to train (2 + 1) ( + ) + 2 parameters for 10 6 epochs whereas the gradient-search algorithm only needs 2 trainable parameters for 10 3 steps.

B. Information Flow
We consider a common channel estimation problem for an OFDM system with subcarriers. Let z [1] , · · · , [ − 1]] which denotes frequency impulse response (FIR) vector of a channel. For the sake of convenience, we denote the measurable variable as v Δ =ẑ LS whereẑ LS represents the least-square (LS) estimation of z. Usually, it can be obtained by using training symbol-based channel estimation. In this paper, we use linear interpolation and the number of pilots = /4 = 16. According to (11), the minimum logarithmic expected (population) risk for this inference problem is (z|ẑ LS ) which can be estimated by Renyi's -entropy (z|ẑ LS ) = (z,ẑ LS ) − (ẑ LS ) with = 1.01. Fig. 4 illustrates the entropy (z|ẑ LS ) with respect to different values of SNR and . As can be seen, (z|ẑ LS ) monotonically decreases as the size of training set increases. When → ∞, (z|ẑ LS ) decreases slowly. It is because the joint distribution (z,ẑ LS ) can be perfectly learned and therefore the empirical risk is approaching to the expected risk. Interestingly, when > 580, the lower the SNR or the larger input dimension is, the smaller is needed to obtain the same value of (z|ẑ LS ). where linear activation function is considered and the training sample is constructed by concatenating the real and imaginary parts of the complex channel vectors. Batch size is 100 and learning rate = 0.001. We use and to denote the input and output of the decoder, respectively. The number of iterations is illustrated through a color bar. From IP-I, it can be seen that the final value of mutual information I ( ; ) in each layer tends to be equal to the final value of I ( ; ), which means that the information from has been learnt and transferred to by each layer. In IP-II, I ( ; ) < I ( ; ) in each layer, which implies that all the layers are not overfitting. The tendency of I ( ; ) to approach the value of I ( ; ) can be observed from IP-III. Finally, from all the IPs, it is easy to notice that the mutual information does not change significantly when the number of iterations is larger than 200. Meanwhile, according to Fig. 5(d), the MSE reaches a very low value and also does not change sharply. It means that 200 iterations are enough for the task of 64-subcarrier channel estimation using a DNN with the above-mentioned topology.

IV. CONCLUSION
In this paper, we propose a framework to understand the manner of the DNNs in physical communication. We find that a DNN-based transmitter essentially tries to produce a good representation of the information source. Then, we quantitatively analyze the information flow in a DNN-based communication system. We believe that this framework has the potential for the design of DNN-based physical communication.
APPENDIX A MATRIX-BASED FUNCTIONAL OF RENYI'S -ENTROPY For a random variable in a finite set X, its Renyi's entropy of order is defined as where ( ) is the PDF of the random variable . Let where : X × X ↦ → R is a real valued positive definite and infinitely divisible kernel. Then, a matrixbased analogue to Renyi's -entropy for a normalized positive definite matrix A of size × with trace 1 can be given by the functional where (A) denotes the -th eigenvalue of A, a normalized version of K: . (16) Now, the joint-entropy can be defined as