## 3 Motivation for Using LSTM Network to Design the CMM  
The objective of this paper is to design the beamforming matrix in a sequential manner. Specifically, we aim to optimize the CMM \(\mathbf{\Phi}\) at each time sample \(t=1,2,\cdots,T\) in an adaptive manner such that the CMM \(\mathbf{\Phi}\) at time sample \(t+1\) can be regarded as a function of all prior observations, denoted by \(\mathbf{y}(1:t)\) and \(\mathbf{\Phi}(1:t)\), i.e.,  
Figure 2: Block diagram of a compressive sampling antenna array [18]. \[\mathbf{\Phi}(t+1)=\mathcal{F}(\mathbf{y}(1:t),\mathbf{\Phi}(1:t)), \tag{9}\]  
where \(\mathcal{F}\) is a function that is exploited to map the past observations and past CMMs to design the next CMM. However, the dimension of the past observations increases as the time index increases, rendering it impractical to optimize the CMM \(\mathbf{\Phi}\) using all prior observations. Therefore, a significant challenge of this sequential optimization process is to summarize all of the historical observations. In [34], instead of using all past observations, the posterior distribution of signal DOA at time \(t\) is considered a sufficient statistic to design the CMM \(\mathbf{\Phi}\) at time \(t+1\). However, this approach may be prone to robustness issues. For instance, if the posterior \(p(\theta_{k})\) for a signal containing the angular bin \(\theta_{k}\) becomes small due to an estimation error during any time iteration, the error will propagate through the time iteration, resulting in inaccurate DOA estimation. Furthermore, in each time instant, it involves performing analog beamforming and spectrum estimation, which are computationally expensive, particularly for a large number of iterations. In addition, the paper uses a fully connected neural network, which does not well exploit the temporal correlation of the received data. To address this issue, we propose an LSTM framework that can provide a tractable solution. LSTM is a type of recurrent neural network that can retain information over time in a variable known as the cell state. Moreover, to maintain the scalability of prior observation, LSTM incorporates a gate mechanism that controls which information to be discarded and which to be incorporated into the cell state, retaining only the relevant information from historical observations that are necessary for the given task. Figure 3 illustrates a unit of the proposed LSTM framework at time \(t\). At this time instant, the input to the deep learning unit comprises the current compressed measurement \(\mathbf{y}_{t}\) and the cell and hidden states from the previous time samples, denoted as \(\mathbf{c}_{t-1}\) and \(\mathbf{h}_{t-1}\), respectively. The LSTM unit has four gates, namely the forget gate (\(f_{t}\)), input gate (\(i_{t}\)), cell gate (\(g_{t}\)), and output gate (\(o_{t}\)), which respectively perform the following operations:  
* Forget gate (\(f_{t}\)): This gate combines the current input \(\mathbf{y}(t)\) and the previous hidden state \(\mathbf{h}(t-1)\) to decide which information to forget and which to remember from previous cell state. The operation is given by \[f_{t}=\sigma\bigg{(}\mathbf{W}_{f}\Big{[}\mathbf{y}^{\mathrm{T}}(t)\ \mathbf{h}^{\mathrm{T}}(t-1)\Big{]}^{\mathrm{T}}\bigg{)},\] (10) where \(\sigma(\cdot)\) denotes the sigmoid function, and \(\mathbf{W}_{f}\) is a weight matrix corresponding to the forget gate. * Input gate (\(i_{t}\)): This gate combines the current input \(\mathbf{y}(t)\) and the previous hidden state \(\mathbf{h}(t-1)\) to decide which information to store in the cell state. The operation is given by \[i_{t}=\sigma\bigg{(}\mathbf{W}_{i}\Big{[}\mathbf{y}^{\mathrm{T}}(t)\ \mathbf{h}^{\mathrm{T}}(t-1)\Big{]}^{\mathrm{T}}\bigg{)},\] (11) where \(\mathbf{W}_{i}\) is a weight matrix corresponding to the input gate. * Cell gate (\(g_{t}\)): This gate combines the current input \(\mathbf{y}(t)\) and the previous hidden state \(\mathbf{h}(t-1)\) to compute the actual representation that will go into the cell state.