## 2 Principle  
### Overview of the Autoencoder-Based Geometric Shaping Model  
The real underwater visible-light communication system design adopts a modular approach, and the entire communication system consists of multiple sub-modules, including source coding, channel coding, modulation, channel estimation, and channel equalization. Every model has to be as realistic as possible for an optimal performance. However, the traditional GS methods used in UVLC are based on a series of ideal model blocks, each of which is built based on a prior mathematical theory. This means the traditional GS methods can only work with ideal and static systems, and they cannot be optimal solutions for real UVLC systems. Using deep learning and autoencoder techniques, we can employ a neural network to model the entire visible-light communication system and use an autoencoder to automatically generate an initial shaping scheme to guarantee the best SER performance. In order to further ensure the optimal BER performance, a revised pairwise optimization (RPO) algorithm can be used to find the best bit representation for each constellation point to obtain a globally optimal shaping scheme. The principle of the autoencoder-based geometric shaping model (AEGSM) using end-to-end learning is shown in Figure 1.  
As shown in Figure 1, the autoencoder-based geometric shaping model framework consists of three main modules, namely symbol-wise optimization, bit-wise optimization, and the UVLC test. The symbol-wise optimization module is divided into three steps: collecting symbol data, training the channel model, and training the autoencoder. In the first step, the data to be sent are first mapped by the Norm-8 QAM to obtain the original constellation, and after up-sampling, IQ separation, and CAP modulation, it is sent to the arbitrary waveform generator to obtain the transmitted signal. At the receiving end, the signal passing through the actual underwater visible-light channel is subjected to corresponding CAP demodulation, down-sampling, and post-equalization processing to obtain the distorted constellation. After the distorted constellation is mapped to a symbol for performance testing, it is sent to the second step as the label of the channel model training, and the corresponding input is the original constellation obtained in the first step. In the stage of training the self-encoder, the channel model trained by the second step is embedded between the encoder and the decoder, and the weights are frozen to simulate the real underwater optical channel. The autoencoder performs unsupervised learning to find the optimal constellation distribution scheme at the symbol-wise level. In the bit-wiseoptimization module, the constellation distribution generated by the autoencoder is paired with the optimal bit representation under the optimization objective of the RPO algorithm. In the final step, the UVLC test module, the data to be sent are mapped by the AE-8 QAM and processed by corresponding DSP methods, including up-sampling, IQ separation, and CAP modulation. After DA conversion, the processed signal is then input into the actual underwater visible-light communication system. At the receiving end, the received signal is first subjected to AD conversion and sequentially undergoes CAP demodulation, down-sampling, post-equalization, and AE-8 QAM de-mapping for performance testing. Firstly, to train the channel model based on the neural network, the signal to be sent is modulated by norm QAM-CAP and transmitted in the real underwater visible-light system. Then, we collect the constellation signals of the transmitting end and receiving end to use as the input and labels of the channel training, respectively, and conduct channel training. Next, we embed the trained channel model weights into the autoencoder and freeze the channel model. The autoencoder then undergoes unsupervised learning to generate a symbol-wise optimal reshaping scheme.