Skip to Content
SensorsSensors
  • Article
  • Open Access

31 December 2025

21 Pages

Adaptive Dynamic Thresholds for Unsupervised Joint Anomaly Detection and Trend Prediction

,
,
,
,
and
1
Beijing Institute of Control Engineering, Beijing 100190, China
2
School of Astronautics, Beihang University, Beijing 100191, China
3
College of Information Science and Technology, Beijing University of Chemical Technology, Beijing 100013, China
*
Author to whom correspondence should be addressed.
This article belongs to the Section Fault Diagnosis & Sensors

Abstract

Anomaly detection and degradation trend prediction are two pivotal tasks in system health management. However, most existing approaches treat them as independent problems and fail to exploit their intrinsic interdependence. In addition, the scarcity of labeled data in real-world scenarios limits the applicability of supervised learning methods. To address these challenges, we propose an adaptive thresholding strategy framework for unsupervised joint anomaly detection and trend prediction. Our framework introduces a self-adaptive threshold strategy from historical data distributions and dynamically updates them in response to evolving system behavior. The anomaly detection results are integrated to enhance degradation trend forecasting, while the predicted degradation trends, in turn, refine the anomaly thresholds through a feedback mechanism. Experiments on both public and real-world industrial datasets demonstrate that the proposed framework achieves superior detection accuracy, robust trend prediction, and high computational efficiency under diverse operational conditions.

1. Introduction

Ensuring the reliability and safety of complex engineering systems, such as aerospace propulsion, power generation, and energy infrastructures, requires effective health monitoring strategies. Early detection of abnormal behaviors and accurate prediction of degradation trends are two pivotal tasks in health management, as they enable timely recognition of system operating states, thereby preventing unexpected failures and reducing maintenance costs. However, the highly dynamic environments of such systems make robust health management a challenging task.
In many real-world applications, the operational states of complex engineering systems are continuously monitored, and the resulting data are typically recorded as multivariate time series, which exhibit several key characteristics shown in Figure 1: (1) Periodicity [1]: Due to environmental influences or operational schedules, time series data from industrial systems often exhibit strong periodic patterns. These may manifest as seasonality, driven by external environmental cycles (e.g., daily, weekly, or annual repetitions), or as operation-mode periodicity, where specific parameters consistently change in a predictable manner during certain tasks (e.g., ignition of satellite thrusters). (2) Non-stationarity [2]: System data are influenced by complex and varying factors, making them inherently non-stationary. The relationships among variables can evolve over time, challenging methods that rely on stationary assumptions. (3) Distribution drift [3]: Time-series data may exhibit gradual distributional shifts over time. Such changes can result from evolving operating conditions, environmental influences, and degradation. Consequently, models that assume fixed data distributions or static thresholds may fail to detect emerging anomalies or accurately capture degradation trends.
Figure 1. Periodicity, non-stationarity, and distributional drift in satellite telemetry data collected from onboard sensors.
Although several methods have employed adaptation techniques in anomaly detection models to address periodicity and distribution drift [4,5,6], the health management of complex systems continues to pose several key challenges: (1) Scarcity of labeled data [7]: In many real-world engineering systems, labeled data for degradation or failure events are often scarce or unavailable, making supervised learning approaches impractical. (2) Joint modeling of anomalies and degradation trends [8]: Anomalies and degradation trends are both crucial for health management and are inherently interrelated: short-term abnormal events can accelerate system degradation, while the underlying long-term degradation trend can influence the likelihood and severity of anomalies. Therefore, joint modeling of these two aspects is necessary for comprehensive and robust system monitoring. (3) Computational efficiency [9]: Health monitoring systems often generate large-scale, high-dimensional time-series data with stringent real-time requirements. Achieving high accuracy while maintaining computational efficiency remains a critical challenge for real-world health management applications.
To address these challenges, we propose a dynamic threshold framework for unsupervised joint anomaly detection and trend prediction. To tackle Challenge (1), we develop an adaptive thresholding method that generates thresholds from historical data, enabling unsupervised learning without relying on labeled anomalies. For Challenge (2), we investigate the interrelation between anomalies and degradation. Specifically, we design a degradation trend prediction method that leverages anomaly thresholding results, while simultaneously updating thresholds in response to the evolving degradation process. Regarding Challenge (3), the threshold-based method can significantly improve computational efficiency compared to heavy deep learning models, making it more suitable for real-time health management scenarios. Our main contributions can be summarized as follows:
  • We develop an adaptive thresholding strategy that derives thresholds from historical data distributions while explicitly accounting for key characteristics of complex system time series, such as periodicity, nonstationarity, and distribution drift.
  • We propose a unified framework that explicitly models the interactions between anomalies and degradation. Specifically, anomaly detection supports degradation trend prediction, while degradation modeling provides feedback to refine thresholds, enabling a mutually reinforcing loop for more robust health management.
  • Our proposed framework demonstrates strong performance in real-world applications, providing accurate early warnings and robust trend predictions under limited labeled data scenarios.

3. Methodology

