Manuscript Offprint
arXiv:2611.04825UniFlow: Unified Multi-Scale Flow Matching for Time Series Generation
Shibo Feng*, Wei Li*, Min Wu Senior Member, IEEE, Chunyan Miao† Fellow, IEEE, Peilin Zhao† Senior Member, IEEE
Abstract—Real-world time series exhibit complex dynamics across multiple temporal resolutions, yet effectively incorporating multi-scale information into generative modeling remains challenging without increasing generative complexity. We propose UniFlow, a unified framework that integrates multi-scale representation learning with efficient non-autoregressive generation through a shared-semantic discrete interface. Specifically, a multi-scale tokenizer employs shared-index voting to consolidate complementary temporal information into a single public-ID sequence, while scale-specific codebooks preserve the information required for reconstruction. Building on this unified representation, we develop geometry-aware categorical flow matching, which initializes transport from learned low-rank anchors and generates public identities non-autoregressively. This design captures multi-scale temporal structure without requiring multiple generative token streams or sequential token decoding. Experiments across four benchmarks and both short- and long-term settings demonstrate improved generative fidelity, strong cross-scale consistency, and substantial inference speedups over representative autoregressive and diffusion-based baselines. Code is available at https://github.com/William-Liwei/uniflow
Index Terms—Time Series, Vector Quantization, Flow Matching.
I. INTRODUCTION
Time-series generation aims to learn the underlying distribution of temporal processes, supporting applications such as simulation, data augmentation, privacy-preserving analysis, and downstream model development. Recent advances span adversarial generators [1, 2], variational latent models [3], diffusion-based approaches [4, 5, 6], and flow-based generative models [7]. Despite their progress in generative fidelity, effectively incorporating multiscale temporal information into a unified and efficient generation process remains an important challenge.
Real-world time series exhibit complex dynamics across multiple temporal resolutions, ranging from local fluctuations and periodic variations to long-term trends. These structures provide complementary information about the same underlying process, motivating multiscale representation learning in temporal modeling [8, 9, 10]. For generation, however,
capturing individual temporal patterns is not sufficient: the generated sequences must also preserve their relationships across scales. This raises a fundamental question: How can complementary multiscale information be integrated into a unified generative representation without introducing multiple token streams or excessive generation complexity? Addressing this question involves three key challenges.
-
Capturing Complementary Multi-scale Dynamics. Temporal patterns exhibit different characteristics across resolutions, making it difficult for a single temporal view to explicitly distinguish local variations from broader temporal structures. An effective representation should capture complementary information at different scales while preserving their correspondence to the same underlying sequence.
-
Unifying Multi-scale Semantics without Interface Expansion. Multi-scale representations naturally introduce multiple sets of latent features or discrete tokens. Directly generating separate scale-specific streams requires coordination across representations, while concatenating them increases the sequence length presented to the generator. The challenge is therefore to consolidate multi-scale information into shared semantic identities without expanding the generator-facing token sequence.
-
Efficient Generation of Unified Token Sequences. Autoregressive token generation relies on sequential decoding, where predictions depend on previously generated tokens. Its teacher-forced training procedure also introduces a discrepancy between training and inference histories, potentially accumulating errors during generation [11, 12]. An alternative should generate the complete shared-token sequence non-autoregressively while effectively modeling the structure of its latent distribution.
To address these challenges, we propose UniFlow, a unified multi-scale time-series generation framework that connects shared-semantic tokenization with geometry-aware categorical flow matching. In Stage 1, aligned scale-specific encoders extract complementary temporal representations, while shared-index voting assigns a common public identity to each temporal position. Scale-specific codebooks retain reconstruction details, whereas the resulting public-ID sequence provides a single, length- generative interface regardless of the number of scales. In Stage 2, a learned low-rank anchor prior provides structured initialization for categorical flow matching, which models the complete public-ID trajectory through non-autoregressive continuous transport. This design integrates multi-scale representation learning with efficient generation without requiring multiple synchronized token streams.
Shibo Feng and Chuanyan Miao are with the College of Computing and Data Science, Nanyang Technological University, Singapore. Email: {shibo001,ascymiao}@ntu.edu.sg.
Wei Li is with Shanghai Jiao Tong University and Beijing Zhongguancun Academy, Shanghai, China. Email: liwei008009@163.com
Min Wu is with the Institute for Infocomm Research and AIMfg, A* STAR, Singapore 138634. Email: wumin@i2r.a-star.edu.sg.
Peilin Zhao is with the School of Artificial Intelligence, Shanghai Jiao Tong University, Shanghai, China. Email: peilinzhao@sjtu.edu.cn.
- Authors contributed equally, † Corresponding author.
Our main contributions are summarized as follows:
-
Unified Multi-scale Semantic Tokenization. We introduce shared-index voting with scale-specific codebooks to integrate complementary temporal information into a single public-ID sequence, preserving multi-scale reconstruction information without expanding the generative interface.
-
Geometry-Aware Non-Autoregressive Generation. We develop a categorical flow framework that combines learned low-rank anchor initialization with parallel public-ID generation, avoiding sequential token decoding while leveraging the learned latent structure.
-
Generative Fidelity and Multi-scale Consistency. Extensive experiments across four benchmarks demonstrate improved generative fidelity and inference efficiency. Reconstruction, cross-scale consistency, and scale-aware statistical analyses further validate the effectiveness of the unified multi-scale representation.
Discrete and Multi-scale Representation Learning. VQ-VAE [14] and VQGAN [15] compress observations into reusable discrete tokens. Hierarchical and residual quantization further enhance representational capacity through multiple latent levels [16, 17]. Recently, vector-quantized modeling has gained increasing attention in time series generation. SDformer [18] and SDFlow [19] introduces similarity-driven discrete token modeling, while MSDformer [20] and TimeMAR [21] explore multi-scale discrete generation. Despite these advances, balancing temporal representation quality and efficient generative fidelity remains an important challenge. UniFlow addresses this challenge by integrating multi-scale information into a unified public-token interface for non-autoregressive generation.
Flow Matching and Non-Autoregressive Generation. Flow matching and rectified flow learn continuous transport fields [22, 23, 24], while stochastic interpolants connect flow-based and diffusion-based modeling [25, 26]. Variational flow matching further supports flexible endpoint distributions, including categorical posteriors [27], with DiT providing a scalable generative backbone [28]. In discrete representation learning, TokenFlow [29] aligns text-guided semantic and pixel-level visual features through shared code indices, unifying image understanding and generation. In contrast, UniFlow
employs shared-index learning to integrate multi-scale temporal evidence into a single public-ID sequence, enabling non-autoregressive categorical flow generation without separate scale-specific token streams.
The Position of UniFlow Existing studies have advanced time series generation through expressive generative models, multiscale discrete representations, and efficient flow-based learning. However, effectively integrating complementary temporal information without increasing generative complexity remains an important challenge. To bridge these directions, UniFlow unifies multiscale semantic representations through a shared public-token interface and employs geometry-aware categorical flow matching for non-autoregressive generation. This design enables rich multiscale modeling within a single generative sequence, providing an effective balance between representation capacity and efficient generative fidelity.
III. PRELIMINARIES
We fix the notation shared by both stages and briefly recall the single-scale components that UniFlow generalizes. UniFlow combines a shared-index multi-scale token interface with non-autoregressive token space generation.
Problem Formulation. Let be a multivariate time series drawn from the unknown data distribution . Given a source variable , unconditional generation learns a mapping such that
For aligned temporal views induced by different receptive fields or patch scales, the multi-scale objective additionally requires the joint generated view distribution
to approximate the corresponding joint distribution of real views. The goal is therefore one coherent generated sequence, rather than independently generated outputs for different temporal scales.
Similarity-Based Quantization. Following similarity-based discrete tokenization [18, 19], a VQ tokenizer first maps the input sequence to latent features , where is the compressed token length. Each latent vector is then assigned to one code in a learned vocabulary by cosine similarity:
Normalized similarities help prevent the codebook from collapsing toward a few large-norm entries, after which the decoder reconstructs the series from the retrieved embeddings. UniFlow extends this rule with aligned branches that produce scale-specific latents but jointly export one public token sequence and codebook; Section IV-A details the shared mapping across branch-specific codebooks.
Rectified Flow Matching (RFM) [30]. RFM learns a time-dependent velocity field whose ODE

