Skip to content
AI.info

Research

Cadence: Error-Bounded Lossy Compression of Demand Time Series with a Time-Series Foundation Model

Overview Research area: Lossy and lossless compression of time series using pre-trained time-series foundation models, sitting at the intersection of information theory, scientific data reduction, and

Cadence: Error-Bounded Lossy Compression of Demand Time Series with a Time-Series Foundation Model
arXiv
2609.06008
Published
2026-09-05
Authors
Roberto Tacconelli

AI summary

Overview

Research area: Lossy and lossless compression of time series using pre-trained time-series foundation models, sitting at the intersection of information theory, scientific data reduction, and time-series database storage.

Technical level: Intermediate. The core idea is intuitive, but interpreting the results requires some familiarity with entropy coding, error-bounded compression, and how forecasting accuracy relates to code length.

Scope: The paper tests whether a pre-trained time-series foundation model (TimesFM-3) can compress numeric data more cheaply than classical predictors, and finds that the answer flips depending on whether coding is lossless or error-bounded, and on which data domain is being compressed.

What This Paper Is About

Shannon's framing that compression is prediction suggests that a model forecasting electricity demand better than a linear filter should also compress it better. The paper tests that inference directly: it routes a pre-trained time-series foundation model and a family of classical predictors through the identical entropy coder, first in a lossless setting, then in an error-bounded lossy setting. The goal is to determine precisely where, if anywhere, the foundation model buys real bits.

Key Contributions

  1. The log2 law as a design constraint. The paper formalizes why forecasting accuracy transfers only logarithmically into lossless compression (Δbits = log2(MAE_old / MAE_new)), and verifies it numerically, explaining a measured median of +0.03% that would otherwise look like an implementation bug.
  2. An identical-coder evaluation protocol. Every predictor — neural and classical — is routed through one adaptive binary range coder, so comparisons isolate prediction quality rather than entropy-coding quality. The harness is validated on i.i.d. noise, where true entropy is log2(4096) = 12.000, every predictor reads 12.003 bits/value, and the gain is exactly +0.00%.
  3. Domain localization on uncontaminated data. TimesFM-3 is trained on Wikipedia pageviews and Google Trends, so the team evaluates on two 2026 corpora postdating any plausible training cutoff (EIA-930 grid demand and MTA subway ridership) and tests the resulting domain claim by attempting to falsify it on SDRBench.
  4. Cadence, a closed-loop error-bounded codec. The codec guarantees |x̂_t − x_t| ≤ τ per sample, codes the context bootstrap lossily, and is shown to round-trip bit-exactly at group sizes G = 8 and G = 16.
  5. A determinism constraint for neural codecs. Predictions are not bit-identical across batch sizes, and no PyTorch configuration tested repairs this, so group size must be part of the container format.

Main Findings

  • Lossless coding does not benefit from the foundation model. Median gain over the best classical predictor is +0.03% across 12 series, with 7/12 nominal wins of negligible size. A 1.51× accuracy advantage buys 0.60 bits out of 20.28, or 2.9%; halving a 20-bit-per-value file would require a roughly 1000× better forecaster.
  • The advantage is real but narrowly localized in lossy coding. Cadence achieves a median gain of +13.3% (147/147) on grid load and +28.3% (150/150) on ridership, giving +21.4% median over 297 series-tolerance pairs, winning all 297. The same codec gains only +6.4% (21/24) on mixed operational telemetry and +2.9% (7/12) on synthetic signals.
  • Gains grow with tolerance in the winning domains. On grid load: +6.4%, +13.3%, +21.2% at ρ = 0.01, 0.05, 0.20. On ridership: +19.9%, +27.7%, +51.2%.
  • A retracted result reverses under a real entropy coder. An earlier version reported grid gains shrinking in ρ (+21.3%, +14.0%, +13.9%) because LZMA compresses the long zero runs a simple predictor emits at loose tolerance. The arithmetic coder inverts the trend. Replacing xz/zstd with the paper's coder gains +9.7% (15/15).
  • The domain claim survives a falsification attempt. On SDRBench the codec loses: −0.8% median, 0/27, deepening to −41% on a smooth simulation field (Hurricane scanlines: −3.5%, −25.4%, −41.0% at ρ = 0.01, 0.05, 0.2). EXAALT molecular-dynamics trajectories are near break-even (−0.6% median, 0/18).
  • Batch-size invariance is unattainable. Repeated calls and reordered batches are bit-identical, but batch 1 vs. batch 8 differs by 3.9 × 10⁻³ MW and batch 8 vs. batch 9 by 7.8 × 10⁻³ MW. Disabling TF32, SDPA, or forcing the MATH backend does not repair it. With D = 985 MW at ρ = 0.05 on MISO, the per-sample desynchronization probability is ≈8 × 10⁻⁶ — negligible per sample, near-certain over a million.
  • The context bootstrap dominates short archives. The seed (c = 512, coded lossily) is 0.412 bpv, 20% of a 2.111 bpv total at n = 4300, ρ = 0.05. End-to-end gains are +6.8% at six months of hourly data, rising to +11.0% at one year, +13.0% at two years, and +14.2% at five years.
  • The quantile head is not worth transmitting. Using the predicted spread yields a median +0.3% (10/15 configurations) and is negative at ρ = 0.2. Splitting the index stream into eight spread buckets reads −66.3% (0/15), and expressing spread as contexts inside one stream still gives −13.8% (0/15); the cause is context dilution, not fragmentation.
  • Context length is worth little, but shorter contexts save compute. c = 64 costs 11.6% of body rate against c = 1024; c = 256 costs 3.1%. Accuracy saturates early, so c = 256 quarters inference cost for a small body-rate penalty.
  • Against downsampling, the guarantee is the strongest case. Downsampling's worst-case error relative to Cadence's guaranteed bound is 28.0× (grid), 36.7× (NAB), and 56.1× (transit) at the median.
  • Against the real SZ3 binary the median gain is +36.3%, but that is not the defensible bar. The paper's own classical predictors also beat SZ3 on these 1-D data; SZ3 carries roughly 500 B of container overhead that dominates below N ≈ 4k.
  • Three negative results. Cross-series conditioning (conditioning en.wikipedia views on de.wikipedia) moved code length from 19.045 to 19.054 bpv despite lowering MAE from 113.6k to 111.4k. Foundation-model interpolation failed in every configuration tested (K ∈ {8, 16}, stride ∈ {32, 64}, ρ ∈ {0.01, 0.05}), from −0.7% to −210%. Hybrid switching via a zero-bit "leader" rule selects TimesFM-3 in 100% of blocks and degenerates to TimesFM-3 alone; the net gain is +0.0%, and an earlier −4.0% was entirely fragmentation.
  • No cheap proxy predicts which series will benefit. Neither the ratio of local to long-lag classical code length (r = −0.37) nor daily-versus-lag-1 autocorrelation (r = +0.44, n = 49) separates winners from losers.
  • On reporting discipline: every idealized number in the study came in high when re-measured as real bytes. Idealized code lengths overstated gains by roughly a quarter; a projected +9.9% end-to-end figure measured +2.9%; a domain gain of +15% inferred from an idealized coder measured −12.9%.

