Time series augmentation is critical for training robust deep learning models, particularly in domains where labelled data is scarce and expensive to obtain. However, existing augmentation libraries for time series, mainly written in Python, suffer from performance bottlenecks, where running time grows exponentially as dataset sizes increase -- an aspect limiting their applicability in large-scale, production-grade systems. We introduce RATS (Rapid Augmentations for Time Series), a high-performance library for time series augmentation written in Rust with Python bindings (RATSpy). RATS implements multiple augmentation methods spanning basic transformations, frequency-domain operations and time warping techniques, all accessible through a unified pipeline interface with built-in parallelisation. Comprehensive benchmarking of RATSpy versus a commonly used library (tasug) on 143 datasets demonstrates that RATSpy achieves an average speedup of 74.5\% over tsaug (up to 94.8\% on large datasets), with up to 47.9\% less peak memory usage.
翻译:时间序列增强对于训练鲁棒的深度学习模型至关重要,尤其在标注数据稀缺且获取成本高昂的领域中。然而,现有的时间序列增强库主要基于Python编写,存在性能瓶颈,其运行时间随数据集规模增大呈指数级增长——这一局限性阻碍了其在大规模生产级系统中的应用。本文介绍RATS(时间序列快速增强库),这是一个用Rust编写并具有Python绑定(RATSpy)的高性能时间序列增强库。RATS实现了多种增强方法,涵盖基础变换、频域操作和时间扭曲技术,所有功能均可通过内置并行化的统一流水线接口访问。在143个数据集上对RATSpy与常用库(tsaug)进行的全面基准测试表明,RATSpy相比tsaug平均实现了74.5%的速度提升(在大型数据集上最高可达94.8%),同时峰值内存使用量降低最高达47.9%。