This section introduces our proposed framework for unsupervised joint anomaly detection and trend prediction. As illustrated in Figure 2, our dynamic threshold-based framework consists of two primary components: (1) an adaptive thresholding module, and (2) a degradation trend prediction module.
Figure 2. Overview of the proposed framework. The approach consists of two primary components: a Degradation Trend Prediction module, which forecasts the future evolution of the system’s health based on statistical features and the constructed degradation index (DI); and a Threshold-based Anomaly Detection module, which incorporates historical observations and the predicted degradation trend to generate dynamic thresholds for anomaly identification. Raw telemetry data are segmented into operational cycles, after which dynamic thresholds are iteratively updated using anomaly outcomes and predicted trends. Cycle-level statistics form a degradation index (DI), whose future trajectory is forecasted and fed back into the next threshold update.
The adaptive thresholding module generates thresholds for anomaly detection by capturing recurring patterns and trends from historical operational cycles. The data is initially segmented on the basis of cyclic operational patterns. The thresholds from the preceding segments are then used to compute a confidence score, which represents the proportion of points exceeding the threshold, indicating potential distributional changes. Local variation patterns are captured using sliding windows to generate new thresholds, minimizing the impact of high-frequency fluctuations and enabling more accurate threshold adaptation. These new thresholds are compared with previously fused thresholds and adaptively updated based on the confidence score. The updated thresholds are then applied to detect anomalies in the subsequent data segment.
The degradation trend prediction module is designed to estimate and forecast the long-term health trajectory of the system by leveraging both historical sensor data and anomaly information derived from the adaptive thresholding process. To achieve this, we employ a light weighted Transformer decoder-only model, which efficiently captures temporal dependencies and trends in the evolving system behavior while maintaining low computational complexity. By integrating anomaly scores, the module explicitly accounts for the interaction between short-term abnormal events and gradual system degradation, allowing it to anticipate the potential accelerated deterioration caused by recurring anomalies. This joint modeling approach not only enables robust and accurate predictions of future degradation trends but also provides feedback to adaptively refine anomaly detection thresholds, forming an interdependent mechanism that enhances overall system health monitoring.
The two modules interact in a mutually reinforcing manner: anomalies provide early indicators that inform degradation prediction, while the progression of degradation dynamically adjusts the anomaly thresholds. This synergistic approach improves the accuracy of the short-term anomaly detection accuracy and the robustness of long-term health monitoring.

3.1. Dynamic Thresholding for Anomaly Detection

To formulate an efficient method for online anomaly detection, we propose a dynamic thresholding approach that adapts to evolving data distributions and captures the underlying temporal patterns of the system. By leveraging historical operational cycles, the method continuously updates thresholds in response to changes in system behavior, enabling accurate detection of abnormal events without relying on labeled anomalies.

3.1.1. Data Segmentation

Data segmentation is a critical step in adaptive thresholding. Unlike traditional seasonal data which are characterized by continuous periodic patterns, cycles in equipment data typically align with operational periods. Our design of segmentation rests on the assumption that, under stable environmental conditions and in the absence of faults, parameter variations within each operational cycle remain approximately consistent, and failures are unlikely to occur during non-operational intervals. Thus, cycle-based segmentation can be interpreted as distinguishing between operational and non-operational states.
In this study, K-means clustering is applied at the time-point level to multivariate sensor signals that reflect the instantaneous operational status of the equipment. The resulting clusters are interpreted as operational and non-operational states. Based on the temporal continuity of the point-wise clustering results, the time series is subsequently partitioned into cycles, which serves as a lightweight preprocessing step to support downstream thresholding and anomaly detection. Formally, for a time series T, segmentation decomposes it into a set of cycles S :
S = { S 1 , S 2 , … , S N } ∈ R N × t
where N denotes the number of segments and t is the length of each segment.

3.1.2. Local Pattern Extraction and Threshold Generation

Existing dynamic thresholding methods typically rely on statistical measures of the data to compute and update thresholds. A common approach calculates the mean and standard deviation of a data segment and combines them into a single threshold, which is usually represented as a straight line. However, such thresholds often fail to account for the intrinsic fluctuations of the data and tend to be overly broad, resulting in a high false negative rate, particularly when the segment contains substantial internal variations. To overcome this limitation, we propose a method for extracting local thresholds that more closely tracks the underlying data dynamics. By capturing trend information, these local thresholds allow the model to learn finer-grained and more precise variation patterns during threshold fusion and update.
A sliding window is employed to capture local trends within each data segment. For each data segment, the sliding window traverses the sequence to generate local thresholds t upper and t lower :
t upper = { x 1 u , x 2 u , … , x n u }
t lower = { x 1 d , x 2 d , … , x n d }
where x i u and x i d are the maximum and minimum values within the sliding window, adjusted by a parameter ϵ :
x i u = max ( x i − k + 1 , x i − k + 2 , … , x i , … , x i + k ) + ϵ
x i d = min ( x i − k + 1 , x i − k + 2 , … , x i , … , x i + k ) − ϵ
Here, k denotes the size of the sliding window. These local thresholds, extracted from each cycle of data, are subsequently fused in the dynamic threshold computation stage to form the final thresholds used for anomaly detection.

3.1.3. Distribution Shift Detection

A key distinction between dynamic thresholds and manually set static thresholds lies in their ability to capture distributional changes within a cycle and autonomously recompute thresholds. Consequently, detecting such changes is a fundamental component of any dynamic thresholding algorithm.
Since a single data point is insufficient to characterize distributional shifts, and most real-world data deviate from normality, rendering the z-test inapplicable, we propose an alternative approach. Specifically, a peak threshold is first defined as the 95% of the anomaly threshold. Let p denote the proportion of points within a data cycle that exceed this threshold but are not classified as anomalies. Two parameters, δ 1 and δ 2 , are subsequently introduced to guide the threshold update process:
Δ t = keep , p > δ 1 , partial , δ 2 < p ≤ δ 1 , full , p ≤ δ 2 ,
This formulation enables the adaptive threshold to update based on the degree of distributional change.

3.1.4. Dynamic Threshold Computation and Fusion

Unlike conventional dynamic thresholding methods that update thresholds only after detecting distributional changes, our approach updates thresholds at the end of each operational cycle, with the update strategy adapted to the degree of distributional shift. By using the entire cycle rather than individual data points as the update unit, the model can effectively captures subtle variations in normal patterns across different cycles.
After preprocessing and segmentation, the local thresholds t upper and t lower are extracted using Equations (4) and (5). Meanwhile, the distribution shift detection module quantifies the extent of the distributional change. These outputs are then combined to compute and update the dynamic thresholds for the subsequent cycle.
Let the current cycle be the n-th cycle in the data stream. Assume that the existing dynamic thresholds are derived from previous observations and the local thresholds extracted from the current cycle are denoted by t upper and t lower . To enable smoother and more responsive adaptation to temporal variations, the anomaly thresholds for the next cycle, t A upper and t A lower , are updated using an Exponential Weighted Moving Average (EWMA) [29] formulation:
t A upper ( n ) = α t upper ( n ) + ( 1 − α ) t A upper ( n − 1 )
t A lower ( n ) = α t lower ( n ) + ( 1 − α ) t A lower ( n − 1 )
where α ∈ ( 0 , 1 ) is the smoothing factor that determines the responsiveness of the update process. The dynamic threshold update procedure is shown in Algorithm 1.
Algorithm 1: Dynamic Threshold Update with Trend Forecasting Feedback
Sensors 26 00257 i001