Fig. 1: Overview of UniFlow. Stage 1 integrates aligned temporal representations through shared-index voting, yielding a single public-ID sequence and scale-specific codebooks. Stage 2 generates public identities using anchor-initialized categorical flow matching, followed by scale-specific embedding retrieval and decoding. Dashed blue and solid orange arrows denote training and sampling, respectively.
moves samples from a simple source distribution toward the target distribution:
For the linear interpolation path , the target velocity becomes , leading to the objective
Because the whole sequence evolves jointly under this ODE, flow matching removes the left-to-right dependency that drives exposure bias in autoregressive token models.
IV. METHOD
As illustrated in Fig. 1, UniFlow consists of two stages that connect multiscale representation learning with unified non-autoregressive generation. Stage 1 learns a shared-semantic tokenizer, in which aligned temporal views jointly determine a single public-ID sequence while retaining scale-specific codebooks for reconstruction. Stage 2 models this sequence through geometry-aware categorical flow matching, combining a learned low-rank anchor prior with non-autoregressive endpoint prediction. Thus, multiscale information is incorporated into a single generative interface without introducing separate token streams for individual scales.
A. Stage 1: Shared-Semantic Multiscale Tokenization
Aligned Temporal Representations. Given an input time series , we employ temporal encoders with different receptive fields or patch sizes:
All branches are aligned to the same compressed temporal length , so each position is characterized by the complementary representations . Our implementation uses
fine- and coarse-scale branches, while the formulation allows more temporal resolutions.
Independently quantizing these views would produce multiple scale-specific token sequences, requiring the generator to represent their temporal evolution and cross-scale dependencies. We instead separate shared semantic identity from scale-specific realization: the branches retain private embedding spaces but jointly select a public discrete index.
(1) Shared-index Voting Quantization. Branch m maintains a codebook
with a common index set across branches. For each position and candidate code , the normalized branch-wise similarity is
The branch-wise evidence is combined before discrete assignment:
Accordingly, each temporal position receives one public ID rather than separate scale-specific assignments. Importantly, a shared index does not force the branch embeddings to be identical: code k acts as a common semantic key whose realization remains specific to scale m.
(2) Public-token Construction and Training. After selecting , each branch retrieves its private codeword . The decoder reconstructs the sequence from the concatenated embeddings
This induces a fused public codebook
Stage 1 is trained with reconstruction and branch-wise commitment losses:
where the dot products are evaluated using normalized branch features and codewords, and denotes stop-gradient. Scale-specific codebooks are updated by exponential moving average (EMA), with inactive-code resetting to maintain utilization.
Once trained, the tokenizer is frozen. Its output consists of one public-ID sequence and the fused endpoint representation
which provides the shared discrete vocabulary and continuous endpoint targets for Stage 2.
B. Stage 2: Geometry-Aware Categorical Flow Matching
Stage 2 models the public-token sequence exported by the frozen tokenizer. We first construct a structured source distribution informed by the geometry of training endpoints, and then learn a continuous velocity field through categorical prediction over their public identities.
(1) Low-rank Anchor Initialization. Valid public-token endpoints are assembled from a finite shared codebook and exhibit sequence-level structure in the ambient latent space. To capture this geometry, we vectorize the endpoints as
and collect training endpoints in
We approximate these endpoints using a learned low-rank factorization,
where contains support coordinates and provides a shared basis. The coordinates are regularized by
For a sampled support coordinate , we construct an anchor by local perturbation:
After reshaping into , we apply token-wise normalization,
The bandwidth is determined from neighboring support-coordinate distances. This procedure defines an anchor distribution concentrated around the learned low-rank scaffold rather than an isotropic ambient-space source.
(2) Categorical Endpoint Prediction. For an anchor–endpoint training pair and , the interpolation is
A DiT-based network predicts logits , defining a categorical posterior at each position:
(21)
where is the softmax temperature. Rather than regressing an unconstrained endpoint embedding, the model directly learns the probabilities of the valid public identities supplied by Stage 1.
(3) Categorical-to-continuous Transport. The categorical prediction is mapped to the shared embedding space using its expected codeword:
Stacking these means gives . We parameterize the velocity field by
The categorical cross-entropy objective is
where the expectation is taken under the anchor–endpoint training coupling. The categorical objective trains the flow network, while regularizes the learned anchor coordinates. The two roles are distinct: the anchor prior specifies the source geometry, whereas the categorical network predicts endpoint identities and thereby determines continuous transport.
(4) Non-autoregressive Sampling and Decoding. At inference, we sample and numerically solve
to obtain an estimated terminal state . Public identities are retrieved position-wise using cosine similarity:
Each generated ID retrieves its private codewords , which are concatenated and passed to the frozen decoder to produce . The ODE evolves all temporal positions jointly, avoiding sequential autoregressive token decoding while retaining a generator-facing sequence of length .
Overall Training and Generation Workflow. UniFlow follows a two-stage training procedure. Stage 1 learns the shared-semantic tokenizer and scale-specific codebooks, which are subsequently frozen to provide unified public token representations for Stage 2. The categorical flow generator then learns to transport samples from the structured anchor prior toward these representations. During inference, the generated latent states are mapped to public IDs, which retrieve scale-specific embeddings for time series reconstruction. This workflow integrates multi-scale representation learning with non-autoregressive generation through a single public-token interface.
C. Theoretical Properties of Unified Multiscale Generation
We analyze the unified interface from two perspectives. At the representation level of Stage 1, we examine the reliability of shared voting quantization, the recoverability of public identities from individual views, and the complexity of length-preserving generation. At the generative level of Stage 2, we characterize the geometry of the anchor source and the consistency between categorical endpoint prediction and continuous velocity learning.
a) Reliability of shared-index voting.: The shared mapping raises a fundamental question: when does aggregating multiple temporal views yield a more reliable semantic assignment? Let be a fixed reference identity, specified independently of the score fluctuations being analyzed. For a competing code , define the branch-wise target-versus-competitor margin
Writing the vector of margins as
we regard as the expected cross-scale margin and as its variation.
Proposition 1 (Robustness of shared-index voting). Suppose is zero-mean sub-Gaussian with covariance proxy and for all . Then the shared assignment satisfies
where a term with zero variance proxy and a positive projected margin is interpreted as zero.
The result follows from a sub-Gaussian tail bound on each aggregated margin and a union bound over competing codes (Appendix I). It shows that shared-vote reliability is governed by the aggregated margin relative to cross-scale uncertainty. Additional temporal views can therefore improve assignment reliability when their complementary evidence increases this margin-to-uncertainty ratio. This result characterizes the conditions under which aggregating cross-scale evidence can improve assignment reliability, providing a probabilistic motivation for shared-index voting.
b) Single-view recoverability and decoder stability.: We next examine whether the public ID from Eq. (9) remains recognizable from an individual view. For branch r, define
| Dataset | Shared Ref. Token | Shared Ref. Seq | Scale-1 Token | Scale-1 Seq | Scale-2 Token | Scale-2 Seq |
|---|---|---|---|---|---|---|
| Sine | 1.0000 | 1.0000 | 0.7873 | 0.2396 | 0.8540 | 0.3906 |
| Stock | 1.0000 | 1.0000 | 0.8053 | 0.3372 | 0.9053 | 0.5789 |
| ETTh | 1.0000 | 1.0000 | 0.8305 | 0.3389 | 0.8676 | 0.4281 |
| Energy | 1.0000 | 1.0000 | 0.8847 | 0.4974 | 0.8823 | 0.4868 |
TABLE I: Agreement with the canonical public-ID sequence. Shared Ref. denotes the full shared mapping, while Scale 1 and Scale 2 recover the public IDs from a single temporal view.
Proposition 2 (Single-view recovery and decoder stability). If , branch uniquely recovers the shared identity, i.e., . This assignment remains unchanged under similarity-score perturbations bounded by in norm whenever .
Further, suppose the decoder is -Lipschitz, and define the diameter of branch codebook m by
Let and denote the fused codeword matrices selected by the shared and recovered IDs, respectively, and let S be the set of positions where these IDs differ. Then
(32)
Consequently, for an input sequence X,
The margin conditions ensure the stability of individual code assignments; the decoder bounds follow from codebook diameters, decoder Lipschitzness, and the triangle inequality (Appendix I). They clarify how a common public identity can be recovered from scale-specific representations, and how mismatched identities can affect reconstruction.
Empirical Verification of Shared-ID Recoverability. Table I complements the above analysis by evaluating how well the canonical public-ID sequence obtained from the full shared mapping can be recovered from an individual temporal view. The Shared Ref. columns report agreement with the original shared assignment itself and therefore equal 1.0 by construction, serving as the reference for the complete multi-scale representation. In contrast, using only Scale 1 or Scale 2 recovers between 78.73% and 90.53% of the public IDs across the four datasets. This indicates that the shared semantic identity remains largely recognizable from either temporal resolution.
Importantly, the single-view agreement is high but not perfect, suggesting that the two scales preserve complementary rather than fully redundant information. The lower sequence-level agreement is expected because it requires exact recovery of every token in a sequence; consequently, even a small number of position-wise mismatches causes the entire sequence to be counted as inconsistent.
c) Complexity of the unified interface.: The public representation exposes L tokens to Stage 2 independently of the number of aligned temporal branches.
Proposition 3 (Complexity of the unified interface). Assume M aligned branches, each with L tokens, and a fixed per-token DiT hidden width . The unified public-token sequence requires a self-attention term of
Concatenating M separate scale-specific sequences yields ML tokens and a self-attention term of
while M separate attention streams require a total of
before any cross-stream interaction.
Its structural implication is that a shared public-ID interface avoids the scale-dependent expansion of the generator-facing token sequence.
d) Structured Initialization and Categorical-flow Consistency.: The learned anchor prior provides a structured source distribution for categorical flow transport. Specifically, for the unnormalized anchor , where , we have
(37)
Thus, the source perturbations before row normalization lie within a learned subspace of dimension at most r. Given the resulting anchor–endpoint coupling, the population conditional velocity associated with Eq. (20) is
We next establish how categorical endpoint learning recovers this conditional velocity field under the population-optimality assumption.
Proposition 4 (Categorical endpoint and velocity consistency). Assume the categorical model can represent the true conditional position-wise distributions and that the population cross-entropy optimum is attained. Then, for each temporal position i,
Consequently,
and the induced velocity field satisfies, for t < 1,
At the population optimum, the position-wise categorical probabilities recover the conditional codebook expectations. Moreover, interpolation implies
Algorithm 1 Training procedure of UniFlow.
Require: Training set , multi-scale encoders, branch codebooks, decoder, and voting weights.
1: Stage 1: shared-semantic tokenization
2: for each minibatch do
3: Encode aligned temporal views and compute branch-wise similarities.
4: Select each public ID by the weighted shared-mapping rule.
5: Retrieve private branch embeddings and concatenate them.
6: Reconstruct and optimize .
7: Update branch codebooks by EMA and inactive-code resetting.
8: end for
9: Freeze Stage 1 and construct public-token matrices .
10: Vectorize public-token matrices and initialize from .
11: Stage 2: anchor-initialized categorical flow
12: for each endpoint minibatch do
13: Construct from the corresponding low-rank coordinates.
14: Sample and set .
15: Predict position-wise public-ID logits.
16: Update using .
17: end for
18: Construct from learned support coordinates and their local smoothing scale.
19: return Frozen Stage 1, flow model, , and .
which coincides with Eq. (23). Thus, categorical endpoint supervision is consistent with the corresponding conditional continuous velocity field under the stated assumptions. The conclusion concerns position-wise conditional marginals and does not, on its own, establish consistency of the full joint categorical sequence distribution.
e) Consistency of geometric readout.: The final public-ID assignment is obtained through cosine similarity between the generated terminal state and the shared codebook. For nonzero vectors, let and denote their normalized forms, and define
Assuming distinct normalized codewords, if
then k is the unique cosine nearest-code assignment. This follows from the triangle inequality and the equivalence between cosine maximization and Euclidean nearest-neighbor search on normalized vectors.
This condition provides a sufficient guarantee for stable public-ID retrieval from the generated terminal state, establishing a geometric foundation for reliable discrete token reconstruction in UniFlow.
Algorithm 2 Sampling with UniFlow.
Require: Anchor prior , basis , flow , branch codebooks , shared codebook , and decoder .
1: Sample .
2: Project through , reshape to , and apply row normalization.
3: .
4: for do
5: .
6: .
7: end for
8: .
9: return .
V. EXPERIMENTS
A. Experimental Setup
Benchmarks. We evaluate on four datasets spanning diverse domains and complexities, following the protocol established by prior work [1, 18]:
-
Sines: Synthetic sinusoidal sequences with varying frequencies and phases, 5 features. This serves as a sanity check for basic temporal pattern capture.
-
Stocks: Daily Google stock prices from 2004–2019, including open/close/high/low prices and volume, 6 features. Real financial data with complex non-stationary dynamics.
-
ETTh: Hourly electrical transformer temperature measurements, 7 features. Industrial time series with periodic patterns and trend components.
-
Energy: UCI appliance energy use dataset with weather and environmental sensors, 28 features. High-dimensional multivariate series with complex cross-correlations.
Baselines. We compare UniFlow with representative time-series generation methods across five generative paradigms. GAN-based methods include TimeGAN [1], which combines adversarial and supervised learning to preserve temporal dynamics in a learned embedding space, and COT-GAN [2], which employs causal optimal transport to capture temporal dependencies in sequential data. VAE-based methods include TimeVAE [3], which learns probabilistic latent representations and supports interpretable temporal components such as trends and seasonality. Diffusion-based methods include DiffWave [31], which generates waveforms through iterative reverse diffusion; DiffTime [32], which adapts diffusion modeling to time-series generation and supports constraint-aware sampling; and Diffusion-TS [6], which incorporates disentangled temporal representations and Fourier-based objectives for interpretable sequence generation. Discrete-token methods include SDformer-ar [18] and SDformer-m [18], which combine similarity-driven vector quantization with autoregressive or masked discrete Transformer modeling. We additionally include MSDformer [20], a multi-scale autoregressive discrete generative variant of SDformer, which demonstrates competitive generation performance in long-term settings. Flow-based methods include FlowTS [7], which employs rectified flow to
learn continuous transport trajectories for efficient time-series generation.
Evaluation Metrics. To comprehensively evaluate the fidelity and utility of generated time series, we report three complementary metrics: Discriminative Score, Predictive Score, and Context-FID, with results averaged over five random seeds.
To be specific, Discriminative Score (DS) evaluates the distinguishability between real and generated time series using a post-hoc binary classifier. Following TimeGAN and Diffusion-TS [1, 6], we train a GRU-based classifier with a sigmoid output layer on balanced real and synthetic samples, and evaluate its accuracy on a held-out test set. The score is defined as DS = |Acc - 0.5|, where Acc denotes the classification accuracy. A lower DS indicates that generated sequences are more difficult to distinguish from real data, with zero corresponding to chance-level discrimination. The classifier is trained using binary cross-entropy and Adam for 2,000 iterations with a batch size of 128. Predictive Score (PS) evaluates temporal predictive fidelity by training a GRU-based one-step-ahead predictor on synthetic sequences and evaluating its mean absolute error (MAE) on held-out real sequences:
Here, denotes the number of real test sequences, and MAE is computed over all predicted time steps and variables. Lower PS indicates better preservation of temporal predictive structure. The predictor is trained using Adam with an L1 loss for 5,000 iterations and a batch size of 128. Context-FID (C-FID) evaluates the distributional fidelity of generated time series in a contextual representation space. Following [6, 33, 20], we employ a TS2Vec encoder [34], pretrained on real training data, to extract 320-dimensional embeddings from full-length real and synthetic sequences. The Fréchet distance between their Gaussian-approximated embedding distributions is computed as
where and denote the empirical means and covariance matrices of real and synthetic embeddings, respectively. Lower C-FID indicates closer alignment between their contextual feature distributions.
Implementation Details. We evaluate UniFlow on unconditional generation with and on longer horizons within above four datasets. For UniFlow, Stage 1 always uses a two-branch shared-index tokenizer with , fused width , branch widths 192/320, depths 2/4, patch sizes 2/4, weights 0.4/0.6, and downsampling rate . The details are shown in Tables III and IV. Also, each Stage 2 generator is paired only with its matched Stage 1 checkpoint, so the reported results do not mix incompatible tokenizers and generators. All experiments were run on a single NVIDIA GPU with 8 GB memory, with results averaged over five runs.
| Category | Method | Sine | Stock | ETTh | Energy | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DS ↓ | PS ↓ | C-FID ↓ | DS ↓ | PS ↓ | C-FID ↓ | DS ↓ | PS ↓ | C-FID ↓ | DS ↓ | PS ↓ | C-FID ↓ | ||
| GAN-based | TimeGAN | .011±.008 | .093±.019 | .101±.014 | .102±.021 | .038±.001 | .103±.013 | .114±.055 | .124±.001 | .300±.013 | .236±.012 | .273±.004 | .767±.103 |
| COT-GAN | .254±.137 | .100±.000 | 1.337±.068 | .230±.016 | .047±.001 | .408±.086 | .325±.099 | .129±.000 | .980±.071 | .498±.002 | .259±.000 | 1.039±.028 | |
| VAE-based | TimeVAE | .041±.044 | .093±.000 | .307±.060 | .145±.120 | .039±.000 | .215±.035 | .209±.058 | .126±.004 | .805±.186 | .499±.000 | .292±.000 | 1.631±.142 |
| Diffusion-based | DiffWave | .017±.008 | .093±.000 | .014±.002 | .232±.061 | .047±.000 | .232±.032 | .190±.008 | .130±.001 | .873±.061 | .493±.004 | .251±.000 | 1.031±.131 |
| DiffTime | .013±.006 | .093±.000 | .006±.001 | .097±.016 | .038±.001 | .236±.074 | .100±.007 | .121±.004 | .299±.044 | .445±.004 | .252±.000 | .279±.045 | |
| Diffusion-TS | .006±.007 | .093±.000 | .006±.000 | .067±.015 | .036±.000 | .147±.025 | .061±.009 | .119±.002 | .116±.010 | .122±.003 | .250±.000 | .089±.024 | |
| Discrete-token | SDformer-m | .008±.004 | .093±.000 | .010±.002 | .020±.011 | .037±.000 | .034±.008 | .022±.001 | .119±.002 | .019±.003 | .062±.006 | .250±.000 | .041±.005 |
| SDformer-ar | .006±.004 | .093±.000 | .001±.000 | .010±.006 | .037±.000 | .002±.000 | .003±.001 | .118±.002 | .008±.001 | .006±.004 | .249±.000 | .003±.000 | |
| Flow-based | FlowTS | .005±.005 | .092±.000 | .002±.000 | .019±.013 | .036±.000 | .015±.003 | .011±.015 | .118±.005 | .024±.001 | .053±.010 | .250±.000 | .031±.004 |
| Ours | UniFlow | .003±.001 | .092±.000 | .0004±.0000 | .005±.002 | .036±.000 | .001±.000 | .003±.001 | .118±.001 | .001±.000 | .003±.002 | .249±.000 | .001±.000 |
| Reference | Original | — | .094±.001 | — | — | .036±.001 | — | — | .121±.005 | — | — | .250±.003 | — |
TABLE II: Unconditional generation results on standard benchmarks (). Best results in bold, second best underlined. Lower is better for all metrics. Original denotes the real-data PS reference. Results show mean std over 5 runs.
| Branch Dims | Branch Depths | Patch Sizes | Shared Weights | ||||
|---|---|---|---|---|---|---|---|
| 24 | 192/320 | 2/4 | 2/4 | 0.4/0.6 | 512 | 512 | 4 |
| 64 | 192/320 | 2/4 | 2/4 | 0.4/0.6 | 512 | 512 | 4 |
| 128 | 192/320 | 2/4 | 2/4 | 0.4/0.6 | 512 | 512 | 4 |
| 256 | 192/320 | 2/4 | 2/4 | 0.4/0.6 | 512 | 512 | 4 |
TABLE III: Stage 1 tokenizer settings used by UniFlow across sequence lengths.
| Rank | DiT Layers | Heads | ODE Steps | Bandwidth Factor | ||
|---|---|---|---|---|---|---|
| 24 | 256 | 1 | 512 | 16 | 20 | 0.005 |
| 64 | 256–512 | 3 | 1024 | 16 | 20 | 0.005 |
| 128 | 512 | 3 | 1024 | 16 | 20 | 0.005 |
| 256 | 1024 | 3 | 1024 | 16 | 20 | 0.005 |
TABLE IV: Stage 2 generator settings used by UniFlow across sequence lengths.
B. Main Results
-
Short-Sequence Generation ().: Table II shows that UniFlow is already strong in the short-horizon regime, where autoregressive error accumulation is less pronounced and several baselines remain competitive. The largest separation appears in DS and C-FID, the two metrics most directly tied to distributional realism. On Energy, for example, UniFlow reduces DS from 0.006 to 0.003 and C-FID from 0.003 to 0.001 compared with the strongest token baseline. PS remains competitive across datasets. Together with the tokenizer ablation, this result shows that the shared multi-scale representation is useful even before long-horizon error accumulation becomes dominant. Also, we found that UniFlow's parallel transport also provides an efficiency advantage: in our wall-clock runs, generating 1,024 short-horizon samples is about faster than autoregressive token decoding, which is shown in Table VI.
-
Long-Sequence Generation ().: Table V evaluates long-horizon generation on ETTh and Energy. Across all sequence lengths, UniFlow consistently achieves the lowest DS and C-FID while maintaining competitive PS, demonstrating strong distributional fidelity as the generation horizon increases. Compared with the autoregressive discrete
model SDformer-ar, UniFlow reduces DS from 0.008 to 0.005 and C-FID from 0.021 to 0.001 on ETTh at , with corresponding reductions from 0.017 to 0.007 and 0.041 to 0.002 on Energy. Notably, MSDformer, a multi-scale autoregressive extension of SDformer, further improves long-horizon generative performance, highlighting the value of incorporating multi-scale temporal information. Nevertheless, UniFlow consistently outperforms MSDformer in DS and C-FID across both datasets and all evaluated lengths, suggesting that multi-scale representations can be effectively integrated into a unified non-autoregressive generative interface. These results demonstrate the effectiveness of UniFlow in modeling long-range temporal distributions without relying on sequential token generation.
C. Cross-Scale Complementarity and Generative Consistency
A central motivation of the shared-index design is to integrate complementary temporal information into a unified representation. To examine the contribution of cross-scale integration, we compare the full shared-token model with two single-scale variants that recover the Stage 2 trajectory using only Scale 1 or Scale 2, while keeping the decoder and remaining generator settings unchanged.
Table VII evaluates generative quality using DS/C-FID and MAE/MSE, together with cross-scale consistency through Cycle Agree. Given generated sequences, we re-encode each sample using the frozen multi-scale tokenizer and independently recover the public IDs from the two temporal branches, which is defined as
where denotes the ID recovered independently from scale . Higher value indicates stronger cross-scale agreement under the frozen tokenizer, rather than external semantic correctness.
Across all three datasets, shared generation consistently achieves lower DS/C-FID and higher agreement than either
| Method | DS ↓ | PS ↓ | C-FID ↓ | ||||||
|---|---|---|---|---|---|---|---|---|---|
| ℓ = 64 | ℓ = 128 | ℓ = 256 | ℓ = 64 | ℓ = 128 | ℓ = 256 | ℓ = 64 | ℓ = 128 | ℓ = 256 | |
| ETTh Dataset | |||||||||
| TimeGAN | .227±.078 | .188±.074 | .442±.056 | .132±.008 | .153±.014 | .220±.008 | 1.130±.102 | 1.553±.169 | 5.872±.208 |
| COT-GAN | .296±.348 | .451±.080 | .461±.010 | .135±.003 | .126±.001 | .129±.000 | 3.008±.277 | 2.639±.427 | 4.075±.894 |
| TimeVAE | .171±.142 | .154±.087 | .178±.076 | .118±.004 | .113±.005 | .110±.027 | .827±.146 | 1.062±.134 | .826±.093 |
| DiffWave | .254±.074 | .274±.047 | .304±.068 | .133±.008 | .129±.003 | .132±.001 | 1.543±.153 | 2.354±.170 | 2.899±.289 |
| DiffTime | .150±.003 | .176±.015 | .243±.005 | .118±.004 | .120±.008 | .118±.003 | 1.279±.083 | 2.554±.318 | 3.524±.830 |
| Diffusion-TS | .106±.048 | .144±.060 | .060±.030 | .116±.000 | .110±.003 | .109±.013 | .631±.058 | .787±.062 | .423±.038 |
| FlowTS | .010±.004 | .040±.012 | .081±.022 | .115±.005 | .104±.013 | .107±.005 | .039±.003 | .128±.007 | .302±.018 |
| SDformer-ar | .018±.007 | .013±.005 | .008±.006 | .116±.006 | .110±.007 | .095±.003 | .018±.003 | .024±.001 | .021±.001 |
| MSDformer | .013±.012 | .006±.003 | .007±.005 | .112±.008 | .110±.009 | .110±.005 | .015±.002 | .023±.002 | .018±.002 |
| UniFlow | .003±.000 | .006±.002 | .005±.002 | .112±.003 | .108±.006 | .105±.005 | .001±.000 | .001±.000 | .001±.000 |
| Original | — | — | — | .114±.006 | .108±.005 | .106±.010 | — | — | — |
| Energy Dataset | |||||||||
| TimeGAN | .498±.001 | .499±.001 | .499±.000 | .291±.003 | .303±.002 | .351±.004 | 1.230±.070 | 2.535±.372 | 5.032±.831 |
| COT-GAN | .499±.001 | .499±.001 | .498±.004 | .262±.002 | .269±.002 | .275±.004 | 1.824±.144 | 1.822±.271 | 2.533±.467 |
| TimeVAE | .499±.000 | .499±.000 | .499±.000 | .302±.001 | .318±.000 | .353±.003 | 2.662±.087 | 3.125±.106 | 3.768±.998 |
| DiffWave | .497±.004 | .499±.001 | .499±.000 | .252±.001 | .252±.000 | .251±.000 | 2.697±.418 | 5.552±.528 | 5.572±.584 |
| DiffTime | .328±.031 | .396±.024 | .437±.095 | .252±.000 | .251±.000 | .251±.000 | .762±.157 | 1.344±.131 | 4.735±.729 |
| Diffusion-TS | .078±.021 | .143±.075 | .290±.123 | .249±.000 | .247±.001 | .245±.001 | .135±.017 | .087±.019 | .126±.024 |
| SDformer-ar | .010±.007 | .013±.007 | .017±.003 | .247±.001 | .244±.000 | .243±.002 | .031±.002 | .036±.002 | .041±.003 |
| MSDformer | .009±.006 | .009±.006 | .010±.009 | .247±.001 | .244±.000 | .243±.003 | .027±.003 | .034±.004 | .032±.002 |
| UniFlow | .003±.001 | .006±.003 | .007±.005 | .247±.000 | .243±.001 | .242±.002 | .001±.000 | .001±.000 | .002±.000 |
| Original | — | — | — | .245±.002 | .243±.000 | .243±.000 | — | — | — |
TABLE V: Long-horizon generation on ETTh and Energy (). Best and second-best results are bold and underlined; all metrics are lower-better. Mean std over 5 runs; Original is the real-data PS reference.
| Method | Sine | Stock | ETTh | Energy |
|---|---|---|---|---|
| Diffusion-TS | 9.57 | 10.12 | 11.85 | 34.92 |
| SDformer-ar | 0.15 | 0.18 | 0.40 | 0.15 |
| MSDformer | 0.95 | 0.96 | 0.30 | 0.96 |
| UniFlow (Ours) | 0.05 | 0.04 | 0.04 | 0.04 |
| Speedup vs AR | 3.0× | 4.5× | 7.5× | 3.8× |
TABLE VI: Inference time (seconds) for generating 1,024 samples at . The comparison is calculated relative to the fastest autoregressive baseline on each dataset.
| Dataset | Variant | DS / C-FID ↓ | MAE / MSE ↓ | Cycle Agree. ↑ |
|---|---|---|---|---|
| Sine | Real (ref.) | — | — | 0.665 |
| Shared gen. | 0.003 / 0.0004 | 0.1201 / 0.0268 | 0.766 | |
| Scale-1 gen. | 0.008 / 0.009 | 0.1062 / 0.0208 | 0.499 | |
| Scale-2 gen. | 0.011 / 0.007 | 0.1110 / 0.0227 | 0.540 | |
| ETTh | Real (ref.) | — | — | 0.711 |
| Shared gen. | 0.003 / 0.001 | 0.1543 / 0.0428 | 0.768 | |
| Scale-1 gen. | 0.108 / 0.008 | 0.1457 / 0.0383 | 0.467 | |
| Scale-2 gen. | 0.069 / 0.010 | 0.1497 / 0.0400 | 0.477 | |
| Energy | Real (ref.) | — | — | 0.778 |
| Shared gen. | 0.003 / 0.001 | 0.2011 / 0.0703 | 0.789 | |
| Scale-1 gen. | 0.345 / 0.363 | 0.1768 / 0.0561 | 0.483 | |
| Scale-2 gen. | 0.316 / 0.326 | 0.1704 / 0.0517 | 0.466 |
TABLE VII: Single-view generation and tokenizer-cycle consistency. Cycle Agree. compares scale-specific IDs after decoding and re-encoding.
single-scale variant. Although individual scales occasionally yield lower MAE/MSE, these improvements do not translate into better distributional fidelity or cross-scale consistency. These observations suggest that different temporal views provide complementary information and that shared-index model-
ing effectively integrates this information into a more coherent generative representation.
Coarse-View Distributional Consistency. To further assess whether the generated sequences preserve temporal structure beyond their original resolution, we evaluate their distributions under non-overlapping temporal aggregation. For each window , we construct summary features from the aggregated trajectories, first-order differences, and channel-wise means and standard deviations. We then compute a Fréchet-type distance between real and generated features, standardized using real-data statistics, and average the distances across windows.
| Dataset | Shared Dist. | S1 Dist. | S2 Dist. | S1/Shared | S2/Shared |
|---|---|---|---|---|---|
| Sine | 0.455 | 15.185 | 13.908 | 33.3× | 30.5× |
| ETTh | 3.746 | 14.949 | 14.848 | 4.0× | 4.0× |
| Energy | 62.493 | 369.868 | 241.368 | 5.9× | 3.9× |
TABLE VIII: Coarse-view distributional fidelity under non-overlapping temporal aggregation . Distances are averaged across windows; lower is better. Ratios indicate the relative distances of single-scale variants to shared generation.
As shown in Table VIII, shared generation consistently achieves the lowest coarse-view distances across all three datasets. Compared with shared generation, the Scale-1 and Scale-2 variants exhibit approximately 30.5–33.3× larger distances on Sine, 4.0× on ETTh, and 3.9–5.9× on Energy. These results complement the scale-aware visualizations in Fig. 3, showing that the benefits of shared-index generation extend beyond discrete semantic agreement to the preservation of observable temporal statistics under aggregation.
Together, these analyses provide complementary evidence at both semantic and observable levels: shared-index generation

