Title: Adaptive Quantization in Generative Flow Networks for Probabilistic Sequential Prediction
Venue: NeurIPS 2025
Accepted: yes
Keywords: Generative Flow Networks

Probabilistic Forecasting

Quantization

Time Series

Sequential Prediction

Uncertainty Quantification
Abstract: Probabilistic time series forecasting, essential in domains like healthcare and neuroscience, requires models capable of capturing uncertainty and intricate temporal dependencies. While deep learning has advanced forecasting, generating calibrated probability distributions over continuous future values remains challenging. We introduce Temporal Generative Flow Networks (Temporal GFNs), adapting Generative Flow Networks (GFNs) – a powerful framework for generating compositional objects – to this sequential prediction task. GFNs learn policies to construct objects (eg. forecast trajectories) step-by-step, sampling final objects proportionally to a reward signal. However, applying GFNs directly to continuous time series necessitates addressing their inherently discrete action spaces and ensuring differentiability. Our framework tackles this by representing time series segments as states and sequentially generating future values via quantized actions chosen by a forward policy. We introduce two key innovations: (1) An adaptive, curriculum-based quantization strategy that dynamically adjusts the number of discretization bins based on reward improvement and policy entropy, balancing precision and exploration throughout training. (2) A straight-through estimator mechanism enabling the forward policy to output both discrete (hard) samples for trajectory construction and continuous (soft) samples for stable gradient propagation. Training utilizes a trajectory balance loss objective, ensuring flow consistency, augmented by an entropy regularizer. We provide rigorous theoretical bounds on the quantization error's impact and the adaptive factor's range. We demonstrate how Temporal GFNs offer a principled way to leverage the structured generation capabilities of GFNs for probabilistic forecasting in continuous domains.

Adaptive Quantization in Generative Flow Networks for Probabilistic Sequential Prediction

Abstract

Probabilistic time series forecasting, essential in domains like healthcare and neuroscience, requires models capable of capturing uncertainty and intricate temporal dependencies. While deep learning has advanced forecasting, generating calibrated probability distributions over continuous future values remains challenging. We introduce Temporal Generative Flow Networks (Temporal GFNs), adapting Generative Flow Networks (GFNs) - a powerful framework for generating compositional objects - to this sequential prediction task. GFNs learn policies to construct objects (eg. forecast trajectories) step-by-step, sampling final objects proportionally to a reward signal. However, applying GFNs directly to continuous time series necessitates addressing their inherently discrete action spaces and ensuring differentiability. Our framework tackles this by representing time series segments as states and sequentially generating future values via quantized actions chosen by a forward policy. We introduce two key innovations: (1) An adaptive, curriculum-based quantization strategy that dynamically adjusts the number of discretization bins based on reward improvement and policy entropy, balancing precision and exploration throughout training. (2) A straight-through estimator mechanism enabling the forward policy to output both discrete (hard) samples for trajectory construction and continuous (soft) samples for stable gradient propagation. Training utilizes a trajectory balance loss objective, ensuring flow consistency, augmented by an entropy regularizer. We provide rigorous theoretical bounds on the quantization error's impact and the adaptive factor's range. We demonstrate how Temporal GFNs offer a principled way to leverage the structured generation capabilities of GFNs for probabilistic forecasting in continuous domains.

1 Introduction

Time series forecasting - predicting future values based on historical observations - is fundamental to informed decision-making across countless applications, from managing energy grids and financial portfolios to monitoring patient health and understanding brain activity [14, 7]. In many critical domains, particularly healthcare (e.g., forecasting vital signs from Electronic Health Records - EHRs) and neuroscience (e.g., predicting Electroencephalogram - EEG signals), obtaining not just a single point prediction but a full probabilistic forecast is paramount. Probabilistic forecasts quantify the inherent uncertainty in predictions, providing prediction intervals or complete density estimations, crucial for risk assessment and reliable decision support [10]. The advent of deep learning has revolutionized time series forecasting. Models based on Recurrent Neural Networks (RNNs) [30, 27]

and Transformers [20, 24, 32] can capture complex temporal patterns from large datasets. These models often achieve probabilistic forecasts by parameterizing a specific output distribution (e.g., Gaussian [30]) or predicting specific quantiles [34]. While effective, these approaches can impose potentially restrictive assumptions on the shape of the predictive distribution or suffer from issues like quantile crossing. More flexible generative models like Normalizing Flows [28] and Diffusion Models [19] have also been adapted, offering richer distributional modeling at potentially higher computational costs. Recently, Large Language Models (LLMs) have demonstrated remarkable zero-shot capabilities in various domains, including time series forecasting [12]. Frameworks like Chronos [1] show that standard transformer architectures, trained on time series tokenized via simple scaling and quantization, can achieve state-of-the-art results. This highlights the power of sequence modeling and the potential of mapping continuous time series to a discrete vocabulary. However, these methods typically rely on a fixed quantization scheme decided a priori. An alternative paradigm for structured generation is offered by Generative Flow Networks (GFNs) [3, 6]. GFNs learn policies to construct complex objects (like molecules or computational graphs) through a sequence of discrete actions in a state space. The key idea is to sample terminal objects (completed structures) with a probability proportional to a given reward function, effectively learning to navigate the state space towards high-reward configurations. This focus on sampling from a reward-modulated distribution makes GFNs naturally suited for tasks where we want to generate diverse, high-quality samples, rather than just finding a single optimal solution (as in reinforcement learning). This generative process seems well-aligned with time series forecasting: we can view a forecast trajectory as a compositional object built step-by-step, where the reward reflects the accuracy of the final forecast. However, GFNs traditionally operate in discrete state and action spaces. How can we adapt them to generate sequences of continuous time series values? Directly applying GFNs faces two primary hurdles: 1. Continuous Action Space: Time series values are continuous, but GFN policies typically output probabilities over discrete actions. 2. Differentiability: Selecting a discrete action (even if representing a continuous value via quantization) breaks the gradient flow required for training neural network policies.

In this work, we propose Temporal Generative Flow Networks (Temporal GFNs) , a framework designed to overcome these challenges and harness GFNs for probabilistic continuous time series forecasting. Our approach leverages the strengths of GFNs - structured sequential generation and reward-driven sampling - while introducing mechanisms specifically tailored for the continuous nature of time series data.

Our core contributions are:

GFN Formulation for Probabilistic Forecasting: We frame forecasting as constructing a trajectory in a GFN state space, where states are time series windows and actions append the next predicted (quantized) value. The GFN learns to sample trajectories whose associated rewards (forecast accuracy) match the target distribution.

Adaptive Curriculum-Based Quantization: We move beyond fixed quantization by introducing a dynamic scheme. The number of quantization bins K is adjusted during training based on reward improvement and policy entropy, enabling the model to learn effectively with adaptive precision.

Differentiable Discrete Actions via STE: We employ a straight-through estimator (STE) [5] to reconcile discrete action selection with gradient-based optimization. The forward policy generates both discrete samples for state transitions and continuous approximations for gradient propagation.

Trajectory Balance Learning: We train the framework using the Trajectory Balance (TB) loss [22], enforcing flow consistency across entire forecast trajectories, and include an entropy bonus to encourage exploration.

Theoretical Guarantees: We provide theoretical bounds on the policy gradient error introduced by our quantization and STE approach, and on the range of the adaptive quantization factor, ensuring controlled behavior.

The paper is structured as follows: Section 2 reviews related work in forecasting and Generative Flow Networks (GFNs). Section 3 introduces the Temporal GFN framework, detailing its components like adaptive quantization, STE, and the training objective. Section 4 provides empirical validation through mechanism-focused ablation studies and performance comparisons against benchmarks.

Section 5 discusses the implications of our approach, and 6 concludes with a summary and future directions.

2 Background and Related Work

Our work builds upon concepts from probabilistic time series forecasting, Generative Flow Networks, and methods for handling continuous data in discrete frameworks.

2.1 Time Series Forecasting

Time series forecasting aims to predict future values x C +1: C + H = [ x C +1 , . . . , x C + H ] given historical context x 1: C = [ x 1 , . . . , x C ] . We focus on probabilistic forecasting, which involves predicting the conditional probability distribution p ( x C +1: C + H | x 1: C ) . Classical methods like ARIMA and ETS [16] model time series components (trend, seasonality, noise) and often provide prediction intervals under specific statistical assumptions. Deep learning methods leverage architectures like RNNs [30, 27] or Transformers [20, 24] to learn complex dependencies. Probabilistic outputs are commonly achieved by parameterizing output distributions [30], predicting quantiles [34], or using generative models like Flows [28] or Diffusion Models [19]. LLM-based forecasters [12, 1] have shown strong performance, often by tokenizing time series values into a discrete vocabulary similar to natural language. Chronos [1], for instance, uses simple scaling and uniform quantization, demonstrating the effectiveness of applying standard language model architectures and training objectives (cross-entropy) to tokenized time series. While powerful, these often rely on fixed quantization and may require very large models. Our Temporal GFN differs by using a GFN objective and introducing adaptive quantization.

2.2 Generative Flow Networks (GFNs)

GFNs [3, 6] are a class of probabilistic generative models designed to learn policies for constructing objects x in a compositional manner, such that the probability of sampling x is proportional to a given reward R ( x ) > 0 . They operate on a directed acyclic graph (DAG) where nodes represent states s (partial or complete objects) and edges represent actions a leading from one state to another. GFNs excel at exploring complex, high-dimensional discrete spaces and sampling diverse, high-reward objects [17, 37]. Applying them to continuous domains, especially for sequential generation, remains an open challenge [26, 36].

2.3 Discretization and Continuous Actions in Time Series Forecasting

Bridging continuous time series data with models often designed for discrete inputs is a central challenge in modern forecasting. Quantization , or tokenization, which maps continuous values to a finite set of discrete symbols, is a widely adopted strategy. This has enabled the successful application of powerful sequence models, like Transformers, to time series by treating them as "sentences" of tokens [1] or like amino acids in proteins navigating a continuous space to model discrete sequences [2]. Recent advancements also explore more sophisticated tokenization schemes, such as wavelet-based approaches, to better capture multi-scale temporal features before feeding them to foundation models [23]. While these methods highlight the power of discretization, a commonality is often the reliance on a fixed quantization scheme (e.g., a predetermined number of bins or a fixed tokenization vocabulary). As discussed by Rabanser et al. [25], such fixed schemes can be suboptimal: too few bins (coarse quantization) limit precision and lead to information loss, whereas too many bins (fine quantization) can create an overly sparse action space, hindering exploration and slowing down the learning process, particularly in early training phases. Our proposed adaptive quantization mechanism (Section 3) is designed to directly mitigate this by dynamically adjusting the quantization granularity. Furthermore, when discrete actions (like selecting a quantization bin) are part of the model's generative process, as in our Temporal GFN framework, ensuring differentiability for gradient-based training of neural policies is critical. The Straight-Through Estimator (STE) [5, 35] serves as a standard technique to enable gradient propagation through such discrete steps. We employ STE to allow our GFN's forward policy to make discrete action selections (choosing quantized values) while facilitating effective gradient-based learning of the policy network. Our work, therefore, uniquely combines the GFN paradigm with both adaptive quantization for optimized