3.1.5. Anomaly Detection

After the anomaly thresholds are computed, each data point can be classified as normal or abnormal based on its value. Specifically, a data point is considered normal when it lies between the upper threshold t A upper and lower threshold t A lower . Conversely, it is regarded as abnormal if its value exceeds the upper threshold or falls below the lower threshold.

3.2. Degradation Trend Prediction

While anomaly thresholds focus on identifying short-term deviations within each operational cycle, degradation prediction aims to capture long-term performance decline across cycles. In practice, gradual degradation often manifests as subtle yet persistent shifts in the extracted local thresholds or anomaly frequencies, which cannot be fully explained by random fluctuations.
To this end, we model the temporal evolution of dynamic thresholds and anomaly indicators as a degradation signal. By applying statistical smoothing and trend extraction techniques, the model distinguishes between short-term noise and long-term deterioration patterns.

3.2.1. Feature Construction

For each cycle n, we extract a feature vector x n that characterizes potential degradation. The construction of x n aims to capture both short-term fluctuations and long-term shifts in equipment behavior. Specifically, the following types of features are considered:
  • Relative change in dynamic thresholds Δ t ( n ) . The relative difference between the updated dynamic thresholds of the current cycle and those of the previous cycle reflects gradual drifts in the decision boundary. Such drifts often indicate the accumulation of wear or performance loss over time.
  • Absolute shift of local thresholds δ ¯ t ( n ) . The absolute displacement of cycle-level local thresholds provides fine-grained information about variations in normal operating patterns. Persistent increases or decreases in these values can signal long-term deterioration that is not immediately detectable through anomaly counts alone.
  • Proportion of points exceeding the peak threshold p n . This feature quantifies the fraction of data points that surpass the peak threshold but are not classified as anomalies. A rising p n across cycles suggests that the baseline operating condition itself is shifting toward more extreme values, which is a typical symptom of degradation.
  • Statistical descriptors of the cycle data. Standard metrics (mean μ n , variance σ n , and quantiles q n ) capture distributional changes within the cycle. Increasing variance may indicate unstable operation, while systematic shifts in the mean or quantiles often reveal gradual decline in equipment health.
All extracted features are standardized to ensure comparability across dimensions and concatenated into a single vector:
x n = Δ t ( n ) , δ ¯ t ( n ) , p n , μ n , σ n , q 25 , n , q 75 , n ,

3.2.2. Degradation Index Computation

Once the feature vector x n is constructed, it is mapped into a scalar degradation index (DI) that summarizes the health condition of the equipment for cycle n. At this stage, we adopt a simple averaging strategy:
D I n = 1 d ∑ i = 1 d x n , i ,
where d is the dimensionality of the feature vector x n .
To reduce the effect of short-term fluctuations while retaining long-term degradation trends, the raw DI sequence is further smoothed using an Exponential Weighted Moving Average (EWMA):
D ˜ I n = λ D I ˜ n − 1 + ( 1 − λ ) D I n ,
Here, λ controls the degree of smoothing, with higher values giving more weight to previous cycles. The smoothed degradation index D I ˜ n serves as the input for subsequent trend analysis and predictive modeling.

3.2.3. Trend Forecasting

To ensure computational efficiency while retaining predictive accuracy, we adopt a lightweight forecasting approach based on Transformer decoder which contains only a single-layer multi-head attention block followed by a compact feed-forward module with residual and layer normalization. The attention block employs a local-window mechanism, which reduces the effective computational complexity from O ( L 2 ) to approximately O ( L · w ) , where w is the window size.
Formally, given a smoothed degradation index (DI) sequence { D I 1 , D I 2 , … , D I n } , each element is first mapped into a d-dimensional embedding space and enhanced with positional embeddings to preserve temporal order. The decoder then takes the most recent L steps as input context and predicts the next step in an auto-regressive manner. At each decoding step t, the decoder attends to w previous representations h t − w ( l − 1 ) , … , h t − 1 ( l − 1 ) through a multi-head self-attention mechanism:
A ( l ) = softmax Q ( l ) ( K ( l ) ) ⊤ d k V ( l ) ,
The result of the attention layer is then passed through a feed-forward network (FFN) applied to each time step independently:
FFN ( x ) = σ ( x W 1 + b 1 ) W 2 + b 2 ,
where σ ( · ) is a nonlinear activation function. Finally, the output representation of the last decoder layer O t ( L ) is mapped to the predicted degradation index:
D ^ I t = O t ( L ) W o u t + b o u t .
The forecasting objective minimizes the mean squared error between the predicted and actual degradation indices over the horizon H:
L t r e n d = 1 H ∑ h = 1 H D ^ I n + h − D I n + h 2 .
where D ^ I n + h denotes the predicted degradation index at the future time step n + h , D I n + h is the corresponding ground-truth degradation index.

3.3. Overall Workflow of the Proposed Framework

The proposed framework follows a unified workflow that integrates data preprocessing and segmentation, dynamic thresholding, degradation index construction, and trend prediction. As illustrated in Figure 2, the end-to-end process consists of four major stages.
(1)
Data preprocessing and cycle-based segmentation. The raw telemetry data are first preprocessed and subsequently segmented into distinct operational cycles through a k-means clustering procedure.
(2)
Dynamic thresholding and anomaly detection. The dynamic threshold is iteratively updated based on the anomaly detection outcome and the trend prediction results obtained in the previous round. An anomaly is flagged whenever the data exceeds the adaptive boundary.
(3)
Degradation index construction. After the threshold is updated, the degradation index is constructed based on the cycle-level data and their corresponding thresholds.
(4)
Trend prediction through sequence forecasting. A forecasting model is utilized to estimate the future trajectory of the degradation index (DI). The predicted trend serves as a reference baseline and is incorporated into the next iteration of dynamic threshold updates to enhance sensitivity to gradual degradation.

