# Adaptive Modem Based on LSTM-AutoEncoder with Vector Quantization
## 1 Introduction  
As 2019 becomes the first year of commercial 5G mobile network applications, and emerging technologies are progressively assimilated into a single international standard [1], wireless communication research is rapidly progressing in the direction described by the ITU Network 2030 Working Group [2] and is constantly evolving towards AI-driven and intelligent directions [3]. In modern communication systems, modulation and demodulation are crucial links, and efficient and stable modulation methods still maintain high value [4; 5; 6]. However, the continuous advancement of communication countermeasure technology has put forward higher and higher requirements for the rapid generation and switching of waveforms. Therefore, it is a very valuable task to study the fast and low resource consumption implementation of adaptive modulation and demodulation methods. Classic modulation and demodulation methods mainly rely on mathematical models designed by experts, such as QAM (Quadrature Amplitude Modulation) and PSK (Phase Shift Keying). These methods can only be used individually, and there is no unified architecture that can implement multiple modes. Adaptive coding and modulation [7] has played a historic role in solving this problem. By changing parameters to adapt to the channel environment, adaptive coding and modulation implements a variety of modulation and demodulation methods with different rates and orders and seeks to achieve an acceptable balance between communication reliability and effectiveness. However, traditional ACMhas gradually failed to meet the intelligence requirements of communication systems, and algorithms based on neural networks [8; 9; 10; 11; 12] have received more attention and research. Deep learning, as a powerful artificial intelligence technology, has achieved remarkable results in many fields, surpassing traditional methods such as image recognition and natural language processing. In recent years, researchers have also begun to explore the application of deep learning to the modulation and demodulation process of communication systems and have achieved the goal of using a unified architecture to implement multiple modulation methods under specific conditions. After testing, various models have shown advantages over traditional methods in some orders, such as achieving similar performance to 2 PSK [8; 9] and the same or better performance to 4 PSK [8; 10]. However, the cost of this versatility and adaptability is the consumption of a large amount of software and hardware resources. In practice, the calculation is complex and requires special hardware or DSP software to work. Finding a balance between system performance and resource consumption is crucial. This paper introduces a new deep learning framework for multi-order modulation and demodulation that seamlessly integrates the LSTM-AE model for anomaly detection with vector quantization technology to innovatively generate learned modulation signals while optimizing cost efficiency. This integrated optimization technology will play an increasingly important role in resource-constrained contexts such as military satellite communications. The main contributions of this paper are as follows:  
1. An adaptive modem based on LSTM-AE was developed. LSTM-AE was applied to communication modulation and demodulation and combined with vector quantization technology to achieve the purpose of lightweight adaptive modulation and demodulation. The loss function, optimization algorithm, and training method were given. Compared with other models, it achieved equal or better performance with a lower number of parameters and improved the model's ability to reconstruct representation. 2. Based on Pytorch, VQ-LSTM-AE was trained and tested, and the constellation diagram, symbol mapping relationship, and demodulation performance of second to thirty-second-order modems were given.