## 2 Principle
### Autoencoder-Based Symbol-Wise Optimization  
During the symbol-wise optimization stage, we use an autoencoder to find the optimal constellation distribution to guarantee the best SER performance. Regarding the autoencoder, we regard the transmitting part of the communication system as an encoder, and the receiving part as a decoder, and what is transmitted in the channel is the constellation scheme learned by the encoder. In order to allow the gradient of the receiver network to  
Figure 1: Principle of the autoencoder-based geometric shaping model framework. backpropagate to the transmitter network, we need an additional channel neural network to model the real underwater visible-light channel and embed the channel model between the encoder and decoder, and finally a complete autoencoder for geometric shaping can be obtained. The neural network structure of the autoencoder is shown in Figure 2.  
For encoders, their input is a one-hot vector, and the index of the non-zero position in the vector represents the symbol to be transmitted. To simulate the inter-symbol interference between consecutive samples introduced by the channel effect, multiple encoders are connected in parallel to represent different moments, and the results they produce represent the real transmitted constellation sequence. For the channel model, it is trained in advance to learn the channel response of the actual underwater visible-light channel and then embedded into the autoencoder to act as the actual channel. The constellation sequence output to the encoders is firstly concatenated by a flatten layer and is then fed into the network-based channel to simulate real transmission in the underwater visible-light channel. After passing through the channel network, the distorted constellation is directly decoded by the decoder. The decoding result of the decoder is backpropagated under the action of the loss function, and the encoder is prompted to generate a globally optimal constellation distribution to adapt to the actual underwater visible-light channel. Once the learning of the autoencoder is completed, it will have the ability to generate the symbol-wise optimal constellation scheme to ensure the best SER performance. The training of the autoencoder is divided into two phases: neural-network-based channel training and transceiver training. During the neural-network-based channel training phase, we use a multilayer perceptron to emulate the UVLC channel response for constellations of QAM signals and connect the computation graph between the encoder and decoder for the gradient backpropagation. The transmission equation of the neural-network-based channel can be expressed as  
\[Y_{out}=W^{3T}relu(W^{(2)T}relu(W^{(1)T}X+b^{(1)})+b^{(2)})+b^{(3)}+noise \tag{1}\]  
where \(W^{(i)}\) and \(b^{(i)}\) represent the weight matrix and biases of the \(i-th\) layer, \(relu(\cdot)\) is the rectified linear unit (ReLU) [31], \(X\) is the input constellations of transmitted signals, and \(Y_{out}\) is the channel output constellations. In order to imitate the real time-varying UVLC channel, additive white Gaussian noise (AWGN) is added on the output constellation of the whole neural-network-based channel model. The loss function for training the channel model can be expressed as  
\[L=\left\|Y-Y_{out}\right\|^{2} \tag{2}\]  
where \(Y\) is the received constellations, and \(Y_{out}\) is the corresponding model output constellations. The constellations of Norm-8 QAM signals before and after passing through the real underwater visible-light channel are used as the input and labels for the channel model training to approximate the complicated channel effect. Figure 2: Schematic of the neural network structure of the autoencoder. During the transceiver training phase, the neural-network-based channel needs to be frozen to simulate the real channel. The randomly transmitted symbol \(m\in\{1,\ldots,M\}\) is transformed into an \(M\times 1\) one-hot vector, \(s_{in}\), where the \(m-th\) element is equal to 1.