3.4. Interactions Between Modules

The interaction between the Trend Forecasting and Dynamic Thresholding modules is crucial for the framework’s adaptability and accuracy. As the Trend Forecasting module predicts the system’s future degradation trends based on historical data, these predictions inform the Dynamic Thresholding module by providing updated expectations for the system’s long-term behavior. Specifically, the forecasts from the Trend Forecasting module offer insights into whether the system’s degradation trajectory will remain stable or accelerate in the coming cycles. For example, when the system is predicted to experience more rapid degradation, the thresholds are modified to become more sensitive to smaller changes, ensuring timely anomaly detection.
By incorporating these predictions, the system can efficiently adapt to both gradual health declines and sudden shocks, maintaining high sensitivity to real-time anomalies while accounting for the underlying trends in the data.

4. Experiments

4.1. Experimental Setup

This section outlines the datasets, baseline methods, evaluation metrics, and implementation details used in our experiments.

4.1.1. Datasets

To evaluate the performance of our proposed framework across diverse scenarios, we conduct experiments on a public dataset and a real-world satellite thruster dataset. The Yahoo Webscope dataset [30] is a publicly available dataset released by Yahoo Labs. It contains 367 labeled time series, including both real and synthetic data, with each series consisting of 1420 to 1680 instances. The dataset includes stationary periodic series as well as series that exhibit periodicity combined with evolving trends. Table 1 summarizes the statistics of both datasets, while Figure 3 presents representative time-series examples from the Yahoo dataset. The satellite thruster dataset originates from real-time measurements of thrusters employed for orbit maintenance and attitude control in on-orbit satellites. It consists of multiple sensor readings, including current and voltage parameters, which capture the operational characteristics of the thrusters. Appendix A.2 provides additional details of the satellite thruster dataset.
Table 1. Statistics of the public dataset.
Figure 3. Sample series of Yahoo Dataset.

4.1.2. Baselines

We compare our proposed dynamic thresholding framework in the anomaly detection task against the following representative methods:
  • OCSVM [31], an unsupervised anomaly detection algorithm that models the normal data distribution and identifies outliers as anomalies.
  • Isolation Forest [32] uses random partitioning to recursively isolate data points.
  • SPOT [12], an anomaly detection algorithm that leverages Extreme Value Theory (EVT) to detect outliers in time series data.
  • DSPOT [12], an enhanced version of SPOT that adapts to changes in the data by dynamically adjusting the thresholds.
  • SI-ATFD [33] combines stacked machine learning with adaptive residual thresholding to enable fast and accurate early fault diagnosis.
  • AT2SD [34] proposes a two-stage threshold-based detector for DDoS detection.
  • DONUT [35] applies variational autoencoders in unsupervised anomaly detection.
  • TranAD [36], an unsupervised anomaly detection algorithm that leverages the Transformer architecture to capture long-range dependencies and detect anomalies in time-series data.
  • Anomaly Transformer [37] proposes Anomaly Attention mechanism to model the prior association and the series association.
In terms of trend prediction, we compare our method with several representative approaches, including ARIMA [38], LSTM [39], TCN [40], CF-RUL [41] and BiLSTM-MHSA [42].

4.1.3. Evaluation Metrics

To evaluate our model’s anomaly detection performance, we adopt Precision, Recall, and F1-score as the primary metrics.
Precision = T P T P + F P
Recall = T P T P + F N
F 1 = 2 × Precision × Recall Precision + Recall
where T P is the number of true positives, F P is the number of false positives and F N is the number of false negatives.
As for the prediction task, we employ Mean Squared Error (MSE), Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE) in the evaluation:
MSE = 1 N ∑ i = 1 N ( y i − y ^ i ) 2
RMSE = 1 N ∑ i = 1 N ( y i − y ^ i ) 2
MAE = 1 N ∑ i = 1 N | y i − y ^ i |
where N is the number of samples, y i is the ground truth value, and y ^ i is the predicted value.

4.1.4. Implementation Details

Experiments were conducted on a Lenovo laptop (Lenovo Group Ltd., Beijing, China) equipped with a NVIDIA 3060 Laptop GPU (NVIDIA Corporation, Santa Clara, CA, USA) and an AMD Ryzen 7 5800H CPU (Advanced Micro Devices, Inc., Santa Clara, CA, USA). The implementation was developed in Python using NumPy (Version 2.1.3), scikit-learn (Version 1.5.2), and PyTorch (Version 2.5.1). GPU acceleration was enabled via CUDA (Version 12.4).
We employ the Adam optimizer with a learning rate of 0.001 for the trend prediction module. For the Yahoo dataset, a sliding window strategy with a fixed window size of 200 is adopted to construct cyclic input sequences. In the dynamic thresholding module, the sliding window size k is set to 40 for the Yahoo dataset and 100 for the Satellite dataset. The hyper-parameters δ 1 and δ 2 are set to 0.95 and 0.85 respectively for both datasets. All input time-series data are normalized using the StandardScaler, which standardizes each feature according to:
z = x − μ σ
where x is the original feature value, μ is the mean of the feature in the training data, and σ is the standard deviation. More detailed parameter configurations are reported in Appendix A.1.

4.2. Overall Results

4.2.1. Unsupervised Anomaly Detection