precision and STE for differentiability, specifically targeting the challenges of probabilistic continuous time series forecasting.

3 Methodology: Temporal Generative Flow Networks

In this section, we detail the proposed Temporal Generative Flow Network framework. We begin by mapping the probabilistic time series forecasting problem onto the Generative Flow Network paradigm. Subsequently, we describe the core components designed to handle continuous data within this framework: state representation, the adaptive quantization scheme coupled with the forward policy network, the mechanism for ensuring differentiability, and finally, the training objective based on Trajectory Balance.

3.1 Forecasting as Trajectory Generation in a GFN

Generative Flow Networks (GFNs) provide a powerful lens for learning to generate complex, structured objects [6]. They learn a policy to navigate a state space through a sequence of actions, ultimately sampling terminal objects (complete structures) with probabilities proportional to a predefined reward signal. This compositional generation process, guided by reward, makes GFNs an appealing candidate for sequential prediction tasks like time series forecasting.

We conceptualize the generation of a forecast as constructing a trajectory τ in a GFN state space.

States ( s ): A state s t encapsulates the information available at step t of the forecast generation. We choose to represent states as fixed-length sliding windows containing the most recent history and any forecast values generated so far. The process begins from an initial state s 0 , which corresponds to the observed historical context window, s 0 = ( x obs , . . . , x obs + T -1 ) .

Actions ( a ): An action a t taken from state s t corresponds to selecting the predicted value for the next time step, x obs + T + t . As GFNs fundamentally operate over discrete action spaces, a crucial step is mapping the inherently continuous space of possible time series values to a finite set of discrete actions. This is achieved through quantization, detailed in Section 3.2.

State Transitions: Applying a chosen (discrete) action a hard t to state s t results in the next state s t +1 . This is typically achieved by appending a hard t to the window represented by s t and removing the oldest value, effectively sliding the window forward: s t +1 = ( s t [1] , . . . , s t [ T -1] , a hard t ) .

Trajectories ( τ ): A complete forecast trajectory τ = ( s 0 , s 1 , . . . , s T ′ ) is formed by sequentially applying actions a 0 , . . . , a T ′ -1 according to a learned policy, spanning the desired forecast horizon T ′ .

Reward ( R ( τ ) ): A reward function assigns a scalar value to each completed trajectory, quantifying the desirability or quality of the generated forecast (e.g., based on its accuracy against the true future values). The GFN's objective is to learn a policy that samples trajectories τ such that the sampling probability P ( τ ) ∝ exp( R ( τ )) .

The main technical challenges lie in adapting the discrete action mechanism of GFNs to the continuous nature of time series values and ensuring the entire process remains differentiable for effective training using gradient-based optimization.

3.2 Forward Policy, Adaptive Quantization, and Differentiability

The core generative component is the forward policy P F ( a t | s t ) , which learns the probability distribution over possible next actions given the current state. To manage the continuous action space and enable learning, we combine quantization, a Transformer-based policy network, an adaptive mechanism for quantization granularity, and the Straight-Through Estimator (STE).

3.2.1 Quantization and the Forward Policy Network

To bridge the gap between continuous time series values and the GFN's discrete action space, we employ quantization. We map continuous values within a range [ v min , v max ] to a set of K discrete

bins, represented by their centers: q k = v min + k -1 K -1 ( v max -v min ) , k = 1 , . . . , K. These K bin centers { q 1 , . . . , q K } constitute the discrete action space A available to the GFN at any given state s t . The forward policy network P F ( a t = q k | s t ) computes the probability of selecting action q k given the current state window s t . Recognizing the success of Transformer architectures [32] in capturing longrange dependencies in sequential data, we use a Transformer encoder as the backbone of our policy network. The state window s t , a sequence of T real values, is processed by the Transformer encoder, yielding a fixed-dimensional representation h t that summarizes the relevant historical context. This representation is then projected by a linear output layer to produce logits over the K possible discrete actions: logits t = W F h t + b F , where logits t ∈ R K . Applying the softmax function to these logits yields the policy distribution: P F ( a t = q k | s t ) = exp( logits t,k ) ∑ K j =1 exp( logits t,j ) . This network learns to predict the probability of the next value falling into each of the K quantization bins, based on the preceding time series pattern encoded in s t .

3.2.2 Adaptive Quantization: A Curriculum for Precision

Using a fixed number of bins K throughout training presents a dilemma common in discretization tasks [25]. A small K leads to high quantization error, limiting forecast precision, while a large K creates a vast, sparse action space that can significantly slow down learning and hinder exploration, especially in the initial phases when the policy is still poorly defined. To overcome this, we introduce an adaptive quantization scheme that treats the number of bins K as a parameter that evolves during training, akin to a curriculum learning strategy [4]. The model starts with a relatively small K (coarse granularity), making the initial exploration task simpler. As training progresses, K is dynamically adjusted based on the model's performance and confidence. Specifically, after a warmup period E warmup, we compute an adaptive update factor η e at each epoch e . This factor depends on the recent reward improvement ∆ R e = R e -R e -δ (average reward difference over δ epochs) and the average normalized forward policy entropy H e ∈ [0 , 1] :

Here, λ > 0 controls the sensitivity of adaptation, and ϵ > 0 is a target reward improvement threshold.

The Improvement Signal becomes positive if the model's reward gain is below the threshold ϵ . Slow improvement suggests the current quantization might be too coarse, thus pushing η e > 1 to encourage increasing K .

The Confidence Signal is large when entropy H e is low (i.e., the policy is highly confident or "peaked"). High confidence might indicate premature convergence or insufficient exploration. Increasing K in this case refines the action space, potentially revealing finer structures and encouraging further exploration.

The number of bins for the next epoch K e is updated multiplicatively, bounded by a maximum K max :

If K e changes value, the size of the final linear layer ( W F , b F ) in the forward policy network (and the backward network, if learned) must be adjusted to match the new number of output bins.

To ensure training stability when the number of bins K e is increased, a simple random re-initialization of the output layer would be catastrophic, erasing previously learned knowledge. Instead, we employ a weight-reuse strategy. The weights and biases in the linear layer corresponding to the pre-existing bins are preserved. The weights and biases for the newly added bins are initialized to near-zero values. This method allows the policy to retain its learned distribution over the existing action space while cautiously exploring the new, finer-grained actions, thus preventing catastrophic forgetting and ensuring a smooth curriculum.

3.2.3 Ensuring Differentiability: The Straight-Through Estimator

A critical issue arises when selecting the discrete action a hard t = q k from the policy P F ( ·| s t ) to update the state. Operations like sampling or taking the argmax are non-differentiable, which would

prevent gradients from flowing back from the final loss calculation to the parameters of the policy network ( W F , b F and the Transformer encoder). To circumvent this, we employ the Straight-Through Estimator (STE) technique [5, 35]. The core idea is to use the discrete value in the forward pass for computations that require it (like state transitions) but to use a continuous approximation for the backward pass (gradient computation). Our forward policy generates two outputs at each step t :

Hard Sample ( a hard t ): The discrete quantized value selected for constructing the trajectory. This is typically the most likely action: a hard t = q argmax k P F ( a t = q k | s t ) . This a hard t value is used to update the state s t → s t +1 .

Soft Sample ( a soft t ): A continuous, differentiable proxy for the chosen action, computed as the expectation of the action under the current policy distribution: a soft t = ∑ K k =1 q k P F ( a t = q k | s t ) . During backpropagation, the gradient is computed with respect to a soft t . This gradient is then passed straight through the non-differentiable argmax/sampling operation that produced a hard t , effectively using the gradient of the continuous expectation a soft t to update the parameters that generated the policy P F ( ·| s t ) .

This STE mechanism allows us to maintain the integrity of the discrete state transitions inherent to the GFN formulation while enabling end-to-end training with gradient descent.

3.3 Learning Objective: Trajectory Balance and Exploration

GFNs are trained by enforcing flow consistency conditions. We adopt the Trajectory Balance (TB) loss [22], which offers robust credit assignment, particularly for long sequences.

3.3.1 Backward Policy

The TB objective necessitates a backward policy P B ( s t -1 | s t ) , modeling the probability of transitioning backward from state s t to a potential predecessor state s t -1 . We consider two implementations:

Uniform Policy: Assumes all valid predecessor states are equally likely. Given the fixed action space size K , this simplifies to log P B ( s t -1 | s t ) = -log K . This is parameter-free but ignores temporal structure.

Learned Policy: Parameterizes P B using a neural network that takes the representations of the involved states ( h t -1 , h t ) as input, e.g., log P B ( s t -1 | s t ) = log softmax ( W B concat ( h t -1 , h t ) + b B ) . This allows P B to adapt but increases model size.

3.3.2 Reward Function

The reward function R ( τ ) guides the GFN towards generating desirable trajectories. For forecasting, desirability equates to accuracy. We define the reward based on the discrepancy between the generated forecast sequence z = ( z 1 , . . . , z T ′ ) (derived from the sequence of soft samples a soft t ) and the ground truth future sequence y = ( y 1 , . . . , y T ′ ) . We use an exponential function of the negative normalized Mean Squared Error (MSE):

where β > 0 controls the reward scaling. Higher values of β create a sharper reward landscape, more strongly penalizing deviations from the ground truth.

3.3.3 Trajectory Balance Loss with Entropy Regularization

The TB loss [22] equates the flow along a trajectory based on forward probabilities and the initial flow Z (a learnable parameter representing the partition function or total flow) with the flow based on backward probabilities and the terminal reward R ( τ ) . The squared difference forms the loss for a

single trajectory:

The overall TB loss is the expectation over trajectories sampled from the forward policy: L TB = E τ ∼ P F [ L TB ( τ )] .

To mitigate the risk of the policy becoming prematurely deterministic and to encourage broader exploration of the action space, we incorporate an entropy bonus into the learning objective (equivalent to subtracting an entropy penalty from the loss). The entropy of the forward policy at state s t is: H ( P F ( ·| s t )) = -∑ K k =1 P F ( a t = q k | s t ) log P F ( a t = q k | s t ) . The final loss function balances the TB objective with the average entropy across the trajectory: L = L TB -λ entropy E τ ∼ P F [ 1 T ′ ∑ T ′ -1 t =0 H ( P F ( ·| s t )) ] , where λ entropy ≥ 0 is a hyperparameter controlling the weight of the entropy regularization. Optimizing this final loss L trains the forward policy P F , the backward policy P B (if learned), and the partition function Z , we summarize this section with Algorithm A and we provide theorical analysis of our methodology in Appendix B.

4 Experiments

