# Advanced Security Framework for 6G Networks: Integrating Deep Learning and Physical Layer Security
## 3 Results and Discussion  
The performance of different models (ML, hybrid, and non-ML) under various conditions of no attack, spoofing attack, eavesdropping attack, and jamming attack is evaluated in terms of BER and accuracy. In the absence of attacks, the BER decreases as the SNR increases for all models, as shown in Figure 2e. The ML-based models for both Alice and Bob show the lowest BER, demonstrating their effectiveness in decoding signals under normal conditions. The hybrid models also perform well, closely following the ML models. Non-ML models have the highest BER, indicating their relative ineffectiveness in error correction compared to ML and hybrid models. For instance, at an SNR of 20 dB, the ML models achieve a BER of less than 0.05, whereas the non-ML models have a BER of around 0.3, reflecting a performance difference of approximately 85%. Under spoofing attacks, the BER trends are similar to the no-attack scenario, as shown in Figure 2d. However, the overall BER values are higher, reflecting the impact of the spoofing attack. The ML and hybrid models still outperform the non-ML models, but the effectiveness of the ML model is slightly reduced due to the attack interference. Specifically, at 20 dB SNR, the ML models' BER is about 0.1, while the non-ML models' BER is around 0.35, indicating that the ML models' BER is about 71% lower than that of the non-ML models. Eavesdropping attacks increase the BER across all models, but ML and hybrid models maintain better performance, as shown in Figure 2c. The non-ML models show a significant rise in BER, highlighting their vulnerability to such attacks. At an SNR of 20 dB, the BER for ML models is approximately 0.15, while for non-ML models, it is around 0.4, suggesting that the ML models have a 63% lower BER compared to non-ML models under eavesdropping attacks. Jamming attacks result in the highest BER among all attack scenarios, as shown in Figure 2b. The ML and hybrid models show resilience to some extent, but their performance is still affected. The non-ML models exhibit the worst performance under jamming conditions. For example, at 20 dB SNR, the ML models' BER is around 0.2, whereas the non-ML models' BER is close to 0.5, indicating that the ML models' BER is 60% lower than that of the non-ML models. Without attacks, the accuracy increases with SNR. The ML models for both Alice and Bob achieve near-perfect accuracy at higher SNR levels, as shown in Figure 2e. Hybrid models also perform well, while non-ML models lag, demonstrating their limitations in achieving high accuracy. At an SNR of 20 dB, ML models achieve an accuracy of over 99%, whereas non-ML models achieve around 80%. Under spoofing attacks, the accuracy decreases compared to the no-attack scenario, attributed to the injected false signals, which disrupt the legitimate signal patterns and make it harder for the models to correctly identify the legitimate data. ML and hybrid models still outperform non-ML models, though the accuracy improvement is less pronounced due to the attack interference, as shown in Figure 2h. At 20 dB SNR, the ML models achieve an accuracy of approximately 95%, while non-ML models achieve around 75%. Eavesdropping attacks lead to a significant drop in accuracy across all models because of the introduction of the random bit flips into the signal, complicating the models' ability to accurately decode the original message, as shown in Figure 2g. The ML and hybrid models manage to retain relatively higher accuracy, but the performance gap with non-ML models widens, emphasising the robustness of ML and hybrid models. At 20 dB SNR, the accuracy for ML models is about 90%, while for non-ML models, it is around 70%. Jamming attacks cause the most significant decrease in accuracy because of the substantial interference in the communication channel, as shown in Figure 2f. Despite this, the ML and hybrid models show better resilience compared to non-ML models, though all models are impacted by the high interference.