To validate the effectiveness of the proposed model, we conduct experiments on an unsupervised anomaly detection task. The results are presented in Table 2. To alleviate the bias introduced by point-wise evaluation on contiguous anomaly regions, we further adopt a delayed F1 metric in Appendix B.1 as well as a paired t-test in Appendix B.2. From the results, we observe:
Table 2. Comparison of unsupervised anomaly detection performance on Yahoo and Satellite datasets over 5 random seeds. ↑ indicates that higher values are better. Bold values indicate the best performance.
  • Traditional methods such as OCSVM and Isolation Forest exhibit unstable performance, as they rely on static decision boundaries that cannot adapt to the dynamic and periodic characteristics of the data.
  • Methods based on Extreme Value Theory (EVT), including SPOT and DSPOT, achieve moderate improvements by introducing adaptive thresholds. However, they fail to capture periodic patterns in common industrial data and cannot effectively respond to abrupt changes, making them insufficient for anomaly detection on periodic data.
  • Deep learning-based approaches DONUT, TranAD, and Anomaly Transformer show stronger adaptability by leveraging latent representations, yielding better precision recall trade-offs compared to traditional methods.
  • Compared to other threshold-based PHM methods, our proposed model achieves the highest overall F1 scores, confirming its capability to handle periodic data and working cycles. By dynamically updating thresholds based on both recent data distributions and long-term trends, our model can maintain reliable detection even under shifting data distributions, outperforming all baseline methods in overall accuracy and stability in most industrial situations.

4.2.2. Trend Prediction

The trend prediction performance is evaluated on both datasets, and the results are shown in Figure 4.
Figure 4. The prediction performance of our proposed framework in comparison to baselines.
As illustrated in Figure 4, our method consistently outperforms the baselines across all evaluation metrics. Specifically, our model achieves the lowest MSE of 0.1217, indicating superior accuracy in trend prediction compared to ARIMA (0.1595), LSTM (0.1355), TCN (0.1299), CF-RUL (0.1284) and BiLSTM-MHSA (0.1236). These results suggest that our framework excels at capturing long-term dependencies and complex patterns in the data, and can effectively predict degradation trends in real industrial applications.

4.3. Computational Efficiency

To evaluate the computational efficiency of the proposed model, we analyze both runtime and memory consumption of the dynamic thresholding process compared with existing baseline methods. Since the trend forecasting module is executed independently and does not dominate the overall computation, our focus is placed on the anomaly detection phase, which is the primary component in real-time deployment. The experiments are performed on A3Benchmark, a subset of the Yahoo dataset containing 100 time-series samples, each comprising 1580 data points. The results are shown in Table 3.
Table 3. Runtime and memory consumption result on A3Benchmark. Bold values indicate the best performance.
Among all baselines, our proposed method achieves the lowest computational cost while maintaining stable performance. Specifically, our model requires only 10.94 s to process the entire dataset, which is approximately 1.1× faster than Isolation Forest, 3× faster than OCSVM, and more than 12× faster than SPOT. In terms of memory usage, our method also shows clear advantages, consuming only 339.86 MB. This improvement mainly stems from the lightweight design of the dynamic thresholding mechanism, which incrementally updates the upper and lower bounds without full historical recomputation.

4.4. Ablation Study

To better understand the contribution of each component in the proposed framework, we conduct a series of ablation experiments by removing them from the full model, which includes (1) w/o TF: removes the trend forecasting module, which captures long-term degradation tendencies; (2) w/o Dy: removes the dynamic threshold updating mechanism, which adaptively adjusts the upper and lower bounds; (3) w/o Fu: replaces the EWMA-based threshold fusion with a simple average when updating the anomaly thresholds. Results are shown in Figure 5 and the detailed results are provided in Appendix B.3.
Figure 5. (a) Ablation study results on Yahoo dataset. (b) Ablation study results on Satellite dataset.
It can be observed that removing any of the components leads to a noticeable degradation in overall performance. When the trend forecasting module (w/o TF) is removed, the model loses its ability to anticipate long-term degradation tendencies, resulting in delayed or missed anomaly detections. Similarly, eliminating the dynamic threshold updating mechanism (w/o Dy) greatly reduces adaptability to distributional shifts, resulting in increased missed detection. Moreover, replacing the EWMA-based fusion strategy with a simple averaging scheme (w/o Fu) makes the model more sensitive to short-term fluctuations and noise, leading to unstable detection performance. Notably, the performance degradation caused by jointly removing TF and Fu is larger than that observed when removing either component alone, indicating a non-additive interaction between trend forecasting and feature fusion.

4.5. Segmentation Stability

To verify robustness of K-means clustering, we conduct a sensitivity analysis based on the Adjusted Rand Index (ARI). Specifically, we inject additive noise and slow drift into the raw sensor signals and compute ARI between the original and perturbed cluster assignments.
Table 4 reports the ARI-based sensitivity analysis for point-wise operational state clustering. The clustering remains unchanged under additive Gaussian noise up to 10% of the signal standard deviation and bias drift up to 20%. These results demonstrate that the proposed point-wise clustering is highly stable and robust under realistic noise and drift conditions.
Table 4. Segmentation stability under noise and drift measured by ARI.

4.6. Parameter Sensitivity

We conduct experiments on the two datasets to study the impacts of the following hyper-parameters. δ 1 and δ 2 are parameters that control the threshold update, and k is the sliding window size in local pattern extraction and threshold generation module; the results are shown in Figure 6.
Figure 6. Parameter sensitivity tests of the model on two datasets.
Figure 6a,c show the result of varying δ . The performance drop as we increase or decrease the threshold of distribution change detection. This is because a smaller δ causes the model to over-react to minor fluctuations, leading to frequent threshold updates and false alarms. In contrast, a larger δ makes the model less responsive to actual distribution shifts, resulting in delayed or missed anomaly detections.
Figure 6b,d illustrate the result of varying k. We observe that the performance drops when a smaller window size is selected, as the extracted patterns fail to capture sufficient temporal context and result in unstable feature representations.

4.7. Case Study

4.7.1. Adaptive Threshold Result Comparison