In this section, we present a comprehensive empirical evaluation of the Temporal Generative Flow Network (Temporal GFN) framework. Our experimental investigation is twofold. First (Section 4.1), we assess the performance of optimized Temporal GFN configurations against a broad range of established baselines on standard forecasting benchmarks and challenging related datasets. Throughout this section, we explicitly link empirical observations to the mathematical concepts introduced in Appendix B. Detailed experimental setup common to both studies is described in Appendix E. Second (Section 4.2), we conduct mechanism-focused analyses and ablations using synthetic data and standard benchmarks to validate the theoretical underpinnings of our approach, particularly concerning adaptive quantization and the Straight-Through Estimator (STE).

4.1 Benchmark Performance Comparison

Datasets, Training Strategy and Evaluation Metrics. We train and evaluate Temporal GFN on a large and diverse collection of publicly available time series datasets, comprehensively gathered and curated, mirroring the scale used in recent foundation model studies [1], the dataset, the training strategy, evaluation tasks and metrics are detailed in Appendix J. We evaluate optimized Temporal GFN configurations against relevant baselines across the defined benchmarks.

4.1.1 Comparison with RL and MCMC Baselines (Benchmark I)

Table 1 summarizes the aggregated relative performance on Benchmark I against PPO, SAC, and MCMCbaselines. Temporal GFN (Adaptive K20) shows substantial improvements (25-35%) across all metrics compared to these methods. The Learned Policy variant further improves probabilistic metrics (CRPS/WQL). This highlights the benefits of the GFN framework tailored for forecasting over generic sequential decision-making approaches shown in table 1.

4.1.2 Comparison with SOTA Time Series Forecasters (Benchmark I & II)

Table 2 presents aggregated performance against SOTA deep learning models, evaluated on both Benchmark I (In-Domain) and Benchmark II (Zero-Shot) where applicable. Temporal GFN demonstrates highly competitive performance, often leading in probabilistic metrics (CRPS, WQL) and particularly excelling in zero-shot scenarios and on metrics sensitive to distribution shape like Calibration Error and Multimodality Score (evaluated on extended/healthcare benchmarks, details in Appendix I). Qualitative examples in Appendix K (Figures 20) visually support Temporal GFN's ability to capture complex dynamics and multimodality.

Main Temporal GFN results reflect strong performance across settings. Calib. Err. & Multimod. primarily from healthcare/extended benchmarks. Task-Specific models trained per dataset. Learned Policy results from Table 3.

4.2 Analysis of Quantization Mechanism

We investigate the quantitative relationship between quantization resolution (number of bins, K ), the resulting approximation error, and the implications for policy learning and performance. Table 3 summarizes the configurations and main results for this ablation study.

Quantization Error Bound Validation: Theorem B.1 established that the policy gradient error depends linearly on the quantization error ϵ . We empirically verify the relationship between K and ϵ . Figure 1 (bottom left) plots the Mean Squared Error (MSE), serving as a proxy for ϵ 2 , against K . As predicted, increasing K significantly reduces the quantization error, consistent with the premise that finer discretization leads to smaller ϵ . The relationship between error reduction and reward gain is explored in Figure 2. The left panel shows a strong negative correlation between quantization error and achievable reward, while the right panel shows that increasing K yields diminishing returns in reward improvement, suggesting a trade-off that motivates adaptive approaches.. We visually confirms this reduction in approximation error across the data distribution for increasing K in Appendix K Figure 3.

Adaptive Quantization Dynamics and Bounded Updates: The adaptive mechanism (Section 3.2.2) aims to optimize K based on reward improvement ( ∆ R e ) and policy entropy ( H e ), as governed by Eq. 1. Theorem B.2 guarantees the update factor η e is bounded: 1 ≤ η e ≤ 1 + 2 λ . This prevents uncontrolled explosion or collapse of K . In Appendix K, figure 10 (left panel, purple/blue lines for Adaptive Quantization) shows the coupled evolution of reward and entropy, which drive η e . The resulting non-uniform bin distribution learned by adaptive quantization (Figure 4, Adaptive panel) demonstrates its ability to allocate bins effectively compared to fixed uniform quantization (Uniform panel). This optimized allocation minimizes the effective ϵ in relevant regions, leading to superior performance observed in benchmark comparisons (Tables 1, 3).

Continuous Energy Landscape

Quantized Landscape (k=4)

Quantized Landscape (k=16)

Quantized Landscape (k=64)

0.96

0.84

0.92

0.96

0.84

0.75

0.82

0.84

0.72

99'0

0.72

0.72

09'0

0.57

0.62

Parameter 2

0.60

0.52

0.48

0.48

0.48

0.42

0.36

0.39

0.36

0.32

2

0.24

0.30

0.22

0.24

0.12

0.21

0.12

0.12

Z

Parameter 1

0

0.00

Parameter 1

0.12

Parameter 1

0

0.02

Parameter 1

0

0.00

Quantization Error vs. Bins (k)

Quantization Error (k=4)

Quantization Error (k=16)

Quantization Error (k=64)

0.12

Mean Error

ooooool

0.120

0.032

0.008

0.105

8200

0.007

0.10

品

0.090

0.024

0.006

0.08

Parameter 2

0

0.075

neter 2

0.020

Parameter 2

0.005

0.060

0.016

0.004

0.045

0.012

0.003

0.04

0.030

0.008

0.002

0.02

0.015

00°0

0.001

0.00

16

32

9

0

0.000

0.000

0.000

Number of Bins (k)

Parameter 1

Parameter 1

Parameter 1

Quantization and Policy Representation: In Figure 5 Appendix K visualizes how the choice of K impacts the policy's representation of the underlying continuous energy landscape. A low K provides a very coarse approximation, while higher K values capture more detail but remain discrete. The adaptive mechanism, by optimizing bin placement, aims to create a quantized landscape that best preserves the essential features (modes, relative probabilities) of the continuous landscape within the constraints of K bins, facilitating more accurate policy learning.

Entropy-Error Trade-off Quantification: In Figure 6 Appendix K quantifies the trade-off inherent in selecting K . It plots Normalized MSE (proxy for quantization error ϵ ) against Normalized Entropy (uniformity of bin usage). As K increases (indicated by color/size), error decreases, but entropy might slightly decrease from its maximum if adaptation leads to concentrated bins. This plot empirically illustrates the optimization landscape navigated by the adaptive mechanism.

5 Discussion

While our results demonstrate the effectiveness of Temporal GFNs, particularly in probabilistic accuracy and multimodality capture, it is important to contextualize its limitations. The sequential, step-by-step generation of trajectories, fundamental to the GFN paradigm, can be more computationally intensive during training compared to models like standard Transformers or LLMs that generate forecasts in a single forward pass. Furthermore, the performance is contingent on a welldesigned reward function R ( τ ) . Although the exponential MSE reward used in our work is effective for accuracy, designing rewards for more complex or domain-specific objectives (e.g., penalizing physiologically implausible trajectories in healthcare) remains a critical and potentially challenging modeling decision. 1) .Our adaptive quantization (Section 3) robustly applies GFNs to continuous data by dynamically balancing precision and exploration. Governed by reward and entropy signals (Eq. 1) and stabilized by theoretical bounds (Theorem B.2 Appendix B), it acts as an effective learning curriculum. While alternative data-driven quantization strategies (e.g., quantile-based bins) were explored in [9], particularly for skewed data by reducing quantization error ϵ more aggressively in dense regions (Figure 8, leading to CRPS improvements in Figure 9), it introduces significant implementation complexity (e.g., estimating quantiles dynamically or learning boundaries) and potentially higher training overhead (15% reported increase). Our adaptive uniform spacing approach provides a strong balance, achieving competitive performance (Tables 1, 2) and adapting the number

of bins effectively based on learning dynamics (Figure 10) without the full complexity of learning non-uniform boundaries, representing a practical and performant design choice. The reduction in ϵ achieved through adaptation directly contributes to improved gradient accuracy (Theorem C.1, Eq. 7). 2) .For enabling gradient flow through discrete quantization choices, we employ the Straight-Through Estimator (STE) [5]. While STE is a widely adopted and practically effective method, alternatives like Gumbel-Softmax (GS) relaxation [18] offer a different approach to managing differentiability in discrete action spaces via z k = softmax (( ℓ k + g k ) /τ temp ) . Our comparative analysis highlights the nuanced trade-offs. Figure 11 shows that GS can lead to faster initial convergence in terms of training loss, potentially due to its inherently smoother gradient signals early in training (high τ temp ). However, this initial advantage can sometimes plateau, with STE achieving a slightly lower final loss in some configurations. A key factor is gradient stability; Figure 7 illustrates that while STE maintains relatively stable gradient variance throughout training, GS, despite generally lower average variance, can exhibit occasional spikes, particularly if temperature annealing is not perfectly tuned. Furthermore, as detailed in Figure 12, GS introduces notable overhead: approximately 35% increased compute time, 41% higher memory usage, and a significant 70% rise in perceived implementation complexity due to temperature annealing and managing the continuous relaxation. Considering these factors, Figure 13 summarizes our practical guidance: STE is preferred for its simplicity, resource efficiency, and stability, especially for smaller models or complex distributions where its biased but consistent gradient proves effective. 3) .Finally, the combination of the Trajectory Balance objective with entropy regularization ( L ) proves highly effective. TB loss facilitates credit assignment, while the entropy bonus explicitly manages the exploration-exploitation trade-off, crucial for learning diverse and well-calibrated distributions. Removing the entropy bonus leads to significantly poorer final rewards (Figure 14), highlighting its role in preventing mode collapse and ensuring sufficient exploration (Figures 15, 16).

6 Conclusion

Temporal Generative Flow Networks (Temporal GFNs) offer a novel approach to probabilistic time series forecasting by adapting GFN principles for continuous data. Key to our framework is the framing of forecasting as reward-driven trajectory sampling, which facilitates exploration and learning distributions over diverse futures, potentially yielding more robust probabilistic forecasts than standard methods. We successfully address the challenges of continuous data through adaptive quantization-providing dynamic precision control as a curriculum and overcoming fixed discretization limitations-and the (STE), which enables learning by bridging discrete state transitions with differentiable gradient updates. Trained via Trajectory Balance for effective credit assignment and entropy regularization for managed exploration, Temporal GFNs learn to sample accurate and diverse forecast trajectories. Theoretical bounds affirm the stability of our adaptive mechanism and quantify the quantization error impact. Compared to alternatives like LLM-based forecasters [1, 23, 29], Temporal GFN provides adaptive precision and a distinct flow-matching learning paradigm, while its unique sequential decision-making generative process offers advantages for complex dependencies and multimodality over standard probabilistic models. Future work will focus on multivariate extensions, extensive empirical validation, and exploring alternative GFN objectives.

Multivariate Extension : A key direction for future work is the extension of Temporal GFNs to the multivariate setting. While this paper focused on the univariate case to rigorously establish the core framework, the approach is not fundamentally limited. The state representation s t can be expanded from a vector to a matrix representing a window of multivariate observations, and the action a t can become a vector of quantized values for each dimension. The primary challenge lies in designing a policy network P F that efficiently models the joint distribution over the multivariate action space. This could be achieved through an autoregressive factorization of the output dimensions or by learning a parameterized covariance structure, offering a rich area for future research.

