Manuscript Offprint
arXiv:2610.06039MercerFlow: Flow Matching in a Kernel-Induced Latent Space for Probabilistic Forecasting
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
Recent work has shown that probabilistic flow matching for time series forecasting benefits from a data-matched prior. The resulting prior introduces local correlations, which a sequential architecture usually absorbs: a recurrent neural network (RNN), a structured state-space model (S4), or a Transformer. However, such a backbone costs GPU memory and time per epoch. A cheaper alternative is MLP-based latent-space flow matching: embed the time series via an invertible map to a single latent vector and learn the flow there, so a tabular MLP can treat the series as a set of features. The relationship between the prior and the choice of linear latent map is understudied in conditional flow matching (CFM) forecasting, yet we found it strongly affects performance. Fixed transforms such as Fourier or discrete cosine (DCT) are only well-conditioned for Ornstein–Uhlenbeck priors, while a principal-component (PCA) map fit to the data is a strong but training-set-dependent reference sensitive to train–test shift. Instead, we propose to use the Mercer eigenbasis of the prior kernel: it diagonalises the centred covariance exactly, decouples from training data, and adapts to non-stationary and periodic priors. On five GluonTS benchmarks (ETTh1, ETTh2, Weather, Electricity, Traffic) under a shared protocol with TSFlow, the resulting MLP matches or beats it on CRPS at about less training memory and less time per epoch.
1 INTRODUCTION
The usual approach to probabilistic forecasting is to devise an algorithm which samples from a predictive distribution over future windows given the observed past. A sampler that is expressive, while staying cheap to train and cheap to run, is the practical target. Flow matching (Lipman et al., 2023; Tong et al., 2024) is a prominent modern way to build such samplers: one learns a velocity field along a probability path from a tractable prior to the data, and training is ordinary regression onto a known interpolant. Since each forecast requires numerically integrating this velocity during inference, the cost at test time is dominated by the backbone that evaluates the field; cheapness at training time matters too, since the backbone also dictates GPU memory and time per epoch. If the prior already matches the data, the flow starts closer to the target and needs less capacity to finish the trip. TSFlow (Kollovieh et al., 2025) commits to a Gaussian-process (GP) prior on the forecast window for that reason. However, under that prior, neighbouring time coordinates stay correlated, so a global multilayer perceptron (MLP) spends capacity on local smoothness the GP already encodes. TSFlow absorbs those correlations with a bidirectional state-space backbone (Gu et al., 2022), which is accurate on long smooth series but expensive in memory and time per epoch.
Orthonormal projections are a classical way to decorrelate coordinates in a latent space (Mercer, 1909; Karhunen, 1947; Gabor, 1946). Several recent generative models run denoising or score matching in orthonormal latents: DCTdiff (Ning et al., 2025) trains image diffusion in discrete cosine coordinates, Crabbé et al. (Crabbé et al., 2024) dualise time-series diffusion to the Fourier domain, and Phillips et al. (Phillips et al., 2022) score functional data along truncated Mercer eigen-
Equal contribution.