Note: the paper reports a few figures inconsistently across its own abstract, contributions list, and tables — for example, the contributions list cites −3.4% synthetic and +5.2% mixed telemetry where Table 2 reports +2.9% and +6.4%, and it describes the context-length effect as "∼1 point" where Section 5.9 says "about two points."

Methodology in Plain English

The approach rests on a simple mechanism. Given a series and a tolerance τ = ρσ(x), the codec computes a prediction, quantizes the difference between the actual value and the prediction with step D = 2τ, and codes the resulting integer index. Because the prediction plus an index multiple of D always lands within τ of the true value, the reconstruction is guaranteed to satisfy the error bound by construction.

The critical design choice is that the predictor is fed its own reconstruction, never the original data. This closed loop means the decoder can reproduce the prediction exactly, and it also means any quantization noise the predictor sees propagates forward.

For the neural predictor, the authors use TimesFM-3 with a context of c samples and a horizon of 64, of which only the first step is used, taking the median quantile as the point forecast. Since the model's outputs vary slightly with batch size, a group size G is fixed in the container format so encoder and decoder run identical batches.

The model needs c samples of history before it can predict anything, whereas a Lorenzo-1 predictor needs one. Cadence codes those c samples lossily at the same τ using the best of five side-information-free classical predictors, storing a one-byte identifier — a cost the classical baseline never pays, which is why the paper reports end-to-end rather than body-only gains.

All quantization indices pass through one adaptive binary range coder with CABAC-like binarization, and crucially the conditioning is expressed as contexts within a single stream rather than as separate streams, so no partitioning can fragment the coder. Baselines are the best of six classical error-bounded predictors (Lorenzo orders 1–3, 32-tap least-squares LPC, multilevel linear and cubic interpolation), selected per row, each run closed-loop at the same τ through the identical coder.

Why This Matters

The paper reframes a plausible-sounding assumption — better forecasting means better compression — as a quantitative constraint that is easy to check before building anything. It also argues that

Authors’ abstract

We present Cadence, an error-bounded lossy compressor for numeric time series pairing a 330M-parameter time-series foundation model (Google TimesFM-3) with an adaptive arithmetic coder, guaranteeing $|\hat{x}_t-x_t|\leτ$ on every sample. One negative result constrains the design space: for lossless coding a foundation model is worth nothing, because bits saved are logarithmic in predictor accuracy, $Δb=\log_2(\mathrm{MAE_{old}}/\mathrm{MAE_{new}})$. So the $1.51\times$ advantage TimesFM-3 holds over a 32-tap linear predictor buys 0.60 bits of 20.28, a median gain of +0.03%. Error-bounded coding escapes this at one point: once a forecast lands inside the band the residual index is zero and the sample nearly free. Cadence contributes: (1) an adaptive range coder with context-modelled binarization, beating xz/zstd on real indices by 9.7% (15/15) and reversing a finding from a general-purpose back end; (2) a determinism result -- predictions are not bit-identical across batch sizes, and no PyTorch configuration repairs this, forcing group size and execution device into the container format; and (3) domain localization on corpora postdating any plausible training cutoff. On 49 EIA-930 balancing-authority demand series (2026) Cadence gains 13.3% over the best of six classical predictors, and 28.3% on 50 MTA ridership series (2026): 21.4% median over 297 series-tolerance pairs, winning all 297. Against downsampling, what time-series databases deploy for retention, its guaranteed worst-case error is $28$--$56\times$ tighter at equal size. End-to-end, once the context bootstrap is paid for, gains run from 6.8% at six months of hourly data to 15.1% asymptotically. Attempting to falsify the domain claim on SDRBench, theory predicts failure and delivers: -0.8% median, 0 of 27 pairs gaining. Three further negative results and eight retracted claims are reported in full.

Read the original paper