Irregular Sampling : Furthermore, the current implementation assumes regularly sampled time series due to its use of a fixed-size sliding window. To handle the irregularly sampled data common in domains like healthcare (EHRs) or finance, the framework can be adapted. The state representation could be augmented to include not just observation values but also the time elapsed between them, for instance, by feeding a sequence of ( value , time_delta ) tuples into the Transformer encoder. This would allow the policy network to explicitly learn time-dependent dynamics, making the model robust to irregular sampling and significantly broadening its applicability.

References

Abdul Fatir Ansari, Lorenzo Stella, Caner Turkmen, Xiyuan Zhang, Pedro Mercado, Huibin Shen, Oleksandr Shchur, Syama Sundar Rangapuram, Sebastian Pineda Arango, Shubham Kapoor, et al. Chronos: Learning the language of time series. arXiv preprint arXiv:2403.07815 , 2024.

Timothy Atkinson, Thomas D. Barrett, Scott Cameron, Bora Guloglu, Matthew Greenig, Louis Robinson, Alex Graves, Liviu Copoiu, and Alexandre Laterre. Protein sequence modelling with bayesian flow networks. bioRxiv , 2024. doi: 10.1101/2024.09.24.614734. URL https: //www.biorxiv.org/content/early/2024/09/26/2024.09.24.614734 .

Emmanuel Bengio, Moksh Jain, Maksym Korablyov, Chris Link Cremer, Tristan Deleu Lau, and Yoshua Bengio. Flow network based generative models for non-iterative diverse candidate generation. In Advances in Neural Information Processing Systems , volume 34, pages 2738127394, 2021.

Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In Proceedings of the 26th Annual International Conference on Machine Learning , ICML '09, page 41-48, New York, NY, USA, 2009. Association for Computing Machinery. ISBN 9781605585161. doi: 10.1145/1553374.1553380. URL https://doi.org/10.1145/ 1553374.1553380 .

Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. 2013.

Yoshua Bengio, Salem Lahlou, Tristan Deleu, Edward J Hu, Mo Tiwari, and Moksh Jain. Gflownet foundations. arXiv preprint arXiv:2111.09266 , 2021.

Konstantinos Benidis, Syama Sundar Rangapuram, Valentin Flunkert, Yuyang Wang, Danielle C Maddix, Caner Turkmen, Jan Gasthaus, Michael Bohlke-Schneider, David Salinas, Lorenzo Stella, et al. Deep learning for time series forecasting: Tutorial and literature survey. ACM Computing Surveys (CSUR) , 55(6):1-36, 2022.

Abhimanyu Das, Weihao Kong, Rajat Sen, and Yichen Zhou. A decoder-only foundation model for time-series forecasting, 2024. URL https://arxiv.org/abs/2310.10688 .

Sebastian Espinosa, Jorge F. Silva, and Pablo Piantanida. A data-driven quantization design for distributed testing against independence with communication constraints. In ICASSP 2022 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) , pages 5238-5242, 2022. doi: 10.1109/ICASSP43922.2022.9746197.

Jan Gasthaus, Konstantinos Benidis, Yuyang Wang, Syama Sundar Rangapuram, David Salinas, Valentin Flunkert, and Tim Januschowski. Probabilistic forecasting with spline quantile function rnns. In Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics , pages 1901-1910. PMLR, 2019.

Tilmann Gneiting and Adrian E Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American statistical Association , 102(477):359-378, 2007.

Nate Gruver, Marc Finzi, Shikai Qiu, and Andrew Gordon Wilson. Large language models are zero-shot time series forecasters. Advances in Neural Information Processing Systems , 36, 2023.

Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor, 2018. URL https://arxiv.org/abs/1801.01290 .

Rob J Hyndman and George Athanasopoulos. Forecasting: principles and practice. In OTexts , 2018.

Rob J Hyndman and Anne B Koehler. Another look at measures of forecast accuracy. International journal of forecasting , 22(4):679-688, 2006.

Rob J Hyndman, Anne B Koehler, J Keith Ord, and Ralph D Snyder. Forecasting with exponential smoothing: the state space approach. In Springer Science & Business Media , 2008.

Moksh Jain, Maksym Korablyov, Hugo Larochelle, Tristan Deleu, and Yoshua Bengio. Biological sequence design with generative flow networks. arXiv preprint arXiv:2203.04115 , 2022.

Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144 , 2016.

Marcel Kollovieh, Abdul Fatir Ansari, Michael Bohlke-Schneider, Jasper Zschiegner, Hao Wang, and Yuyang Wang. Predict, refine, synthesize: Self-guiding diffusion models for probabilistic time series forecasting. In Advances in Neural Information Processing Systems , volume 36, pages 28341-28364, 2023.

Bryan Lim, Sercan Ö Arık, Nicolas Loeff, and Tomas Pfister. Temporal fusion transformers for interpretable multi-horizon time series forecasting. International Journal of Forecasting , 37(4): 1748-1764, 2021.

Xu Liu, Juncheng Liu, Gerald Woo, Taha Aksu, Yuxuan Liang, Roger Zimmermann, Chenghao Liu, Silvio Savarese, Caiming Xiong, and Doyen Sahoo. Moirai-moe: Empowering time series foundation models with sparse mixture of experts, 2024. URL https://arxiv.org/abs/ 2410.10469 .

Nikolay Malkin, Kan Miao, Zhendong Li, Guangyao Zhang, Emmanuel Bengio, Chenghao Zhang, Tristan Deleu, Dinghuai Shen, Meng Liu, Hugo Larochelle, et al. Trajectory balance: Improved credit assignment in generative flow networks. In International Conference on Machine Learning , pages 14817-14836. PMLR, 2022.

Luca Masserano, Abdul Fatir Ansari, Boran Han, Xiyuan Zhang, Christos Faloutsos, Michael W. Mahoney, Andrew Gordon Wilson, Youngsuk Park, Syama Rangapuram, Danielle C. Maddix, and Yuyang Wang. Enhancing foundation models for time series forecasting via wavelet-based tokenization, 2024. URL https://arxiv.org/abs/2412.05244 .

Yuqi Nie, Nam H Nguyen, Phanwadee Sinthong, and Jayant Kalagnanam. A time series is worth 64 words: Long-term forecasting with transformers. In International Conference on Learning Representations , 2023.

Stephan Rabanser, Tim Januschowski, Valentin Flunkert, David Salinas, and Jan Gasthaus. The effectiveness of discretization in forecasting: An empirical study on neural time series models. arXiv preprint arXiv:2005.10111 , 2020.

Francisco Ramalho, Meng Liu, Zihan Liu, and Etienne Mathieu. Towards gflownets for continuous control. arXiv preprint arXiv:2310.18664 , 2023.

Syama Sundar Rangapuram, Matthias W Seeger, Jan Gasthaus, Lorenzo Stella, Yuyang Wang, and Tim Januschowski. Deep state space models for time series forecasting. In Advances in neural information processing systems , volume 31, 2018.

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 , pages 8857-8868. PMLR, 2021.

Kashif Rasul, Arjun Ashok, Andrew Robert Williams, Hena Ghonia, Rishika Bhagwatkar, Arian Khorasani, Mohammad Javad Darvishi Bayazi, George Adamopoulos, Roland Riachi, Nadhir Hassen, Marin Biloš, Sahil Garg, Anderson Schneider, Nicolas Chapados, Alexandre Drouin, Valentina Zantedeschi, Yuriy Nevmyvaka, and Irina Rish. Lag-llama: Towards foundation models for probabilistic time series forecasting, 2024. URL https://arxiv.org/abs/2310. 08278 .

David Salinas, Valentin Flunkert, Jan Gasthaus, and Tim Januschowski. Deepar: Probabilistic forecasting with autoregressive recurrent networks. International Journal of Forecasting , 36(3): 1181-1191, 2020.

John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms, 2017. URL https://arxiv.org/abs/1707.06347 .

Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems , volume 30, 2017.

Vladimir Vovk, Alex Gammerman, and Glenn Shafer. Algorithmic learning in a random world . Springer Science & Business Media, 2005.

Ruofeng Wen, Kari Torkkola, Balakrishnan Narayanaswamy, and Dhruv Madeka. A multihorizon quantile recurrent forecaster. arXiv preprint arXiv:1711.11053 , 2017.

Peiqian Yin, Subhankar S K, Shuai Zhang, Yingyong Xie, Jun Liu, Jian Tu, Siyu Wang, X M Leo Zhang, Qi Chen, and Ping Luo. Understanding straight-through estimator in training activation quantized nets. arXiv preprint arXiv:1903.05662 , 2019.

Chenghao Zhang, Kan Miao, and Yoshua Bengio. Generating continuous objects with discrete gflownets. arXiv preprint arXiv:2306.01764 , 2023.

Dinghuai Zhang and Nikolay Malkin Kan Miao Zhendong Li Guangyao Zhang Chenghao Liu Jian Tang Yoshua Bengio. Generative flow networks for discrete probabilistic modeling. In International Conference on Machine Learning , 2022.

Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization, 2018. URL https://arxiv.org/abs/1710.09412 .

A Training Algorithm

Algorithm 1 Temporal GFN Training Procedure

̸

B Theoretical Analysis

To better understand the behavior and stability of our Temporal GFN framework, we provide theoretical analysis on two crucial aspects: the impact of our quantization and STE approximation on the learning signal, and the bounds governing the adaptive quantization mechanism.

B.1 Quantization Error Bound on Policy Gradient

The core learning process relies on policy gradients. However, our framework uses discrete actions ( a hard t ) for state transitions while calculating gradients via continuous approximations ( a soft t ) using the STE. This introduces a potential discrepancy between the true gradient of the expected reward and the gradient actually used for updates. It is crucial to understand if this approximation significantly corrupts the learning signal. Theorem B.1 provides a bound on this error, showing that it depends on the inherent quantization error and the STE approximation quality.

Theorem B.1 (Quantization Error Bound) . Assume the reward function R is L R -Lipschitz w.r.t. its input sequence and ∇ log ˜ P F has bounded variance. Let ϵ = max ∥ actiontrue -actionquantized ∥ be the max quantization error. Let δ = ∇ log P F -∇ log ˜ P F be the difference in score functions due to STE.

The error between the true policy gradient ∇ E [ R ] and the estimated gradient ∇ E [ ˜ R ] is bounded by:

Proof. (The proof is given in the appendix C, following the decomposition in Eq. 11 and applying Lipschitz continuity and Cauchy-Schwarz). The bound demonstrates that the gradient error is controlled by the quantization resolution ( ϵ ) and the fidelity of the STE approximation (measured by δ ). If quantization is fine ( ϵ small) and STE provides a reasonable gradient proxy ( δ small in expectation), the learning signal remains informative.

B.2 Adaptive Update Factor Bound