Fig. 2: t-SNE visualization of real and Stage 1 reconstructed samples under different public-ID assignments.
improves cross-scale agreement in the learned token space while more faithfully reproducing multi-scale temporal statistics in the generated sequences. This distinction highlights the role of the unified public-ID interface in preserving information across temporal resolutions without introducing separate generative token streams.
| Condition | Initial Acc. | Refined Acc. | Correction | DS / C-FID |
|---|---|---|---|---|
| Scale-1 IDs | 0.7873 | 0.9999 | 0.9996 | 0.0116 / 0.00024 |
| Scale-2 IDs | 0.8540 | 0.9999 | 0.9997 | 0.0109 / 0.00026 |
TABLE IX: Sine conditional public-ID refinement diagnostic. Initial accuracy is the token match between a single branch's recovered IDs and the jointly voted shared IDs; refined accuracy is measured after the conditional Stage 2 refinement.
D. Effects of Shared-Index Voting on Reconstruction Fidelity
A key question in shared-semantic tokenization is whether unifying multiple temporal views into a single public ID compromises reconstruction fidelity. To investigate this, we evaluate Stage 1 reconstruction by comparing the original shared-index assignment with single-view alternatives that recover public IDs using only Scale 1 or Scale 2, while keeping the learned scale-specific codebooks and decoder fixed.
Table X reports reconstruction MSE/MAE and their changes relative to the shared assignment. The shared mapping consistently achieves the lowest reconstruction errors across all four datasets, indicating that aggregating cross-scale evidence produces more informative code assignments than relying on either individual view. The varying reconstruction degradation across datasets and scales highlights their data-dependent contributions, further motivating the integration of complementary temporal evidence through shared-index voting.
These findings complement the single-view recoverability analysis by showing that shared-index voting improves not only discrete ID agreement but also reconstruction fidelity.
Together with the Stage 2 generation results DS/C-FID in Table VII, they provide evidence that the unified public-token interface supports both faithful reconstruction and high-quality generative modeling. The t-SNE visualization in Fig. 2 further illustrates the distributional overlap between real samples and Stage 1 reconstructions under different public-ID assignments.

