## 1 Introduction  
Natural phenomena such as earthquakes significantly threaten populations, infrastructure, and ecosystems. Although such events cannot be prevented, various strategies can be implemented to mitigate their impact. These include the deployment of early warning seismic stations and advanced data analysis technologies [1]. In this context, early warning systems (EWSs) have become increasingly relevant to minimize damage and ensure public safety [2]. One of the critical components of such systems is the detection of primary (P) waves, which are the first seismic waves to reach the Earth's surface following an earthquake. Although P waves are less destructive than subsequent secondary (S) waves, their identification is crucial for early warning applications. Detecting P waves enables the prediction of incoming, more dangerous seismic waves, facilitating the timely initiation of evacuation procedures and other protective measures, thus reducing the potential for casualties and structural damage [3]. Accurately determining the timing and location of a seismic wave epicenter is a fundamental aspect of research in this field. One of the significant challenges in seismic wave detection is the low amplitude of ground motion combined with a high noise level. Traditional methods for identifying seismic waves require automation to improve efficiency and reliability. Advancements in high-speed technologies have enabled the collection of seismic data at an unprecedented rate. However, processing such data requires highly efficient analytical methods that minimize errors while maintaining precision. To address these challenges, the field of seismology demands the development of robust and precise automated techniques capable of enhancing the efficiency of data processing and improving the reliability of seismic event detection. One of the classic methods for the detection and identification of seismic waves is the short-term average/long-term average (STA/LTA) algorithm [4]. However, STA/LTA has inherent limitations; improper selection of initial parameters can lead to inaccurate results. Additionally, under noisy conditions, this algorithm may generate false detections of seismic waves or fail to identify them altogether. Another widely referenced approach for P-wave detection is the Akaike information criterion (AIC) [5]. Despite its utility, this method also has significant drawbacks. One of its main limitations is the inaccurate estimation of the global minimum in the presence of high noise levels, which reduces its reliability in real-world applications. Long-term memory (LSTM) networks are introduced to model the differences between P waves and background noise. Furthermore, the front end of the network often incorporates a short-time Fourier transform (STFT) to preserve implicit information while reducing computational load. However, studies indicate that the accuracy of deep neural networks using the LSTM-STFT approach declines when the amplitude of the P-wave is low and background noise levels are high [6]. Early studies in seismology focused primarily on classical methods for determining the location and magnitude of the earthquake. For instance, in [7], fundamental principles of seismic wave registration and processing were examined to facilitate the estimation of earthquake parameters. In [8], algorithms for automatically detecting P and S waves were proposed, significantly improving the accuracy of time-based measurements. Similarly, in [9], a methodology was developed to analyze the time delays between P and S waves was developed to enhance the accuracy of epicenter localization. These advancements laid the foundation for modern seismic monitoring techniques, paving the way for further improvements by integrating deep learning-based approaches. The analysis and development of P-wave detection algorithms are crucial research areas in earthquake early warning systems (EEWSs). In their review study, [PERSON] et al.