The adaptive quantization mechanism (Eq. 1, 2) modifies the number of bins K multiplicatively based on performance and entropy. Unbounded updates could lead to instability - either K growing uncontrollably large or collapsing. Theorem B.2 establishes that the multiplicative factor η e is strictly bounded within a predictable range determined by the hyperparameter λ . This ensures the adaptation process is controlled and prevents drastic, potentially harmful, changes to the action space in a single step.

Theorem B.2 (Adaptive Update Factor Bound) . Let η e be defined as in Eq. 1, with ∆ R e ∈ [0 , ϵ ] and H e ∈ [0 , 1] . Then η e is bounded as:

Proof. (The proof is given in Appendix section D, analyzing the bounds of the terms T 1 = max(0 , ϵ -∆ R e ) /ϵ and T 2 = (1 -H e ) and their sum S ). This bound guarantees that K can only increase (since η e ≥ 1 ) and the maximum multiplicative increase per step is limited by (1 + 2 λ ) , ensuring a degree of stability in the adaptation process.

C Quantization Error Bound

The use of discrete hard samples ( a hard t ) in the state transition and trajectory construction, while using soft samples ( a soft t ) for gradient computation via STE, introduces a discrepancy in the policy gradient estimates. We aim to bound the error in the policy gradient due to this approximation.

Let R ( x ) be the true reward based on a continuous action x , and ˜ R ( q hard ) be the reward obtained when using the discrete action q hard . Let P F be the policy producing continuous outputs (before quantization) and ˜ P F be the policy over discrete bins. Let ∇ E [ R ] be the true policy gradient and ∇ E [ ˜ R ] be the gradient obtained using our STE approach (gradient through q soft, reward based on q hard or q soft ).

Theorem C.1 (Quantization Error Bound) . Assume the reward function R is L R -Lipschitz with respect to its input sequence and that the score function ∇ log ˜ P F has bounded variance. Let ϵ denote the maximum quantization error, i.e., ∥ actioncontinuous -actionquantized ∥ ≤ ϵ . Let δ = ∇ log P F - ∇ log ˜ P F represent the difference in score functions due to the STE approximation (gradient computed via q soft vs. actual discrete choice q hard). The error in the policy gradient estimate is bounded by:

where L = max { L R √ E [ ∥∇ log ˜ P F ∥ 2 ] , √ E [ ˜ R 2 ] } is a constant depending on the Lipschitz constant of the reward and the moments of the reward and score function.

Proof. We decompose the gradient difference:

Bounding Term A: By the Lipschitz property of R , we have | R -˜ R | ≤ L R ∥ x -˜ x ∥ ≤ L R ϵ , where x represents the sequence generated with continuous actions and ˜ x with quantized actions. Using Cauchy-Schwarz:

Bounding Term B: Using Cauchy-Schwarz again:

(We use ˜ R in the definition of L as R might not be directly computable in the context of ˜ P F ).

Combining the bounds for Term A and Term B using the triangle inequality on Eq. 11:

This completes the proof. The bound shows that the gradient error depends linearly on the quantization error ϵ and the square root of the expected squared norm of the score function difference δ induced by the STE.

D Adaptive Update Factor Bound

The adaptive update factor η e (Eq. 1) controls the change in the number of bins K . It is important to ensure this factor remains within reasonable bounds to guarantee stability.

Theorem D.1 (Adaptive Update Factor Bound) . Let the adaptive update factor η e be defined as in Eq. 1, where the reward improvement ∆ R e ∈ [0 , ϵ ] (assuming reward is non-decreasing or improvement is capped by ϵ ) and the normalized entropy H e ∈ [0 , 1] . Then, η e is bounded as:

Specifically, η e = 1 when ∆ R e = ϵ (maximum improvement considered) and H e = 1 (maximum entropy). Conversely, η e = 1 + 2 λ when ∆ R e = 0 (no improvement) and H e = 0 (minimum entropy/maximum confidence).

Since ∆ R e ∈ [0 , ϵ ] :

If ∆ R e = ϵ , then ϵ -∆ R e = 0 , so T 1 = max(0 , 0) ϵ = 0 .

If ∆ R e = 0 , then ϵ -∆ R e = ϵ , so T 1 = max(0 ,ϵ ) ϵ = 1 .

For intermediate values 0 < ∆ R e < ϵ , we have 0 < ϵ -∆ R e < ϵ , thus 0 < T 1 < 1 .

Therefore, T 1 ∈ [0 , 1] .

Since the normalized entropy H e ∈ [0 , 1] :

If H e = 1 , then T 2 = 1 -1 = 0 .

If H e = 0 , then T 2 = 1 -0 = 1 .

For intermediate values 0 < H e < 1 , we have 0 < T 2 < 1 .

Therefore, T 2 ∈ [0 , 1] .

The sum inside the parenthesis is S = T 1 + T 2 . Since T 1 ∈ [0 , 1] and T 2 ∈ [0 , 1] , the sum S ∈ [0 , 2] . The adaptive factor is η e = 1 + λS . Since S ∈ [0 , 2] and λ > 0 , we have λS ∈ [0 , 2 λ ] . Therefore, η e = 1 + λS ∈ [1 , 1 + 2 λ ] .

The minimum value η e = 1 is achieved when S = 0 , which requires T 1 = 0 and T 2 = 0 . This happens when ∆ R e = ϵ and H e = 1 . The maximum value η e = 1 + 2 λ is achieved when S = 2 , which requires T 1 = 1 and T 2 = 1 . This happens when ∆ R e = 0 and H e = 0 . This completes the proof. The theorem shows that the multiplicative update factor is bounded, preventing excessively large or small changes in K in a single step.

E Experimental Setup for Benchmark Comparaison