Fig. 3: Multi-scale temporal structure under shared and single-scale generation. Top: Temporal aggregation gaps. Middle: Joint fine- and coarse-scale activity distributions. Bottom: Covariance ellipses of joint variation. Shared generation better preserves the real-data multi-scale structure.
E. Single-View Conditioned Shared-ID Refinement
Building upon the single-view recovery property in Proposition 2, we further investigate whether Stage 2 can refine incomplete public-ID assignments obtained from an individual temporal scale. While the proposition characterizes when branch-specific evidence is sufficient for stable ID recovery, it does not guarantee correct assignments at positions with insufficient semantic margins.
To examine this setting, we conduct a controlled experiment on Sine, where IDs independently recovered from Scale 1 or Scale 2 initialize the refinement process and condition Stage 2 through adaptive layer normalization (AdaLN). The jointly voted shared IDs serve as the reference for evaluating token recovery.
As shown in Table IX, conditional refinement improves token accuracy from 78.73%/85.40% to 99.99% for Scale 1/Scale 2, correcting over 99.9% of initially mismatched IDs. The refined sequences also achieve DS/C-FID values of 0.0116/0.00024 and 0.0109/0.00026, respectively.
These results extend the single-view recoverability analysis by showing that, in this controlled setting, Stage 2 can substantially reduce ambiguities remaining in individual-scale ID assignments. This further illustrates the potential of the shared-semantic interface for conditional cross-scale generation.
| Dataset | MSE ↓ | MAE ↓ | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Shared | Scale-1 | Scale-2 | S1 Δ | S2 Δ | Shared | Scale-1 | Scale-2 | S1 Δ | S2 Δ | |
| Sine | 0.00004929 | 0.00005341 | 0.00006096 | 0.00000412 | 0.00001166 | 0.005348 | 0.005533 | 0.005819 | 0.000185 | 0.000471 |
| Stock | 0.00018091 | 0.00018585 | 0.00018173 | 0.00000495 | 0.00000082 | 0.008570 | 0.008625 | 0.008587 | 0.000055 | 0.000017 |
| ETTh | 0.00010566 | 0.00011746 | 0.00013094 | 0.00001180 | 0.00002528 | 0.007804 | 0.008116 | 0.008494 | 0.000312 | 0.000690 |
| Energy | 0.00005832 | 0.00008911 | 0.00016054 | 0.00003078 | 0.00010222 | 0.005546 | 0.005986 | 0.006699 | 0.000440 | 0.001153 |
| Avg. Δ | - | - | - | 0.00001291 | 0.00003500 | - | - | - | 0.000248 | 0.000583 |
TABLE X: Reconstruction performance under shared and single-view public-ID assignments. Δ denotes the increase in reconstruction error relative to the shared mapping. Lower values indicate better reconstruction quality.
F. Ablation Study
Table XI examines three key design choices of UniFlow: multi-scale tokenization, the shared public-ID interface, and flow initialization of Energy dataset.
Multi-scale Tokenization. Introducing multiple temporal scales alone does not guarantee better generation. The dilation-only variant performs worse than single-scale token flow (DS: 0.027 vs. 0.006), whereas patch-based multi-scale tokenization achieves substantially lower DS/C-FID 0.003/0.001. This contrast indicates that the effectiveness of multi-scale modeling depends on how temporal information is represented and aligned, rather than simply increasing the number of scales.
Shared Semantic Interface. Keeping the Stage 2 architecture and token sequence length fixed, replacing jointly voted public IDs with Scale 1 or Scale 2 IDs substantially degrades DS/C-FID, from 0.003/0.001 to 0.345/0.363 and 0.316/0.326, respectively. This result highlights the importance of integrating cross-scale evidence into a unified semantic identity, rather than relying on individual scale-specific assignments.
Geometry-aware Initialization. Replacing the learned anchor prior with Gaussian coordinates increases DS/C-FID to 0.218/0.279. A fitted-mixture prior improves performance to 0.047/0.031, but remains inferior to the learned anchor prior 0.003/0.001. These results suggest that initialization informed by the learned low-rank support structure provides a more suitable starting distribution for categorical flow transport than the evaluated alternatives.
Overall, the three ablations reveal complementary roles across the two stages: multi-scale tokenization determines the temporal information captured by the tokenizer, shared-index voting consolidates this information into a unified generative interface, and the anchor prior determines the initialization geometry for subsequent transport. Their combined effectiveness supports the representation-to-generation design of UniFlow.
VI. CONCLUSION
We presented UniFlow, a unified framework for multi-scale time series generation that reconciles rich temporal representations with efficient generative modeling. Through shared-index voting and scale-specific codebooks, UniFlow integrates complementary temporal information into a single public-ID sequence while preserving scale-dependent reconstruction details. Building on this unified representation, geometry-aware categorical flow matching leverages learned low-rank
| Component | Variant | DS ↓ | C-FID ↓ |
|---|---|---|---|
| Tokenizer | Single-scale token flow | 0.006 | 0.003 |
| Multi-scale, dilation-only | 0.027 | 0.018 | |
| Multi-scale, patch-based | 0.003 | 0.001 | |
| Interface | Shared public IDs | 0.003 | 0.001 |
| Scale-1 IDs only | 0.345 | 0.363 | |
| Scale-2 IDs only | 0.316 | 0.326 | |
| Prior | Gaussian coordinate prior | 0.218 | 0.279 |
| Fitted-mixture prior | 0.047 | 0.031 | |
| Learned anchor prior | 0.003 | 0.001 |
TABLE XI: Ablation of multi-scale tokenization, shared-ID interface, and flow initialization on Energy.
anchors to initialize continuous transport and enables non-autoregressive generation without sequential token decoding.
Extensive experiments demonstrate that UniFlow achieves improved generative fidelity and inference efficiency across diverse benchmarks and generation horizons. Further analyses validate its effectiveness in preserving reconstruction fidelity, cross-scale semantic consistency, and multi-scale temporal structure. These findings highlight that rich multi-scale information can be integrated into a unified generative interface, enabling high-quality and efficient time series generation without multiple token streams.
Limitations and Future Directions. Modeling temporal information across multiple scales is essential for capturing the complex dynamics of time series data. The current tokenization of UniFlow relies on predefined temporal scales. Exploring adaptive scale selection and integration could further enhance its ability.
REFERENCES
[1] J. Yoon, D. Jarrett, and M. Van der Schaar, “Time-series generative adversarial networks,” Advances in neural information processing systems, vol. 32, 2019. [2] T. Xu, L. K. Wenliang, M. Munn, and B. Acciaio, “Cot-gan: Generating sequential data via causal optimal transport,” Advances in neural information processing systems, vol. 33, pp. 8798–8809, 2020. [3] A. Desai, C. Freeman, Z. Wang, and I. Beaver, “TimeVAE: A variational auto-encoder for multivariate time series generation,” arXiv preprint arXiv:2111.08095, 2021. [4] Y. Tashiro, J. Song, Y. Song, and S. Ermon, “Csdi: Conditional score-based diffusion models for probabilistic time series imputation," Advances in neural information processing systems, vol. 34, pp. 24804–24816, 2021.
[5] J. M. L. Alcaraz and N. Strodthoff, “Diffusion-based time series imputation and forecasting with structured state space models,” arXiv preprint arXiv:2208.09399, 2022.
[6] X. Yuan and Y. Qiao, “Diffusion-ts: Interpretable diffusion for general time series generation,” arXiv preprint arXiv:2403.01742, 2024.
[7] Y. Hu, X. Wang, Z. Ding, L. Wu, H. Zhang, S. Z. Li, S. Wang, J. Zhang, Z. Li, and T. Chen, “Flowts: Time series generation via rectified flow,” arXiv preprint arXiv:2411.07506, 2024.
[8] B. Lim and S. Zohren, “Time-series forecasting with deep learning: a survey,” Philosophical transactions of the royal society a: mathematical, physical and engineering sciences, vol. 379, no. 2194, 2021.
[9] S. Wu, X. Xiao, Q. Ding, P. Zhao, Y. Wei, and J. Huang, “Adversarial sparse transformer for time series forecasting,” Advances in neural information processing systems, vol. 33, pp. 17 105–17 115, 2020.
[10] Q. Ding, S. Wu, H. Sun, J. Guo, and J. Guo, “Hierarchical multi-scale gaussian transformer for stock movement prediction.” in Ijcai, 2020, pp. 4640–4646.
[11] S. Bengio, O. Vinyals, N. Jaitly, and N. Shazeer, “Scheduled sampling for sequence prediction with recurrent neural networks,” Advances in neural information processing systems, vol. 28, 2015.
[12] F. Schmidt, “Generalization in generation: A closer look at exposure bias,” arXiv preprint arXiv:1910.00292, 2019.
[13] S. Feng, C. Miao, Z. Zhang, and P. Zhao, “Latent diffusion transformer for probabilistic time series forecasting,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 38, 2024, pp. 11 979–11 987.
[14] A. van den Oord, O. Vinyals, and K. Kavukcuoglu, “Neural discrete representation learning,” Advances in neural information processing systems, vol. 30, 2017.
[15] P. Esser, R. Rombach, and B. Ommer, “Taming transformers for high-resolution image synthesis,” in Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 2021, pp. 12 873–12 883.
[16] W. Williams, S. Ringer, T. Ash, D. MacLeod, J. Dougherty, and J. Hughes, “Hierarchical quantized autoencoders,” Advances in Neural Information Processing Systems, vol. 33, pp. 4524–4535, 2020.
[17] F. Shibo, P. Zhao, L. Liu, P. Wu, and Z. Shen, “Hdt: Hierarchical discrete transformer for multivariate time series forecasting,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 39, no. 1, 2025, pp. 746–754.
[18] Z. Chen, S. Feng, Z. Zhang, X. Xiao, X. Gao, and P. Zhao, “Sdformer: Similarity-driven discrete transformer for time series generation,” Advances in Neural Information Processing Systems, vol. 37, pp. 132 179–132 207, 2024.
[19] W. Li, S. Feng, P. Wu, X. Gao, M. Wu, and P. Zhao, “Sdflow: Similarity-driven flow matching for time series generation,” arXiv preprint arXiv:2605.05736, 2026.
[20] S. Feng, Z. Chen, X. Xiao, Z. Zhang, Q. Li, X. Gao, and
P. Zhao, “Msdformer: Multi-scale discrete transformer for time series generation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2026.
[21] X. Xu, Q. Zhong, and J. Hu, “Timemar: Multi-scale autoregressive modeling for unconditional time series generation,” in Proceedings of the ACM Web Conference 2026, 2026, pp. 5132–5143.
[22] Y. Lipman, R. T. Chen, H. Ben-Hamu, M. Nickel, and M. Le, “Flow matching for generative modeling,” arXiv preprint arXiv:2210.02747, 2022.
[23] X. Liu, C. Gong, and Q. Liu, “Flow straight and fast: Learning to generate and transfer data with rectified flow,” arXiv preprint arXiv:2209.03003, 2022.
[24] A. Tong, K. Fatras, N. Malkin, G. Huguet, Y. Zhang, J. Rector-Brooks, G. Wolf, and Y. Bengio, “Improving and generalizing flow-based generative models with minibatch optimal transport,” arXiv preprint arXiv:2302.00482, 2023.
[25] M. S. Albergo, N. M. Boffi, and E. Vanden-Eijnden, “Stochastic interpolants: A unifying framework for flows and diffusions,” arXiv preprint arXiv:2303.08797, 2023.
[26] R. T. Chen and Y. Lipman, “Flow matching on general geometries,” arXiv preprint arXiv:2302.03660, 2023.
[27] F. Eijkelboom, G. Bartosh, C. Andersson Naesseth, M. Welling, and J.-W. van de Meent, “Variational flow matching for graph generation,” Advances in Neural Information Processing Systems, vol. 37, pp. 11 735–11 764, 2024.
[28] W. Peebles and S. Xie, “Scalable diffusion models with transformers,” in Proceedings of the IEEE/CVF international conference on computer vision, 2023, pp. 4195–4205.
[29] L. Qu, H. Zhang, Y. Liu, X. Wang, Y. Jiang, Y. Gao, H. Ye, D. K. Du, Z. Yuan, and X. Wu, “Tokenflow: Unified image tokenizer for multimodal understanding and generation,” arXiv preprint arXiv:2412.03069, 2024.
[30] X. Liu, C. Gong, and Q. Liu, “Flow straight and fast: Learning to generate and transfer data with rectified flow,” arXiv preprint arXiv:2209.03003, 2022.
[31] Z. Kong, W. Ping, J. Huang, K. Zhao, and B. Catanzaro, “Difwave: A versatile diffusion model for audio synthesis,” arXiv preprint arXiv:2009.09761, 2020.
[32] A. Coletta, S. Gopalakrishnan, D. Borrajo, and S. Vyetrenko, “On the constrained time-series generation problem,” Advances in Neural Information Processing Systems, vol. 36, pp. 61 048–61 059, 2023.
[33] P. Jeha, M. Bohlke-Schneider, P. Mercado, S. Kapoor, R. S. Nirwan, V. Flunkert, J. Gasthaus, and T. Januschowski, “Psa-gan: Progressive self attention gans for synthetic time series,” in The tenth international conference on learning representations, 2022.
[34] Z. Yue, Y. Wang, J. Duan, T. Yang, C. Huang, Y. Tong, and B. Xu, “Ts2vec: Towards universal representation of time series,” in Proceedings of the AAAI conference on artificial intelligence, vol. 36, no. 8, 2022, pp. 8980–8987.
[35] L. van der Maaten and G. E. Hinton, “Visualizing data using t-sne,” Journal of machine learning research, vol. 9, no. Nov, pp. 2579–2605, 2008.
VII. BIOGRAPHY SECTION