Figure 1: Overview of MERCERFLOW. The joint context and horizon window is mapped into the decorrelated Mercer eigenbasis of the GP prior. A lightweight MLP learns conditional flow matching directly in this latent space, enabling fast and scalable probabilistic forecasting without sequential backbones.
functions. However, when we commit to a GP prior, as in TSFlow, the latent map must also decorrelate the resulting structure—not just the correlations in the data itself. To address this, we conduct a controlled comparison of five linear codecs for projection on a shared architecture and matched prior: Fourier (discrete Fourier transform), discrete cosine (DCT), principal components (PCA), the identity (Raw), and Mercer-based eigenbasis.
Mercer’s theorem supplies the orthonormal eigenbasis of the kernel one has already committed to (Mercer, 1909; Karhunen, 1947), so the coefficients are uncorrelated under the corresponding GP. Thus, that decorrelation is exact for the centred prior and approximate for the conditional law and for the interpolant on which the network trains. Across codecs, Mercer is the most versatile data-free choice: it works on data which requires a non-OU prior (Fourier and DCT best diagonalise OU-like priors, which are not always optimal for the data) and where PCA suffers from the train–test shift since it fits only the training path (§3.2).
That said, all five codecs are orthonormal projections, so a rotation-equivariant optimiser with an MSE loss should treat them as equivalent reparameterisations (Nesterov, 2004; Zhang et al., 2025). However, that equivalence is optimiser-specific: it holds for Euclidean SGD (Proposition 1), but fails under Adam because of the first-layer input geometry. Write for a first-layer input second-moment matrix and for the condition number of its spectrum. Orthonormal codecs leave the spectrum and unchanged, so Euclidean SGD cannot prefer one codec over another. Under Adam, however, per-coordinate rescaling is modelled by the Jacobi preconditioner , after which the normalised second-moment matrix is DAD with the geometry conditioned by . The rotation leaves fixed but changes , which is what Jacobi reads, so is codec-dependent. Empirically, the decorrelating codecs exhibit both lower and better forecasting accuracy than Raw under Adam on challenging datasets, while their advantage disappears under SGD. Our experiments therefore examine how codec choice interacts with the optimiser and whether MercerFlow offers a favourable balance of predictive accuracy and computational cost relative to TSFlow and other baselines.
Contributions. Our contributions are as follows:
• A controlled five-codec study of conditional flow matching under matched architecture, prior, and protocol: Mercer, Fourier, DCT, PCA, and Raw on five GluonTS benchmarks with paired t-test ranks.
• A diagnostic of codec gaps under Adam versus SGD. First-layer separates Raw from the decorrelating codecs on hard sets under Adam, while the gaps vanish when the models are trained with SGD.
• MERCERFLOW: conditional flow matching carried out directly in the Mercer / Karhunen–Loève eigenbasis of the forecasting GP prior. Unlike fixed transforms such as DCT and
Fourier, the basis adapts directly to non-stationary and periodic priors, providing a data-free representation that remains robust across kernels without fitting the training path.
• An empirical comparison against TSFlow on multiple benchmarks. The MLP codecs are about cheaper in peak GPU memory and cheaper in time per epoch at matched batch size, making MLP flow matching in linearly projected latents a practical alternative to sequential S4 backbones.
MercerFlow overview. Figure 1 summarises three stages of MERCERFLOW. First, we condition a Gaussian-process prior on the observed past and sample an initial future window (Subsection 2.1). Second, we concatenate this sample with the past and encode the joint window in the orthonormal eigenbasis of the same kernel matrix (Subsection 2.2). Third, during training, a lightweight MLP learns the velocity along linear interpolants between the encoded source and target windows (Subsection 2.3). Finally, at inference time, we integrate the learned velocity from a newly sampled source, apply the inverse transform, and extract the forecast horizon (Subsection 2.3). Repeating this procedure produces samples from the predictive distribution.
2.1 CONDITIONAL GP PRIOR
Let be a positive-definite covariance kernel, e.g., Ornstein–Uhlenbeck (OU), radial basis function (RBF), or periodic, with length scale and diagonal jitter . In our primary benchmark runs, we adopt the stationary exponential (OU) kernel:
Evaluating across all pairs of temporal coordinates in defines the joint covariance matrix , with entries . Partitioning according to the past and future index sets and yields:
where , , and . Conditioned on the observed context , the observation-space prior over the future window is given by the standard Gaussian Process posterior:
We select the prior length scale via validation-likelihood maximisation per dataset (Table 8, §3). The diagonal jitter provides numerical stability but cannot substitute for basis rotation: as shown in Appendix F.3, Raw's condition number remains near across all , while extreme regularisation ( ) degenerates the prior into white noise and degrades both Mercer and Raw equally.
2.2 LINEAR CODEC ON THE JOINT WINDOW
To make the observed past available to the velocity field, we apply a single linear codec to the joint context and future window. The source window concatenates with a sample from the conditional GP prior, while the target window combines the same context with the observed future
. Both windows are projected into a shared coefficient space using an orthonormal matrix , with encoding and decoding defined by:
Since the columns of are orthonormal, , and this map is an exact isometry. The source prior state is and the target state is . The five codecs described below differ only in how they construct the basis vectors of the matrix .
Identity (Raw). This codec keeps the series in observation coordinates with , which yields . Each coordinate represents an ambient time step. It acts as an unrotated baseline and matches the time-domain setup of TSFlow, but uses an MLP rather than an S4 backbone.
Mercer (Ours). The basis columns are the orthonormal eigenvectors of the kernel matrix K:
Eigenvalues are sorted in descending order. The first row of is constrained to be non-negative to fix signs. By Mercer's theorem and the Karhunen–Loève expansion, if , then (Rasmussen & Williams, 2006). Appendix B.3 gives the exact derivation. Therefore, latent coordinates are uncorrelated under the prior. This decorrelation is exact for the prior and provides an effective preconditioning proxy for the conditional law.
Fourier. This codec implements a real discrete Fourier transform on the time grid (Gabor, 1946; Baraniuk & Jones, 1995). The first column is the constant direct current (DC) mode . Higher harmonic frequencies provide cosine and sine pairs:
When is even, the final column is the Nyquist mode . The transform expresses the series in this real orthonormal Fourier basis, with each coefficient corresponding to one Fourier mode.
DCT. This codec uses an orthonormal type-II discrete cosine transform, ordered from lowest to highest frequency. Evaluated at time steps , the basis columns are:
With and normalisation, the modes form an orthonormal basis. Unlike Fourier, the DCT does not enforce periodic boundaries. It provides an asymptotic Karhunen–Loève basis for stationary Markovian and OU processes (Ahmed et al., 1974; Gray, 2006).
PCA. The basis columns are the eigenvectors of the empirical sample covariance matrix computed across all training windows (Jolliffe, 2005):
here is the empirical mean of the training sequences. Eigenvalues are sorted in descending order with the same sign convention as Mercer. Centering is used solely to construct , while the latent projection remains strictly linear. Because is fitted to the training sample, PCA is data-dependent and sensitive to train–test distribution shifts.
2.3 FLOW MATCHING IN COEFFICIENT SPACE
Flow matching (Lipman et al., 2023) learns a time-dependent velocity field that transports a source distribution to the data. Standard formulations often require minibatch optimal transport to straighten trajectories originating from unstructured Gaussian noise (Tong et al., 2024). In contrast, we adopt TSFlow (Kollovieh et al., 2025) and use the conditional GP prior equation 3 as the source distribution. Because this prior already captures temporal history and local smoothness, independent pairing between source and target yields straight paths without optimal transport overhead.
We instantiate this probability path directly in the joint coefficient space:
with flow time , source , and target . Since the historical context is shared, the target displacement simplifies to . We train an MLP velocity field by minimizing the mean squared regression error:
Because is an orthogonal isometry , it preserves the Euclidean norm: . Consequently, the training loss magnitude is identical across all five codecs (Appendix B.1).
To preserve input-layer geometry, the MLP injects AdaLN time modulation only after the first linear map (Appendix C.3). During inference, we sample , project the joint state , and integrate from to 1 using an Euler ODE solver to obtain the terminal state . The predicted horizon is then extracted from the reconstructed sequence .
2.4 WHY THE ROTATION CAN MATTER: ADAM'S DIAGONAL
At full order, corresponding to a square orthonormal basis on the ambient sequence window, Mercer, Fourier, and the identity baseline parameterise the identical Euclidean interpolant in three distinct orthonormal coordinate systems.
Proposition 1 (SGD is invariant to the choice of orthonormal codec). Let be a square orthogonal matrix defined on the ambient observation space. Consider the velocity field parameterized by :
where aggregates all internal hidden layers along with AdaLN time conditioning, acting entrywise on its first argument with parameters independent of .
Let denote the parameters of the identity network, and define the conjugated parameter set of the codec- network by
Then the velocity field satisfies , and the squared conditional flow matching loss equation 10 is preserved identically:
where . Under rotation-invariant parameter initialisations, Euclidean gradient descent and Euclidean momentum schemes, including the heavy-ball method and Nesterov accelerated gradient, generate identical loss trajectories and identical decoded flows at every training iteration (Nesterov, 2004; Zhang et al., 2025).
The proof is provided in Appendix B.1. An empirical validation using Nesterov SGD at a matched computational budget is reported for ETTh1 and ETTh2 in Table 3 of Appendix B.2.
The equivalence established in Proposition 1 is strictly Euclidean, as standard stochastic gradient descent applies isotropic updates across all coordinate axes. Modern probabilistic forecasting models are instead routinely optimized with adaptive algorithms such as AdamW (Kingma & Ba, 2015). These optimizers maintain an exponential moving average of squared coordinate-wise gradients to rescale parameter updates individually, thereby dampening oscillations along steep directions and accelerating progress along plateaus. Because this coordinate-wise scaling is defined relative to the canonical parameter axes, it is not rotation-equivariant. Rotating the input-space basis fundamentally alters Adam's trajectory, whereas SGD's trajectory undergoes a simple linear conjugation (Zhang et al., 2025; Xie et al., 2025). Consequently, when training the velocity field of Section 2.3 with AdamW, optimisation dynamics are governed not by the raw input Gram matrix, but by its geometry following diagonal preconditioning.
Let denote the input vector to the first linear layer, and let be its uncentred second-moment matrix. For the linear mapping , the matrix determines the curvature of the corresponding linear subproblem. The extremal directions of stretch are given by the eigenvectors of A, and their relative ratio is quantified by the condition number
As Nesterov (2004) show, gradient descent on a quadratic objective has a convergence rate governed directly by . Because an orthogonal transformation leaves the spectrum of A invariant, substituting A with preserves and cannot accelerate Euclidean gradient descent.
In contrast, the first-layer dynamics of Adam deviate substantially from Euclidean optimisation. Under the Kronecker-factored curvature model of Martens & Grosse (2015), the coordinate-wise second-moment accumulator decomposes into an output factor and an input factor given by . The resulting coordinate rescaling corresponds to the classical Jacobi preconditioner , producing the preconditioned input and the rescaled curvature matrix . The optimisation of the first-layer weights is therefore dictated by . According to van der Sluis (1969), the Jacobi preconditioner minimises the condition number among all diagonal scalings up to a factor depending only on dimensionality. When A possesses small off-diagonal elements, approximates the identity matrix, effectively whitening the layer inputs.
Proposition 2 (Jacobi preconditioning distinguishes linear codecs). Let the total window length be , and let denote the symmetric Toeplitz covariance matrix generated by the spectral density function of a stationary Ornstein–Uhlenbeck process with length scale :
Let be the coefficient representation under the centred prior with , and let . Under the Jacobi preconditioner , the condition number satisfies:
-
Identity (Raw): The matrix is Toeplitz with constant diagonal . The preconditioner satisfies , yielding , which grows monotonically with the prior length scale .
-
Mercer: Because the columns of diagonalize the kernel matrix , the second-moment matrix satisfies , where is diagonal. Hence , which yields the optimal condition number .
-
Fourier and DCT: The respective transformation bases satisfy the asymptotic bounds
where the bound loosens whenever concentrates mass predominantly at low frequencies.
The proof is given in Appendix B.3, where Table 4 provides a structured overview of the second-moment structure and condition numbers across all five codecs.
On synthetic stationary OU paths where the data-generating kernel is known exactly, empirical matches this ordering and CRPS ties across codecs within 0.2% (Appendix F.1), reproducing under analytical control the behavior observed on easy real datasets.
While an orthonormal change of basis cannot alter , it modifies the diagonal entries that govern Adam's scaling factors. During training, the network input is not drawn from the centred prior y, but represents the conditional interpolant . Empirical evaluations of across datasets are detailed in Appendix C.5 (Table 12) and summarized in Section 3.2. Under AdamW optimisation, first-layer clearly separates the ill-conditioned Raw baseline from the decorrelating codecs on challenging benchmarks, whereas training with SGD eliminates performance discrepancies across codecs, in complete alignment with Proposition 1.
3 EXPERIMENTS
Benchmark Setup and Protocol. Experiments cover five standard time series benchmarks: ETTh1, ETTh2, Weather, Electricity, and Traffic. The context and forecast lengths are fixed at , giving a joint window of length , with channels treated independently.
Baselines include four alternative codecs (Raw, Fourier, DCT, and PCA), the flow-based forecaster TSFlow, and the deterministic forecasters DLinear, PatchTST, and DMamba. All five codec variants use the same MLP architecture, joint-window conditioning scheme, and GP prior. Prior hyperparameters are selected by validation likelihood (Appendix C.4). Architecture and training details appear in Appendix C.
For each probabilistic model, evaluation uses forecast trajectories per test window. Normalised continuous ranked probability score (CRPS) measures distributional forecast accuracy (Alexandrov et al., 2020; Kollovieh et al., 2025), while mean absolute error (MAE) measures point-forecast accuracy. For probabilistic models, the point forecast is the empirical median of the generated samples. Scores are aggregated over rolling test windows, with metric definitions and aggregation details provided in Appendix C.1.
3.1 MAIN RESULTS: FORECASTING QUALITY AND EFFICIENCY
Table 1 summarises overall prediction quality across all five benchmarks via paired two-sided -test ranks, while Table 2 reports the computational footprint. Full per-dataset numerical CRPS and MAE distributions are reported in Appendix D within Tables 14 and 15.
Table 1: Predictive performance summary across all five benchmarks (ETTh1, ETTh2, Weather, Electricity, Traffic). Rank = 1+ number of methods strictly outperforming the model under a paired two-sided -test on shared seeds (, lower score is better); a win denotes rank 1.
| Metric | Ours | Linear Codec Baselines | Sequential | |||
|---|---|---|---|---|---|---|
| Mercer | Fourier | DCT | PCA | Raw | TSFlow (S4) | |
| Mean CRPS rank (↓) | 1.00 | 1.20 | 1.40 | 1.80 | 3.40 | 5.80 |
| # CRPS wins (↑) | 5/5 | 4/5 | 4/5 | 3/5 | 2/5 | 0/5 |
| Mean MAE rank (↓) | 1.00 | 1.60 | 1.40 | 2.00 | 3.20 | 5.00 |
| # MAE wins (↑) | 5/5 | 3/5 | 4/5 | 3/5 | 2/5 | 1/5 |
Table 2: Computational efficiency benchmark at batch size 512. Comparison of per-epoch training time (seconds, ↓) and peak GPU memory (GB, ↓).
| Metric / Architecture | ETTh1 | ETTh2 | Weather | Electricity | Traffic |
|---|---|---|---|---|---|
| MLP Time (s, ↓) | 0.67 | 0.69 | 1.80 | 0.93 | 0.68 |
| S4 Time (s, ↓) | 2.50 | 2.40 | 7.70 | 4.10 | 2.60 |
| MLP VRAM (GB, ↓) | 1.5 | 1.5 | 1.5 | 1.5 | 1.5 |
| S4 VRAM (GB, ↓) | 7.1 | 7.1 | 7.1 | 7.1 | 7.1 |
Probabilistic Forecasting Quality. As shown in Appendix D, flow matching models decisively outperform deterministic architectures on distributional calibration. While deterministic baselines achieve competitive point estimates on simple trends, they degrade on multi-frequency series (e.g., on Traffic, MERCERFLOW achieves CRPS versus 10.75 for DLinear and 10.42 for DMamba; on Weather, 1.82 versus 6.26).
Compared to TSFlow, which employs a heavy bidirectional S4 backbone, our lightweight MLP codecs achieve substantially better CRPS calibration across all benchmarks (mean rank 1.00–1.80 vs 5.80, Table 1). By offloading temporal continuity directly to the analytical GP prior, an MLP operating in decorrelated coordinates avoids wasting capacity on local correlations. Within the MLP family, the unrotated Raw baseline consistently degrades on harder datasets (ETTh1, Electricity,
Traffic), yielding an inferior mean CRPS rank of 3.40. In contrast, MERCERFLOW resolves first-layer conditioning bottlenecks, securing a flawless mean rank of 1.00 (5/5 wins) across both CRPS and MAE. The full per-dataset CRPS and MAE scores, including the deterministic baselines and the horizon extension to , appear in Appendix D (Tables 14, 15, and 16).
Computational Efficiency. As detailed in Table 2, operating in the latent coefficient space allows a compact feed-forward MLP ( parameters) to replace the sequential state-space model (186k parameters). This achieves a reduction in peak GPU memory (1.5 GB vs 7.1 GB) and accelerates per-epoch throughput by at matched batch size (512). Furthermore, straight probability paths allow MERCERFLOW to saturate predictive performance within only 4–10 ODE integration steps, drastically outperforming equivalent score-based diffusion models (Appendix F.2, Table 19).
3.2 WHY MERCER? CODEC UNIVERSALITY AND PRIOR ALIGNMENT
Traffic uniquely exhibits strong weekly periodicity: validation GP likelihood decisively selects a weekly periodic kernel over the stationary OU prior . We therefore use Traffic to compare the default OU prior against a better periodic prior, exposing the differences between fixed harmonic transforms, empirical bases, and MercerFlow's analytical basis.
Figure 2 shows first-layer Jacobi Gram heatmaps on conditional-prior draws for both Traffic priors. Under the stationary OU prior, DCT is near-optimal because its fixed harmonic basis approximates the Karhunen–Loève expansion of Markovian processes. Under the periodic kernel, DCT cannot adapt; off-diagonal energy concentrates at weekly harmonics, surging DCT's condition number by for Mercer, for DCT) and dropping its test CRPS (Table 10). MercerFlow recomputes analytically from the chosen kernel , diagonalising the periodic kernel by construction. While Fourier avoids DCT's mirror reflection mismatch on periodic series, it suffers from severe boundary-leakage ill-conditioning on stationary long-horizon series ( reaching 268.5 on ETTh1 vs 1.00 for Mercer) and becomes unstable under learning rate stress on the periodic prior (Table 10). While PCA attains low training condition numbers, it overfits empirical samples and degrades on held-out test windows (Table 12: PCA condition number surges from 481 to 1290, whereas Mercer shifts only from 683 to 925). Appendix C.5 details full tables across all benchmarks.
3.3 EXTENDED ANALYSES AND APPENDIX OVERVIEW
We conduct extensive controlled experiments and ablations in the appendix:
Optimizer Equivariance under SGD. Proposition 1 predicts Euclidean SGD is rotation-equivariant; matched-budget Nesterov SGD ties all five codecs within one standard deviation on ETTh1 and ETTh2 (Appendix B.2, Table 3). Under AdamW, coordinate-wise rescaling breaks rotational equivariance, unlocking large gains for well-conditioned codecs on hard benchmarks.
High Learning Rate Dynamics and Stability. Aggressive learning rates ( ) collapse the unrotated baseline (CRPS explodes to 1.22 on ETTh1 and 0.246 on Traffic; Table 17), whereas all decorrelating codecs remain stable (Appendix E, Figure 3).
Synthetic OU and Diffusion Comparison. On synthetic OU paths where the true kernel is known, Mercer achieves , and misspecifying the length scale by degrades CRPS by only 0.006 (Appendix F.1, Table 18). Furthermore, straight probability paths saturate calibration in 4–10 integration steps, outperforming score-based diffusion at 128 steps (Appendix F.2, Table 19).
Prior Regularisation and Full Scoreboard. Diagonal jitter confirms that damping the prior cannot rescue an unrotated basis: Raw stays ill-conditioned ( ; Appendix F.3, Table 20). Full per-dataset CRPS/MAE scoreboards and extended horizons ( ) appear in Appendix D (Tables 14, 15, and 16).

