# A Transformer-Based Channel Estimation Method for OTFS Systems
## 4 Performance Evaluation
### Computational Complexity  
Space and time are two important metrics for evaluating the computational complexity of a DL model. In this paper, the quantity of parameters is chosen as the space evaluation metric, and the quantity of floating-point operations (FLOPs) is selected for the time aspect. As the number of parameters in a model increase, it necessitates a larger amount of data to effectively train the model. However, this can lead to a higher risk of overfitting, where the model becomes overly specialized to the training data. Additionally, excessive time complexity can significantly prolong the training and prediction processes. The quantity of parameters refers to how many parameters the model contains and directly ascertains the size of the model. Usually, the parametric quantities of a model are analyzed to determine the memory usage of a computer. Assuming that the DL models contain multiple hidden layers, the formula for calculating the quantity of parameters for DNN, RNN, LSTM, and Transformer can be written respectively as  
\[Q_{DNN}=n_{h}^{1}\times n_{i}+n_{h}^{1}+\sum_{i=2}^{I}\left(n_{h}^{i-1}\times n _{h}^{i}+n_{h}^{i}\right)+n_{h}^{I}\times n_{o}+n_{o} \tag{21}\]  
\[Q_{RNN}=\left(n_{h}^{1}+n_{i}\right)\times n_{h}^{1}+n_{h}^{1}+\sum_{i=2}^{I} \left[\left(n_{h}^{i-1}+n_{h}^{i}\right)\times n_{h}^{i}+n_{h}^{i}\right]+n_{h }^{I}\times n_{o}+n_{o} \tag{22}\]  
\[Q_{LSTM}=\left[\left(n_{h}^{1}+n_{i}\right)\times n_{h}^{1}+n_{h}^{1}\right] \times 4+4\times\sum_{i=2}^{I}\left[\left(n_{h}^{i-1}+n_{h}^{i}\right)\times n _{h}^{i}+n_{h}^{i}\right]+n_{h}^{I}\times n_{o}+n_{o} \tag{23}\]  
where \(I\) denotes the number of hidden layers, and \(n_{i},n_{o},n_{h}^{1},n_{h}^{i}\) represent the number of neurons in the input layer, the output layer, the first hidden layer, and the \(i\)-th hidden layer, respectively. The Transformer estimation model constructed in Section 3.1 is then analyzed for spatial complexity. First, a matrix transformation in a fully connected layer that does not contain activation operations can be written as  
\[R_{o}=T_{i}W+B \tag{24}\]  
Figure 8: BER performance curves between different algorithms. where \(R_{o}\in^{S\times O}\), \(T_{i}\in^{S\times I}\) denotes the output and the input of the network at that layer, respectively. \(W\) represents the weighting matrix, and \(B\) represents the bias matrix. Then, the number of parameters for a fully connected layer can be written as  
\[Q=(I+S)\times O \tag{25}\]  
The quantity of FLOPs can be understood as the amount of computation, which is used to measure the complexity of the model time. Individual FLOPs generally refer to a single addition, subtraction, multiplication, or division operation. In neural networks, since the number of operations of the activation function is very small, it is not considered in FLOPs. Assuming that the DL models contain multiple hidden layers, the formula for calculating the quantity of FLOPs for DNN, RNN, LSTM, and Transformer can be written, respectively, as  
\[F_{DNN}=2n_{i}\times n_{h}^{1}+\sum_{i=2}^{I}\left(2n_{h}^{I-1}\times n_{h}^{I }\right)+2n_{h}^{I}\times n_{o} \tag{26}\]  
\[F_{RNN}=\left(\left(n_{i}+n_{h}^{1}\right)\times n_{h}^{1}\right)\times 2+2 \times\sum_{i=2}^{I}\left[\left(n_{h}^{I-1}+n_{h}^{I}\right)\times n_{h}^{I} \right]+2n_{h}^{I}\times n_{o} \tag{27}\]  
\[F_{LSTM}=\left(\left(n_{i}+n_{h}^{1}\right)\times n_{h}^{1}\right)\times 2 \times 4+4\times 2\times\sum_{i=2}^{I}\left[\left(n_{h}^{I-1}+n_{h}^{I} \right)\times n_{h}^{I}\right]+2n_{h}^{I}\times n_{o} \tag{28}\]  
The number of FLOPs for a fully connected layer in the Transformer estimation model can be written as  
\[F=S\times 2 IO \tag{29}\]  
where the significance of each parameter is consistent with the space complexity analysis, so we do not explain it in detail. Table 2 shows the complexity analysis of different neural network models.