作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• •    

基于时频协作的多变量时间序列异常检测方法

  • 发布日期:2026-12-04

Time-Frequency Collaboration-based Multivariate Time Series Anomaly Detection Method

  • Published:2026-12-04

摘要: 基于重构的多变量时间序列异常检测方法通常假设训练数据均为正常样本,通过学习正常模式并依据重构误差识别异常。然而,实际训练数据中不可避免地会混入潜在异常,使模型学习异常模式并产生过拟合。现有污染训练处理方法主要依据时域重构误差筛选样本,容易遗漏时域变化不明显而周期结构或频谱能量发生偏移的异常。针对上述问题,提出基于时频协作的多变量时间序列异常检测方法TFC-MTSAD。该方法将时频融合用于污染训练下的伪正常样本筛选,通过逐点融合时域重构误差与频域结构偏差生成自适应伪标签,使频域信息同时参与正常参考样本的选择与测试异常评分,为时域表现不明显的异常提供补充判别依据。模型以快速傅里叶变换所得复频谱的实部与虚部增强输入表示,联合时域重构误差与原始、重构序列的短时傅里叶变换对数幅值谱差异,刻画观测值偏离及局部频谱结构变化。双域误差经时间对齐与尺度标准化后进行自适应门控融合,使融合权重反映各时间点的相对异常响应,减弱误差尺度差异的干扰,并突出异常响应较强的域所提供的判别信息。依据伪标签筛选伪正常样本,并将其与对应重构结果共同用于对抗训练,为自编码器提供分布层面的约束。时频联合重构损失仍覆盖全部时间点,使未入选样本继续参与表示学习。测试阶段不再随机生成伪标签,而是融合归一化后的双域偏差,输出确定性的逐点异常分数。在MSL、SMAP和SWaT数据集上,严格逐点F1分别达到42.71%、38.44%和86.34%,较次优方法分别提高0.04、1.15和0.14个百分点。结果表明,将频域结构偏差用于训练样本筛选与异常评分,能够补充单一时域误差的判别信息,有助于减轻潜在异常对正常模式学习的干扰,提高复杂异常的识别能力。

Abstract: Reconstruction-based methods for multivariate time series anomaly detection typically assume that training data consist entirely of normal samples and identify anomalies by learning normal patterns and measuring reconstruction errors. However, real-world training data inevitably contain latent anomalies, causing models to learn and overfit anomalous patterns. Existing approaches to handling contaminated training data mainly screen samples using time-domain reconstruction errors and may overlook anomalies with subtle time-domain changes but shifts in periodic structure or spectral energy. To address this problem, a time-frequency collaborative method for multivariate time series anomaly detection, termed TFC-MTSAD, is proposed. The method applies time-frequency fusion to pseudo-normal sample screening under contaminated training conditions. By adaptively fusing time-domain reconstruction errors and frequency-domain structural discrepancies at each time point, it generates pseudo-labels that enable frequency information to inform normal reference sample selection during training. Frequency information is also incorporated into test-time anomaly scoring, providing complementary evidence for anomalies that are inconspicuous in the time domain. The model enhances its input representation using the real and imaginary components of the complex spectrum obtained through the fast Fourier transform. It combines time-domain reconstruction errors with discrepancies between the short-time Fourier transform log-magnitude spectra of the original and reconstructed sequences to characterize deviations in observed values and changes in local spectral structure. After temporal alignment and scale normalization, the two errors are fused through an adaptive gating mechanism. The resulting weights reflect the relative anomaly responses at each time point, reduce the influence of differences in error scales, and emphasize evidence from the domain exhibiting a stronger anomaly response. Pseudo-normal samples are selected according to the pseudo-labels and used together with their corresponding reconstructions for adversarial training, providing the autoencoder with a distribution-level constraint. Meanwhile, the joint time-frequency reconstruction loss covers all time points, allowing samples not selected as pseudo-normal to continue contributing to representation learning. During testing, random pseudo-label generation is disabled, and the normalized discrepancies from both domains are fused to produce deterministic point-wise anomaly scores. On the MSL, SMAP, and SWaT datasets, TFC-MTSAD achieves strict point-wise F1 scores of 42.71%, 38.44%, and 86.34%, exceeding the corresponding second-best methods by 0.04, 1.15, and 0.14 percentage points, respectively. The results indicate that incorporating frequency-domain structural discrepancies into training-sample screening and anomaly scoring provides complementary information to time-domain errors alone, helps mitigate the interference of latent anomalies with normal-pattern learning, and improves the detection of complex anomalies.