Figure 2: Traffic decorrelation on conditional-prior draws for the joint window. Each panel displays for the leading 64 modes, with condition number and test CRPS ( ) shown above each plot. Aligning the codec basis with the prior kernel maintains low off-diagonal correlation and preserves downstream performance.
4 CONCLUSION
Gaussian process priors provide structured probability paths for conditional flow matching, but raw temporal coordinates leave dense correlations that create severe conditioning bottlenecks under AdamW. First-layer preconditioning separates these representations on challenging benchmarks: the unrotated baseline consistently trails behind and collapses under learning rate stress, while rotation-equivariant SGD leaves all orthonormal codecs tied. Fixed harmonic transforms fail when the covariance departs from stationary Toeplitz structures, and empirical PCA degrades under distribution shifts between train and test windows. By contrast, the Mercer eigenbasis diagonalizes the chosen prior covariance analytically without data fitting, maintaining stable preconditioning across both stationary and periodic processes. Aligning the latent coordinate frame with the prior kernel allows a lightweight feed-forward MLP to match or surpass sequential state-space models on probabilistic calibration, while reducing peak GPU memory by and per-epoch training time by .
LIMITATIONS
Our theoretical analysis idealises Adam’s coordinate rescaling as exact Jacobi preconditioning and assumes rotation-invariant SGD initialisation. Empirically, performance depends on selecting an appropriate prior kernel and length scale via validation likelihood; also, our evaluations are restricted to univariate channels on a single fixed-width MLP backbone. Finally, the condition number metric captures the relative performance among Mercer, DCT, Fourier, and PCA bases primarily under structured departures from stationary Toeplitz priors (such as elevated learning rates, periodic kernels, or train–test distribution shifts). This aligns with our theoretical analysis, which shows that preconditioning differences diminish when the kernel matches the data-generating process.
REPRODUCIBILITY
We are publishing our entire repository on an anonymous repository to facilitate reproducibility: https://anonymous.4open.science/r/mercerflow_public-0323/. All datasets are freely available, and most training runs take only a few minutes.
AI USE STATEMENT
We used AI tools to:
• Conduct literature reviews and locate relevant papers. Every cited paper has been read by at least one co-author.
• Write and maintain the code for this paper, including the ablation scripts. All code has been manually reviewed by two co-authors, and large parts were written by hand.
• Draft and edit LATEX, including the theory section and the proofs. We reviewed the text and rewrote most of it.
We take full responsibility for the claims made in this paper.
REFERENCES
Nasir Ahmed, T_ Natarajan, and Kamisetty R Rao. Discrete cosine transform. IEEE transactions on Computers, 100(1):90–93, 1974.
Alexander Alexandrov, Konstantinos Benidis, Michael Bohlke-Schneider, Valentin Flunkert, Jan Gasthaus, Tim Januschowski, Danielle C. Maddix, Syama Rangapuram, David Salinas, Jasper Schulz, et al. GluonTS: Probabilistic and neural time series modeling in Python. Journal of Machine Learning Research, 21(116):1–6, 2020.
Richard G. Baraniuk and Douglas L. Jones. Unitary equivalence: a new twist on signal processing. IEEE Transactions on Signal Processing, 43(10):2269–2282, 1995.
Raymond H. Chan. Circulant preconditioners for Hermitian Toeplitz systems. SIAM Journal on Matrix Analysis and Applications, 10(4):542–550, 1989.
Ruxuan Chen and Fang Sun. Dmamba: Decomposition-enhanced mamba for time series forecasting. arXiv preprint arXiv:2602.09081, 2026.
Jonathan Crabbé, Nicolas Huynh, Jan Stanczuk, and Mihaela van der Schaar. Time series diffusion in the frequency domain. arXiv preprint arXiv:2402.05933, 2024.
Dennis Gabor. Theory of communication. Journal of the Institution of Electrical Engineers – Part III, 93(26):429–441, 1946.
Robert M. Gray. Toeplitz and circulant matrices: A review. Foundations and Trends in Communications and Information Theory, 2(3):155–239, 2006.
Ulf Grenander and Gabor Szegő. Toeplitz Forms and Their Applications. University of California Press, 1958.
Albert Gu, Karan Goel, and Christopher Ré. Efficiently modeling long sequences with structured state spaces. In International Conference on Learning Representations, 2022.
Vineet Gupta, Tomer Koren, and Yoram Singer. Shampoo: Preconditioned stochastic tensor optimization. In International Conference on Machine Learning, 2018.
Ian Jolliffe. Principal component analysis. Encyclopedia of statistics in behavioral science, 2005.
Keller Jordan, Yuchen Jin, Vlado Boza, Jiacheng You, Franz Cesista, Laker Newhouse, and Jeremy Bernstein. Muon: An optimizer for hidden layers in neural networks. https://kellerjordan.github.io/posts/muon/, 2024.
Mark Kac, W. L. Murdock, and Gabor Szegő. On the eigenvalues of certain Hermitian forms. Journal of Rational Mechanics and Analysis, 2:767–800, 1953.
Kari Karhunen. Über lineare Methoden in der Wahrscheinlichkeitsrechnung. Ann. Acad. Sci. Fennicae. Ser. A. I., 37:1–79, 1947.
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015.
Marcel Kollovieh, Marten Lienen, David Lüdke, Leo Schwinn, and Stephan Günnemann. Flow matching with Gaussian process priors for probabilistic time series forecasting. In International Conference on Learning Representations, 2025.
Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Matthew Nickel, and Matt Le. Flow matching for generative modeling. In International Conference on Learning Representations, 2023.
Michel Loève. Probability Theory II. Springer, 4 edition, 1978.
James Martens and Roger Grosse. Optimizing neural networks with Kronecker-factored approximate curvature. In International Conference on Machine Learning, 2015.
James Mercer. Functions of positive and negative type, and their connection with the theory of integral equations. Philosophical Transactions of the Royal Society of London. Series A, 209: 415–446, 1909.
Yurii Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Springer, 2004.
Yuqi Nie, Nam H Nguyen, Phanwadee Sinthong, and Jayant Kalagnanam. A time series is worth 64 words: Long-term forecasting with transformers. arXiv preprint arXiv:2211.14730, 2022.
Mang Ning, Mingxiao Li, Jianlin Su, Haozhe Jia, Lanmiao Liu, Martin Beneš, Wenshuo Chen, Albert Ali Salah, and Itir Onal Ertugrul. DCTdiff: Intriguing properties of image generative modeling in the DCT space. In International Conference on Machine Learning, 2025.
Angus Phillips, Thomas Seror, Michael Hutchinson, Valentin De Bortoli, Arnaud Doucet, and Emile Mathieu. Spectral diffusion processes. In NeurIPS 2022 Workshop on Score-Based Methods, 2022.
Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006.
Kashif Rasul, Calvin Seward, Ingmar Schuster, and Roland Vollgraf. Autoregressive denoising diffusion models for multivariate probabilistic time series forecasting. In International Conference on Machine Learning, 2021.
Yusuke Tashiro, Jiaming Song, Yang Song, and Stefano Ermon. CSDI: Conditional score-based diffusion models for probabilistic time series imputation. In Advances in Neural Information Processing Systems, 2021.
Alexander Tong, Kilian Fatras, Nikolay Malkin, Guillaume Huguet, Yanlei Zhang, Jarrid Rector-Brooks, Guy Wolf, and Yoshua Bengio. Improving and generalizing flow-based generative models with minibatch optimal transport. In International Conference on Artificial Intelligence and Statistics, 2024.
A. van der Sluis. Condition numbers and equilibration of matrices. Numerische Mathematik, 14: 14–23, 1969.
Nikhil Vyas, Depen Morwani, Rosie Zhao, Mujin Kwun, Itai Shapira, David Brandfonbrener, Lucas Janson, and Sham Kakade. SOAP: Improving and stabilizing Shampoo using Adam. In International Conference on Learning Representations, 2025.
Peter Whittle. Hypothesis Testing in Time Series Analysis. Almqvist & Wiksell, 1951.
Shuo Xie, Mohamad Amin Mohamadi, and Zhiyuan Li. Adam exploits -geometry of loss landscape via coordinate-wise adaptivity. In International Conference on Learning Representations, 2025.
Ailing Zeng, Muxi Chen, Lei Zhang, and Qiang Xu. Are transformers effective for time series forecasting? In Proceedings of the AAAI conference on artificial intelligence, volume 37, pp. 11121–11128, 2023.
Tianyue Zhang, Lucas Maes, Alan Milligan, Alexia Jolicoeur-Martineau, Ioannis Mitliagkas, Damien Scieur, Simon Lacoste-Julien, and Charles Guille-Escuret. Understanding Adam requires better rotation dependent assumptions. In Advances in Neural Information Processing Systems, 2025.
A RELATED WORK
Probabilistic generative forecasting. Denoising diffusion is a standard sampler for probabilistic time series: TimeGrad (Rasul et al., 2021) forecasts autoregressively with a diffusion decoder, and CSDI (Tashiro et al., 2021) performs conditional score matching for imputation and forecasting in observation coordinates. Conditional flow matching (Lipman et al., 2023; Tong et al., 2024) replaces the reverse SDE with regression onto a known interpolant velocity. TSFlow (Kollovieh et al., 2025) applies that recipe to forecasting with a Gaussian-process prior on the forecast window, Euclidean CFM in observation coordinates, and a bidirectional S4 backbone (Gu et al., 2022). We keep that prior and interpolant, and move the flow to a linear latent of the same window so that an MLP can replace the sequential backbone.
Latent-space generative models. Several recent generative models run the denoising process in an orthonormal latent rather than in observation coordinates. DCTdiff (Ning et al., 2025) trains image diffusion in block DCT coordinates and reports gains in sample quality and training cost over pixel-space diffusion. Crabbé et al. (Crabbé et al., 2024) dualise time-series diffusion to the Fourier domain under mirrored Brownian motion, so that frequency-localised series are scored where they concentrate. The DCT is near Karhunen–Loève for smooth stationary Grams on a finite interval, and the DFT diagonalises every circulant covariance; Whittle and Szegő treat it as an approximate KL basis for stationary Toeplitz Grams (Gabor, 1946; Baraniuk & Jones, 1995; Whittle, 1951; Kac et al., 1953; Grenander & Szegő, 1958; Gray, 2006; Chan, 1989). Phillips et al. (Phillips et al., 2022) go further toward a kernel eigenbasis: they expand functional data in truncated Mercer coefficients and train a score model on the retained modes, with the kernel taken as the empirical covariance or a stationary alternative such as RBF or Matérn. Mercer's theorem supplies that eigenbasis for a continuous positive-definite kernel (Mercer, 1909), and the Karhunen–Loève theorem yields uncorrelated coefficients for a second-order process, independent under a GP (Karhunen, 1947; Loève, 1978; Rasmussen & Williams, 2006). Although data-matched GP priors are natural for structured time series, existing approaches do not examine how such priors interact with latent projections under flow matching. Our contribution is to study this interaction: fixing a forecasting GP prior, we compare five full-order codecs on one MLP and one CFM loss.
Rotation equivariance of optimisers. Euclidean SGD is equivariant to orthogonal reparameterisations of the weights: conjugating the network by a rotation conjugates the iterates and leaves the loss trajectory unchanged. Adam (Kingma & Ba, 2015) is not: its per-coordinate second-moment rescaling depends on the parameter basis, so rotating the coordinates changes the optimisation path (Zhang et al., 2025; Xie et al., 2025). That gap has motivated rotation-aware and approximately rotation-equivariant optimisers, including Kronecker-factored preconditioners such as Shampoo (Gupta et al., 2018), Shampoo–Adam hybrids such as SOAP (Vyas et al., 2025), and orthogonalised updates such as Muon (Jordan et al., 2024). Proposition 1 extends to any optimiser whose update commutes with , which includes Muon and Shampoo without grafting; we test SGD only.
B THEORETICAL PROOFS
B.1 PROOF OF PROPOSITION 1 (SGD INVARIANCE)
Fix a square orthogonal codec matrix acting on the ambient observation vector that enters the first linear layer. (For the concatenated joint window , this is precisely ; when context and horizon are encoded independently, one uses a block-diagonal isometry , but the algebraic conjugation remains identical).
Let and denote the ambient source and target joint states, respectively, yielding latent endpoints and . The target displacement in coefficient space is . The conditional flow matching probability path is the image of the ambient observation-space line under . Because is an orthogonal isometry ( ), it preserves Euclidean norms:
Consequently, the squared conditional flow matching regression objective equation 10 is isometric across all orthogonal coordinate systems.
The hypothesis of Proposition 1 holds for any velocity field whose first and final linear projections bracket an entrywise hidden mapping whose internal parameters are independent of . The implemented MLP architecture satisfies this condition (Section C.3). Denoting by the bracketed entrywise nonlinear operation (comprising hidden layers and AdaLN time modulation), the network computing the velocity field has the form:
where acts entrywise on its first argument, with parameters governed exclusively by the flow time . Consider an Identity network parameterised by and define the conjugated parameter set of the codec- network by
Evaluating the conjugated velocity field on the rotated input yields:
(20)
Subtracting the target displacement confirms that the residual vectors are related by an exact orthogonal rotation:
Because the Euclidean norm is rotation-invariant, the instantaneous conditional flow matching loss is preserved identically at every point along the probability path:
Furthermore, the velocity field intertwines the decoded trajectories identically: if and , then by the chain rule,
The equality of squared residuals establishes that the loss landscapes satisfy . Moreover, the parameter transformation equation 19 is an exact linear isometry under the standard Frobenius/Euclidean inner product on parameter space:
Under rotation-invariant initialisation schemes, standard SGD and Euclidean momentum methods (such as heavy-ball momentum and Nesterov accelerated gradient) generate updates that are strictly equivariant to orthogonal conjugation (Nesterov, 2004; Zhang et al., 2025). That is, the gradient step on the conjugated parameters matches the conjugation of the Euclidean gradient step on the original parameters. Consequently, given conjugated initialisations, the training loss trajectories and decoded probability flows of Mercer, Fourier, DCT, PCA, and the unrotated Raw baseline coincide identically at every training iteration under Euclidean SGD.
B.2 SGD CONTROL ON REAL BENCHMARKS
To probe whether the rotation-equivariance of SGD remains visible under our non-rotation-invariant initialisations and matched training budget, we re-train the five codecs with Nesterov SGD (momentum 0.9, learning rate ) on ETTh1 and ETTh2, leaving every other hyperparameter identical to the AdamW runs in the main text. The SGD learning rate is untuned; the comparison is the matched-budget control that Proposition 1 predicts.
Table 3 reports test CRPS over seeds 42–44 at 20 NFE under the shared joint window () and OU length scales. All five codecs land within one standard deviation of each other on both datasets, in agreement with the equivariance claim. The shared SGD level is uniformly worse than the AdamW level on these two datasets (e.g. 0.2255 vs. 0.188 for Mercer on ETTh1, about 20% above AdamW). On synthetic OU paths where the analytical prior matches the data-generating law exactly (Section F.1), SGD performs on par with AdamW (0.6033 vs. 0.6063), indicating that Adam's coordinate-wise preconditioning primarily provides an optimisation advantage on complex, non-stationary data.
Table 3: SGD ablation on ETTh1 and ETTh2 (Test CRPS, ↓) for Post-AdaLN Nesterov SGD (momentum 0.9, learning rate ). Evaluated at 20 NFE under the identical joint window () and OU length scales as the AdamW runs.
| Codec | ETTh1 | ETTh2 |
|---|---|---|
| Mercer (Ours) | 0.2255 ± 0.0007 | 0.145 ± 0.002 |
| Fourier | 0.2240 ± 0.0020 | 0.145 ± 0.003 |
| DCT | 0.2260 ± 0.0010 | 0.145 ± 0.002 |
| PCA | 0.2248 ± 0.0004 | 0.145 ± 0.002 |
| Raw | 0.2240 ± 0.0010 | 0.145 ± 0.003 |
B.3 PROOF OF PROPOSITION 2 (JACOBI PRECONDITIONING)
Let under the centred prior on the ambient grid, and set . Under the standing model that Adam's input-side rescaling acts as this Jacobi preconditioner, the change of coordinates leaves the residual Gram
Its condition number is , as in equation 14. The spectrum of is invariant under any orthogonal codec , since is similar to . The diagonal of is not. The uncentred conditional interpolant used in training is outside the claim (cf. the measurements in §3).
The proposition's summary is given in Table 4, built by evaluating the closed form of for each codec, then applying the Jacobi formula . The calculations below verify each row.
Table 4: Theoretical first-layer Gram matrix and corresponding Jacobi condition number under the centred Ornstein–Uhlenbeck prior on a window of length , with regularizing jitter .
| Codec | First-layer Gram Matrix A | Jacobi Condition Number Bound |
|---|---|---|
| Identity (Raw) | , increases with length scale | |
| Mercer (Ours) | 1 (exact decorrelation) | |
| Fourier | ||
| DCT | ||
| PCA | Empirical data covariance | Data-dependent (not aligned with prior kernel) |
Identity. A stationary kernel on a regular grid makes Toeplitz, hence constant on the diagonal: for every . Then and , so .
Mercer. With , , and square orthogonal,
by Mercer’s theorem and the Karhunen–Loève expansion (Rasmussen & Williams, 2006). Jitter gives , so and , hence .
Fourier. On a window of length , is the symmetric Toeplitz covariance generated by the spectral density . Let be the optimal Strang circulant approximation to , which is exactly diagonalised by the discrete Fourier basis: with (Gray, 2006). The latent second-moment matrix is , whose diagonal asymptotically satisfies . Under the Jacobi preconditioner , the preconditioned Gram evaluates to:
Because Toeplitz covariance does not wrap periodically, the boundary discrepancy is a dense triangular perturbation driven by the edge jump . In the Fourier domain, this step discontinuity generates harmonic spectral leakage (the Gibbs phenomenon). Because the Jacobi weights scale as , the off-diagonal entries scale inversely with high-frequency spectral density:
For an OU process, . When is large, the spectral mass concentrates at low frequencies, so shrinks rapidly. Dividing by the vanishing high-frequency spectral density severely amplifies the off-diagonal elements of , inflating . The empirical numbers in Table 5 precisely follow this dependency: scales monotonically with , growing from 13.4 on Traffic ( ) to 268.5 on ETTh1 ( ).
DCT. The DCT-II basis diagonalises the symmetric circulant that approximates under mirror-reflective boundary conditions (Ahmed et al., 1974; Gray, 2006). Crucially, even reflection across the grid boundaries eliminates the periodic wrap-around step discontinuity that plagues the Fourier basis. Consequently, the boundary discrepancy produces negligible spectral leakage, leaving the off-diagonal entries of tightly suppressed across all frequencies. Under Jacobi scaling, , where the perturbation remains uniformly small and stable with respect to the length scale . As reported in Table 5, DCT maintains a near-optimal condition number across all benchmarks.
PCA. PCA's basis is the eigenbasis of the empirical training covariance, which is data-dependent. On the centred prior population of the proposition, PCA's basis is generally not aligned with K, and is whatever that misalignment produces; Table 5 reports 8.15–46.98. On its own empirical-covariance population the codec gives trivially; this is a separate statement and is not the population the proposition addresses.
Empirical check. The population the identity is proved against is the centred prior on the joint grid; the training input is not that population. Table 5 reports on it: Mercer hits 1 on every dataset, DCT sits at 1.9–2.1 (reflecting boundary reflection stability), Fourier in the tens to hundreds (growing with ), PCA at 8–47, and Raw from on Traffic to on ETTh1.
C EXPERIMENTAL SETUP AND IMPLEMENTATION DETAILS
C.1 EVALUATION METRICS
To evaluate forecast distribution accuracy and point calibration, we draw sample trajectories per test window in the observation space (after inverse scaling).
Table 5: Empirical Jacobi condition number under the centred prior on the joint grid (joint window 192/192; last channel; scaler fit on the first 70%). This is the population the proposition's identity is proved against: Mercer hits on every dataset, with jitter only, by construction. The training input is not this population; Table 12 reports the same quantity under the conditional draw .
| Dataset | Raw | Fourier | Mercer | DCT | PCA |
|---|---|---|---|---|---|
| ETTh1 | |||||
| ETTh2 | |||||
| Weather | |||||
| Electricity | |||||
| Traffic |
Continuous Ranked Probability Score (CRPS). Following standard probabilistic forecasting benchmarks (Alexandrov et al., 2020; Kollovieh et al., 2025), we report the normalised CRPS, defined as the mean weighted quantile loss across nine standard evaluation quantiles :
where denotes the empirical -quantile of the sampled forecasts at horizon step , and is the asymmetric pinball loss.
Mean Absolute Error (MAE). For deterministic point forecast evaluation, we take the empirical median across generated trajectory samples, , and evaluate the unnormalized absolute deviation:
Both metrics are averaged across various rolling test horizons.
C.2 EXPERIMENTAL PROTOCOL
All time-series channels are treated as independent univariate sequences. The observation-space prior is the Gaussian Process defined in Section 2.1, governed by the stationary Ornstein–Uhlenbeck (OU) covariance kernel with length scale selected via validation-likelihood maximisation (Table 8) and shared across all five MLP codecs. The context past and forecast horizon lengths are fixed at , yielding a total sequence window . Source prior samples and target data trajectories are paired independently during training; minibatch optimal transport is not required due to the structured probability paths induced by the GP prior.
Joint Window Conditioning. The complete joint sequence of length is mapped into the latent coefficient space at once via the square orthonormal matrix . The lightweight MLP described in Section C.3 maps the joint coefficient vector to a hidden dimension of width 64 (a 2-layer MLP with 1 hidden layer, parameters), applies adaptive flow-time conditioning, and projects back to predict the velocity field. Parameter counts across Mercer, Fourier, Raw, DCT, and PCA are strictly matched.
TSFlow Baseline. The reference flow matching baseline is TSFlow (Kollovieh et al., 2025), evaluated on the identical context-and-horizon window () and shared length scale . TSFlow operates in ambient observation space and utilises an expressive bidirectional S4 backbone comprising 186,833 parameters.
Evaluation Protocol. Predicted distributions are evaluated using the normalised Continuous Ranked Probability Score (CRPS) across nine evaluation quantiles (Alexan-drov et al., 2020), normalised by the sum of absolute ground-truth horizon values scaled by , i.e., . Deterministic point forecasts are evaluated via the Mean Absolute Error (MAE) of the empirical median trajectory . All metrics are computed via 20 Euler integration steps (NFE) with sample trajectories per test window, averaged over random seeds 42–48.
C.3 ADALN ARCHITECTURAL PLACEMENT
To ensure our network satisfies the conditions of Proposition 1, the implemented MLP applies adaptive time modulation (in the style of AdaLN) after the first linear layer. Given the concatenated input vector (joint sequence coefficients) and the sinusoidal flow-time embedding , the forward pass is defined as:
where the scale and shift vectors are generated via a zero-initialised linear projection of . The bracketed operation
acts purely entrywise on the hidden activation vector , with modulation parameters depending exclusively on flow time . This strictly satisfies the structural condition required in the proof of Proposition 1 (Appendix B.1).
C.4 DATASET PROPERTIES AND VALIDATION LIKELIHOOD
Each benchmark time series is assigned the covariance kernel achieving the lowest Gaussian negative log-likelihood on its validation slice. A standard scaler is fit on the first of the series. The validation score is computed as the mean negative log density across the subsequent under a zero-mean Gaussian process. For the stationary Ornstein–Uhlenbeck (OU) and squared exponential (RBF) kernels, the continuous length scale is searched over . For the periodic kernel, the length scale is searched over alongside an integer period . Every candidate kernel includes a regularizing diagonal jitter . Hyperparameters are optimized using 400 Tree-structured Parzen Estimator (TPE) trials. As an intuitive baseline, isotropic white noise on a series scaled to unit variance scores approximately 1.42.
Table 6 compares the validation negative log-likelihood across candidate kernels. Traffic exhibits dominant weekly periodicity (). ETTh2 and Electricity favor the smooth squared exponential (RBF) kernel, whereas ETTh1 and Weather are optimal under the rougher Ornstein–Uhlenbeck (OU) kernel. Table 7 details the optimal continuous hyperparameters found via TPE for each candidate kernel. In our primary benchmark experiments, we adopt standard domain-aligned integer length scales for the baseline OU prior (matching characteristic temporal cycles close to the continuous validation optima), along with a runtime diagonal jitter of shared across all models; these parameters are summarized in Table 8.
Table 6: Mean negative log density of candidate Gaussian process priors on the validation slice. Lower is better ( ). The periodic entry for Traffic uses period p = 168, length scale , and jitter ; all other entries represent the optimal fit across 400 TPE trials. Bold indicates the best score in each row.
| Dataset | OU | RBF | Periodic |
|---|---|---|---|
| ETTh1 | -1.231 | -0.970 | 0.062 |
| ETTh2 | -0.836 | -1.184 | 0.608 |
| Traffic | 0.465 | 0.226 | 0.035 |
| Electricity | 0.228 | 0.209 | 0.969 |
| Weather | -0.587 | -0.372 | 1.203 |
First-Layer Conditioning under Traffic Covariance Kernels. When evaluating linear codecs on Traffic, departing from the stationary Ornstein–Uhlenbeck (OU) assumption breaks the near-Toeplitz covariance structure that DCT diagonalizes. Table 9 reports the conditional Jacobi condition
Table 7: Continuous optimal parameters of the validation likelihood fits from Table 6. Length scale , period (periodic kernel only), and regularizing diagonal jitter . The jitter search interval is ; the OU fits for ETTh2, Traffic, Electricity, and Weather saturate at the lower bound .
| Dataset | Kernel | Period | Jitter | |
|---|---|---|---|---|
| ETTh1 | OU | 479 | — | |
| ETTh1 | RBF | 7.41 | — | |
| ETTh1 | Periodic | 1.98 | 276 | |
| ETTh2 | OU | 183 | — | |
| ETTh2 | RBF | 4.58 | — | |
| ETTh2 | Periodic | 2.77 | 24 | |
| Traffic | OU | 13.1 | — | |
| Traffic | RBF | 3.70 | — | |
| Traffic | Periodic | 0.10 | 168 | |
| Electricity | OU | 20.7 | — | |
| Electricity | RBF | 3.52 | — | |
| Electricity | Periodic | 0.46 | 168 | |
| Weather | OU | 111 | — | |
| Weather | RBF | 5.57 | — | |
| Weather | Periodic | 0.67 | 288 |
Table 8: Baseline OU length scale and runtime diagonal jitter used in primary benchmark runs, shared across Mercer, Fourier, DCT, PCA, and Raw.
| Dataset | Length Scale | Runtime Jitter |
|---|---|---|
| ETTh1 | 336 | |
| ETTh2 | 192 | |
| Weather | 96 | |
| Electricity | 24 | |
| Traffic | 7 |
number evaluated during training under both the baseline OU prior (, ) and the optimal weekly periodic prior (, , ). While DCT provides a competitive condition number under the OU prior (), its condition number surges to under the periodic kernel, confirming that fixed harmonic bases cannot accommodate non-Toeplitz periodic correlations. In contrast, MERCERFLOW analytically derives its orthonormal basis directly from the kernel Gram matrix , dynamically adapting to periodic covariance and maintaining a tightly bounded condition number ().
Table 9: Traffic first-layer Jacobi condition number under conditional prior samples : stationary OU prior (, ) versus validation-optimal periodic prior (period , , ). Evaluated on the joint window (, , ), last channel, random seed 42, standard scaler fit on the first 70%. Bold indicates the best (lowest) condition number in each row.
| Prior | Mercer | Fourier | Raw | DCT | PCA |
|---|---|---|---|---|---|
| OU | |||||
| Periodic |
Forecasting Performance Beyond Stationary Priors. To examine how prior–codec alignment translates to empirical forecasting quality, Table 10 evaluates all five linear codecs on Traffic under both the baseline OU prior and the validation-optimal weekly periodic prior at the default learning rate () and under learning rate stress ().
At the default learning rate , adopting the kernel-matched periodic prior improves CRPS across all five codecs, confirming that a data-aligned GP prior benefits flow matching globally. MERCERFLOW achieves the best overall forecast (0.0821 CRPS). Crucially, when pushed to an aggressive learning rate , fixed harmonic codecs that assume stationary Toeplitz Gram matrices degrade severely: DCT CRPS deteriorates to 0.1641, while Fourier becomes numerically unstable (CRPS explodes to 0.7773). In contrast, MERCERFLOW preserves exact Karhunen–Loève decorrelation for the periodic kernel and maintains stable convergence (0.0951 CRPS), demonstrating robust universality beyond stationary priors.
Fourier Degradation Across Stationary and Periodic Regimes. Although Fourier captures periodic harmonic frequencies better than DCT on Traffic, it remains inferior to MERCERFLOW. On stationary processes with long temporal dependencies (such as ETTh1 and ETTh2), the finite-window boundary jump causes harmonic spectral leakage under Fourier coordinates. Because Adam's coordinate preconditioning scales inversely with spectral density (), dividing by the vanishing high-frequency spectral density severely inflates off-diagonal entries, driving Fourier's condition number to 268.5 on ETTh1 (Table 5) and 471 under conditional training draws (Table 12), compared to 1.00 and 14.8 for MERCERFLOW. Under learning rate stress (), these amplified high-frequency coordinates receive disproportionate gradient updates along leakage directions, making Fourier numerically unstable and causing seed divergence (0.7773 CRPS in Table 10). By deriving its basis analytically from the exact finite-domain covariance, MERCERFLOW maintains exact Karhunen–Loève decorrelation without boundary leakage, ensuring stable convergence across learning rate regimes.
Table 10: Traffic probabilistic forecasting performance (Test CRPS, 20 NFE, ) under the stationary OU prior vs. the validation-optimal periodic prior (, , ). Under the periodic prior, MERCERFLOW dynamically adapts and achieves top performance, whereas fixed harmonic codecs (DCT, Fourier) suffer from severe condition degradation and numerical instability under learning rate stress (). Bold indicates the best score in each row.
| Prior | Learning Rate | Mercer | Fourier | Raw | DCT | PCA |
|---|---|---|---|---|---|---|
| OU | ||||||
| OU | ||||||
| Periodic | ||||||
| Periodic |
C.5 DATASET HARDNESS AND FIRST-LAYER CONDITIONING
To quantify dataset difficulty independently of model architecture or codec choice, we define dataset “hardness” as the mean squared error (MSE) of the frozen analytical OU conditional mean evaluated on the held-out final 15% slice (after standard scaling, averaged across all channels), using the optimal validation length scale from Table 8.
Table 11 reports this residual alongside the validation negative log-likelihood. ETTh2 and Weather yield low residual errors of 0.33 and 0.44, respectively; we classify these as easy benchmarks where the analytical prior mean already captures the dominant temporal structure. In contrast, ETTh1, Electricity, and Traffic exhibit substantial residuals ranging from 1.00 to 1.46; we classify these as hard benchmarks where the velocity field must actively learn complex residual dynamics.
Table 11: Dataset hardness from the frozen OU prior. Residual is the mean squared error of the conditional OU mean on the held-out last , after the training standard scaler, averaged over channels; length scale from Table 8. OU NLL is the validation score from Table 6; white noise on unit-scaled series scores about 1.42. Easy: residual ; hard: residual .
| ETTh2 | Weather | Electricity | ETTh1 | Traffic | |
|---|---|---|---|---|---|
| OU NLL | -0.836 | -0.587 | 0.228 | -1.231 | 0.465 |
| Residual | 0.33 | 0.44 | 1.00 | 1.44 | 1.46 |
Empirical First-Layer Conditioning . Table 12 reports the empirical Jacobi condition number evaluated on conditional prior samples across both the training split and the held-out test split. On the training split, PCA achieves low condition numbers by construction, as its basis directly diagonalises the empirical training covariance. However, under test-set non-stationarity and distribution shift (notably on Electricity and Traffic), PCA's condition number degrades sharply (surging from 115 to 285 on Electricity, and from 481 to 1290 on Traffic). Because MERCERFLOW derives its orthonormal basis analytically from the true prior kernel , it exhibits consistent preconditioning across splits without empirical overfitting.
Table 12: Empirical Jacobi condition number under the conditional prior draws on the training split and on the held-out last , standard-scaled; with the empirical second moment of . Each cell gives train/test. Scaler fit on the first ; the PCA basis is fit on data windows, not on prior draws. Raw values share a single exponent per row.
| Dataset | Raw | Fourier | Mercer | DCT | PCA |
|---|---|---|---|---|---|
| ETTh1 | (2.08/3.25) 1e5 | 539 / 471 | 34.7 / 14.8 | 34.7 / 14.6 | 26.8 / 15.1 |
| ETTh2 | (3.45/6.21) 1e5 | 1770 / 2970 | 155 / 248 | 154 / 260 | 121 / 198 |
| Weather | (4.20/1.11) 1e4 | 295 / 272 | 13.5 / 4.5 | 14.3 / 4.6 | 17.6 / 15.9 |
| Electricity | (5.85/5.22) 1e3 | 234 / 394 | 60.2 / 171 | 59.6 / 176 | 115 / 285 |
| Traffic | (8.60/1.10) 1e3 | 922 / 1140 | 683 / 925 | 709 / 936 | 481 / 1290 |
Correlation Between Conditioning and Predictive Quality. To verify the direct connection between first-layer AdamW preconditioning and final forecasting quality, Table 13 reports the mean within-dataset Spearman rank correlation between and test CRPS across the five MLP codecs. On the hard datasets, where the flow model must resolve significant residual dynamics beyond the prior mean, the rank correlation reaches on held-out splits. On the easy datasets, the frozen prior already accounts for almost all predictive capacity, causing performance across codecs to saturate and making CRPS independent of first-layer conditioning ().
Table 13: Mean across datasets of within-dataset Spearman between under the conditional prior (Table 12) and CRPS, over the five MLP codecs; TSFlow excluded. Each per-dataset ranks the five codecs on the two axes within that dataset; the column is the mean of those 's across the listed datasets. is the number of datasets averaged.
| κ(DAD) | Overall (n=5) | Hard (n=3) | Easy (n=2) |
|---|---|---|---|
| Test | 0.44 | 0.79 | -0.08 |
| Train | 0.38 | 0.68 | -0.08 |
D FULL PREDICTIVE PERFORMANCE
While the main text condenses benchmark evaluations into summary ranks and computational footprint (Section 3.1), this section provides comprehensive, uncompressed per-dataset results for both probabilistic and point forecasting across all five GluonTS benchmarks.
D.1 PROBABILISTIC FORECASTING PERFORMANCE (CRPS)
Table 14 details the normalised Continuous Ranked Probability Score (CRPS, ) across all models, evaluated at 20 Euler integration steps with 100 sampled paths per forecast window. Parenthetical values indicate the model's rank determined by pairwise two-sided -tests on shared random seeds () within the flow matching family.
As shown, deterministic forecasters (DLinear, PatchTST, DMamba) exhibit severe CRPS degradation across every dataset, as they fail to capture multi-modal predictive distributions and uncertainty bounds. Among conditional flow matching models, MERCERFLOW consistently matches or outperforms all alternatives, securing rank 1 across all five benchmarks.
Table 14: Comprehensive long-horizon probabilistic forecasting performance (Test CRPS, , ). Top: deterministic baselines; bottom: conditional flow matching models. Parenthetical values denote paired two-sided -test rank () among flow matching models on shared random seeds (42–48). : best; .
| Method | ETTh1 | ETTh2 | Weather | Electricity | Traffic |
|---|---|---|---|---|---|
| DLinear (Zeng et al., 2023) | |||||
| PatchTST (Nie et al., 2022) | |||||
| DMamba (Chen & Sun, 2026) | |||||
| TSFlow (S4) (Kollovieh et al., 2025) | (5) | (6) | (6) | (6) | (6) |
| Raw | (5) | (1) | (1) | (5) | (5) |
| Fourier | (1) | (1) | (1) | (2) | (1) |
| DCT | (1) | (1) | (1) | (1) | (3) |
| PCA | (1) | (1) | (1) | (4) | (2) |
| MercerFlow (Ours) | (1) | (1) | (1) | (1) | (1) |
D.2 POINT FORECASTING PERFORMANCE (MAE)
To assess point-forecasting capability, Table 15 reports the unnormalised Mean Absolute Error (MAE) evaluated on the empirical median of generated sample paths .
Deterministic baselines often achieve strong MAE on smooth benchmarks (e.g., ETTh1 and ETTh2), but this comes at the expense of severe distributional degradation (Table 14). Conversely, MERCERFLOW delivers competitive point accuracy across all datasets while simultaneously preserving well-calibrated prediction intervals, maintaining top rank (1.00) among generative models.
Table 15: Point forecasting performance (Test MAE, ↓, Traffic in ). Parenthetical values denote paired two-sided -test rank () among flow matching models on shared random seeds (42–48). Bold: best; second best.
| Method | ETTh1 | ETTh2 | Weather | Electricity | Traffic |
|---|---|---|---|---|---|
| DLinear (Zeng et al., 2023) | |||||
| PatchTST (Nie et al., 2022) | |||||
| DMamba (Chen & Sun, 2026) | |||||
| TSFlow (S4) (Kollovieh et al., 2025) | (1) | (6) | (6) | (6) | (6) |
| Raw | (6) | (1) | (1) | (5) | (3) |
| Fourier | (3) | (1) | (1) | (2) | (1) |
| DCT | (1) | (1) | (1) | (1) | (3) |
| PCA | (1) | (1) | (1) | (4) | (3) |
| MercerFlow (Ours) | (1) | (1) | (1) | (1) | (1) |
D.3 SENSITIVITY TO EXTENDED FORECASTING HORIZONS
To evaluate model resilience across extended horizons, we expand the forecast window from the default to while keeping the context length fixed at (resulting in total sequence lengths of and ). Table 16 provides the full test CRPS and MAE comparisons across all five benchmarks.
The results reveal distinct structural behaviors across datasets. On smooth series with long temporal correlation scales, such as ETTh1 (), ambient observation-space modeling (RAW) remains effective. However, on complex, multi-frequency series such as Weather and Electricity at the longest horizon (), predicting directly in observation space incurs severe error accumulation and variance inflation (e.g., RAW MAE on Electricity degrades to , compared to for DCT). In contrast, orthogonal latent codecs constrain error compounding and maintain calibration even as the window length quadruples, demonstrating that compact MLP architectures operating in decorrelated coordinates scale reliably without requiring sequential recurrence.
Table 16: Sensitivity to extended forecasting horizons (). Bold: best; underline: second best.
| Method | ETTh1 | ETTh2 | Weather | Electricity | Traffic | |
|---|---|---|---|---|---|---|
| CRPS (, ) | ||||||
| 336 | Raw | |||||
| Fourier | ||||||
| DCT | ||||||
| PCA | ||||||
| MercerFlow | ||||||
| 720 | Raw | |||||
| Fourier | ||||||
| DCT | ||||||
| PCA | ||||||
| MercerFlow | ||||||
| MAE () | ||||||
| 336 | Raw | |||||
| Fourier | ||||||
| DCT | ||||||
| PCA | ||||||
| MercerFlow | ||||||
| 720 | Raw | |||||
| Fourier | ||||||
| DCT | ||||||
| PCA | ||||||
| MercerFlow | ||||||
Traffic MAE is reported in .
Table 17: Test CRPS (, ) at AdamW learning rate (default is ), mean std over seeds 42–44. Evaluated at matched mid-run EMA checkpoints . Bold: within one std of the best.
| Dataset | Mercer (Ours) | Fourier | DCT | PCA | Raw |
|---|---|---|---|---|---|
| ETTh1 | |||||
| ETTh2 | |||||
| Weather | |||||
| Electricity | |||||
| Traffic |
E OPTIMIZER DYNAMICS AND STABILITY
Increasing the AdamW learning rate from the default to subjects the first-layer curvature to extreme stress under the shared OU prior. Table 17 reports test CRPS at a matched mid-run evaluation checkpoint across all five benchmarks (seeds 42–44). To ensure fair comparison, the shared evaluation checkpoint corresponds to the median of validation-best epochs among decorrelating codecs for each dataset (ETTh1 at epoch 40, ETTh2 at 40, Weather at 10, Electricity at 20, and Traffic at 30).
Under this severe learning rate regime, the unrotated Raw baseline—whose first-layer condition number is two to four orders of magnitude larger than that of the orthonormal codecs—catastrophically collapses on the harder benchmarks (CRPS explodes to 1.22 on ETTh1, 0.065 on Electricity, and 0.246 on Traffic). In stark contrast, all decorrelating codecs (MERCERFLOW, Fourier, DCT, PCA) preserve stable descent trajectories, avoiding numerical instability and remaining close to their default-learning-rate performance.
To visualize optimization stability, Figure 3 plots the training loss trajectories at an elevated learning rate (). MERCERFLOW converges rapidly and strictly monotonically. In contrast, the un-