Shibo Feng is currently a researcher at Nanyang Technological University (NTU), Singapore. His research focuses on Generative AI and its applications, including large models and time series analysis. He has served as the reviewer for top-tier venues such as ICML, ICLR, NeurIPS, and TPAMI. He received his PhD's degree in College of Computing and Data Science (CCDS) from Nanyang Technological University.

University.
Peilin Zhao is currently a professor at Shanghai Jiao Tong University. He previously worked at Tencent Group, Ant Group, A*STAR Singapore, and Rutgers University. His research focuses on machine learning and its applications, including large models, AI for science, AI for games, and recommendation systems. He has served as an Area Chair and Associate Editor for top-tier venues such as ICML, NeurIPS, and TPAMI. He received his bachelor's degree in mathematics from Zhejiang University and his PhD in computer science from Nanyang Technological

Wei Li studies computer science and technology at Shanghai University, China (2023–2027), and has been admitted to the joint Ph.D. program of Shanghai Jiao Tong University and Beijing Zhongguancun Academy, starting in 2027. His research focuses on machine learning and data mining, including time-series generation, forecasting, clustering, and representation learning. His representative works include SDFlow (NeurIPS 2026) and APCL (KDD 2026). He has been invited to review for venues including Neural Networks, NeurIPS (ethics review), AAAI, and ICASSP. He received the National Scholarship and the Baosteel Scholarship in 2026.

