{'fraction_non_alphanumeric': 0.03462603878116344, 'fraction_numerical': 0.022622345337026777, 'mean_word_length': 5.036211699164346, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Real‐Time Earthquake Detection and Magnitude Estimation Using Vision Transformer

We design a fully automated system for real‐time magnitude estimation based on a vision transformer (ViT) network. ViT is an attention mechanisms, which guides the proposed network to extract the significant features from the input seismic data, leading to robust magnitude estimation performance. We propose to design two separate ViT networks, that is, one for picking the P‐wave arrival time and the other for predicting the earthquake magnitude using a single station. For real‐time application, we pick the P‐wave arrival times and consider them as the reference, based on which the non‐normalized 30‐s (i.e., 1 s before and 29 s after the reference time) three‐component seismograms are used to predict the magnitudes of the corresponding earthquakes. The ViT picking network is first trained and tested using the STanford EArthquake Data set (STEAD) and shows robust picking performance, achieving an average picking error of less than 0.2 s compared to the manual picks. Then, the ViT magnitude estimation network is evaluated using several data sets, including those from California, STEAD repository, and Texas. The ViT demonstrates robust magnitude estimation performance in all these test cases as compared with the benchmark methods. For magnitude estimation, the mean absolute error (MAE) and the standard deviation error (σ) for the testing set of the STEAD data set are 0.112 and 0.164 (as compared with 0.141 and 0.219 for the state‐of‐the‐art MagNet method), respectively. The MAE and σ for the California testing set are 0.079 and 0.120 (as compared with 0.089 and 0.138 for the Magnet method), respectively. As a case study, the new ViT networks are applied to the 24‐hr continuous seismic data of the TexNet‐PB05 station recorded on September 20th. The network successfully picks all the events in the TexNet catalog with a small (<=0.42) magnitude error. The ViT network shows promising magnitude prediction results when tested with 4‐s long seismograms. This highlights its potential in the earthquake early warning (EEW) system for fast and reliable decisions.