Time series imputation plays a crucial role in various real-world systems and has been extensively explored. Models for time series imputation often require specialization, necessitating distinct designs for different domains and missing patterns. In this study, we introduce NuwaTS, a framework to repurpose Pre-trained Language Model (PLM) for general time series imputation. Once trained, this model can be applied to imputation tasks on incomplete time series from any domain with any missing patterns. We begin by devising specific embeddings for each sub-series patch of the incomplete time series. These embeddings encapsulate information about the patch itself, the missing data patterns within the patch, and the patch's statistical characteristics. To enhance the model's adaptability to different missing patterns, we propose a contrastive learning approach to make representations of the same patch more similar across different missing patterns. By combining this contrastive loss with the missing data imputation task, we train PLMs to obtain a one-for-all imputation model. Furthermore, we utilize a plug-and-play layer-wise fine-tuning approach to train domain-specific models. Experimental results demonstrate that leveraging a dataset of over seventeen million time series from diverse domains, we obtain a one-for-all imputation model which outperforms existing domain-specific models across various datasets and missing patterns. Additionally, we find that NuwaTS can be generalized to other time series tasks such as forecasting. Our codes are available at https://github.com/Chengyui/NuwaTS.
翻译:时间序列插补在众多现实世界系统中扮演着关键角色,并已得到广泛研究。时间序列插补模型通常需要专门化,针对不同领域和缺失模式需进行不同的设计。在本研究中,我们介绍了NuwaTS,这是一个将预训练语言模型(PLM)重新用于通用时间序列插补的框架。该模型一旦训练完成,即可应用于来自任何领域、具有任何缺失模式的不完整时间序列的插补任务。我们首先为不完整时间序列的每个子序列片段设计特定的嵌入表示。这些嵌入包含了片段本身的信息、片段内的缺失数据模式以及片段的统计特征。为了增强模型对不同缺失模式的适应能力,我们提出了一种对比学习方法,使得同一片段在不同缺失模式下的表示更加相似。通过将此对比损失与缺失数据插补任务相结合,我们训练PLMs以获得一个通用插补模型。此外,我们采用一种即插即用的分层微调方法来训练领域特定模型。实验结果表明,利用来自不同领域的超过一千七百万条时间序列数据集,我们获得了一个通用插补模型,其在各种数据集和缺失模式上的表现均优于现有的领域特定模型。此外,我们发现NuwaTS可以推广到其他时间序列任务,例如预测。我们的代码可在 https://github.com/Chengyui/NuwaTS 获取。