## 2 Materials and Methods
### CNN Architecture for P-Wave Detection  
This study uses a convolutional neural network model to process seismic data. In contrast to traditional methods that require complex preprocessing steps, our approach allows direct analysis of raw seismic signals, uncovering hidden patterns in crustal oscillations. This capability enables the model to differentiate between longitudinal (P) and transverse (S) waves and analyze their propagation times [8]. The architecture of the proposed CNN-based approach is illustrated in Figure 5.  
Seismic waveform data are recorded in three components and retrieved from the IRIS database. In the first stage of seismic data processing, the waveform information is extracted from *_mseed_ files using the ObsPy and pyweed libraries [37]. From the retrieved data, the signal amplitudes are extracted and subsequently processed. The time series is then segmented into fixed-length intervals, allowing the neural network to analyze each segment individually, thereby improving the detection of seismic events. The CNN model architecture used in this study is presented in Figure 6.  
Figure 4: A diagram illustrating the number of seismic events before and after filtering. From the extracted seismic data, the signal amplitudes are isolated and subsequently normalized to eliminate differences in scale and enhance the stability of the model. Scaling the data reduces the influence of amplitude variations, thereby improving the model performance. Normalized data are used to construct the input array for the neural network. Following preprocessing, data integrity checks are performed. The extraction and normalization process is repeated if one or more criteria are not met (e.g., missing values or invalid data entries). Once all conditions are satisfied, the data are divided into two groups: Preprocessed input data array and corresponding class labels. After completion of the preprocessing stage, the data (local_data and local_labels) undergo further analysis utilizing parallel computing techniques. A thread pool executor was implemented to optimize computational efficiency, enabling the simultaneous processing of multiple MiniSEED (*.mseed) files (Figure 7). Each file is loaded and processed in a separate thread, significantly reducing execution time. Figure 5: The data processing system structure for seismic activity detection is based on convolutional neural networks (CNNs). Figure 6: Block diagram of the data preprocessing algorithm. The processed data are aggregated into a unified NumPy array, which is then divided into two subsets: the training set (82%) and the validation set (18%). This ratio is a standard practice in machine learning, as it ensures a sufficient volume of data for model training while also allowing for an objective evaluation of model performance on an independent dataset. We conducted a series of experiments, which allowed us to determine the optimal hyperparameter values for our task. This approach led to the best results in terms of P-wave detection accuracy. The structure of the proposed convolutional neural network is presented in Figure 8 and Table 1, while the model hyperparameters are listed in Table 2. The model consists of a sequence of four convolutional layers (Conv1D), each performing a one-dimensional convolution along the temporal axis of the input data. Each convolutional layer employs the ReLU activation function, effectively extracting non-linear features from seismic waveforms. Each convolutional layer in the proposed model contains kernels of equal size. As a result, input features are progressively filtered, enabling the extraction of increasingly complex representations from seismic waveforms. Each convolutional layer is followed by a subsampling operation (MaxPooling1D) with a window size of 2 to reduce dimensionality and suppress noise. Dropout layers are incorporated after the second and fourth convolutional layers to mitigate overfitting, with dropout rates of 0.5 and 0.4, respectively.