U-TSS: a novel time series segmentation model based U-net applied to automatic detection of interference events in geomagnetic field data

Weifeng Shan, Meng Wang, Jinzhu Xia, Jun Chen, Qi Li, Lili Xing, Ruilei Zhang, Maofa Wang, Suqin Zhang, Xiuxia ZhangPeerJ Comput. Sci 2025

TL;DR

This paper introduces U-TSS, a novel U-Net-based deep learning model for precise time series segmentation. It's applied to automatically detect High-Voltage Direct Current (HVDC) interference events in geomagnetic field data, achieving superior performance over existing methods and reducing reliance on manual analysis.

What Problem Does This Paper Address?

The increasing volume of data from IoT devices, particularly time series data, presents challenges for traditional analysis methods due to complex patterns and long-term dependencies. In the realm of geomagnetic field observation, detecting interference events, such as those caused by HVDC transmission lines, is crucial for accurate seismic-magnetic relationship studies. Current methods rely heavily on manual inspection, which is time-consuming, labor-intensive, and prone to individual variability. This paper aims to automate this process by developing a precise time series segmentation model capable of identifying these interference events.

Methods

The core of this work is the U-TSS (U-net Time Series Segmentation) model. It's a sequence-to-sequence, fully convolutional network adapted from the U-Net architecture, originally designed for image segmentation. U-TSS processes one-dimensional time series data of arbitrary length. Its architecture consists of:

  • Contracting Path: This part acts as a feature extractor, progressively down-sampling the input time series using convolutional and max-pooling layers to capture temporal patterns.
  • Expanding Path: This path up-samples the feature maps, restoring the original resolution. Crucially, it uses skip connections to fuse high-level semantic features with low-level positional details, which is vital for precise segmentation.
  • Dense Segmentation Classifier: This final module assigns a label (HVDC event or background) to each time step, producing a dense output.

U-TSS employs one-dimensional convolutions to efficiently process time series data. It implicitly classifies each time point and then aggregates these classifications to identify segments of varying lengths. To further enhance performance, the Particle Swarm Optimization (PSO) algorithm was used to optimize the model's hyperparameters.

Datasets

The study utilized geomagnetic field observation data collected from the Geomagnetic Network Center of China, Institute of Geophysics, China Earthquake Administration. The data spans from January 1, 2014, to December 31, 2018.

A newly produced dataset for HVDC interference events was created for this research. This involved:

  1. Selecting HVDC interference events from manual logs.
  2. Filtering events with durations longer than 5 minutes.
  3. Merging events by station code, instrument code, and date.
  4. Reading corresponding raw Z-component geomagnetic data.
  5. Performing Z-score normalization on the data.
  6. Labeling each time point as either "HVDC" (1) or "BACKGROUND" (0).

This dataset consists of 9,255 samples from 126 observation stations, randomly shuffled and split into training (7,405 samples), validation (925 samples), and testing (925 samples) sets, following an 8:1:1 ratio.

Key Insights and Ideas

  • U-Net Adaptation for Time Series: The paper successfully demonstrates that the U-Net architecture, highly effective in 2D image segmentation, can be effectively adapted for 1D time series segmentation tasks, particularly for detecting subtle events.
  • Dense Segmentation for Precision: By assigning a label to every time step (dense labeling), U-TSS achieves a level of precision in event boundary detection that sliding window approaches struggle with, especially for events of variable duration.
  • Skip Connections are Key: The integration of skip connections in the U-Net architecture is highlighted as crucial for fusing contextual information from different scales, leading to more robust and accurate segmentation of complex temporal patterns.
  • PSO for Hyperparameter Tuning: Using PSO for hyperparameter optimization not only improved the model's performance but also accelerated its convergence, showcasing the benefits of meta-heuristic optimization for deep learning models in specialized domains.

Key Results

The U-TSS model achieved impressive results on the test set:

  • Accuracy: 95.54%
  • Precision: 88.65%
  • Recall: 76.07%
  • F1-score: 0.8188
  • AUC: 0.9637

These metrics significantly outperformed several state-of-the-art deep learning models (CNN, CNN-LSTM, TinySleepNet, U-Time, Encoder, FCN, Inception, ResNet) and traditional methods like the 1st-difference approach. For instance, the 1st-difference method achieved only 73.04% accuracy. The U-TSS model also demonstrated superior performance in accurately identifying the onset and termination of HVDC interference events, even in complex cases with varying durations and amplitudes.

Limitations and Future Work

The authors acknowledge that the U-TSS model still has room for improvement, specifically:

  • Recall: The recall rate needs to be further enhanced.
  • Network Optimization: Future work could explore optimizing the network structure, potentially by incorporating LSTM or attention mechanisms to further improve performance.
  • Concurrent Events: In practical applications, the simultaneous occurrence of subway, light rail, and HVDC interference events could reduce the model's accuracy.

The authors plan to extend the application of U-TSS to detect other types of interference events, such as those caused by subways and vehicles.

Summary updated

Abstract

With the rapid advancement of Internet of Things (IoT) technology, the volume of sensor data collection has increased significantly. These data are typically presented in the form of time series, gradually becoming a crucial component of big data. Traditional time series analysis methods struggle with complex patterns and long-term dependencies, whereas deep learning technologies offer new solutions. This study introduces the U-TSS, a U-net-based sequence-to-sequence fully convolutional network, specifically designed for one-dimensional time series segmentation tasks. U-TSS maps input sequences of arbitrary length to corresponding sequences of class labels across different temporal scales. This is achieved by implicitly classifying each individual time point in the input time series and then aggregating these classifications over varying intervals to form the final prediction. This enables precise segmentation at each time step, ensuring both global sequence awareness and accurate classification of complex time series data. We applied U-TSS to geomagnetic field observation data for the detection of high-voltage direct current (HVDC) interference events. In experiments, U-TSS achieved superior performance in detecting HVDC interference events, with accuracies of 99.42%, 94.61%, and 95.54% on the training, validation, and test sets, respectively, outperforming state-of-the-art models in accuracy, precision, recall, F1-score, and AUC. Our code can be accessed openly in the GitHub repository at https://github.com/wangmengyu1/U-TSS.
BibTeX
@inproceedings{shan2025u,
  author = {Weifeng Shan and Meng Wang and Jinzhu Xia and Jun Chen and Qi Li and Lili Xing and Ruilei Zhang and Maofa Wang and Suqin Zhang and Xiuxia Zhang},
  title = {{U-TSS: a novel time series segmentation model based U-net applied to automatic detection of interference events in geomagnetic field data}},
  booktitle = {PeerJ Comput. Sci},
  year = {2025},
  url = {https://openreview.net/forum?id=jBr41o2Iwt},
}
Figure