MantisV2: Closing the Zero-Shot Gap in Time Series Classification with Synthetic Data and Test-Time Strategies
Proposes MantisV2, using synthetic data and test strategies to close the zero-shot time series classification gap.
Key Findings
Methodology
This paper introduces a Transformer-based foundation model, MantisV2, which employs large-scale synthetic time series generated via CauKer for pretraining. The model integrates convolutional, differential, and statistical feature encodings, with six Transformer layers enhanced by RoPE and SwiGLU. During pretraining, contrastive learning with augmentation (random crop resize) promotes invariance and generalization. Test-time strategies include intermediate-layer representation fusion, input perturbation self-ensembling, and cross-model embedding fusion, boosting robustness. Extensive experiments on UCR, UEA, HAR, and EEG datasets show superior zero-shot performance compared to prior TSFMs, with accuracy reaching 85%, outperforming models like TS2Vec (81.2%). The architecture is streamlined via ablation, emphasizing synthetic data's role in avoiding data leakage and improving generalization.
Key Results
- On UCR datasets, MantisV2 achieved 85.0% accuracy in zero-shot classification, surpassing TS2Vec's 81.2% by 3.8 percentage points, and outperforming previous self-supervised models. Fusion of intermediate-layer representations and test strategies further closed the gap to fine-tuned models. Ablation studies confirmed that synthetic pretraining, architecture simplification, and test-time fusion are key to performance gains. The model also demonstrated robustness across diverse tasks, including EEG and HAR, with consistent improvements. Results indicate that synthetic data pretraining combined with multi-layer fusion significantly enhances zero-shot generalization.
- The experimental results highlight that the proposed approach effectively leverages synthetic data to achieve state-of-the-art zero-shot classification, reducing reliance on labeled data. The multi-layer intermediate representation fusion and test-time strategies notably improve robustness, making the model suitable for real-world deployment where labeled data is scarce. The ablation studies validate the importance of each component, with synthetic data pretraining playing a pivotal role in performance. Overall, the model sets a new benchmark for zero-shot time series classification, with broad implications for scalable, label-efficient AI systems.
Significance
This work advances the field of time series analysis by demonstrating that synthetic data and test-time strategies can drastically improve zero-shot performance. It addresses longstanding challenges of data dependency and overfitting, enabling models to generalize across tasks without extensive labeled datasets. The approach reduces costs and accelerates deployment in industrial, healthcare, and financial sectors, where data annotation is costly or impractical. Furthermore, the framework paves the way for future research into scalable, robust foundation models capable of adapting to diverse, real-world scenarios, marking a significant step toward universal time series understanding.
Technical Contribution
The paper introduces a novel pipeline combining synthetic data generation via CauKer, architecture optimization through ablation, and test-time inference strategies, including intermediate-layer fusion and input perturbation ensembling. The model employs a lightweight Transformer with convolutional, differential, and statistical encoders, enhanced by RoPE and SwiGLU. The contrastive learning pretraining aligns representations across augmented views, fostering invariance. The multi-layer fusion leverages rich intermediate features, improving robustness. These innovations collectively enable a pure zero-shot approach that rivals fine-tuned models, setting new performance standards in time series classification.
Novelty
This research is the first to utilize large-scale synthetic time series for pretraining a Transformer-based foundation model in a zero-shot setting, effectively avoiding data leakage issues. The multi-layer intermediate representation fusion and test-time strategies are novel contributions, providing a new paradigm for enhancing robustness without additional training. Unlike prior models that rely heavily on fine-tuning, this approach achieves high accuracy purely through pretraining and inference enhancements, representing a significant innovation in zero-shot learning for time series data.
Limitations
- The model's robustness may still be challenged by extreme noise or anomalies not represented in synthetic data; synthetic data diversity needs further enhancement.
- Pretraining on large synthetic datasets incurs high computational costs, limiting accessibility for resource-constrained environments.
- Validation is primarily on public datasets; real-world industrial scenarios with complex noise and missing data require further testing.
Future Work
Future research will explore multi-modal data integration, multi-task learning, and adaptive synthetic data generation to improve robustness. Efforts will focus on reducing computational costs, enhancing anomaly detection capabilities, and deploying models in real-world industrial and healthcare settings. Additionally, extending the framework to few-shot and transfer learning scenarios could further broaden its applicability.
AI Executive Summary
Time series classification remains a fundamental challenge across scientific and industrial domains. Traditional methods rely heavily on labeled data, limiting scalability and adaptability. Recent advances in foundation models, especially in vision and language, have inspired similar efforts in time series analysis. However, existing models often struggle with zero-shot generalization, partly due to data leakage and overfitting issues.
This paper introduces MantisV2, a Transformer-based foundation model trained entirely on synthetic time series generated by CauKer. The synthetic data covers diverse temporal patterns, avoiding data leakage and improving out-of-distribution robustness. The model architecture integrates convolutional, differential, and statistical feature encodings, optimized through ablation studies for efficiency and performance. During inference, multiple test-time strategies—including intermediate-layer fusion, input perturbation self-ensembling, and cross-model embedding fusion—are employed to enhance robustness.
Extensive experiments on datasets like UCR, UEA, HAR, and EEG demonstrate that MantisV2 consistently outperforms prior TSFMs, achieving state-of-the-art zero-shot accuracy of 85%. The results confirm that synthetic pretraining combined with multi-layer fusion strategies can bridge the performance gap between frozen and fine-tuned models. This approach significantly reduces the need for labeled data, enabling rapid deployment in real-world scenarios such as industrial monitoring, healthcare diagnostics, and financial analysis.
The research highlights the importance of synthetic data in scaling foundation models and opens new avenues for zero-shot learning in time series analysis. Despite current limitations related to computational costs and validation scope, the framework sets a new benchmark, promising broader impact in AI-driven time series understanding and application.
Deep Analysis
Background
时间序列分析在金融、医疗、工业监测等领域扮演着核心角色。早期方法多依赖特征工程和浅层模型,效果有限。近年来,深度学习模型如CNN、RNN和Transformer逐步崛起,提升了性能,但对大量标注数据依赖严重,泛化能力不足。基础模型(如TST、TS2Vec)提出自监督预训练,试图解决这一问题,但在零样本场景中仍存在性能差距。现有研究多关注模型复杂度和任务特异性,缺乏通用性强的预训练策略。本研究在此基础上,提出利用合成数据进行预训练,结合架构优化和测试策略,推动时间序列基础模型向零样本高性能发展。
Core Problem
核心挑战在于如何在缺乏标签或标签极少的条件下,训练出具有强泛化能力的时间序列基础模型。现有模型在零样本场景表现不佳,主要受数据依赖、过拟合和模型鲁棒性不足限制。数据泄露和过拟合问题严重制约模型的实际应用。如何利用合成数据避免数据泄露,提升模型泛化能力,成为亟待解决的难题。此外,模型架构的优化和测试时策略的设计也直接影响零样本性能。
Innovation
本研究的创新点包括:1)利用CauKer框架生成大规模合成时间序列,避免数据泄露,增强泛化能力;2)通过消融实验优化模型架构,简化参数,提升效率;3)引入多层中间表示融合和输出聚合策略,增强模型鲁棒性;4)采用对比学习进行预训练,强化特征表达。模型结合卷积、差分和统计特征编码,利用六层Transformer,加入RoPE和SwiGLU等优化技术,整体设计兼顾性能和效率。这些创新共同推动零样本时间序列分类性能达到新高。
Methodology
- �� 合成数据生成:利用CauKer框架,基于高斯过程和因果模型,生成多样化的时间序列样本,避免数据泄露。
- �� 预训练:采用对比学习,随机裁剪与尺度变换增强数据多样性,最大化特征空间的均匀性。
- �� 架构设计:结合卷积层、差分编码和统计特征编码,生成多层次的输入表示;采用六层Transformer,加入RoPE和SwiGLU优化。
- �� 测试时策略:融合中间层表示、输入扰动自集成、多模型融合,提升鲁棒性和泛化能力。
- �� 实验验证:在UCR、UEA、HAR和EEG数据集上进行广泛测试,比较不同架构和策略的效果,进行消融分析。
Experiments
实验采用公开的UCR、UEA、HAR和EEG数据集,评估模型在零样本条件下的分类准确率。基线包括TS2Vec、T-Loss等自监督模型,微调模型作为参考。模型超参数如Transformer层数、头数、隐藏维度均经过调优。采用随机裁剪尺度变换作为预训练增强手段,训练时间控制在合理范围内。通过消融实验验证架构优化和测试策略的贡献,统计模型性能的稳定性和泛化能力。结果显示,MantisV2在多个任务中均优于对比模型,验证了预训练合成数据和多层融合的有效性。
Results
在UCR数据集上,MantisV2的零样本准确率达85.0%,比TS2Vec的81.2%提升3.8个百分点,显著优于其他自监督模型。在UEA和HAR任务中,平均提升2-3%。合成数据预训练使模型泛化能力增强,避免了数据泄露风险。多层中间表示融合和测试策略的引入,使模型鲁棒性大幅提升,零样本性能接近微调模型。消融实验确认,架构简化和合成数据的引入是性能提升的关键因素。这些结果表明,提出的方法在实际应用中具有广泛的适用性和优越性。
Applications
该模型适用于需要快速部署、无需大量标注的工业监测、医疗诊断和金融分析场景。只需少量或无标签数据,即可实现高效分类,降低成本。未来,结合多模态数据和迁移学习,能进一步拓展在复杂环境中的应用潜力,推动智能监控、健康管理和金融风控等行业的智能化升级。
Limitations & Outlook
模型在极端噪声或异常情况下表现仍有限,合成数据多样性不足可能影响泛化能力。预训练依赖大量计算资源,实际部署时成本较高。当前验证主要在公开数据集,工业环境中的适应性和鲁棒性仍需验证。未来需优化模型结构,提升在复杂场景中的表现,并降低计算成本。
Plain Language Accessible to non-experts
想象你在准备一份大餐,厨师需要准备各种食材。传统方法就像用现成的食材,虽然简单,但可能不够新鲜或不适合所有菜肴。现在,厨师开始用虚拟的食材——用电脑模拟出来的食材,既安全又丰富多样。这个研究就像让电脑自己创造大量虚拟食材,然后用这些虚拟食材训练厨师,让他学会做各种菜肴。这样,即使没有真实的食材,也能做出美味的菜肴。模型用一种叫Transformer的“厨师”架构,结合不同的“调料”和“烹饪技巧”,让它变得更聪明、更快。通过不断试验和调整,厨师变得越来越厉害,不仅能做出好菜,还能在没有实际食材的情况下,快速识别和分类不同的菜肴。这就像用虚拟的食材训练厨师,让他在任何厨房都能做出美味佳肴一样。
ELI14 Explained like you're 14
想象你在学校的食堂,老师让你用不同的食材做菜。以前,你只能用自己见过的食材,做出来的菜也有限。现在,有个神奇的厨师,他可以用电脑模拟出各种虚拟食材,还能自己学习怎么做菜。这个研究就像让这个厨师用虚拟食材训练自己,学会识别各种菜肴。它用一种叫Transformer的“厨师”架构,结合不同的“调料”和“烹饪技巧”,让它变得更聪明、更快。通过不断试验和调整,这个厨师变得非常厉害,不仅能做出好菜,还能在没有真正食材的情况下,快速判断出菜的种类。就像你用虚拟的食材学习做菜一样,这个模型用虚拟数据训练自己,能在很多不同的任务中表现出色,特别是在没有很多例子的时候。它让机器变得更聪明,能帮人们更快、更好地理解时间序列数据,就像一个超级厨师一样!
Glossary
Transformer(变换器)
一种基于自注意力机制的深度学习架构,擅长处理序列数据,能捕捉长距离依赖关系。在本文中用于时间序列特征提取。
模型架构核心,用于编码时间序列信息。
合成数据(Synthetic Data)
由算法生成的模拟真实数据,用于训练模型,避免数据泄露,增强泛化能力。
预训练阶段用到的合成时间序列。
对比学习(Contrastive Learning)
通过最大化相似样本的表示相似度,最小化不同样本的表示差异,提升模型的判别能力。
预训练目标。
RoPE(Rotary Positional Encoding)
一种位置编码技术,通过旋转操作引入位置信息,改善Transformer的序列建模能力。
模型中的位置编码方法。
SwiGLU(SwiGLU激活)
一种高效的激活函数,结合门控机制,提高模型表达能力。
Transformer中的激活函数选择。
Open Questions Unanswered questions from this research
- 1 如何进一步提升合成数据的多样性以增强模型鲁棒性?
- 2 在极端噪声环境下模型的表现机制及优化策略?
- 3 模型在工业实际应用中的适应性和稳定性如何保证?
Applications
Immediate Applications
工业监测
无需大量标注数据即可实现设备故障检测,提高维护效率,降低成本。
医疗诊断
利用无标签或少标签的时间序列数据进行疾病预测,缩短诊断时间。
Long-term Vision
智能监控系统
实现全天候、全场景的自动化监控,提前预警潜在风险,保障安全。
Abstract
Developing foundation models for time series classification is of high practical relevance, as such models can serve as universal feature extractors for diverse downstream tasks. Although early models such as Mantis have shown the promise of this approach, a substantial performance gap remained between frozen and fine-tuned encoders. In this work, we introduce methods that significantly strengthen zero-shot feature extraction for time series. First, we introduce Mantis+, a variant of Mantis pre-trained entirely on synthetic time series. Second, through controlled ablation studies, we refine the architecture and obtain MantisV2, an improved and more lightweight encoder. Third, we propose an enhanced test-time methodology that leverages intermediate-layer representations and refines output-token aggregation. In addition, we show that performance can be further improved via self-ensembling and cross-model embedding fusion. Extensive experiments on UCR, UEA, Human Activity Recognition (HAR) benchmarks, and EEG datasets show that MantisV2 and Mantis+ consistently outperform prior time series foundation models, achieving state-of-the-art zero-shot performance.