To verify the effectiveness and superiority of the proposed thresholding algorithm, we apply the proposed dynamic thresholding model to the satellite thruster dataset and compare its performance with two traditional thresholding methods under real anomaly cases. The results are shown in Figure 7.
Figure 7. Case Study on the Satellite Thruster Dataset: The red background section indicates the true anomaly region, the blue curve represents the actual data, the upper and lower orange dashed lines denote the thresholds computed by the model, and the red dots mark the anomaly points detected by the model.
The results demonstrate that the proposed method can accurately detect changes in the data distribution, dynamically compute, update, and fuse thresholds for anomaly detection, and successfully identify all actual fault occurrences. Moreover, the proposed model achieves better performance than the baseline methods, exhibiting higher detection accuracy and stronger adaptability to distributional variations.
As illustrated in the figure, the Isolation Forest algorithm determines anomalies solely based on distance metrics and outputs a static linear threshold. Such a method cannot effectively detect or recognize contextual anomalies, leading to missed detections in the second anomalous region. Furthermore, Isolation Forest separates anomalies according to a predefined contamination ratio, which often results in false positives.
In comparison, the SPOT algorithm generates thresholds that better align with the real data distribution and can adapt to gradual changes over time. However, SPOT fails to capture periodic patterns in the data and cannot effectively respond to abrupt changes. In some cases, it becomes overly sensitive to short-term fluctuations. As shown in the figure, after detecting an upward trend, SPOT recalculates thresholds based on the updated distribution, causing a substantial increase in the upper bound. Such excessively broad thresholds greatly reduce the algorithm’s sensitivity to anomalies, resulting in a high miss-detection rate.
Our proposed method performs notably better on periodic datasets. As shown in the results, the model effectively extracts periodic information and updates the thresholds according to cyclic variations. This approach produces dynamic thresholds that closely follow the true data distribution. Although some false alarms may occur, the algorithm achieves a significantly higher anomaly detection rate overall. In practical applications, the ability to detect all true anomalies is often of higher priority, a moderate increase in false positives is acceptable when it improves the overall reliability of detection.

4.7.2. Temporal Evolution of the Adaptive Threshold

To further illustrate the effectiveness of the designed interaction between the adaptive thresholding mechanism and the trend prediction module, as well as the rationale behind the DI construction, we visualize the temporal evolution of the dynamic thresholds. As shown in Figure 8, the thresholds gradually shift over time rather than remaining static, indicating that the thresholding mechanism adapts to long-term degradation trends. This result demonstrates how the threshold-related DI and the associated trend prediction jointly guide the adaptive thresholding process, and further confirms that the selected features used for DI construction can effectively capture degradation trends.
Figure 8. Temporal evolution of the dynamic upper and lower thresholds. The thresholds are updated iteratively and exhibit a gradual downward trend over time, reflecting adaptation to long-term performance degradation.

5. Conclusions

In this paper, we propose a dynamic thresholding framework for unsupervised joint anomaly detection and trend prediction. The adaptive thresholding module derives anomaly thresholds from historical data distributions and incrementally updates them to form future thresholds, ensuring real-time adaptability to distributional shifts. Meanwhile, the trend prediction module employs a lightweight Transformer decoder and utilizes the constructed degradation index to forecast long-term degradation trends. The results from the trend prediction module are further utilized to assist in refining the dynamic thresholds, forming a feedback loop between trend forecasting and anomaly detection. This feedback mechanism enables the system to continuously calibrate the anomaly boundaries based on predicted degradation trends, thereby enhancing sensitivity to early-stage anomalies. Experiments on two large-scale datasets demonstrate the effectiveness of our proposed framework. However, two limitations remain: (1) the dynamic thresholding mechanism operates on a one-dimensional telemetry signal and therefore cannot explicitly model cross-variable interactions, such as time differentials associated with changes in multiple sensor channels; (2) the absence of RUL labels limits the extent to which the degradation trend prediction module can be utilized. With a DI constructed through simple aggregation, the forecasting module currently serves mainly as an auxiliary component for dynamic threshold refinement, instead of performing full prognostic tasks such as RUL estimation. In the future, we plan to explore the method of multi-dimensional thresholding, which will enable the model to jointly consider correlations across different variables when determining anomaly boundaries.

Author Contributions

Conceptualization, F.D., Z.L., Y.L. and D.G.; methodology, F.D., Y.Z. and D.G.; software, Y.Z.; validation, F.D., Z.L. and Y.L.; formal analysis, F.D., Z.L., Y.L. and Y.Z.; investigation, F.D. and D.G.; resources, F.D., Z.L., Y.L. and H.T.; data curation, Z.L. and Y.L.; writing—original draft preparation, Y.Z.; writing—review and editing, D.G.; visualization, Y.Z.; supervision, F.D., Z.L., Y.L., H.T. and D.G.; project administration, F.D. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The data from the current study cannot be made publicly available due to confidentiality concerns.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Implementation Details

Appendix A.1. Hyperparameter Configuration

We evaluate hyperparameters over predefined ranges and select the final configuration based on the resulting threshold behavior. The hyperparameter configurations selected for all experiments are reported in Table A1 and Table A2.
Table A1. Hyperparameter configurations for threshold module.
Table A2. Model architecture of the lightweight forecasting decoder.

Appendix A.2. Dataset Annotation and Data Splitting Protocol

The anomaly labels in the satellite thruster dataset are manually labeled based on engineering logs and expert knowledge. Specifically, abnormal operation intervals are identified and labeled by domain experts according to telemetry patterns and maintenance records. In addition to fault-related anomalies, thruster ignition events are also treated as detection targets, as they correspond to abrupt and structured changes in telemetry signals.
Regarding the split protocol, the dataset is split chronologically into training, validation, and test sets with a ratio of 60%/20%/20%.

Appendix B. Additional Experiment Results

Appendix B.1. Event-Based Evaluation

Following [43], the delay threshold K for the Yahoo dataset is set to 3, and for the thruster dataset, K is configured at 5. The result are shown in Table A3.
Table A3. Delayed F1-score on the Yahoo and Satellite datasets over 5 random seeds. Bold values indicate the best performance.

Appendix B.2. Statistical Test

Table A4. Paired t-test result for TranAD and our proposed method.

Appendix B.3. Ablation Results

Table A5. Quantitative ablation results on two datasets. ↑ indicates that higher values are better.

