Abstract The accurate identification of phase-coded radar waveforms is critical in electronic warfare (EW) systems, particularly with the increasing use of low probability of intercept (LPI) radars. However, current methods struggle to reliably recognize these waveforms at low signal-to-noise ratios (SNRs). To address this challenge, we propose an AI-based Global Context Vision Transformer (GC-ViT) model that leverages short-time Fourier transform (STFT) phase spectrum for feature extraction. The GC-ViT model enhances recognition accuracy by incorporating both local and global self-attention mechanisms, enabling more effective identification of phase-coded signals in noisy environments. Experimental results demonstrate that the proposed method achieves approximately 80\% recognition accuracy at an SNR of -12 dB, which significantly outperforms existing techniques. This advancement in radar waveform recognition enhances the situational awareness and decision-making capability of EW systems in complex electromagnetic environments.