Table of Contents
Fetching ...

Learned Compression of Nonlinear Time Series With Random Access

Andrea Guerra, Giorgio Vinciguerra, Antonio Boffa, Paolo Ferragina

TL;DR

NeaTS introduces a nonlinear, error-bounded time series compression framework that yields lossless and lossy representations with bounded residuals. By generalizing nonlinear ε-approximation and partitioning to minimize output space, and by a succinct, random-access-friendly encoding layout, NeaTS achieves competitive compression ratios while enabling fast decompression and single-value access. Empirical results across 16 real-world datasets show NeaTS often outperforms state-of-the-art lossy and lossless compressors in a range of metrics, including range-queries, making it well-suited for storage and real-time analysis of massive time series. The work combines theoretical guarantees with a practical, query-oriented design, offering a new direction for learned, function-based time series compression.

Abstract

Time series play a crucial role in many fields, including finance, healthcare, industry, and environmental monitoring. The storage and retrieval of time series can be challenging due to their unstoppable growth. In fact, these applications often sacrifice precious historical data to make room for new data. General-purpose compressors can mitigate this problem with their good compression ratios, but they lack efficient random access on compressed data, thus preventing real-time analyses. Ad-hoc streaming solutions, instead, typically optimise only for compression and decompression speed, while giving up compression effectiveness and random access functionality. Furthermore, all these methods lack awareness of certain special regularities of time series, whose trends over time can often be described by some linear and nonlinear functions. To address these issues, we introduce NeaTS, a randomly-accessible compression scheme that approximates the time series with a sequence of nonlinear functions of different kinds and shapes, carefully selected and placed by a partitioning algorithm to minimise the space. The approximation residuals are bounded, which allows storing them in little space and thus recovering the original data losslessly, or simply discarding them to obtain a lossy time series representation with maximum error guarantees. Our experiments show that NeaTS improves the compression ratio of the state-of-the-art lossy compressors that use linear or nonlinear functions (or both) by up to 14%. Compared to lossless compressors, NeaTS emerges as the only approach to date providing, simultaneously, compression ratios close to or better than the best existing compressors, a much faster decompression speed, and orders of magnitude more efficient random access, thus enabling the storage and real-time analysis of massive and ever-growing amounts of (historical) time series data.

Learned Compression of Nonlinear Time Series With Random Access

TL;DR

NeaTS introduces a nonlinear, error-bounded time series compression framework that yields lossless and lossy representations with bounded residuals. By generalizing nonlinear ε-approximation and partitioning to minimize output space, and by a succinct, random-access-friendly encoding layout, NeaTS achieves competitive compression ratios while enabling fast decompression and single-value access. Empirical results across 16 real-world datasets show NeaTS often outperforms state-of-the-art lossy and lossless compressors in a range of metrics, including range-queries, making it well-suited for storage and real-time analysis of massive time series. The work combines theoretical guarantees with a practical, query-oriented design, offering a new direction for learned, function-based time series compression.

Abstract

Time series play a crucial role in many fields, including finance, healthcare, industry, and environmental monitoring. The storage and retrieval of time series can be challenging due to their unstoppable growth. In fact, these applications often sacrifice precious historical data to make room for new data. General-purpose compressors can mitigate this problem with their good compression ratios, but they lack efficient random access on compressed data, thus preventing real-time analyses. Ad-hoc streaming solutions, instead, typically optimise only for compression and decompression speed, while giving up compression effectiveness and random access functionality. Furthermore, all these methods lack awareness of certain special regularities of time series, whose trends over time can often be described by some linear and nonlinear functions. To address these issues, we introduce NeaTS, a randomly-accessible compression scheme that approximates the time series with a sequence of nonlinear functions of different kinds and shapes, carefully selected and placed by a partitioning algorithm to minimise the space. The approximation residuals are bounded, which allows storing them in little space and thus recovering the original data losslessly, or simply discarding them to obtain a lossy time series representation with maximum error guarantees. Our experiments show that NeaTS improves the compression ratio of the state-of-the-art lossy compressors that use linear or nonlinear functions (or both) by up to 14%. Compared to lossless compressors, NeaTS emerges as the only approach to date providing, simultaneously, compression ratios close to or better than the best existing compressors, a much faster decompression speed, and orders of magnitude more efficient random access, thus enabling the storage and real-time analysis of massive and ever-growing amounts of (historical) time series data.

Paper Structure

This paper contains 22 sections, 2 theorems, 3 equations, 4 figures, 3 tables, 3 algorithms.

Key Result

Theorem 1

Let $T=[(x_1,y_1),\dots,(x_n,y_n)]$ be a time series, let $\varepsilon \geq 0$ be an integer, and let $f$ be a function with two parameters $\theta_1$ and $\theta_2$. If, for any $k$, the inequalities $-\varepsilon \leq f(x_k)-y_k \leq \varepsilon$ can be transformed into inequalities of the form $\ Then, for any $i$, we can compute the longest fragment $T[i,j]$ that admits an $\varepsilon$-approx

Figures (4)

  • Figure 1: NeaTS represents fragments of the time series via linear or nonlinear functions learned from the data. The residuals of the approximation are bounded by a value $\varepsilon$ so, if lossless compression is needed, we store them in packed arrays (shown on top).
  • Figure 2: The trade-off between compression ratio and speed of the lossless compressors, averaged on the 16 datasets.
  • Figure 3: The trade-off between compression ratio and decompression speed (left plot), and between compression ratio and random access speed (right plot) of the lossless compressors, averaged on the 16 datasets. Note that the vertical axis of the right plot is logarithmic.
  • Figure 4: Range queries throughput across different range sizes.

Theorems & Definitions (5)

  • Definition 1: Time series
  • Definition 2: $\varepsilon$-approximations
  • Theorem 1
  • proof
  • Corollary 1