AI 压缩时间序列,比传统算法省 13%,但有个坑
压缩时间序列数据(电网负荷、地铁客流这类)时,传统算法靠预测下一步来省空间,预测越准压得越狠。这篇把 3.3 亿参数的大模型 TimesFM 拿来当预测器,配合自适应算术编码,在保证每个数据点误差不超过设定值的前提下,比六个经典算法平均省 13.3%,在 297 组测试里全胜;对地铁客流数据省 28.3%。但有个反直觉的发现:如果要求无损压缩,大模型几乎没用——因为无损压缩省下的比特数只跟预测精度的对数成正比,模型精度高 1.5 倍,最终只多省 0.03%。误差有界压缩之所以能赢,是因为一旦预测落在误差带内,那个样本几乎免费。另一个坑:同一模型在不同 batch size 下预测结果不完全一致,且无法通过配置修复,所以压缩文件必须记录分组大小和执行设备,否则解压对不上。这不是你明天能用的工具,但它是「大模型进入数据基础设施」的一个真实信号:不是所有场景都值得上大模型,误差有界压缩是它少数能兑现优势的地方。
📄 原文摘要(英文)
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 |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(MAE_{old}/MAE_{new}). So the 1.51times 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--56times 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.