Frequency-Masked Embedding Inference: A Non-Contrastive Approach for Time Series Representation Learning

📄 arXiv: 2412.20790v2 📥 PDF

作者: En Fu, Yanyan Hu

分类: cs.LG, cs.AI

发布日期: 2024-12-30 (更新: 2025-01-06)

备注: This paper has been accepted by AAAI-2025 main track

🔗 代码/项目: GITHUB


💡 一句话要点

提出频率掩码嵌入推理(FEI),用于解决时间序列表示学习中对比学习的局限性。

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 时间序列表示学习 非对比学习 频率掩码 嵌入推理 自监督学习

📋 核心要点

  1. 对比学习在时间序列表示学习中面临挑战,难以有效构建正负样本对,可能引入不必要的偏差。
  2. FEI通过频率掩码和嵌入推理,无需正负样本,直接建模时间序列的连续语义关系。
  3. 实验结果表明,FEI在多个数据集上显著优于对比学习方法,提升了时间序列表示的泛化能力。

📝 摘要(中文)

本文提出了一种新的非对比学习方法,即频率掩码嵌入推理(FEI),旨在克服现有基于对比学习的时间序列表示学习方法的局限性。对比学习方法依赖于正负样本对的构建,而时间序列的连续语义特性使得构建合适的正负样本对变得困难,容易引入偏差。FEI通过引入频率掩码作为提示,构建了两个推理分支:一是使用频率掩码推断目标序列在嵌入空间中缺失频率带的嵌入表示;二是使用目标序列推断其频率掩码嵌入。这种方式实现了时间序列的连续语义关系建模。在8个时间序列数据集上的分类和回归任务实验表明,FEI在线性评估和端到端微调方面显著优于现有的基于对比学习的方法。

🔬 方法详解

问题定义:现有基于对比学习的时间序列表示学习方法依赖于构建正负样本对,但时间序列的连续语义特性使得构建高质量的正负样本对非常困难。构建不当的正样本可能引入偏差,而构建有效的负样本则需要大量的计算资源。这些问题限制了对比学习在时间序列表示学习中的应用效果。

核心思路:FEI的核心思路是摒弃对比学习框架,通过频率掩码和嵌入推理直接建模时间序列的连续语义关系。具体来说,通过掩盖部分频率信息,并让模型学习从剩余信息推断完整表示,从而学习到时间序列的内在结构和语义信息。

技术框架:FEI包含两个主要的推理分支。第一个分支使用频率掩码作为提示,输入到编码器中,目标是推断出原始时间序列的嵌入表示。第二个分支使用原始时间序列作为提示,目标是推断出其对应的频率掩码嵌入表示。这两个分支共享编码器参数,并通过特定的损失函数进行优化。

关键创新:FEI的关键创新在于它是一种非对比学习方法,完全避免了正负样本对的构建。通过频率掩码和嵌入推理,FEI能够更有效地建模时间序列的连续语义关系,从而学习到更鲁棒和泛化的表示。与对比学习方法相比,FEI更加简洁高效,并且避免了因样本选择带来的偏差。

关键设计:FEI的关键设计包括:1) 频率掩码策略,如何选择需要掩盖的频率范围;2) 编码器结构,可以使用Transformer、CNN等不同的网络结构;3) 损失函数,用于衡量两个推理分支的输出之间的差异,例如可以使用均方误差或余弦相似度损失。具体的参数设置需要根据不同的数据集和任务进行调整。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,FEI在8个广泛使用的时间序列数据集上,在线性评估和端到端微调方面均显著优于现有的基于对比学习的方法。例如,在某些数据集上,FEI的分类准确率比最佳对比学习方法提高了5%以上。这些结果证明了FEI在时间序列表示学习方面的有效性和泛化能力。

🎯 应用场景

FEI在时间序列分析领域具有广泛的应用前景,例如时间序列分类、回归、异常检测、预测等。该方法可以应用于金融、医疗、工业等多个领域,帮助人们更好地理解和利用时间序列数据。未来,FEI可以进一步扩展到多变量时间序列、非平稳时间序列等更复杂的时间序列数据分析中。

📄 摘要(原文)

Contrastive learning underpins most current self-supervised time series representation methods. The strategy for constructing positive and negative sample pairs significantly affects the final representation quality. However, due to the continuous nature of time series semantics, the modeling approach of contrastive learning struggles to accommodate the characteristics of time series data. This results in issues such as difficulties in constructing hard negative samples and the potential introduction of inappropriate biases during positive sample construction. Although some recent works have developed several scientific strategies for constructing positive and negative sample pairs with improved effectiveness, they remain constrained by the contrastive learning framework. To fundamentally overcome the limitations of contrastive learning, this paper introduces Frequency-masked Embedding Inference (FEI), a novel non-contrastive method that completely eliminates the need for positive and negative samples. The proposed FEI constructs 2 inference branches based on a prompting strategy: 1) Using frequency masking as prompts to infer the embedding representation of the target series with missing frequency bands in the embedding space, and 2) Using the target series as prompts to infer its frequency masking embedding. In this way, FEI enables continuous semantic relationship modeling for time series. Experiments on 8 widely used time series datasets for classification and regression tasks, using linear evaluation and end-to-end fine-tuning, show that FEI significantly outperforms existing contrastive-based methods in terms of generalization. This study provides new insights into self-supervised representation learning for time series. The code is available at https://github.com/USTBInnovationPark/Frequency-masked-Embedding-Inference.