arXiv:2609.06008cs.ITSep 2026

Manuscript Offprint

arXiv:2609.06008

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

Roberto Tacconelli

Abstract

We ask whether a pre-trained time-series foundation model reduces the bit cost of numeric data, and find that the answer depends entirely on the coding regime and the data domain. For lossless coding the answer is no, and the reason is structural rather than an engineering deficit: code length depends on the logarithm of predictor accuracy, so the 1.51×1.51\times accuracy advantage TimesFM-3 [11] holds over a 32-tap linear predictor on real data buys 0.60 bits out of 20.28, or 2.9%. Measured against classical predictors under an identical entropy coder, TimesFM-3 yields a median gain of +0.03% across 12 series—nil. For error-bounded lossy coding the picture reverses on one specific class of data. We introduce CADENCE, a closed-loop codec that guarantees ∣x^t−xt∣≤τ|\hat{x}_t - x_t| \leq \tau per sample, and evaluate it on two uncontaminated corpora postdating any plausible training cutoff: 49 US balancing-authority hourly demand series (EIA-930, 2026) and 50 MTA subway station hourly ridership series (2026). Against the best of six classical error-bounded predictors—every predictor coded by the same adaptive arithmetic coder we implement—CADENCE achieves a median gain of +13.3% (147/147) on grid load and +28.3% (150/150) on ridership—+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% on synthetic signals, locating the effect in aggregate human-demand series rather than in numeric data generally. We report five results that constrain how such systems must be built and measured. (1) The log2log_2 law explains why forecasting improvements do not transfer to lossless compression. (2) Batch-size invariance is unattainable: no PyTorch configuration we tested makes predictions bit-identical across batch sizes, so group size must be part of the container format; we verify a bit-exact round trip under this constraint. (3) The context bootstrap is a cost unique to neural codecs and dominates short archives: end-to-end gains are +6.8% at six months of hourly data, rising to +15.1% asymptotically, well below body-only figures. (4) The model's quantile head contributes nothing beyond its median, context length is worth ~1 point, and a general-purpose entropy back end is not neutral—replacing xz/zstd with our coder gains

+9.7% and reverses one apparent finding. (5) Against downsampling—what time-series databases actually deploy—CADENCE delivers a worst-case error 28–56× tighter at equal file size, which we argue is the strongest practical case for the approach. We test the domain claim by attempting to falsify it on SDRBench, where the theory predicts failure and delivers it: −0.8% median, 0/27, deepening to −41% on a smooth simulation field.

Keywords: lossy compression, error-bounded compression, time-series foundation models, scientific data reduction, time-series databases

Code and data: https://github.com/robtacconelli/Cadence

1. Introduction

Shannon [22] established that compression is prediction: a model assigning high probability to the next symbol lets an encoder spend fewer bits on it. Recent work has pushed this to large neural models, with Delétang et al. [7] showing that a 70B language model compresses text below classical context-mixing systems, and practical implementations following [5, 19, 23].

Time-series foundation models—TimesFM [6, 11], Chronos [3], Moirai [29]—are the analogous development for numeric sequences. They are pre-trained on trillions of time points and forecast unseen series zero-shot. If compression is prediction, a model that forecasts electricity demand better than a linear filter should compress it better. This paper tests that inference and finds it substantially false in the lossless case, and true only within a narrow domain in the lossy case.

The negative result has a clean form. Code length under a well-matched residual model is ≈log⁡2(residual scale)+c\approx \log_2(\text{residual scale}) + c, so the bits saved by a better predictor are logarithmic in the accuracy ratio:

Δbits=log⁡2(MAEoldMAEnew).(1)\Delta\text{bits} = \log_2\left(\frac{\text{MAE}_{\text{old}}}{\text{MAE}_{\text{new}}}\right). \tag{1}

