Entanglement-Budgeted Quantum Generation of Spatiotemporal Embeddings

Many of the best traffic forecasters gain much of their accuracy from a large learned lookup table rather than from clever graph operators. This table is an "adaptive embedding": a free vector for every pair of sensor and time step, learned from data, with one size for each combination of node count, time window and width. We propose to replace this table with the output of a small simulated quantum circuit. The circuit's qubits are split into three groups that index node, time step and feature channel. The amount of entanglement allowed between the node qubits and the time qubits then directly sets how much space–time coupling the embedding can express. A few hundred circuit angles stand in for hundreds of thousands of table entries. The trained table is computed once and the forecaster runs entirely on ordinary GPUs.

The compression is not the main point. The main point is that the entanglement budget gives a measurable dial for a question the field argues about: how much real spatial-temporal interaction do these benchmarks contain? A recent audit found that standard benchmarks are dominated by each sensor's own history A Critical Audit of Spatiotemporal Forecasting Benchmark Datasets and Baselines. A generator whose node–time entanglement can be switched off, turned up, and compared against classical structured generators with matched parameter counts tests that claim directly. It also tests whether "quantum" parameterization adds anything beyond a well-chosen classical tensor factorization.

Core Claim

We make three claims, and each is falsifiable. First, the spatio-temporal adaptive embedding of STAEformer can be generated by a register-structured parameterized circuit with roughly two to three orders of magnitude fewer trainable numbers, at less than a few percent loss in forecasting error. STAEformer is the model that showed a plain Transformer becomes competitive once its input carries learned per-node, per-time embeddings Spatio-Temporal Adaptive Embedding Makes Vanilla Transformer SOTA for Traffic Forecasting.

Second, the error gap between a circuit with node–time entanglement and one restricted to a product of separate node, time and channel factors will be small on temporally dominated benchmarks such as METR-LA and PEMS-BAY. It will be larger on dense, congestion-heavy networks such as EXPY-TKY, and larger again when the model is trained on the residuals left after a seasonal linear model removes each sensor's own temporal pattern.

Third, the regression collapse previously reported for quantum weight generation comes from reading weights out of measurement probabilities. It does not come from parameter generation as such. In QT-LSTM, water-level MSE rose from 38.02 to 475.91 when an LSTM's weights were generated by a circuit Quantum-Train Long Short-Term Memory: Application on Flood Prediction Problem. Measurement probabilities are non-negative, sum to one, and shrink exponentially with qubit count, so they are a poor source of finely scaled real values.

Relation to Prior Work

The method comes from the Quantum-Train line of work. Those papers train a circuit on $\lceil \log_2 M \rceil$ qubits whose basis-state probabilities, passed through a small classical mapping network, become the $M$ weights of a classical network Training Classical Neural Networks by Quantum Machine Learning, Quantum-Train: Rethinking Hybrid Quantum-Classical Machine Learning in the Model Compression Perspective. We borrow a second ingredient from Quantum-PEFT, which builds weight updates from unitary circuits of rotations and controlled-Z gates and reports a GLUE average of 86.42 with 0.013M parameters against 86.12 for rank-4 LoRA with 0.33M Quantum-PEFT: Ultra parameter-efficient fine-tuning. The borrowed idea is to read real-valued signed amplitudes from a unitary rather than probabilities.

We depart from both lines in two ways. Those works compress the whole network or generic weight matrices, while we target only the one block whose size grows with nodes times time steps. They also treat the qubit register as an undifferentiated index, while we give the register a spatiotemporal meaning and control the entanglement between its parts.

QT-LSTM is the only prior work at this exact intersection. It shapes our design in two ways. It treats sensors as a flat concatenated vector with no spatial structure, and its regression failure is the risk we must rule out. Other quantum graph methods encode graphs directly into quantum states. QGHNN maps static graphs onto Hamiltonians at 4–6 qubits QGHNN: A Quantum Graph Hamiltonian Neural Network, and QSGCNN uses quantum walks for whole-graph classification A Quantum Spatial Graph Convolutional Neural Network using Quantum Passing Information. Both need quantum computation at inference and neither models time, so we do not build on them.

The benchmark audit motivates the diagnostic half of the proposal. It also constrains our claims. Its finding that a graph-recurrent model trained on seasonal-model residuals reaches MAE 3.32 on METR-LA means that any embedding gain must be checked against a strong temporal-only reference.

Research Program

The generator works as follows. For a dataset with $N_v$ nodes, an input window of $T$ steps and embedding width $d$, we allocate $n_v=\lceil\log_2 N_v\rceil$ node qubits, $n_t=\lceil\log_2 T\rceil$ time qubits and $n_c=\lceil\log_2 d\rceil$ channel qubits. For PEMS-BAY with 325 nodes and 12 steps this is about 9 + 4 + 6–7 qubits, roughly 20 in total, which is within statevector simulation on one GPU. Each register gets its own layers of single-qubit rotations and internal controlled-Z gates. A separate set of $L_\times$ "bridge" layers applies entanglers across the node–time boundary, and a second set across the space-time–channel boundary. The embedding entry for node $v$, time $t$ and channel $c$ is

$$E_a[v,t,c] = s_c \cdot 2^{(n_v+n_t+n_c)/2}\,\mathrm{Re}\,\langle v,t,c \mid U(\phi)\mid 0\rangle,$$

where $U(\phi)$ is the circuit with angles $\phi$, $|v,t,c\rangle$ is the basis state whose bit string encodes the three indices, and $s_c$ is a learned per-channel scale. The factor $2^{(\cdot)/2}$ undoes the norm-one shrinkage. Basis states that fall beyond $N_v$, $T$ or $d$ are discarded.