Min Wu is a Chapter Head at the ASTAR Institute of Advanced Intelligence and Computing (ASTAR IAIC), and Deputy Head of Tech Development at the AI Centre of Excellence for Manufacturing (AIMfg). He received his Ph.D. in Computer Science from Nanyang Technological University (NTU) in 2011 and his B.E. in Computer Science from the University of Science and Technology of China (USTC) in 2006. He has won several best paper awards and serves as an Associate Editor for journals including Neural Networks and IEEE Transactions on Neural Networks and Learning Systems. His current research interests focus on AI for time series data, graph data, and biological and healthcare data.

Chunyan Miao is a President's Chair Professor and the Chair of College of Computing and Data Science at Nanyang Technological University (NTU), Singapore. She received her Ph.D. degree from NTU and was an NSERC Postdoctoral Fellow at Simon Fraser University (SFU), Canada. She was a founding faculty member of the Centre for Digital Media established by the University of British Columbia (UBC) and SFU. She was also a Tan Chin Tuan Engineering Fellow at Harvard and MIT. Dr. Miao has focused on her research in Artificial intelligence (AI) and real-world AI applications for impactful research in health, aging, education, and smart services. She is the Founding Director of the Joint NTU-UBC Research Centre of Excellence in Active Living for the Elderly (LILY), Singapore's first center focusing on AI-empowered solutions to population aging challenges. She is the Founding Director of the Alibaba-NTU Singapore Joint Research Institute (JRI), Alibaba's first and largest JRI outside China. She is an Editor/Associate Editor of leading international journals including IJIT, IEEE Big Data, IEEE IoT, IEEE Access and IEEE Service Computing, and has served as Chair/TPC member of international conferences such as IEEE ICA, ICAA, ACM KDD. She serves on various national committees and is the Chair of the SCS AI Ethics Review Committee.
Supplementary Materials for UniFlow
I. PROBABILISTIC ROBUSTNESS OF THE SHARED MAPPING
We analyze how weighted cross-scale evidence affects the probability of an incorrect public-ID assignment. Fix a temporal position , let denote the reference public ID, and define the branch-wise margin against a competing code as
Theorem 5 (Probabilistic robustness of shared-index voting). For each competitor , assume that the margin vector
where and is sub-Gaussian with covariance proxy , i.e.,
for every and . Let , where and , and define
If for every , then
When and , the corresponding term is interpreted as zero.
Proof. For a competitor , the shared vote can prefer k to only if
Using , this event is equivalent to
The sub-Gaussian assumption implies that has variance proxy . Therefore,
A prediction error requires at least one competitor to attain a score no smaller than the reference code. Applying the union bound over all proves Equation (52).
Corollary 6 (Pairwise optimal voting weights). Fix and , and suppose . Among all nonzero weight vectors, the exponent in Theorem 5 is maximized by
If is component-wise nonnegative, the simplex-constrained solution is
Proof. For a fixed competitor, maximizing the exponent is equivalent to maximizing
Let and . By Cauchy–Schwarz,
with equality if and only if , or equivalently . Normalization to unit sum gives the simplex solution when the vector is component-wise nonnegative.
Remark 7 (Independent branch noise). If branch noises are independent and
then the pairwise optimal weight satisfies
Thus, a branch receives more weight when it provides a larger expected target-versus-competitor margin and less weight when that margin is noisy.
We next state a complementary single-view recovery condition. Let be the shared ID defined in Equation (9), and let branch retrieve using only its own similarity scores.
Proposition 8 (Single-view recovery under branch margin). If branch r has a positive one-vs-all margin
then branch alone recovers the shared ID, i.e., . If the branch scores are perturbed by at most in norm and , the recovered ID is unchanged.
Proof. The positive margin condition implies for every , so the branch-only argmax is . Under a perturbation bounded by , the score of can decrease by at most and any competitor can increase by at most , so the perturbed margin remains at least . The argmax is therefore unchanged.
This condition explains how a single temporal view can recover the public ID without requiring all branches to be identical. It also clarifies why the empirical recovery rates in Table I need not be exactly one: branch-only recovery succeeds where the branch-specific margin is positive and sufficiently stable, while the full shared vote can still use complementary evidence from the other branch.
II. DETAILS OF BASELINES
In this part, we briefly introduce the baselines:
TimeGAN [1] is a method that combines Generative Adversarial Networks (GANs) with sequence modeling. It jointly optimizes supervised and unsupervised adversarial losses to learn both the static features and dynamic dependencies of time series data, thereby generating high-quality synthetic time series.
COT-GAN [2] is a GAN-based method that incorporates causal optimal transport theory. It optimizes the distribution matching between generated and real data to produce high-quality synthetic time series.
TimeVAE [3] is a time series generation method based on Variational Autoencoders (VAEs). It enhances model interpretability by incorporating domain-specific temporal patterns (such as polynomial trends and seasonality) and optimizes training efficiency to accurately represent and efficiently synthesize the temporal attributes of the original data.
DiffWave [31] is an audio synthesis method based on diffusion probabilistic models. The model combines a non-autoregressive structure with bidirectional dilated convolutions to generate high-quality audio in parallel, offering significant advantages in synthesis speed. It also ensures the quality of the generated audio by progressively denoising white noise to produce the target audio waveform.
DiffTime [32] is a time series generation method based on a constrained optimization framework. It combines conditional diffusion models to efficiently generate synthetic time series that meet specific constraints.
SDformer-ar and SDformer-m [18] are two variants of the Similarity-driven Discrete Transformer SDformer for time-series generation. SDformer employs similarity-driven vector quantization to learn discrete time-series representations, followed by Transformer-based token distribution modeling. Specifically, SDformer-ar adopts autoregressive token generation with sequential decoding, whereas SDformer-m employs masked token modeling with iterative refinement. Both variants share the same discrete tokenization framework but differ in their generative strategies.
MSDformer [20] is a multi-scale extension of SDformer, with a particular focus on long-term time-series generation. It introduces a coarse-to-fine discrete tokenization framework that captures multiscale temporal dependencies through coarse representations and residual quantization, preserving both long-range structures and fine-grained details. An autoregressive discrete Transformer then models the resulting token sequences to generate time series with improved temporal fidelity.
FlowTS [7] is a flow-based generative model for time series that employs rectified flow to learn approximately straight transport trajectories between source and target distributions. It incorporates trend-seasonality decomposition, attention registers, and rotary positional embeddings to capture temporal dependencies and improve generation fidelity. An adaptive sampling strategy further enhances sampling efficiency, supporting both unconditional and conditional time-series generation.
III. MODEL DETAILS
This section presents the detailed architectures of UniFlow. Here, , , and denote the batch size, input dimensionality, and sequence length, respectively. Stage 1 employs scale-specific encoders with hidden dimension and branch dimensions , producing a unified public-token sequence of length , where denotes the temporal compression ratio and is the fused code dimension. The encoder, residual block, and shared-ID decoder are detailed in Tables XII, XIII, and XIV, respectively. Stage 2 employs a DiT-based categorical flow generator, where , , , and denote the Transformer hidden dimension, number of layers, attention heads, and anchor rank, respectively. Its architecture is summarized in Table XV.
IV. VISUALIZATION METHODS
To qualitatively assess the distributional fidelity of generated time series, we employ two complementary visualization techniques: t-distributed Stochastic Neighbor Embedding (t-SNE) and Kernel Density Estimation (KDE).
t-SNE [35] projects high-dimensional time-series representations into a two-dimensional space by preserving local neighborhood relationships. It constructs pairwise similarities using adaptive Gaussian kernels and optimizes the low-dimensional embedding through Kullback–Leibler divergence minimization. By jointly visualizing real and generated samples, t-SNE provides a qualitative comparison of their local distributional structures.
Kernel Density Estimation (KDE) estimates continuous probability densities through kernel-based smoothing. Applied to real and generated time-series features, KDE enables visual comparison of their marginal or joint distributions, highlighting differences in density concentration, dispersion, and distributional modes.
These two visualization techniques offer complementary perspectives on generative fidelity. Specifically, t-SNE reveals local neighborhood structures, whereas KDE characterizes the distributional properties of temporal features.
V. OVERVIEW OF UNIFLOW
UniFlow is a unified framework that integrates multi-scale representation learning with efficient non-autoregressive time-series generation. In Stage 1, shared-index voting consolidates complementary temporal information into a single public-ID sequence, while scale-specific codebooks preserve multiscale reconstruction details. In Stage 2, geometry-aware categorical flow matching combines learned low-rank anchor initialization with continuous transport to generate the unified public-token representation.
More specifically, UniFlow extends SDFlow [19] toward efficient multi-scale time series generation. Building upon its non-autoregressive categorical flow framework and learned low-rank anchor prior, UniFlow introduces shared-index multiscale tokenization to integrate complementary temporal information into a unified public-ID sequence. This extension enables multiscale generative modeling without increasing the generator-facing sequence length or requiring separate scale-specific generative streams.
| Layer | Function | Description | Input Shape | Output Shape |
|---|---|---|---|---|
| 1 | Input permutation | Channel-first representation | ||
| 2 | Patch Conv1D | , kernel/stride | ||
| 3 | ReLU | Activation | ||
| 4 | ResNet | Depth , dilation growth | ||
| 5 | Downsampling + ResNet | Stride-2 Conv1D + ResNet, repeated times | ||
| 6 | Output Conv1D | , kernel 3 |
TABLE XII: Detailed architecture of the Stage 1 multiscale encoders. Each branch employs scale-specific patching and residual modeling to produce aligned temporal representations of length .
| Layer | Function | Description | Input Shape | Output Shape |
|---|---|---|---|---|
| 1 | ReLU | Activation | ||
| 2 | Dilated Conv1D | , kernel 3, dilation , padding | ||
| 3 | ReLU | Activation | ||
| 4 | Pointwise Conv1D | , kernel 1 | ||
| 5 | Residual connection | Output = Input + Conv output |
TABLE XIII: Detailed architecture of the Stage 1 residual convolutional block, where denotes the dilation rate and the temporal feature length.
| Layer | Function | Description | Input Shape | Output Shape |
|---|---|---|---|---|
| 1 | Shared-index voting | Weighted cosine similarity, vocabulary size | ||
| 2 | Codebook retrieval | Shared-ID lookup in scale-specific codebooks | ||
| 3 | Feature fusion | Concatenate private embeddings, | ||
| 4 | Input Conv1D | , kernel 3 | ||
| 5 | ReLU | Activation | ||
| 6 | ResNet | Depth , reverse dilation | ||
| 7 | Upsample + Conv1D | Nearest-neighbor upsampling | ||
| ... | ... | Repeat layers 6–7 for operations | ... | ... |
| 8 | Output projection | Conv1D + ReLU + Conv1D, | ||
| 9 | Output alignment | Match length and permute |
TABLE XIV: Detailed architecture of Stage 1 shared-ID assignment and reconstruction. Shared public IDs retrieve scale-specific codebook embeddings, which are fused for time-series reconstruction.
| Layer | Function | Description | Input Shape | Output Shape |
|---|---|---|---|---|
| 1 | Low-rank anchor | Projection through | ||
| 2 | Flow interpolation | |||
| 3 | Global token | Prepend one learned token | ||
| 4 | Input projection | Linear + positional encoding | ||
| 5 | Time embedding | Linear | ||
| 6 | DiT blocks | AdaLN + MHSA ( heads) + FFN (), repeated times | ||
| 7 | Categorical head | LayerNorm + Linear , remove global-token output | ||
| 8 | Endpoint estimation | Softmax + codebook expectation | ||
| 9 | ODE transport | Parallel velocity-based integration | ||
| 10 | Public-ID readout | Normalize + nearest-code assignment |
TABLE XV: Detailed architecture of the Stage 2 non-autoregressive categorical flow generator. The DiT predicts categorical endpoint distributions for joint transport of all public-token positions.




(a) Sines
(b) Stocks
(c) ETTh
(d) Energy
Fig. 4: t-SNE visualizations of the time series synthesized by UniFlow, SDformer and Diffusion-TS.




(a) Sines
(b) Stocks
(c) ETTh
(d) Energy
Fig. 5: Kernel density estimation visualizations of the time series synthesized by UniFlow, SDformer and Diffusion-TS.