On real hourly pageview data, TimesFM-3 attains MAE = 113,608 against 171,507 for a 32-tap least-squares LPC—a genuine 1.51×1.51\times improvement—which Eq. 1 converts into 0.597 bits out of 20.28, i.e. 2.9%.

Figure

Figure 1: Compression gain is logarithmic in forecasting gain (Eq. 1). Points are measured TimesFM-3-versus-LPC-32 accuracy ratios on three real series; the inset zooms the observed regime, where a 1.33–1.51× accuracy advantage yields 0.41–0.60 bits. Halving a 20-bit-per-value file requires a 1024× better predictor.

Halving a 20-bit-per-value file would require a ~1000× better forecaster. This single identity is sufficient to rule out the lossless neural entropy coder, and with it per-file adaptation, retrieval-augmented context, and lossless float coding, all of which route their gain through a smaller residual. Figure 1 shows the relationship together with the three measured operating points.

Error-bounded lossy coding escapes Eq. 1 at one point: when the forecast lands inside the tolerance band the quantized residual is exactly zero and the sample costs ≈0 bits. That is a discontinuity, not a logarithm. We therefore build CADENCE, a closed-loop error-bounded codec, and evaluate it against the predictors that state-of-the-art scientific compressors actually use—the Lorenzo family and multilevel interpolation of SZ3 [16], and ZFP [17].

We make the following contributions.

  1. The log₂ law as a design constraint. We formalize why forecasting accuracy transfers only logarithmically into lossless compression and verify it numerically, explaining a +0.03% median result that would otherwise look like an implementation failure.

  2. An identical-coder evaluation protocol. Comparing a neural predictor against a classical one is only meaningful if both residuals pass through the same entropy coder. We route every predictor through one adaptive mixture-of-scales coder, and validate the harness on i.i.d. noise, where all predictors read 12.003 bits/value against a true entropy of 12.000 and the measured gain is exactly +0.00%. An earlier version of our harness reported a +2.15% “gain” on pure noise—an artifact of comparing a flexible piecewise-linear density against a Laplace.

  3. Domain localization on uncontaminated data. TimesFM-3 is pre-trained on Wikipedia pageviews and Google Trends, so the obvious benchmarks

are contaminated. We evaluate on two corpora postdating any plausible cutoff and show the gain is a property of aggregate human-demand series (+21.4%, 297/297), not of numeric data (-3.4% synthetic, +5.2% mixed telemetry).

  1. A determinism constraint for neural codecs. We show that model predictions are not bit-identical across batch sizes and that no configuration we tested (TF32 disabled, SDPA disabled, deterministic algorithms, forced MATH backend) repairs this. Encoder-decoder desynchronization probability is ~8 × 10⁻⁶ per sample, negligible per sample and near-certain over a million. Group size must therefore be part of the container format; we verify a bit-exact round trip under that rule.

  2. Context-bootstrap accounting. A neural codec must transmit c samples of context that a Lorenzo predictor does not need. We price it, show it dominates short archives, and report end-to-end rather than body-only gains.

  3. Ablations. Context length is worth ~1 point, and the nine quantiles—TimesFM-3's only probabilistic output—contribute +0.3% beyond their median, so the codec can discard them.

  4. An adaptive arithmetic coder, and evidence that the back end is not neutral. We implement a binary range coder with context-modelled binarization of quantization indices. It beats xz/zstd on real indices by +9.7% (15/15), so general-purpose-back-end results understate neural and classical predictors alike; more importantly it reverses an apparent finding (Section 5.2) and re-explains a negative result (Section 5.9) we had attributed to the wrong cause.

  5. Comparison against deployed practice. Time-series databases retain history by downsampling, which has unbounded L∞L_\infty error. At equal file size CADENCE's guaranteed bound is 28–56× tighter.

  6. Three negative results. Cross-series conditioning through covariates, foundation-model interpolation, and per-block hybrid switching all fail; we report why, since two of the three fail for the same measurable reason.

References (30)