Rapid Augmentations for Time Series (RATS): A High-Performance Library for Time Series Augmentation
Wadie Skaf † \,{}^{\dagger}, Felix Kern †, Aryamaan Basu Roy †, Tejas Pradhan †, Roman Kalkreuth, Holger Hoos · 2026
Read Rapid Augmentations for Time Series (RATS): A High-Performance Library for Time Series Augmentation by Wadie Skaf † \,{}^{\dagger}, Felix Kern †, Aryamaan Basu Roy †, Tejas Pradhan †, Roman Kalkreuth, Holger Hoos (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-03159.txt.
Introduction
Wadie Skaf and five co-authors release RATS, a fast library for augmenting time series data. Augmentation, making varied copies of training examples, is vital where labeled data are scarce and costly, but existing Python libraries slow down badly as datasets grow. RATS is written in Rust with Python bindings, and implements many augmentation methods, from basic transformations to frequency-domain operations and time warping, behind one pipeline interface with built-in parallelization.
Benchmarked against a commonly used library on 143 datasets, the Python version of RATS ran about three quarters faster on average, and up to ninety-five percent faster on large datasets. It also used up to about half the peak memory. The library targets production-scale training pipelines where augmentation has become the bottleneck.
Catalog record
| CREATOR | Wadie Skaf † \,{}^{\dagger}, Felix Kern †, Aryamaan Basu Roy †, Tejas Pradhan †, Roman Kalkreuth, Holger Hoos |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 28 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2601-03159
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Rapid Augmentations for Time Series (RATS): A High-Performance Library for Time Series Augmentation Wadie Skaf † \,{}^{\dagger}, Felix Kern †, Aryamaan Basu Roy †, Tejas Pradhan †, Roman Kalkreuth, Holger Hoos Abstract 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. 1 Introduction Time series analysis is a prevalent topic with multiple use cases, such as forecasting [ 6 ] , clustering [ 14 , 13 ] , classification [ 10 ] and anomaly detection [ 23 ] , in addition to applications in numerous sectors, including environmental science [ 3 ] and healthcare [ 24 ] . Deep learning methods trained in a fully supervised manner have achieved strong results in time series classification [ 10 , 7 , 18 ] ; however, these results hinge on the availability of large quantities of labelled data that are typically expensive and often infeasible to obtain. Data augmentation has emerged as a feasible solution to artificially increase the amount of high-quality, expensive-to-obtain labelled data without incurring the high cost of collecting and labelling new data; moreover,it has been extensively used in contrastive-based methods to generate the sample triplets (or pairs) required for contrastive loss when training models [ 15 , 30 , 17 , 22 , 21 ] and foundation models [ 29 , 25 , 28 , 21 ] . However, using data augmentation entails the following challenges: (i) the computational cost of obtaining the augmented data (ii) the selection of suitable augmentation methods for each datasets and downstream task (it has been demonstrated that choosing an augmentation strategy is a critical step that can have larger impact than the network architecture [ 12 , 9 ] ) . Despite its importance, fewer tools have been developed to address the challenges of augmenting time series data, compared to data from other domains, such as computer vision, where many tools are available. The most notable library for time series augmentation is tsaug [ 1 ] . As a native Python library, tsaug suffers from slow performance limited by the Python interpreter, hindering its application in larger-scale and performance-critical applications. In this report, we introduce Rapid Augmentations for Time Series (RATS) , a high-performance library for time series augmentation. RATS is written in Rust, a compiled low-level language, and includes Python bindings to facilitate its use within existing pipelines. In the following sections, we present the details of our high-performance time series augmentation library RATS and its Python wrapper RATSpy , highlighting the main features in Section 2 , followed by implementation details in Section 3 . Furthermore, we present benchmarking results and compare the performance of RATS against tsaug in Section 4 . 2 Features RATS and RATSpy support a wide spectrum of augmentation techniques for univariate time series data. In total, the libraries support 17 different augmenters, most of which are basic transformations, with some having more complex functionality. For each augmenter, it is possible to specify a probability with which it is executed for a given series in a batch. This allows for the probabilistic application of augmenters that can increase the variability of series in a dataset. These libraries also include the pipelining of augmenters. Using pipelining, it is possible to compose multiple augmenters and apply them one after the other. The methods implemented in the libraries can be classified into the following: basic augmentations, frequency domain transformations, frequency domain augmentations, time warping augmentations, and similarity measures (for assessing the quality of generated augmentations). For simplicity, in the following, we use RATS to collectively refer to both RATS and RATSpy . 2.1 Basic Augmentations For basic augmentations, we considered the most used augmentation methods in the literature. [ 26 ] presented Rotation , Permutation , Scaling , Jittering , and Cropping (also known as window Slicing) as valid transformations to time series data under which the labels are likely to remain invariant. We also implemented an augmenter to inject noise into time series data. For the types of noise, we followed [ 27 ] and considered uniform and Gaussian noise as well as injecting spikes or a slope trend into the data. The other basic augmenters, such as Reversing , Resizing , or Quantizing time series, were inspired by tsaug . Figure 1 shows an overview of a sample time series from the Car dataset [ 5 ] before and after basic transformations are applied. Figure 1 : Visualisation of some of the basic augmenters implemented in RATS on the Car dataset (first sample) 2.2 Frequency-Domain Transformations While basic augmentations tweak samples directly in the time domain, frequency-domain transformations look at a signal “as a whole” by breaking it down into simpler periodic components. In RATS , two classic transformations are implemented, namely: Discrete Cosine Transform (DCT) and Fast Fourier Transform (FFT) . Discrete Cosine Transform (DCT) works by rewriting a real-valued series as a weighted sum of cosine waves whose frequencies increase with the index of the respective component. Fast Fourier Transform (FFT) is an algorithm for computing the Discrete Fourier Transform (DFT) that expresses a discrete-time signal as a sum of complex exponentials and enables its analysis in the frequency domain. FFT powers almost every modern spectral analysis tool [ 4 ] . After every forward–inverse transformation, the maximum absolute difference between the original and reconstructed datasets is checked. With a tolerance of 10^{-8} , both DCT and FFT reproduce every sample within a double-precision round-off. 2.3 Frequency Domain Augmentations In addition to the passive frequency-domain transformations presented in Section 2.2 , RATS offers two active spectrum-level augmenters that inject variation directly in the frequency domain, namely: Amplitude and Phase Perturbation (APP) and Frequency Mask. Both APP (fine-grained noise) and Frequency Mask (coarse band removal) offer complementary ways for nudging models toward spectral robustness without altering the overall length or label of the series. Amplitude and Phase Perturbation (APP) adds zero-mean Gaussian noise to the magnitude and phase of every bin. APP includes the following steps: (i) The series is first pushed through an FFT (if the input is still in the time domain); (ii) each complex coefficient is converted to polar form and perturbed by two independent normal distributions whose standard deviations the user can set; (iii) finally, it is mapped back to Cartesian coordinates, before an inverse FFT completes the process. Frequency Mask suppresses a contiguous band of bins of a specific width, effectively simulating a narrowband dropout (notch filter).