# Machine-Learning-Based Optimization for Multiple-IRS-Aided Communication System
## 5 Simulation Results
### Complexity Analysis  
As in our work, one of the most motivating reasons for incorporating ML models into IRS-aided systems is their major advantage of reducing the run time complexity. In this section, we evaluate the time complexity of adapting the proposed algorithms compared to the considered benchmark schemes.  
Table 3 compares the average prediction run time for different schemes by considering different SINR thresholds in the static UE scenario. The average prediction run time is calculated from the online implementation of the algorithms to predict the beamforming and averaged through 200 random initializations. As shown in Table 3, under the static UE case, the average prediction run time for the proposed DDPG-based algorithm is far less than for the other three schemes. This is because it does not need to solve any sub-optimization problems, as in the case of alternative-based approaches, and its structure does not depend on the size of a data set, as in the case of the GRNN-based algorithm. The second-best algorithm from the perspective of complexity is the proposed GRNN  
Figure 12: Optimized total transmit power versus SINR threshold under different schemes.  
Figure 13: Optimized transmit power versus the number of reflection units for each IRS under different schemes.  
-based algorithm. For the proposed GRNN-based algorithm, the network structure and the intermediate neuron units are affected by the data set size, as described in the data processing stage of the algorithm. Regarding the AO algorithm and AO heuristic methods, they are required to solve many sub-problems alternatively until convergence is reached. Theoretically, it can be computed that the complexity of the alternating-based algorithms is \(\mathcal{O}(2*I_{t})\), where \(I_{t}\) is the number of converged iterations. For example, at 10 dB, the AO approach requires, on average, solving ten sub-optimization problems to converge within an equivalent of five iterations. Furthermore, applying the proposed AO heuristic, which starts the AO method with initial near-optimal phases rather than random ones and may be far from optimal solutions, drops the number of convergent iterations to, on average, two iterations. In conclusion, the DDPG-based algorithm performs better than other schemes in online implementation, but it still needs adequate offline training.  
Table 4 shows the average prediction run time for different schemes by considering the SINR threshold of 0 dB and different numbers of reflected elements per IRS in the dynamic UE scenario. Table 4 shows that the average prediction time increases for alternating-based approaches as the number of reflecting elements increases. This is due to the fact that alternating approaches solve the passive beamforming in the joint beamforming by solving the SDR sub-problem \((P3)\), which is directly sensitive to the number of reflecting elements as it increases. Table 4 also demonstrates that our proposed DDPG-based algorithm has the lowest complexity, e.g., around 0.01 s. This is because of the number of hidden layers in the proposed DDPG-based algorithm that are designed to fit different deployed elements and thus remain unchanged as the applied \(N\) per IRS grows. Moreover, as the number of reflecting elements rises, the number of sub-problems solved for alternating approaches increases. This comes from the fact that many iterations may be needed for convergence until finding suboptimal solutions to the beamforming, while the DDPG-based algorithm remains unchanged, without the need to solve any sub-optimization problems. For example, at \(N=10\) elements, the AO approach consumes an average of 8.5039 s, while, at \(N=20\) elements, it consumes an average of 19.8383 s, with the equivalent of solving, on average, eight sub-problems. In comparison, the time consumed by the proposed DDPG-based approach is still around 0.01 s, which reflects the effectiveness of the proposed DDPG-based algorithm in the implementation time.