# Recurrent Deep Learning for Beam Pattern Synthesis in Optimized Antenna Arrays
## 2 Problem Formulation
### Deep Neural Network Modeling  
To address the challenge of predicting amplitudes and phases from pre-optimized radiation patterns, we situated the problem within the framework of supervised learning, conceptualizing it as a predictive task due to the continuous nature of the provided amplitudes and phases. Unlike classification tasks that deal with discrete values, regression--a subtype of supervised learning--is adept at handling continuous labels. In regression, the objective is to learn a mapping from input features to continuous output values, enabling the model to predict numerical quantities based on input data. To address this regression problem, we explored the utilization of three widely recognized neural network architectures: fully connected neural networks (FCNNs), convolutional neural networks (CNNs), and long short-term memory networks (LSTMs). Each architecture offers unique capabilities suited to different types of data and tasks, facilitating the learning of intricate relationships between the input features extracted from radiation patterns and the continuous output labels of amplitudes and phases. In a densely connected neural network or FCNN, each neuron within a layer is coupled to every neuron in the following layer, facilitating the flow of information from the input layer to the output layer as it sequentially traverses each intermediate layer. In each layer, the network calculates a weighted sum of the inputs and their associated weights, incorporating non-linear activation functions to introduce complexity and enable the model to capture intricate patterns in the data. This iterative process continues until the information reaches the output layer, where the network generates its prediction based on the learned relationships encoded in the network's parameters. The fully connected architecture offers versatility and can effectively learn complex mappings between inputs and outputs, making it well-suited for a variety of tasks in machine learning and deep learning domains [25]. A convolutional neural network (CNN) typically comprises convolutional, pooling, and fully connected layers. Convolutional layers are crucial in performing cross-correlation operations, acting as feature extractors. Pooling layers down-sample and reduce the dimension of the network's features, often through performing max-pooling operations. While leading to some information loss, these layers mitigate the risk of over-fitting, enhance efficiency, and reduce complexity. In a CNN, there is a sequential arrangement of convolutional and pooling layers; however, we do not report the pooling layers for this task, as they did not improve the employed CNN. The fully connected layers generate the output, which predicts the labels using the features extracted by the preceding layers [26]. Typically, CNNs are used on two-dimensional signals (2D-CNN); however, in this study, we used one-dimensional signals due to the nature of the radiation patterns (1D-CNN). A long short-term memory (LSTM) is a recurrent neural network (RNN) architecture designed to handle long-term sequential data and dependencies. LSTMs improve the limitations of conventional RNNs by adding memory cells that are capable of retaining information over extended periods. These architectures comprise memory cells with input, output, and forget gates. The memory cells store and update information, while the gates regulate the flow of information within the network; in particular, the input gate controls the information entering the memory cells, the forget gate determines which information to discard, and the output gate decides which information to output from the memory cells [27]. Figure 1 illustrates the three deep neural network architectures devised for predicting amplitude and phase in radiation patterns. These offer great flexibility and their usefulness and reliability across various problems have been demonstrated over the decades.