Setting $L_\times=0$ makes the state a product across registers, so $E_a$ becomes a separable outer-product structure. Increasing $L_\times$ allows coupling between nodes and times; for each extra bridge layer, the entanglement across the node|time cut can grow by at most about one bit per crossing gate. After training we report the entanglement entropy across that cut. This is a direct reading of how much space–time coupling the model actually used.

Everything else in STAEformer stays classical and unchanged: the Transformer layers, the feature embedding, the periodicity embedding and the output head. This keeps the regression-critical path at full precision. It also means that any error change is attributable to the embedding.

The study proceeds in four steps. We first reproduce STAEformer on METR-LA, PEMS-BAY, PEMS04, PEMS08 and EXPY-TKY. We then replace its adaptive embedding with the circuit generator at several parameter budgets and with $L_\times\in\{0,1,2,4,8\}$, and trace error-versus-parameter curves. We repeat the whole sweep with targets replaced by seasonal-model residuals, following the audit's protocol. Finally, as a precision check, we run the same generator with the Quantum-Train probability-plus-mapping readout instead of the amplitude readout. On the Molene temperature network we also compare the learned node–time structure with the joint graph-time spectral model of Towards stationary time-vertex signal processing. A jointly stationary process has a specific low-coupling structure in the joint graph–time Fourier basis, which gives an analytic reference point for how much entanglement such data should need.

Baselines

The naive reference points are a per-sensor seasonal autoregressive model and STAEformer with its adaptive embedding removed entirely. Together they tell us how much the embedding is worth at all. If removing it costs almost nothing on a dataset, compressing it is uninteresting there.

The strongest reported competitor in the file is the audit's graph-recurrent model trained on seasonal residuals, at MAE 3.32 on METR-LA A Critical Audit of Spatiotemporal Forecasting Benchmark Datasets and Baselines. We will rerun it under the same splits and horizons. The full-size STAEformer is the uncompressed upper reference. The file gives no reported numbers for STAEformer or TESTAM on these datasets ("no reported result found on Lacuna for STAEformer MAE on METR-LA/PEMS-BAY" and "no reported result found on Lacuna for TESTAM on EXPY-TKY"), so we will reproduce both with the authors' settings. TESTAM is the mixture-of-experts forecaster that routes each road segment among temporal-only, static-graph and attention experts TESTAM: A Time-Enhanced Spatio-Temporal Attention Model with Mixture of Experts. It serves as a second strong classical reference on EXPY-TKY.

The comparisons that matter most are classical structured generators at exactly matched trainable-parameter counts. These are a CP factorization of the embedding into node, time and channel factors (the classical analogue of $L_\times=0$), a tensor-train factorization with bond dimension swept, and STAEformer with a narrower embedding width. All baselines get the same data, the same backbone, the same number of training epochs and the same hyperparameter search budget of 20 trials each.

Beating the classical generators means a strictly better error-versus-parameter curve at two or more budgets on at least two datasets, measured over five seeds. Matching full STAEformer within 2% MAE at 12 steps ahead while using under 1% of its embedding parameters would count as a practical success even without beating tensor-train. The entanglement ablation ($L_\times=0$ against $L_\times>0$) is the experiment that isolates the key ingredient.

Why not just…?

Why not just use a tensor-train factorization of the embedding? This is the real threat. A circuit of shallow brick-wall layers can be represented exactly by a tensor train whose bond dimension grows exponentially with the number of crossing layers. A tensor train with matched parameters may therefore match our generator. The cited sources give no evidence either way for embeddings. Quantum-PEFT's gains over LoRA Quantum-PEFT: Ultra parameter-efficient fine-tuning were measured against low-rank updates, not against tensor networks. If tensor-train matches us, we will say so plainly. The surviving contribution would then be the register-structured coupling diagnostic, which tensor-train bond dimension can also provide. The claim of a quantum advantage would be withdrawn, and we do not lean on the complexity-theoretic hardness argument of Training Classical Neural Networks by Quantum Machine Learning. Weights being hard to sample classically does not make them useful forecasting weights.

Why not just shrink the embedding width or drop it? If a narrow classical embedding performs as well, then compression is solving a problem that does not exist. Both are baselines. The no-embedding run in particular tells us, per dataset, whether there is anything worth compressing.

Why not just fit a seasonal model and stop, given the audit? On temporally dominated data that may indeed be nearly enough. That is why we run the residual setting and report the separable-versus-entangled gap separately on METR-LA, PEMS-BAY and EXPY-TKY. If cross-register entanglement buys nothing anywhere, it supports the audit's view, and we would report the result as such.

Proposed Experiments and Decisive Checks

We will report MAE, RMSE and MAPE at 3, 6 and 12 steps ahead, along with embedding parameter count, wall-clock training time and node|time entanglement entropy, over five seeds. Four results would decide the proposal.

The first is whether the circuit generator's error-versus-parameter curve lies on or above the tensor-train curve. The second is whether the error gap between $L_\times=0$ and $L_\times>0$ widens from PEMS-BAY to EXPY-TKY, and widens further under residual training. If it does, the entanglement dial is measuring genuine coupling. The third is whether the probability readout reproduces a QT-LSTM-style error blow-up that the amplitude readout avoids, which would test our explanation for that paper's failure. The fourth is whether the learned entanglement on Molene stays low, as the joint stationary model predicts it should.