Figure 3: Training loss trajectories on ETTh1 and ETTh2 at an elevated learning rate ( ). MERCERFLOW (solid blue) converges faster and strictly monotonically. In contrast, the unrotated baseline (RAWFLOW, dashed orange) suffers from optimization friction and visible instability (e.g., the loss spike around epoch 60 on ETTh1), demonstrating the empirical benefits of first-layer preconditioning.
rotated baseline (Raw, labelled RAWFLOW in the legend) exhibits pronounced optimisation friction and overt instability (e.g., a severe gradient-induced loss spike around epoch 60 on ETTh1), visually confirming the critical role of first-layer preconditioning.
F EXTENDED ABLATIONS
F.1 SYNTHETIC ORNSTEIN–UHLENBECK COMPARISON
Evaluating models on synthetic Ornstein–Uhlenbeck (OU) sample paths provides a strictly controlled testbed with a known data-generating kernel. Under this setting, matched and mismatched linear codecs are analytically well-defined, allowing us to evaluate the impact of first-layer conditioning in isolation from real-world confounding factors.
Synthetic trajectories are generated with context length , forecast horizon (total window ), and stationary length scale (corresponding to one e-fold decay across the boundary between context and horizon). The observation-space GP prior and the Mercer basis share this identical ground-truth kernel. Fourier, DCT, and the unrotated Raw baseline employ the exact same AdaLN MLP backbone (width 64, 2 hidden layers) and the same conditional GP prior; only the linear coordinate transformation differs. PCA is omitted in this setting as the ground-truth kernel is known analytically. All models are trained with AdamW at for 2,000 steps (batch size 64, random seeds 0–2).
Table 18 reports the Jacobi condition number evaluated on the centred prior population and on empirical conditional CFM interpolants , along with test CRPS (20 Euler integration steps, 32 trajectories, 256 evaluation windows).
Matched OU Prior. On the centred prior covariance, MERCERFLOW analytically achieves optimal conditioning ( ). DCT closely follows ( ), Fourier sits in the tens (24.9), and the unrotated Raw baseline suffers from severe ill-conditioning ( ). On empirical conditional interpolants, conditioning degrades across all codecs due to non-zero context conditioning, but preserves the identical relative ordering: Mercer (98.5) and DCT (105.0) remain around , Fourier sits at 654.0, and Raw reaches 3,515.0. Under AdamW, all four codecs tie on test CRPS within 0.2% (DCT , Mercer , Fourier , Raw ). This flat scoreboard reflects the synthetic “easy” regime: because the prior matches the data-generating process exactly, the prior conditional mean already explains almost all predictive variance, leaving minimal residual dynamics for the flow to resolve. Nevertheless, the geometric separation remains stark in the condition number columns.
Mismatched Prior Length Scale (Wrong- Stress Test). To examine sensitivity to kernel misspecification, we train a mismatched MERCERFLOW arm where the GP model and Mercer basis assume ( larger than the ground-truth data length scale ). This mismatch increases the prior from 1.00 to 1.71 and the interpolant from 98.5 to 192.0, resulting in a mild CRPS degradation (). Crucially, this performance gap () remains within seed standard deviation, confirming that MERCERFLOW maintains stable optimization even under moderately misspecified prior parameters.
SGD Equivariance Control. Training with Nesterov SGD (momentum 0.9, learning rate , matched step budget) completely eliminates all performance discrepancies: Mercer, Fourier, and Raw achieve identical test CRPS (), with a relative gap from Raw of exactly . This empirical result provides definitive proof of Proposition 1, demonstrating that coordinate representations have zero effect under rotation-equivariant optimization.
Table 18: Synthetic OU comparison (context/horizon 32/32, data length scale ). Matched codecs share the OU prior at ; the wrong- arm uses a Mercer/GP model at . AdaLN MLP (64 hidden, 2 layers), AdamW , 2,000 steps, seeds 0–2 (mean std). prior is computed on the population covariance ; interpolant is empirical on conditional CFM states . SGD control: Nesterov momentum 0.9, matched compute budget; gaps are (CRPS/CRPS) (mean over seeds). Bold indicates values within one standard deviation of the best.
| Codec / arm | prior | interp. | Test CRPS () | SGD gap (%) |
|---|---|---|---|---|
| Mercer () | 1.00 | 98.5 | 0.00 | |
| Fourier () | 24.90 | 654.0 | 0.00 | |
| DCT () | 1.82 | 105.0 | 0.00 | |
| Raw () | 1,501.0 | 3,515.0 | 0.00 | |
| Mercer () | 1.71 | 192.0 | — |
F.2 SAMPLING EFFICIENCY: FLOW MATCHING VS. DIFFUSION
Conditional flow matching generates straight probability paths by pairing source prior draws directly with data targets, avoiding the stochastic Brownian simulation inherent to diffusion. Table 19 benchmarks MERCERFLOW against an equivalent score-based diffusion model formulated in the identical Mercer latent space (MERCERDIFF) across varying Numbers of Function Evaluations (NFE) at forecast horizon .
While MERCERDIFF exhibits severe discretization errors at low step budgets and remains suboptimal even at NFE = 128 (0.47 on ETTh1), MERCERFLOW fully saturates its predictive distribution within merely 4–10 Euler integration steps (0.199), providing a massive practical acceleration during inference.
Table 19: Inference sampling efficiency: Test CRPS (, mean std) across varying Numbers of Function Evaluations (NFE) at horizon . Due to straight probability paths, MERCERFLOW saturates within 4–10 steps, whereas diffusion (MERCERDIFF) suffers from severe discretization error. Bold: best per column.
| Dataset | Method | NFE (Euler Steps) | ||||
|---|---|---|---|---|---|---|
| 4 | 10 | 20 | 50 | 128 | ||
| ETTh1 | MercerDiff | |||||
| MercerFlow | — | — | ||||
| ETTh2 | MercerDiff | |||||
| MercerFlow | — | — | ||||
Table 20: Sensitivity to GP prior diagonal jitter on ETTh1 and ETTh2 (). is evaluated on conditional interpolants . Standard regularisation () preserves well-conditioned representations; extreme jitter () collapses the prior toward white noise (), degrading predictive accuracy. Bold: best per column within each dataset block.
| Metric | Dataset | Codec | Diagonal Jitter | ||||
|---|---|---|---|---|---|---|---|
| ETTh1 | Mercer Raw | ||||||
| ETTh2 | Mercer Raw | ||||||
| CRPS() | ETTh1 | Mercer Raw | |||||
| ETTh2 | Mercer Raw | ||||||
F.3 SENSITIVITY TO PRIOR DIAGONAL JITTER
The regularising diagonal jitter added to the Gaussian process covariance matrix serves two distinct purposes: it ensures numerical stability during matrix inversion in the conditional prior (Equation 3) and sets the diagonal regularisation floor for the Mercer eigenspace. A minimal jitter level () preserves exact alignment with the continuous analytical kernel, whereas excessive jitter forces the prior covariance toward isotropic white noise (). Table 20 systematically evaluates the sensitivity of first-layer conditioning (measured on conditional interpolants ) and test CRPS across jitter values on ETTh1 and ETTh2.
Stability Under Standard Regularisation (). For standard jitter scales (), MERCERFLOW maintains tightly bounded, well-conditioned first-layer geometry ( on ETTh1 and on ETTh2), yielding stable predictive performance (CRPS 0.186–0.188 on ETTh1). Conversely, diagonal jitter fails to resolve the conditioning pathology of the unrotated RAW baseline, whose condition number remains several orders of magnitude higher () across all evaluated jitter scales. On the simple ETTh2 benchmark, where the GP prior mean accounts for the dominant dynamics, CRPS remains virtually invariant to the choice of codec (0.131–0.135).
Breakdown Under Extreme Jitter (). At extreme jitter levels (), the kernel's continuous temporal correlation is drowned out by artificial diagonal dampening (). This distorts the kernel's eigenspace, driving Mercer's condition number up to on ETTh2. More critically, because the prior degenerates toward uninformative white noise, the flow loses its data-matched starting state, causing pronounced CRPS degradation on the harder ETTh1 benchmark ( for Mercer and for RAW). These results show that MERCERFLOW's effectiveness stems from the kernel's authentic analytical structure rather than artificial diagonal conditioning.