References

  1. Guigou, F.; Collet, P.; Parrend, P. SCHEDA: Lightweight Euclidean-Like Heuristics for Anomaly Detection in Periodic Time Series. Appl. Soft Comput. 2019, 82, 105594. [Google Scholar] [CrossRef] [Scilit]
  2. Zhao, H.; Qiu, S.; Yang, J.; Guo, J.; Liu, M.; Cao, X. Satellite Early Anomaly Detection Using an Advanced Transformer Architecture for Non-Stationary Telemetry Data. IEEE Trans. Consum. Electron. 2024, 70, 4213–4225. [Google Scholar] [CrossRef] [Scilit]
  3. Li, B.; Gupta, S.; Müller, E. State-Transition-Aware Anomaly Detection under Concept Drifts. Data Knowl. Eng. 2024, 154, 102365. [Google Scholar] [CrossRef] [Scilit]
  4. Sun, Z.; Peng, Q.; Mou, X.; Bashir, M.F. Generic and Scalable Periodicity Adaptation Framework for Time-Series Anomaly Detection. Multimed. Tools Appl. 2023, 82, 2731–2748. [Google Scholar] [CrossRef] [Scilit]
  5. Zhao, N.; Zhu, J.; Wang, Y.; Ma, M.; Zhang, W.; Liu, D.; Zhang, M.; Pei, D. Automatic and Generic Periodicity Adaptation for KPI Anomaly Detection. IEEE Trans. Netw. Serv. Manag. 2019, 16, 1170–1183. [Google Scholar] [CrossRef] [Scilit]
  6. Saurav, S.; Malhotra, P.; TV, V.; Gugulothu, N.; Vig, L.; Agarwal, P.; Shroff, G. Online Anomaly Detection with Concept Drift Adaptation Using Recurrent Neural Networks. In Proceedings of the ACM India Joint International Conference on Data Science and Management of Data, Goa, India, 11–13 January 2018; pp. 78–87. [Google Scholar]
  7. Fahy, C.; Yang, S.; Gongora, M. Scarcity of Labels in Non-Stationary Data Streams: A Survey. ACM Comput. Surv. 2022, 55, 1–39. [Google Scholar] [CrossRef] [Scilit]
  8. Matania, O.; Bechhoefer, E.; Blunt, D.; Wang, W.; Bortman, J. Anomaly Detection and Remaining Useful Life Estimation for the Health and Usage Monitoring Systems 2023 Data Challenge. Sensors 2024, 24, 4258. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  9. Lu, S.; Lu, J.; An, K.; Wang, X.; He, Q. Edge Computing on IoT for Machine Signal Processing and Fault Diagnosis: A Review. IEEE Internet Things J. 2023, 10, 11093–11116. [Google Scholar] [CrossRef] [Scilit]
  10. Niu, Z.; Yu, K.; Wu, X. LSTM-Based VAE-GAN for Time-Series Anomaly Detection. Sensors 2020, 20, 3738. [Google Scholar] [CrossRef] [Scilit]
  11. Pan, G.; Qian, J.; Ouyang, J.; Luo, Y.; Wang, H. Adaptive Threshold Event Detection Method Based on Standard Deviation. Meas. Sci. Technol. 2023, 34, 075903. [Google Scholar] [CrossRef] [Scilit]
  12. Siffer, A.; Fouque, P.-A.; Termier, A.; Largouet, C. Anomaly Detection in Streams with Extreme Value Theory. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Halifax, NS, Canada, 13–17 August 2017; pp. 1067–1075. [Google Scholar]
  13. Hundman, K.; Constantinou, V.; Laporte, C.; Colwell, I.; Soderstrom, T. Detecting Spacecraft Anomalies Using LSTMs and Nonparametric Dynamic Thresholding. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, UK, 19–23 August 2018; pp. 387–395. [Google Scholar]
  14. Dhiman, H.S.; Deb, D.; Muyeen, S.M.; Kamwa, I. Wind Turbine Gearbox Anomaly Detection Based on Adaptive Threshold and Twin Support Vector Machines. IEEE Trans. Energy Convers. 2021, 36, 3462–3469. [Google Scholar] [CrossRef] [Scilit]
  15. Ko, J.U.; Na, K.; Oh, J.-S.; Kim, J.; Youn, B.D. A New Auto-Encoder-Based Dynamic Threshold to Reduce False Alarm Rate for Anomaly Detection of Steam Turbines. Expert Syst. Appl. 2022, 189, 116094. [Google Scholar] [CrossRef] [Scilit]
  16. Zhang, Y.; Ai, Q.; Wang, H.; Li, Z.; Zhou, X. Energy Theft Detection in an Edge Data Center Using Threshold-Based Abnormality Detector. Int. J. Electr. Power Energy Syst. 2020, 121, 106162. [Google Scholar] [CrossRef] [Scilit]
  17. Yang, X.; Howley, E.; Schukat, M. Adt: Agent-Based Dynamic Thresholding for Anomaly Detection. arXiv 2023, arXiv:2312.01488. [Google Scholar] [CrossRef] [Scilit]
  18. Chen, X.; Liu, Z. A Long Short-Term Memory Neural Network Based Wiener Process Model for Remaining Useful Life Prediction. Reliab. Eng. Syst. Saf. 2022, 226, 108651. [Google Scholar] [CrossRef] [Scilit]
  19. Wang, H.; Xu, T.; Mi, Q. Lifetime Prediction Based on Gamma Processes from Accelerated Degradation Data. Chin. J. Aeronaut. 2015, 28, 172–179. [Google Scholar] [CrossRef] [Scilit]
  20. Zhang, Y.; Tu, L.; Xue, Z.; Li, S.; Tian, L.; Zheng, X. Weight Optimized Unscented Kalman Filter for Degradation Trend Prediction of Lithium-Ion Battery with Error Compensation Strategy. Energy 2022, 251, 123890. [Google Scholar] [CrossRef] [Scilit]
  21. Chen, P.; Li, C.; Zhang, X. Degradation Trend Prediction of Pumped Storage Unit Based on a Novel Performance Degradation Index and GRU-Attention Model. Sustain. Energy Technol. Assess. 2022, 54, 102807. [Google Scholar] [CrossRef] [Scilit]
  22. Ou, S.; Zhao, M.; Wu, H.; Zhang, Y.; Li, S. Machinery Degradation Trend Prediction Considering Temporal Distribution Discrepancy Between Degradation Stages. Eng. Appl. Artif. Intell. 2024, 131, 107872. [Google Scholar] [CrossRef] [Scilit]
  23. Shi, J.; Rivera, A.; Wu, D. Battery Health Management Using Physics-Informed Machine Learning: Online Degradation Modeling and Remaining Useful Life Prediction. Mech. Syst. Signal Process. 2022, 179, 109347. [Google Scholar] [CrossRef] [Scilit]
  24. Xu, L.; Deng, Z.; Xie, Y.; Lin, X.; Hu, X. A Novel Hybrid Physics-Based and Data-Driven Approach for Degradation Trajectory Prediction in Li-Ion Batteries. IEEE Trans. Transp. Electrification 2023, 9, 2628–2644. [Google Scholar] [CrossRef] [Scilit]
  25. Gomes, J.P.P.; Galvão, R.K.H.; Yoneyama, T.; Leão, B.P. A New Degradation Indicator Based on a Statistical Anomaly Approach. IEEE Trans. Reliab. 2016, 65, 326–335. [Google Scholar] [CrossRef] [Scilit]
  26. Dimitrievska, V.; Pittino, F.; Muehleisen, W.; Diewald, N.; Hilweg, M.; Montvay, A.; Hirschl, C. Statistical Methods for Degradation Estimation and Anomaly Detection in Photovoltaic Plants. Sensors 2021, 21, 3733. [Google Scholar] [CrossRef] [Scilit]
  27. Florkowski, M. Anomaly Detection, Trend Evolution, and Feature Extraction in Partial Discharge Patterns. Energies 2021, 14, 3886. [Google Scholar] [CrossRef] [Scilit]
  28. Chen, R.-Q.; Shi, G.-H.; Zhao, W.-L.; Liang, C.-H. A Joint Model for IT Operation Series Prediction and Anomaly Detection. Neurocomputing 2021, 448, 130–139. [Google Scholar] [CrossRef] [Scilit]
  29. Hunter, J.S. The Exponentially Weighted Moving Average. J. Qual. Technol. 1986, 18, 203–210. [Google Scholar] [CrossRef] [Scilit]
  30. Laptev, N.; Amizadeh, S.; Flint, I. Generic and Scalable Framework for Automated Time-Series Anomaly Detection. In Proceedings of the 21st ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Sydney, Australia, 10–13 August 2015; pp. 1939–1947. [Google Scholar]
  31. Schölkopf, B.; Williamson, R.C.; Smola, A.J.; Shawe-Taylor, J.; Platt, J.C. Support Vector Method for Novelty Detection. In Proceedings of the Thirteenth Annual Neural Information Processing Systems Conference (NIPS 1999), Denver, CO, USA, 28–30 November 2000; pp. 582–588. [Google Scholar]
  32. Liu, F.T.; Ting, K.M.; Zhou, Z.-H. Isolation Forest. In Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, Pisa, Italy, 15–19 December 2008; pp. 413–422. [Google Scholar]
  33. Tang, Z.; Shi, X.; Zou, H.; Zhu, Y.; Yang, Y.; Zhang, Y.; He, J. Fault Diagnosis of Wind Turbine Generators Based on Stacking Integration Algorithm and Adaptive Threshold. Sensors 2023, 23, 6198. [Google Scholar] [CrossRef] [Scilit]
  34. Niu, M.; Feng, Y.; Sakurai, K. A Two-Stage Detection System of DDoS Attacks in SDN Using a Trigger with Multiple Features and Self-Adaptive Thresholds. In Proceedings of the 17th International Conference on Ubiquitous Information Management and Communication (IMCOM), Seoul, Republic of Korea, 3–5 January 2023; pp. 1–8. [Google Scholar]
  35. Xu, H.; Chen, W.; Zhao, N.; Li, Z.; Bu, J.; Li, Z.; Liu, Y.; Zhao, Y.; Pei, D.; Feng, Y.; et al. Unsupervised Anomaly Detection via Variational Auto-Encoder for Seasonal KPIs in Web Applications. In Proceedings of the 2018 World Wide Web Conference, Lyon, France, 23–27 April 2018; pp. 187–196. [Google Scholar]
  36. Tuli, S.; Casale, G.; Jennings, N.R. TranAD: Deep Transformer Networks for Anomaly Detection in Multivariate Time Series Data. Proc. VLDB Endow. 2022, 15, 1201–1214. [Google Scholar] [CrossRef] [Scilit]
  37. Xu, J.; Wu, H.; Wang, J.; Long, M. Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy. arXiv 2021, arXiv:2110.02642. [Google Scholar] [CrossRef] [Scilit]
  38. Ho, S.L.; Xie, M. The Use of ARIMA Models for Reliability Forecasting and Analysis. Comput. Ind. Eng. 1998, 35, 213–216. [Google Scholar] [CrossRef] [Scilit]
  39. Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [Scilit]
  40. Bai, S.; Kolter, J.Z.; Koltun, V. An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. arXiv 2018, arXiv:1803.01271. [Google Scholar] [CrossRef] [Scilit]
  41. Zhou, N.; Zheng, Z.; Zhou, J. Prediction of the RUL of PEMFC Based on Multivariate Time Series Forecasting Model. In Proceedings of the 3rd International Symposium on Computer Technology and Information Science (ISCTIS 2023), Chengdu, China, 7–9 July 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 87–92. [Google Scholar]
  42. Jia, C.; He, H.; Zhou, J.; Li, K.; Li, J.; Wei, Z. A Performance Degradation Prediction Model for PEMFC Based on Bi-Directional Long Short-Term Memory and Multi-Head Self-Attention Mechanism. Int. J. Hydrogen Energy 2024, 60, 133–146. [Google Scholar] [CrossRef] [Scilit]
  43. Liu, J.; Zhang, C.; Qian, J.; Ma, M.; Qin, S.; Bansal, C.; Zhang, D. Large Language Models Can Deliver Accurate and Interpretable Time Series Anomaly Detection. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery & Data Mining (KDD 2025), Toronto, ON, Canada, 3–7 August 2025; pp. 4623–4634. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.