One way to protect a stream of readings (a patient's vitals, a car's speed, a household's meter) is to leave every number intact and scramble when each number was recorded. Each reading gets swapped with a nearby one inside a short window. This "temporal" privacy is attractive because the numbers stay exact, and moving averages over the stream are almost untouched. The catch is that forecasting models depend on the order of readings. Classical forecasters such as SARIMA (seasonal autoregressive models that predict from fixed-lag past values) and the neural models trained on their errors all assume that "one step ago" and "one season ago" mean what they say. We propose to make forecasting work on such scrambled data. The key fact is that the scrambling mechanism is public. Its effect on the correlations between readings at different lags is therefore a known linear transformation, and a forecaster's linear stage can be fit by inverting that transformation instead of trusting the scrambled order.
The same question has a second side that the privacy literature has left open. A forecaster good enough to recover the lag structure is also the natural tool for an adversary who wants to put scrambled readings back in order. We therefore study utility and leakage together. We borrow the view from feedback-based state secrecy that secrecy should be measured as the adversary's prediction error, and that predictable dynamics are exactly where it fails.
Core Claim
Temporal local differential privacy (LDP, a guarantee enforced on each user's device before data leaves it) is realized by the Stateful Switch mechanism. That mechanism applies atomic swaps within a window of size $k$, so every reading is released exactly once. The released series $\tilde y_t = y_{\pi(t)}$ is a random, band-limited permutation of the true series $y_t$, with $|\pi(t)-t|\le k$. For a stationary series with autocovariance $\gamma(m)$ (the covariance between readings $m$ steps apart), the released autocovariance is
$$\tilde\gamma(h) = \sum_{m} w_h(m)\,\gamma(m), \qquad w_h(m) = \Pr\big[\pi(t+h)-\pi(t) = m\big].$$
The weights $w_h$ depend only on the mechanism, never on the data. They can therefore be computed exactly, or by simulating the mechanism on index sequences. Two consequences follow.
First, the damage is concentrated at short lags. Seasonal lags $s \gg k$ are only locally smoothed, while lags below roughly $2k$ are heavily mixed. Second, the true $\gamma$ over lags up to some horizon $L$ can be recovered by solving a regularized linear system under a positive-definiteness constraint. SARIMA-style parameters then follow from the corrected moments.
We claim that a hybrid forecaster built this way recovers most of the gap between naive training on scrambled data and training on clean data. It does so without any per-sequence unscrambling, and therefore without doing the adversary's work. The hybrid has two parts:
- a linear stage fit from switch-corrected autocovariances;
- a neural stage trained on residuals, with a loss defined on $k$-aligned window sums, which the switch preserves exactly within blocks, rather than on point values the switch corrupts.
Research Program
The work has three parts.
The correction estimator. We derive $w_h$ for Stateful Switch and for its random-swap baseline RanSwitch. We also derive it for the independent-delay mechanism of Beyond Value Perturbation. That mechanism loses and duplicates points, which adds a mixture term. We then solve for $\gamma$ with Toeplitz-constrained least squares. We will characterize when the inversion is well-conditioned. We expect conditioning to worsen as $k$ approaches the dominant correlation length, because short-lag information is averaged away. That regime is where the method should be expected to fail.
The hybrid forecaster. We keep the recipe shown to work on clean data by A Critical Audit of Spatiotemporal Forecasting Benchmark Datasets and Baselines. That paper trains a graph recurrent network (GCRN-GRU) on node-level SARIMA residuals, and it also warns that careless differencing amplifies high-frequency noise. We change only what the scrambling breaks. The SARIMA stage is fit from corrected moments rather than from the scrambled sequence. The residual network is trained against window-sum targets.
Our deployment scenario is concrete. A curator collects LDP-scrambled streams from many users and trains one shared forecaster. Users then run it locally on their own clean histories. We also report the case where inputs at test time are scrambled.
The adversary. The file notes that Stateful Switch assumes weak autocorrelation and lists reconstruction by exploiting smoothness as open. We build that attacker. Because the permutation is band-limited, the most likely ordering under a forecaster's likelihood can be found by dynamic programming over positions within the band, which is tractable for small $k$. We score the attacker by the fraction of timestamps restored and by the resulting linkage accuracy. We plot both against how predictable the series is.
The framing comes from State-Secrecy Codes for Networked Linear Systems. That paper hides a linear system's state by sending differences from the last acknowledged state, and it proves the eavesdropper's error explodes only when the dynamics are unstable. The analogous prediction here is the mirror image: temporal scrambling should leak most on smooth, strongly autocorrelated series. We expect a lag-one autocorrelation measured at scale $k$ to predict reconstruction success.
The other directions play smaller roles here. Homomorphic encryption appears as a competing way to reach the same forecaster. Feedback-based key generation is out of scope as a mechanism, because the swap randomness lives on the user's device and needs no shared key.
Baselines
Clean-data reference. This is the hybrid SARIMA+GCRN-GRU trained on unscrambled data. On METR-LA (traffic speeds from 207 Los Angeles sensors), the audit paper reports MAE 3.32 (A Critical Audit…). We reproduce it with the authors' configuration to fix the ceiling on our hardware.
Naive hybrid. This is the do-nothing reference: the same pipeline, trained directly on scrambled data as if it were clean.
Pure deep models on scrambled data. We train end-to-end GCRN-GRU and a zero-shot foundation-model feature generator in the style of FutureBoosting on the same scrambled inputs. This tests whether capacity alone absorbs the damage.
Value-perturbation LDP at matched privacy. Laplace noise is added to readings at the same privacy budget $\epsilon$. We run it with and without the obvious correction: subtracting the known noise variance from $\gamma(0)$.
All scrambled-data methods get identical data splits and identical privacy settings, $k$ and $\epsilon$. They also get the same hyperparameter-search budget of 50 trials per method and model, the same GPU hours, and the same random seeds.
Ablations. We isolate the two ingredients of the proposal: moment correction alone, window-sum loss alone, and both together.
What counts as success. "Beating" the naive hybrid means closing at least half the gap in mean absolute error (MAE) between it and the clean reference, at moderate $k$, on at least three of the five datasets.
There is no reported result found on Lacuna for any forecasting benchmark under temporal LDP. The only reported temporal-LDP figures are moving-average errors: 3 to 5 orders of magnitude below value perturbation, and over 20% utility gain over RanSwitch (Stateful Switch).
Why not just…?
Why not just use value perturbation, since its effect on autocovariance is even easier to correct? This is a real threat. Independent Laplace noise inflates only $\gamma(0)$, so after subtracting the noise variance, linear estimation is in expectation unbiased. The argument against it is variance and point-level damage. At small $\epsilon$ the noise dominates each reading, Stateful Switch reports moving-average errors orders of magnitude worse, and in clinical settings exact thresholds matter (Benchmarking deep learning models on large healthcare datasets). We include the corrected value-perturbation baseline explicitly. If it matches our method in forecasting error at equal $\epsilon$, we will report that temporal privacy buys nothing for forecasting.
Why not just use a static per-person date shift, which preserves every lag? When the threat is calendar linkage, this is the right answer. Static shifts are how MIMIC-III and the seasonality-preserving variant in MC-MED are released, and we recommend them there. They offer no local privacy guarantee against the collector in live streams, however. They also leave intra-person interval patterns intact, and those patterns can themselves identify people. EHRCon further shows that shifts create their own artifacts: over 56% of note–table discrepancies are time-related. Our scope is explicitly the streaming LDP threat model.
Why not just let a deep network learn through the scrambling? The audit found that pure deep models often trail SARIMA on clean data (A Critical Audit…), and scrambling makes their job harder. Still, the end-to-end and foundation-model baselines test this directly, on identical budgets.
Why not just encrypt the streams and train under homomorphic encryption (computation directly on encrypted data)? This addresses a different threat. It hides raw data from the server, but it gives no differential privacy for the trained model or its outputs. It also needs key management, and bootstrapping costs dominate deep encrypted circuits (SAFHIRE, SoK: FHE Accelerators). We run an encrypted autoregressive fit using CKKS (a homomorphic scheme for approximate real-number arithmetic) as a cost and accuracy reference point. There is no reported result found on Lacuna for encrypted time-series forecasting.
Proposed Experiments
Datasets. We evaluate on METR-LA, PEMS-BAY, WikiMaths, and Chickenpox with differencing undone, as the audit recommends. We add the public RealE electricity data (France and Germany) and the US-stock and taxi streams used by Stateful Switch. For each, we sweep the swap window $k \in \{2,4,8,16,32\}$ and the privacy budget $\epsilon$. We report MAE against the clean truth and relative gap closure.
First decisive check: does the damage fall where the theory says? The drop in MAE for the naive hybrid should track the mass of $w_h$ at short lags. Weekly seasonal structure on traffic data should survive once $s \gg k$. If the error does not concentrate at short lags, the correction model is wrong.
Second decisive check: do the fitted parameters recover the clean ones? Corrected-moment SARIMA coefficients should converge to those fit on clean data as the number of users grows. We will test this against simulated ARMA processes with known parameters, before any real data.
Third decisive check: the utility–leakage frontier. We report reconstruction accuracy for the dynamic-programming attacker at each $(k,\epsilon)$, alongside forecasting gap closure. The central result we seek is a regime where the curator's forecaster reaches near-clean MAE while per-sequence reconstruction stays near chance. The contrasting smooth-series regime, where the attacker wins, would turn Stateful Switch's open caveat into a measurable condition. That condition would tell practitioners which window $k$ a given series needs.
References
- Stateful Switch: Optimized Time Series Release with Local Differential Privacy
- Beyond Value Perturbation: Local Differential Privacy in the Temporal Setting
- A Critical Audit of Spatiotemporal Forecasting Benchmark Datasets and Baselines
- State-Secrecy Codes for Networked Linear Systems
- Regression Models Meet Foundation Models: A Hybrid-AI Approach to Practical Electricity Price Forecasting
- Benchmarking deep learning models on large healthcare datasets
- MIMIC-III, a freely accessible critical care database
- MC-MED, multimodal clinical monitoring in the emergency department
- EHRCon: Dataset for Checking Consistency between Unstructured Notes and Structured Tables in Electronic Health Records
- Practical and Private Hybrid ML Inference with Fully Homomorphic Encryption
- SoK: Fully Homomorphic Encryption Accelerators