Abstract:
Similar-earthquake waveform retrieval identifies historical events resembling a query and supports studies of repeating earthquakes, event-family structure, and regional seismicity. Cross-correlation measures waveform similarity pointwise, but its cost grows with archive size. General-purpose seismic models learn multiscale waveform representations through pretraining. We examine retrieval from frozen pretrained features and how readout affects performance.
Three-component records are linearly detrended, tapered, and normalized by component standard deviations, without further filtering. Event windows containing P and S phases are aligned to the P arrival. Frozen DiTingSFM-0.1B and EQTransformer yield temporal features from candidate hidden layers. Masked maximum pooling excludes padding positions from aggregation, and L2 normalization yields fixed-dimensional vectors. Cosine similarity ranks same-station historical records to return the Top-K candidates. Offline historical encoding and online retrieval enable reuse through nearest-neighbor indices.
In-domain tests use the Oklahoma2015 and Parkfield2015—2016 subsets of the Stanford Earthquake Dataset (STEAD), containing 3 095 and 1 742 records from 1 423 and 974 catalog events, respectively. At each station, origin-time ordering assigns the first 80% to the historical archive and the last 20% to queries. Reference similar records have horizontal epicentral distances within 5 km of the query and three-component normalized cross-correlation coefficients (NCC)of at least 0.8. Top-K recall is the fraction of queries with available references that retrieve at least one reference among the Top-K candidates. Candidate distances and waveform comparisons assess retrieval quality.
Retrieval depends on architecture and layer selection. DiTing layer3 (DT-L3) and the EQTransformer Encoder (EQT-Enc) perform well among their respective candidate layers. With fixed maximum pooling, Top-5 recalls in Oklahoma2015 and Parkfield2015–2016 are 0.919 and 0.922 for DT-L3 and 0.811 and 0.914 for EQT-Enc, above random baselines of 0.022 and 0.027. Mean horizontal epicentral distances to first-ranked candidates are 6.16 and 3.65 km for DT-L3, 9.42 and 5.60 km for EQT-Enc, and 22.78 and 18.71 km for random retrieval. Examples show consistent waveforms and nearby catalog locations. NCC-based calibration reveals model-dependent cosine-score distributions and indicates that vectors also reflect the similarity of waveform pairs judged similar by cross-correlation.
Cross-dataset tests use the 2021 Changning dense-array data from Sichuan. Initial quality control yields 5 558 events at 105 stations; temporal partitioning and event-window screening produce 93 558 historical records and 24 200 queries. Fixed maximum pooling gives Top-5 recall of 0.570 for DT-L3 and 0.648 for EQT-Enc, above the random baseline of 0.023. Together with the STEAD results, this confirms meaningful ranking by frozen features, while performance varies with data source and observation conditions. Fixed maximum pooling and an uncalibrated cosine space do not ensure cross-dataset consistency.
With encoders frozen, four readouts are compared: A, fixed maximum pooling; B, maximum pooling plus linear projection; C, attention aggregation plus linear projection; and D, attention aggregation alone. B−D use supervised contrastive loss to learn temporal weights or channel transformations. Training/validation contain 20 000/5 000 reference similar-waveform pairs from STEAD outside the Oklahoma and Parkfield test stations and regions. Source events and similar-event families are isolated between splits. None of the three test datasets is used for readout training or model selection.
Configuration C raises DT-L3 Top-5 recall to 1.000, 0.991, and 0.835 in Oklahoma, Parkfield, and Changning, and EQT-Enc recall to 0.892, 0.948, and 0.748. Attention aggregation alone gives no consistent gains, linking improvements to combined temporal aggregation, channel transformation, and supervision. Gains with unchanged encoders indicate retrievable similarity information in pretrained features. As a handcrafted reference, FAST retains its official fingerprint-encoding and hash-search core; its same-station event-window adaptation achieves 0.919, 0.983, and 0.847. DT-C exceeds FAST in the two STEAD regions but is slightly lower in Changning; EQT-C is slightly lower in all three regions. These results support the feasibility of pretrained-feature retrieval but do not represent FAST’s native continuous-stream detection performance ceiling. Future dedicated waveform embeddings will be compared under a unified protocol.
Nearest-neighbor indexing reduces online search costs. For 100 000 expanded vectors, single-CPU-thread HNSW returns Top-5 candidates in a median 0.236 ms, matching exact inner-product candidate sets for tested queries. Single-threaded ObsPy cross-correlation requires 2 073.74 ms against 4 800 real historical waveforms. With feature extraction included, queries against a 4 837-vector timing library from both datasets achieve median end-to-end latencies of 67.89 ms for DT-L3 and 10.23 ms for EQT-Enc, using fixed maximum pooling, RTX 3090 inference, and single-CPU-thread HNSW. These timings show query efficiency and representation reuse in this configuration. Offline encoding avoids repeated pairwise waveform correlation during online queries, supporting large-scale archive searches and similar-event retrieval as archives grow.
Frozen pretrained features provide initial representations for similar-waveform retrieval, improved through supervised readout adaptation. Recall, catalog distances, and waveform cases jointly demonstrate feasibility. NCC and catalog proximity define the evaluation references; physical source relationships require independent seismological constraints. Indexable, reusable, compact fixed-dimensional vectors support rapid historical matching and provide an experimental basis for dedicated similar-earthquake waveform embedding models.