Datasets: We utilize a range of datasets for evaluation. Core ablation studies are performed on benchmark datasets commonly used in time series forecasting (e.g., Electricity, Traffic, ETTm1, ETTh1. We also present results on healthcare-specific datasets (MIMIC-III Vital Signs) to evaluate performance in our target application domains.

Training Strategy. Temporal GFN models, particularly those intended for zero-shot evaluation, undergo a large-scale training phase on the combined "Pre-training only" and "In-domain (Benchmark I)" datasets. The context length T (input window size) for sequences sampled during training is set to 512, matching common Transformer setups, and the prediction length T ′ generated during training rollouts is set to 64, ensuring coverage for various downstream evaluation horizons H . Training employs the Trajectory Balance objective (Section 3) with default entropy regularization ( λ entropy = 0 . 01 ) and adaptive quantization enabled (typically starting K = 20 , max K = 128 ) unless evaluating fixed-K ablations. To enhance robustness and data diversity, we incorporate data augmentation: each training sequence is generated either from the original datasets or with probability 0.9 from a TSMixup set (convex combinations of different time series, adapted from 38) and with probability 0.1 from a synthetic dataset generated via Gaussian Processes with randomly combined kernels (KernelSynth, similar to 1). Training typically proceeds for 10,000 optimization steps on multi-GPU hardware.

Evaluation Tasks and Metrics. For both in-domain (Benchmark I) and zero-shot (Benchmark II) evaluations, we use the final H observations of each time series as a held-out test set ( H is task-specific, see Appendix J). We compute the primary metrics: WQL [10] on 9 levels { 0 . 1 , ..., 0 . 9 } , MASE[15] using the median prediction, and CRPS [11]. To aggregate metrics across diverse datasets and provide fair comparisons, we compute each model's score divided by the score of a baseline model (here, Seasonal Naive), yielding relative scores. These relative scores are then aggregated across all datasets within the benchmark using the geometric mean , which provides a robust aggregation insensitive to outlier datasets and the choice of baseline.

Following standard practices in probabilistic forecasting [10, 1], we evaluate models using:

CRPS (Continuous Ranked Probability Score): Assesses the overall accuracy and calibration of the full predictive distribution. Lower is better.

WQL (Weighted Quantile Loss, τ ∈ { 0 . 1 , ..., 0 . 9 } ): Assesses calibration across different quantiles. Lower is better.

MASE (Mean Absolute Scaled Error): Evaluates point forecast accuracy (median) relative to a naive seasonal baseline [15]. Lower is better.

Calibration Error & Multimodality Score: Used specifically for healthcare/multimodal analysis (lower/higher is better, respectively).

Trajectory / Action Diversity: Quantifies the variety in generated forecast trajectories or chosen actions.

Baselines: We compare Temporal GFN configurations against:

GFN Ablations: Fixed K (K=10, K=20), Adaptive K (start K=10, start K=20), Learned Backward Policy vs. Uniform.

RL/Sampling Methods: PPO [31], SAC [13], and a generic MCMC approach.

SOTA Forecasters: Lag-Llama [29], Chronos [1], MOREI [21], and a decoder-only Transformer (TimeFM) [8].

Implementation Details: The core policy network is a Transformer encoder [32]. Default hyperparameters include λ entropy = 0 . 01 . Adaptive quantization parameters are tuned. We train typically for 10,000 steps. Baselines are run using publicly available implementations or standard libraries where possible.

Training Startegy The adaptive quantization mechanism's sensitivity to training dynamics is primarily managed by the hyperparameter δ , the number of epochs over which reward improvement is averaged (Eq. 1). This parameter's role is to smooth the reward signal ∆ R e , preventing volatile updates to the number of bins K that might arise from high-variance, batch-level rewards. We observed during development that settings with smaller batch sizes or higher learning rates, which typically yield noisier gradient and reward signals, benefit from a larger δ (e.g., δ = 10 ) to ensure stability. For the experiments reported in this paper, we found δ = 5 to provide a good balance between responsiveness and stability across our primary configurations. The adaptation is governed by λ = 0 . 1 and ϵ = 0 . 02 , which we found to be robust across datasets.

F Ablation study of Temporal GFN

This section presents empirical results designed to validate the theoretical underpinnings and analyze the behavior of the proposed Temporal Generative Flow Network (Temporal GFN) framework. Through controlled experiments and ablations, we investigate the quantitative impact of the core mechanisms-adaptive quantization and the Straight-Through Estimator (STE)-on learning dynamics, representation accuracy, and optimization efficacy. We explicitly connect these empirical findings to the mathematical concepts developed in Section B, including the Quantization Error Bound, Adaptive Update Factor Bound, and the role of entropy in the Trajectory Balance objective.

F.1 Validation of the Straight-Through Estimator (STE)

STE is crucial for enabling gradient-based optimization with discrete actions. We validate its effectiveness empirically.

Gradient Flow Approximation: Theorem B.1 bounded the gradient error based on ϵ and the STE approximation quality δ . Figure 21 provides a visual validation by comparing the continuous gradient field with the STE-computed gradient field on the quantized landscape. The preservation of gradient directions and relative magnitudes, particularly the flow towards energy minima, demonstrates that STE provides a sufficiently accurate approximation for effective optimization ( δ is functionally small).

Optimization Trajectory: Figure 17 shows that optimization using STE gradients on the quantized landscape successfully converges to the same low-energy regions as optimization on the continuous landscape. The energy plots (right panel) confirm convergence, although dynamics differ slightly. This provides empirical proof that the gradient signal provided by STE, despite being an approximation bounded by Theorem B.1, is effective for guiding the policy towards optimal (high-reward) states.

Necessity of STE (Ablation): Removing STE entirely breaks the gradient path. Figure 4 (Without STE panel) shows the policy completely fails to learn the target distribution without gradient information. Figure 14 confirms this, with the "No STE" configuration achieving minimal reward, demonstrating its critical role.

G Analysis of GFN Learning Objective and Dynamics

We examine the role of the Trajectory Balance loss and entropy regularization.

Reward Components and TB Loss: Figure 19 illustrates the components contributing to the overall reward signal driving learning, implicitly linked to minimizing the TB loss (Eq. 4). Successful training maximizes the total reward, which requires balancing prediction accuracy, achieving flow consistency (implicitly rewarded), and benefiting from the entropy bonus.

Entropy Regularization and Exploration: The entropy term H ( P F ( ·| s t )) in L section 3.3.3 encourages exploration. Figure 10 shows the typical inverse relationship between reward and entropy during convergence. Critically, comparing the "Adaptive Quantization" curves (with λ entropy = 0 . 01 ) to "No Entropy Regularization" reveals that regularization helps maintain higher entropy, particularly later in training. Figure 14 confirms that removing this regularization ("No Entropy Regularization", teal line) leads to suboptimal final reward (0.55 vs 0.74 for full model), empirically demonstrating the benefit of the entropy term for balancing exploration and exploitation, leading to better overall solutions. This is further supported by sustained high levels of unique actions ratio (Figure 16) and trajectory diversity (Figure 15) throughout training when entropy regularization is present.

H GFN Calibration

A key advantage of Temporal GFN is its inherent capacity for strong calibration . Unlike methods relying solely on quantile regression or implicit uncertainty mechanisms (like dropout), which often exhibit systematic over- or under-confidence as seen in Figure 18 for baselines like LagLlama, Chronos, and MOREI, Temporal GFN's calibration curve aligns closely with the ideal diagonal. This superior intrinsic calibration arises from the GFN objective itself (learning P ( τ ) ∝ R ( τ ) via Trajectory Balance, Eq. 4), which naturally encourages modeling the full distribution of high-reward outcomes, leading to more reliable uncertainty estimates directly from sampled trajectories. While post-hoc techniques like Conformal Prediction (CP) [33] can further enhance calibration and provide formal coverage guarantees for any model (Figure 22, 23), Temporal GFN provides a significantly better-calibrated starting point, making subsequent recalibration potentially more effective or less necessary compared to inherently miscalibrated models.

I Multimodality Metric and GFN Advantage

In time series forecasting, particularly in domains like healthcare or complex system modeling, future outcomes may not follow a single path but could diverge into multiple plausible scenarios (modes). Effectively capturing this inherent multimodality is crucial for robust decision-making. This appendix details the composite metric used to quantify a model's ability to represent multimodal predictive distributions and analyzes how the GFlowNet framework is inherently suited to excel at this task.

I.1 Definition of the Multimodality Score

The Multimodality Score used in our evaluations is a composite measure designed to assess several facets of how well a predicted distribution P (derived from forecast samples) matches a true (potentially multimodal) distribution Q . It incorporates the following components, typically averaged over relevant forecast horizons:

I.1.1 Mode Count Accuracy

This measures whether the model identifies the correct number of distinct modes (peaks) in the distribution. It penalizes both missing true modes and detecting spurious ones.

where N detected and N true are the number of detected and true modes respectively, and λ (e.g., 0.5) controls the penalty strength for detecting extra modes. A value of 1 indicates perfect mode count agreement ( N detected = N true ). N true = 0 is handled as a special case.

I.1.2 Jensen-Shannon (JS) Divergence

JS divergence quantifies the similarity between the overall shapes of the predicted distribution P and the true distribution Q . It is a symmetrized and smoothed version of the Kullback-Leibler (KL) divergence.

where M = 1 2 ( P + Q ) is the mixture distribution, and D KL ( P || Q ) = ∑ i P ( i ) log P ( i ) Q ( i ) . Lower JS divergence indicates higher similarity between the distributions. P and Q are typically derived from binned densities or empirical distributions from samples.

I.1.3 Mode Proportion Error

This assesses whether the model assigns the correct probability mass to each identified mode.

where prop ( i ) is the probability mass associated with the i -th true mode (and its corresponding predicted mode, if found). Calculation requires identifying modes and estimating the probability mass associated with each (e.g., by integrating density between valleys). Lower error indicates better allocation of probability mass.

I.1.4 Wasserstein Distance

The 1-Wasserstein distance (Earth Mover's Distance) measures the cost of transforming one distribution into another. For 1D distributions, it can be efficiently computed using the inverse CDFs F -1 P , F -1 Q or sorted samples:

where x ( i ) , y ( i ) are the i -th sorted samples from P and Q . It captures differences in location and shape. Lower distance is better.

These components are often combined into a single score or reported individually to provide a nuanced assessment of multimodality capture.

I.2 Multimodality Algorithm

The practical calculation of the multimodality score involves several steps, summarized in Algorithm 2. This typically requires estimating probability density functions from samples, identifying modes within these PDFs, and comparing properties of the predicted modes and distribution against the true ones.

Algorithm 2 Pseudo-Code of Multimodality Score Calculation

Require: Forecast samples S P = { x 1 , ..., x N } , True distribution samples S Q = { y 1 , ..., y M } (or analytical form Q ), Horizon indices H interest, Density estimation parameters (bandwidth h , range X range, resolution N grid), Peak detection threshold θ density .

1: Initialize aggregate metrics M agg ←{ Mode Acc.: 0, JS Div.: 0, Mode Prop. Err.: 0, Wass. Dist.: 0 }

2: for each horizon index h ∈ H interest do

3: Extract horizon samples S P,h ←{ x i,h } N i =1 , S Q,h ←{ y j,h } j M =1 ▷ Isolate data for current horizon

4: Estimate predicted PDF P h ( x ) using KDE on S P,h over X range with N grid points. ▷ Density from forecast

5: Estimate true PDF Q h ( x ) using KDE on S Q,h (or use analytical Q ) over X range . ▷ Density from ground truth

6: Detect predicted modes Modes P ←{ ( v k , d k ) } by finding peaks in P h ( x ) > θ density . ▷ Find peaks in predicted PDF

7: N detected ←| Modes P |

8: Detect true modes Modes Q ←{ ( v ′ k , d ′ k ) } by finding peaks in Q h ( x ) > θ density . ▷ Find peaks in true PDF

9: N true ←| Modes Q |

10: Calculate Mode Count Accuracy m acc using Eq. 13. ▷ Compare number of modes

11: Normalize estimated densities ˆ P h ← P h / ∑ P h , ˆ Q h ← Q h / ∑ Q h . ▷ Ensure densities sum to 1

12: Calculate JS Divergence m js ← JS ( ˆ P h || ˆ Q h ) using Eq. 14. ▷ Similarity of overall shapes

13: Estimate predicted mode proportions { prop ( k ) pred } from Modes P , P h ( x ) . ▷ Requires robust area calculation

14: Estimate true mode proportions { prop ( k ) true } from Modes Q , Q h ( x ) . ▷ Mass under each true mode

15: Calculate Mode Proportion Error m prop using Eq. 15. ▷ Accuracy of probability mass per mode

16: Calculate Wasserstein Distance m wass ← W 1 ( S P,h , S Q,h ) using Eq. 16. ▷ Distance between sample sets

17: Store horizon metrics M h ←{ m acc , m js , m prop , m wass }

18: Update aggregate metrics M agg ← M agg + M h

19: end for

20: Average aggregate metrics M final ← M agg / | H interest | ▷ Overall multimodality score components

21: return M final

I.3 How GFlowNets deal with Multimodality

The GFlowNet framework possesses inherent properties that make it particularly well-suited for capturing multimodal distributions, explaining the superior performance observed empirically (e.g., Table 2).

Sampling Proportional to Reward: The fundamental objective of a GFlowNet is to learn a forward policy P F such that the probability of sampling a complete trajectory τ terminating in state

s f (representing a full forecast) is proportional to its reward R ( s f ) :

If the true underlying process generating the time series can lead to multiple distinct future scenarios (modes), and our reward function R ( τ ) correctly assigns high values to forecasts matching any of these true scenarios, the GFN will naturally learn to sample trajectories corresponding to all highreward modes. Unlike maximum likelihood estimation which might focus on the single most likely mode, or simple regression which might average modes, the GFN objective explicitly encourages exploration and sampling from the entire distribution defined by R ( τ ) .

2. Trajectory Balance and Flow Consistency: The Trajectory Balance loss (Eq. 4) enforces consistency across the entire state space. It ensures that the flow generated by P F matches the flow dictated by the reward R and the backward policy P B . For a distribution R with multiple modes (peaks), the TB objective forces the learned flow F ( s ) and policy P F to correctly distribute probability mass across the different pathways leading to these modes. If the policy were to ignore a significant mode, the flow equations would be violated, leading to a high TB loss. Training implicitly pushes the policy to allocate appropriate probability flow towards all high-reward regions of the state space.

3. Exploration via Entropy Regularization: The entropy bonus term -λ entropy H ( P F ) in the loss function L (section. 3.3.3) explicitly encourages the forward policy to maintain diversity and avoid premature convergence to a single mode (mode collapse). By penalizing overly confident (lowentropy) policies, the training process incentivizes the GFN to keep exploring different trajectories, making it more likely to discover and represent multiple distinct modes present in the reward landscape (and thus, the true data distribution if the reward is well-specified). The empirical results in Figure 10 and 14 support this, showing that entropy regularization leads to better overall reward, likely by preventing mode collapse.

4. Adaptive Quantization's Role: Our adaptive quantization mechanism further enhances multimodality capture. By dynamically allocating more bins (higher resolution) around regions corresponding to emerging or established modes (as suggested by Figure 4), it allows the GFN policy P F to represent the shape and separation of these modes with greater fidelity than a fixed, uniform quantization scheme might permit. This synergy between the GFN's distributional learning objective and the adaptive representation capacity allows Temporal GFN to effectively model complex, multimodal predictive distributions.

That is, the combination of reward-proportional sampling, flow consistency constraints enforced by the TB loss, explicit exploration encouraged by entropy regularization, and enhanced representational capacity from adaptive quantization provides a strong theoretical and practical foundation for Temporal GFN's superior performance in capturing multimodality compared to traditional forecasting approaches.

J Datasets

These datasets span multiple domains (e.g., energy, finance, healthcare, web traffic, transport, nature) and exhibit varied properties regarding time series length, sampling frequencies (ranging from minutes to yearly), seasonality, trend complexity, noise levels, and potential multimodality. For structured evaluation and analysis of generalization capabilities, these datasets are divided into three distinct categories:

Pre-training only: A large set of 13 diverse datasets (approx. 795k series) used exclusively for the initial large-scale training phase of Temporal GFN models intended for zero-shot evaluation. These datasets are not used during evaluation.

In-domain (Benchmark I): A collection of 15 datasets (approx. 97k series) that are included in the training corpus. The final segment (forecast horizon H ) of the time series in this benchmark is held out for evaluating the model's performance on familiar data distributions and tasks.

Zero-shot (Benchmark II): Aset of 27 datasets (approx. 190k series) that are never seen by the model during any training phase. These are used solely for evaluating the model's ability to generalize its learned forecasting capabilities to entirely new time series and domains without any task-specific fine-tuning.

K List of Figures

RelationshipbetweenQuantization Error and Reward

Effect ofBin Count on Reward andMSE

1.0 -

K=10,MSE=0.0322

0.95

K=100,MSE=0.0020

0.12

0.90

0.8 -

0.10

0.85

0.6

AverageReward

0.08

Mean Squared Error

Reward

0.80

0.4

MSE

0.06

0.75

0.2

0.04

-0°0

0.70

0.02

0.65

0.00

-0.2

0.0

0.2

0.4

0.6

0.8

1.0

1.2

20

40

60

80

100

Quantization Error

Number of Bins (K)

Quantization with K=5 bins (MSE=0.1273,Normalized Entropy=0.7870)

Quantized

2

-2

0

20

40

60

80

100

SampleIndex(sorted)

Quantization with K=10bins(MSE=0.0322,Normalized Entropy=0.8293)

Quantized

Value

2

0

20

40

60

80

100

SampleIndex(sorted)

Quantization with K=20 bins (MSE=0.0102, Normalized Entropy=0.8618)

Quantized

2

0

20

40

60

80

100

SampleIndex(sorted)

4

Quantized

lue

2

0

20

40

60

80

100

Sample Index (sorted)

Ideal Distribution

Uniform Quantization

0.30-

0.30

Entropy:1.00

Entropy:0.99

0.25

0.25

0.20

0.20-

Probability

Probability

0.15

0.15

0.10

0.10

0.05

0.05

0.00-

0.00

2

3

4

5

6

8

9

2

3

5

6

8

0.30

Adaptive Quantization

0.30

Without STE

Entropy:1.00

Entropy:0.82

0.25 -

0.25

0.20

0.20

Probability

Probability

0.15

0.15

0.10

0.10

0.05

0.05

0.00-

0.00

3

4

5

6

9

2

3

5

6

8

ContinuousPolicyEnergyLandscape

QuantizedPolicyEnergyLandscape

0.00

0.0

0.48

2

2

ModeA

Mode A

-0.8

0.96

Energy (negative log probabity)

Parameter Dimension 2

-1.44

Parameter Dimension 2

Quantized Energy Levels

-1.6

1.92

0

0

2.40

2.4

-1

ModeC

-1

Mode C

2.88

Mode B

Mode B

3.2

2

3.36

2

Quantizationpreserves

major modes but reduces

3.84

fine details

E-

-3

=4.0

-3

2

-1

0

1

2

3

e-

2

-1

0

1

2

Parameter Dimension 1

Parameter Dimension1

Trade-offbetween Bin Distribution Entropy and Quantization Error

1.0 -

K=Ko100

100

K=20

0.8-

-80

Normalized MSE (higher is better)

0.6

60

Number of Bins (K)

0.4

40

0.2 -

Reward Scale

20

Reward: 0.20

K=5

Reward: 0.50

0.0-

Reward: 0.80

0.80

0.82

0.84

0.86

0.88

Normalized Entropy (higher is more uniform)

Gradient Variance Throughout Training

STE

9

Gumbel-Softmax

Gradient Variance (lower is better)

５

4

GSoccasional

variancespikes

STEachievesstablegradients

2

1

0

20

40

60

80

100

Training Progress (Epochs)

Data-Drivenvs.Uniform Quantization Bins

100

QuantizationError

Reduction:38%

80

Frequency

60

Data-driyen

Bins

20

Uniform

Bins

UniformBins

Data-drivenBins

0

0

20

40

60

80

100

Value

Performance Improvements

100

95%

%06

↑Higherisbetter

%98

80%

80

75%

70%

%99

60

Improvement Percentage (

45%

40

27%

20

15%

10%

0

-20

-40

-60

Calibration Error

CRPS

Multimodal

Training

Reduction (%)

Improvement (%)

Preservation (%)

Stability (%)

Temporal GFN (Baseline)

+Data-drivenQuantization

+Combined Approach

MOREI

+ConformalPrediction

+ Gumbel-Softmax

LagLlama

Reward and Entropy over Time

Reward vs.EntropyRelationship

1.0

Adaptive Quantization(Reward)

0.8

AdaptiveQuantization

Adaptive Quantization (Entropy)

Fixed Quantization

Fixed Quantization(Reward)

0.7

No Entropy Regularization

0.8

Fixed Quantization(Entropy)

NaEqtropyRegulerizAinr(Entropy

0.6

Value

0.6

Reward

0.5

0.4

0.4

0.3

0.2

0.2

0

20

40

60

80

100

0.2

0.4

0.6

0.8

1.0

Training Epochs

Entropy

Training Convergence: STE vs. Gumbel-Softmax

Temporal GFN-STE

6

TemporalGFN-GS

5

Loss (lower is better)

4

3

GSfasterinitialconvergence

2

GSplateaueffect

STEfinal losslowerby0.07

0

20

40

60

00

100

Training Epochs

Implementation Resource Requirements

2.5

STE

Gumbel-Softmax

2.0

Relative Cost (lower is better)

+70%

1.5

+41%

+35%

Baseline

Baseline

Baseline

1.0

0.5

0.0

Compute

Memory

Implementation

Time

Usage

Complexity

Practical Approach Selection Guide

STEispreferredformostpracticalapplications

Reward Evolution DuringTraining

No Entropy Regularization

No Adaptive Quantization

WWW

0.8-

No TrajectoryBalance

No STE

FullModel:0.74

NoAdaptive Quantization:0.63

0.6 -

AverageReward

NoEntropyRegularization:0.55

NoTrajectoryBalance:0.37

NoSTE:0.27

0.2

0.0 -

0

25

50

75

100

T

125

150

175

200

Training Epochs

Trajectory Diversityvs.Training Steps

2.33

2.32

2.31

Trajectory Diversity

2.30

2.29

2.28

Configuration

2.27

FixedK=10

FixedK=20

AdaptiveK=10

2.26

LearmedPolicy

0

2000

4000

6000

8000

10000

TrainingSteps

1.00

0.98

0.96

Unique Actions Ratio

t60

0.92

0.90

Configuration

0.88

Fixed K=10

Fixed K=20

AdaptiveK=10

0.86

Adaptive K=20

LearnedPolicy

0

2000

4000

6000

8000

10000

Training Steps

Optimization Paths(Continuous)

Optimization Paths (Quantized, k=16)

Energy During Optimization

0.55

Quantized

0.50

2

Parameter 2

Parameter 2

0.45

Energy

0

0.40

-2

-2

0.35

0.30

-2

Parameter 1

0

2

-2

Parameter 1

0

2

10

Optimization Step

20

30

40

50

Calibration Curves for Different Forecasting Models

1.0

0.8

0.4

0.2

PerfectCalibration

1

TemporalGFN

J1

LagLlama

Chronos

MOREI

1

TimeFM

0.0

0.0

0.2

0.4

0.6

0.8

1.0

NominalProbability

Reward ComponentsBreakdownOverTraining

1.0

Base Reward

FlowConsistencyBonus

EntropyBonus

Prediction Accuracy

RewardComponentValue

0.8

Total Reward

0.6

LNWM

0.4

0.2

0.0

0

25

50

75

100

125

150

175

200

Training Epochs

Individual RewardComponentEvolution

BaseReward

0.5

FlowConsistencyBonus

Entropy Bonus

PredictionAccuracy

0.4 -

Component Value

0.3

0.2

0.1

0.0-

0

25

50

75

100

125

150

175

200

Training Epochs

DistributionalAccuracy(LowerisBetter)

Multimodality Performance Metrics

CRPS

Energy Score

CalibrationScore

0.4

KeyStrengthsofTemporalGFN：

·Superiormultimodaldetection

0.3

·Best-in-classmode coverage

·Highest calibration score

Score

·Lowestdistributionerrorscores]

Multimodal Detection

0.2

0.1

0.0

Temporal GFN

LagLlama

Mode Coverage

ModeCoverage

ModeCoverage

TimeFM

MOREI-

ContinuousRanked Probability Score

Chronos

Temporal GFN

LagLlama

LagLlama

Chronos

EnergyScore

MOREI

TimeFM

Temporal GFN-

0.0

0.2

0.4

0.6

0.8

Score (Higher is Better)

ContinuousGradientFlow

Quantized Gradient Flow (k=16)

Parameter2

Parameter 2

0

0

Parameter 1

Parameter 1

Effect of Recalibration on Model Calibration Curves

Temporal GFN

LagLlama

Chronos

IsotonicRecalibration

Isotonic Recalibration

IsotonicRecalibration

(59.7% improvement)

(70.2% improvement)

(74.7% improvement)

1.0

0.8

0.6

0.4

0.2

-Perfect Calibration

Before

After

0.0

MOREI

TimeFM

ConformalRecalibration

ConformalRecalibration

(67.8% improvement)

(80.5% improvement)

1.0

0.8

0.6

0.4

0.2

0.8.0

0.2

0.4

0.6

0.8

1.0

0.0

0.2

0.4

0.6

0.8

1.0

Nominal Probability

Conformal Prediction Calibration Improvement 1.0

Error Reduction:72.1%

0.8

Empirical Frequency

0.6

0.4

0.2

Perfect Calibration

Temporal GFN

Temporal GFN + CP

0.0

0.0

0.2

0.4

0.6

0.8

1.0

Nominal Probability

Comparison of Key Metrics Across Model Configurations

0.243.09580

1.0

CRPSScore(lowerisbetter)

Calibration Error (lowerisbetter)

0.228

Training Time (lower is better)

0.083

65

0.8

0.182

0.178

Normalized Metric Value

55

0.155

52

47

0.6

45

0.133

0.047

40

0.125

0.045

0.043

0.4

0.2

0.012

0.011

0.0

MOREI

LagLlama

Temporal GFN

TempGFN + CP

TempGFN + DDQ

TempGFN + GS

TempGFN Combined

L Broader Impacts

The development of Temporal Generative Flow Networks (Temporal GFNs) for probabilistic time series forecasting, while primarily an advancement in machine learning methodology, carries a spectrum of potential societal impacts that merit careful consideration. The most significant positive impacts stem from the potential to enhance decision-making in critical domains where understanding uncertainty is paramount. In healthcare, for instance, the ability of Temporal GFNs to provide more accurate and well-calibrated probabilistic forecasts for patient vital signs or physiological signals could lead to earlier detection of adverse events, optimized resource allocation in intensive care units, and more personalized treatment strategies. The framework's capacity to capture multimodality is particularly valuable here, as patients may exhibit distinct future health trajectories. Similar benefits extend to finance, where reliable probabilistic forecasts can improve risk management and portfolio optimization; to energy systems, where better predictions of demand and renewable generation can enhance grid stability and efficiency; and to climate science, where nuanced forecasts with uncertainty can better inform policy. Beyond specific applications, by offering a new way to learn distributions over complex sequential behaviors, Temporal GFNs might also contribute to a deeper scientific understanding of the underlying dynamics in diverse systems.

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: The abstract and introduction (Section 1) clearly state the core contributions regarding the Temporal GFN framework, adaptive quantization, STE for differentiability, TB loss, and theoretical bounds, which are then supported by the methodology, theory, and experimental sections.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: The Discussion (5) and Conclusion (6) touches upon trade-offs (e.g., STE bias, complexity of data-driven quantization vs. adaptive uniform). A dedicated "Limitations" subsection within the Discussion or Conclusion are elaborated on assumptions (e.g., univariate focus, specific GFN objective) and potential areas for improvement.

3. Theory assumptions and proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: Theoretical results (Theorems C.1 and D.1) are presented in Section B. Assumptions (e.g., Lipschitz reward, bounded variance) are stated, and full proofs are provided in Appendix B.

4. Experimental result reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: Section 4 and Appendix J detail the datasets, evaluation strategy, baseline implementations, and Temporal GFN hyperparameters (context length, prediction length, training steps, adaptive parameters, optimizer details). The core methodology, including the algorithm, is described in Appendix A.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: We plan to release the source code for Temporal GFNs and scripts for experiments upon publication. Publicly available benchmark datasets are used and cited. Instructions for data access and preprocessing will be provided in the supplementary material/repository README.

6. Experimental setting/details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: Section E provide details on data splits (Pre-training, Benchmark I, Benchmark II), evaluation horizons, model hyperparameters (e.g., Transformer architecture, GFN parameters, adaptive quantization settings), optimizer (Adam), learning rates, and training duration.

7. Experiment statistical significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: Main benchmark results for Temporal GFN variants are reported as averages over 3 random seeds (Section E). While explicit error bars or statistical tests are not present in all tables/figures in the main text, the multi-seed averaging addresses variability. Appendix figures (e.g., on gradient variance) sometimes show error bars.

8. Experiments compute resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: Appendix E mentions training on multi-GPU hardware and typical training duration (e.g., 10,000 steps). The (previously discussed but removed) computational efficiency table provided typical training times per configuration. This information will be consolidated in the appendix.

9. Code of ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: The research aims to advance probabilistic forecasting with a novel method. Standard benchmarks and synthetic data are primarily used. For any healthcare data, ethical considerations regarding data privacy and responsible use would be paramount (to be detailed further if specific private datasets were used and not just MIMIC-III which has its own usage agreements).

10. Broader impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [Yes]

Justification: A Broader Impacts section has been included in Appendix L. Positive impacts include improved decision-making in healthcare and other critical domains via better uncertainty quantification. Potential negative impacts could relate to misuse if applied to sensitive personal data without safeguards, or over-reliance on model predictions. Mitigation strategies like emphasizing model calibration and responsible deployment are discussed.

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [NA]

Justification: The proposed Temporal GFN model itself, while a generative model for time series, does not inherently pose the same high risk for direct misuse as large-scale image/text generators trained on vast uncurated web data. Benchmark datasets used are standard public datasets. If applied to sensitive healthcare data, access would be governed by existing data use agreements.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: Publicly available benchmark datasets (e.g., ETT, M-series, MIMIC-III) are cited with their original sources. Baselines like Chronos, Lag-Llama are cited. Any opensource code leveraged (e.g., for GFN components or evaluation metrics) will be credited in the implementation details or acknowledgments, and licenses respected.

13. New assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [NA]

Justification: The primary contribution is a new modeling framework and methodology. If code is released, it will be accompanied by a README and usage instructions. No new large-scale datasets or foundational models are being introduced as assets themselves.

14. Crowdsourcing and research with human subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: This research does not involve crowdsourcing or direct research with human subjects in terms of data collection for this study. Any healthcare data used (e.g., MIMIC-III) is pre-existing, de-identified, and accessed under established ethical protocols and data use agreements.

15. Institutional review board (IRB) approvals or equivalent for research with human subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: The research uses pre-existing, de-identified datasets (like MIMIC-III, public benchmarks) or synthetic data. No new human subject data was collected for this study, thus direct IRB approval for this specific work was not required beyond the original approvals for the datasets themselves.

16. Declaration of LLM usage

Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigorousness, or originality of the research, declaration is not required.

Answer: [No]

Justification: LLMs were not used as a core component of the proposed Temporal GFN methodology or experimental research.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces Temporal Generative Flow Networks (Temporal GFNs), transferring GFNs to sequences. The model is trained by optimizing a reward function based on the mean squared error via the Straight Through estimator, making the discrete sampling differentiable. Furthermore, an adaptive quantization scheme is proposed, increasing the number of discretization bins during training based on improvements over the last improvements and the model's predictive entropy. The model achieves state-of-the-art results across various metrics and outperforms current foundation models.\n\nSTRENGTHS AND WEAKNESSES:\n### Strengths\n\n- The clarity of the paper makes it easy to follow and understand. The method is clearly explained and accompanied by a pseudo-code.\n- The paper proposes a novel model transferring generative flow networks to sequential data and ensures differentiability via the straight-through estimator.\n- The authors provide sufficient experiments (e.g., Gumbel Softmax vs Straight Through), insights, and theoretical analyses in the appendix.\n- The authors propose an adaptive quantization to address the limitations of fixed quantizations in previous foundation models [1], posing a natural extension and promising research direction.\n\n### Weaknesses\n\n- Adaptive quantization does not always lead to improvements (see Table 3 for K=10), raising questions about the choice of $\\eta_e$. Also, increasing K worsens the probabilistic metrics. It would be interesting to see whether a different reward function based on the quantile loss improves the probabilistic metrics. In general, it surprised me to have a reward function based on the mean-squared error for quantized sequences.\n- The code is not provided, making it harder to check implementation details.\n- The architecture and hyperparameters are not detailed enough.\n\n[1] Ansari, Abdul Fatir, Lorenzo Stella, Caner Turkmen, Xiyuan Zhang, Pedro Mercado, Huibin Shen, Oleksandr Shchur et al. \"Chronos: Learning the language of time series.\" arXiv preprint arXiv:2403.07815 (2024).\n\nQUESTIONS:\n- L218-223: \"Slow improvement suggests the current quantization might be too coarse, thus pushing $\\eta_e >1$ to encourage increasing K.\" Couldn't it just indicate convergence? \"High confidence might indicate premature convergence or insufficient exploration.\" How do you distinguish premature convergence from true convergence?\n- L225-226: Do you reuse the previously learned weights of the final layer when adding new bins, or do you discard them and reinitialize $W_f$ and $b_f$?\n- Why does adaptive quantization result in worse probabilistic metrics (Table 3) for K=10? Does this mean the adaptive update factor is not optimally chosen? It would be insightful to see a more thorough analysis for $K$.\n- Did you ablate different reward functions, e.g., based on the quantile loss?\n- How is the CRPS computed?\n\nMy primary concern is the correlation between the number of quantization bins and probabilistic metrics. I am willing to increase my score if this is sufficiently addressed.\n\nLIMITATIONS:\nLimitations are discussed in Section 5, but I encourage the authors to include an explicit limitation paragraph.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 3, "CLARITY": 4, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-06-30"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper extends generative flow networks for continuous-value time series forecasting. It does so by framing a forecast as a trajectory in the GFN state space, where future values are quantized into discrete actions. The number of bins are in this case not fixed but are adapted during training, leading to a more flexible quantization procedure. This is enabled by a straight-through estimator that allows gradients to flow through discrete choices.\n\nSTRENGTHS AND WEAKNESSES:\n## Strengths\n\n- The idea to introduce GFNs for continuous forecasting is interesting and makes sense, especially from the point of reward-proportional sampling to achieve better sampling diversity. This is the first application of GFNs to continuous time forecasting, making this approach novel.\n- The paper provides a solid empirical evaluation that demonstrates the effectiveness of the proposed approach. In particular, the paper does a good job at empirically supporting the theoretical claims.\n- The adaptive quantization scheme is well-motivated and definitely interesting. While additionally making the bin boundaries adaptive is compelling, it seems it is sufficient to have just the number of bins adapt dynamically.\n\n## Weaknesses\n\n- Using the exponential of a normalized MSE as the reward might lack flexibility or e.g. long horizon forecasting, switching to CRPS or other loss types would likely require re-deriving the reward scaling factor\n- While the authors explicitly state that a multivariate extension of the proposed approach is left for future work, I do think a limited discussion / execution of this is important for this work. Most real forecasting tasks (power grids, healthcare dataset) are multivariate in nature.\n\nQUESTIONS:\nQ1: Can the authors comment on the overall computational overhead at inference time and how it compares to other approaches? The comparison in Figure 12 is indeed very helpful, can this be expanded to the baselines used in Section 4?\n\nQ2: Could the authors please elaborate on the choice of baselines in the experimental section, particularly in e.g. Table 2? Why were these baselines chosen and would it makes sense to e.g. include the Diffusion / Flow models mentioned in the Related Work?\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 2, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 4, "DATE": "2025-07-01"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe authors provide a new method for augmenting Generative Flow Networks to model timeseries data that addresses the challenge in adapting the discrete action space for continuous variables as seen in many time series. This method uses a dynamic bin-size strategy where bin widths are learned during training through a metric that incorporates model reward and action space entropy. The authors test this method on a range of clinical data sets, comparing to other baselines.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\nFixed-bin discretization is a major limitation of other timeseries modeling methods as mentioned by the authors. The ability to adapt this discretization in a reward driven manner is an appealing characteristic. The paper is clear to read.\n\nWeaknesses:\nThis method appears to be limited to single-variate timeseries models. While this is an important contribution, this limitation should be discussed (or if the reviewer is incorrect, perhaps the distinction can be expanded upon). Often multiple variables are collected together and share mutual information.\n\nQUESTIONS:\nHow do batch size and learning rate affect the reward improvement over the \\delta epoch and therefore the magnitude of the bin update? Was there a sensitivity analysis done for these variables?\n\nLine 225-226 (new linear layer for new bin number): Is this adjustment be done with weight re-use in some way? Or is this a new randomly initialized layer?\n\nMedical data often consists of time-series that are irregularly and informatively sampled. Can the authors explain whether this method captures these aspects of the medical data?\n\nLIMITATIONS:\nThe authors discuss limitations largely around design choices and ablation studies within the body of work presented here. They could expand on these to broader limitations of the method in general compared to other methods of timeseries modeling.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-07-02"}