## 3 Methods
### Attention TFBS(AttTFBS)
#### 3.1.1 Attention-Based LSTM Module  
The attLSTM module consisted of an input layer, LSTM layer, and attention layer. The input layer was used to receive time-series SAR image tiles and convert them into the data format required by the LSTM layer. The LSTM layer was used to extract the deep temporal features contained in the time-series SAR data. The attention layer employed the attention mechanism to screen a large number of temporal features obtained by the LSTM layer such that the model can focus on features with high importance. The shape of the data fed into the input layer is [_bs_, 18, 128, 128], which represents the batch size, channels, width, and height. Then, the shape of the input data is converted to [_bs_\(\times\) 128 \(\times\) 128, 9, 2], which corresponds to the number of pixels of the input image tiles, sequence length (also known as time steps), and number of features of each pixel (VV and VH). The LSTM layer consisted of 64 LSTM units, each of which included nine time steps; each time step corresponded to the backscatter coefficient values of the SAR image for a 24-day time period. The shape of the data fed to each LSTM unit was [2; 9]; each time step of the LSTM unit produced a hidden-state value. Thus, the 64 LSTM units produced a hidden state matrix with a shape of [_bs_\(\times\) 128 \(\times\) 128, 9, 64], which indicates that the number  
Figure 4: Architecture of the attTFBS model. of features in each time period increased from 2 to 64. The specific formulas for each time step (also known as a cell) of the LSTM unit were as follows:  
\[f_{t}=\sigma\Big{(}W_{f}\cdot[h_{t-1},x_{t}]+b_{f}\Big{)}, \tag{1}\]  
\[i_{t}=\sigma(W_{t}\cdot[h_{t-1},x_{t}]+b_{t}), \tag{2}\]  
\[C_{t}^{\prime}=\tanh(W_{C^{\prime}}\cdot[h_{t-1},x_{t}]+b_{C^{\prime}}), \tag{3}\]  
\[C_{t}=f_{t}\cdot C_{t-1}+i_{t}\cdot C_{t}^{\prime}, \tag{4}\]  
\[o_{t}=\sigma(W_{o}\cdot[h_{t-1},x_{t}]+b_{o}), \tag{5}\]  
\[h_{t}=o_{t}\cdot\tanh(C_{t}), \tag{6}\]  
where \(\sigma(\cdot)\) and \(\tanh(\cdot)\) are sigmoid and \(\tanh\) functions, respectively; \(f_{t}\),\(i_{t}\), and \(o_{t}\) are the forget gate, input gate, and output gate, respectively (all determined by the hidden state of the previous time step \(h_{t-1}\) and current input \(x_{t}\)); \(f_{t}\) determines how much of the cell state input from the previous time step, \(C_{t-1}\), is retained in the current state \(C_{t}\); \(C_{t}^{\prime}\) is a candidate state that can be added to the current state \(C_{t}\) and is also determined by the old hidden state \(h_{t-1}\) and current input \(x_{t}\); and \(i_{t}\) determines how much of the candidate state \(C_{t}^{\prime}\) will be input into the current state \(C_{t}\). Thus, the current state \(C_{t}\) can be calculated by adding the retained old-cell state to the input candidate state (Equation (4)). Finally, \(o_{t}\) determines how much of the current state \(C_{t}\) will be output to the new hidden state of the current time steps (Equation (5)). Here, \(W_{f}\), \(W_{i}\), \(W_{C^{\prime}}\), \(W_{o}\), \(b_{f}\), \(b_{i}\), \(b_{C^{\prime}}\) and \(b_{o}\) are the learnable weights and biases of the LSTM layer, respectively. Through the three well-designed gate structures, the LSTM network can mine deep-seated temporal features from raw time-series data and largely avoid the gradient explosion and gradient disappearance faced by the vanilla RNN. After the original time-series SAR data flowed through the LSTM network, the number of features was increased from 2 (VV and VH) to 64; a total of 576 features were obtained in nine periods. Considering that the importance of the features of each period for rice classification is different, an attention layer was employed subsequent to the LSTM layer to determine the weight of the features of each period. Weighted summation was used to obtain a comprehensive feature based on the features of the nine periods. Thus, the shape of the output data in the attention layer was [\(b\)\(\times\) 128 \(\times\) 128, 64].