Adaptive Quantization in Generative Flow Networks for Probabilistic Sequential Prediction

Nadhir Hassen, Zhen Zhang, Johan W. VerjansNeurIPS 2025

TL;DR

This paper introduces Temporal Generative Flow Networks (Temporal GFNs), a novel framework that adapts GFNs—originally designed for discrete objects like molecules—to continuous time series forecasting. By utilizing an adaptive, curriculum-based quantization strategy and a straight-through estimator, the model achieves state-of-the-art probabilistic predictions and excels at capturing complex, multi-modal future scenarios.

What Problem Does This Paper Address?

In fields like healthcare and finance, a single "best guess" for the future isn't enough. Decision-makers need probabilistic forecasts that quantify uncertainty—for example, predicting not just a patient's average heart rate, but the likelihood of it spiking dangerously.

While deep learning has improved forecasting, two major hurdles remain:

  1. Distribution Assumptions: Many models assume the future follows a simple bell curve (Gaussian). This fails when the future is "multi-modal" (i.e., there are several distinct, plausible outcomes).
  2. The Quantization Dilemma: To use powerful sequence models, researchers often "tokenize" continuous data into discrete bins. However, fixed bins present a "Goldilocks" problem: too few bins lose precision, while too many create a massive, sparse search space that is nearly impossible for a model to learn efficiently from scratch.

Methods

The authors propose Temporal GFNs, framing the act of forecasting as a sequential construction process. The model builds a "trajectory" (the forecast) one step at a time, aiming to sample trajectories with a probability proportional to their accuracy (the "reward").

The core innovations include:

  • Adaptive Curriculum-Based Quantization: Instead of picking a fixed number of bins ($K$) at the start, the model begins with a small $K$ (coarse granularity) to make initial exploration easy. As the model's reward improves and its confidence (entropy) stabilizes, it dynamically adds more bins to refine its precision.
  • Differentiable Discrete Actions via STE: To train the network using standard gradients despite the discrete nature of picking "bins," the authors use a Straight-Through Estimator (STE). This allows the model to pick a "hard" discrete bin for the next step while passing "soft" continuous gradients back through the network during training.
  • Trajectory Balance (TB) Loss: The model is trained to ensure "flow consistency," meaning the probability of starting a forecast and ending up at a specific trajectory is mathematically sound across the entire sequence.

Datasets

The study utilizes a massive and diverse collection of data, totaling nearly 1 million time series:

  • Pre-training: ~795k series (Solar, Weather, Wiki traffic) to build general temporal intuition.
  • Benchmark I (In-Domain): 15 datasets including Electricity and M4 competition data.
  • Benchmark II (Zero-Shot): 27 datasets never seen during training, such as Covid Deaths and Australian Electricity, to test generalization.
  • Healthcare Specific: MIMIC-III Vital Signs (Heart Rate, SpO2) to evaluate performance in high-stakes, multi-modal environments.

Key Insights and Ideas

  • The "Aha" Moment for Quantization: The authors found that simply increasing the number of bins ($K$) yields diminishing returns for reward improvement. Their adaptive strategy navigates this trade-off automatically, focusing computational effort where it actually helps the model learn.
  • GFNs are Natural Uncertainty Experts: Unlike standard regression models that might average two possible futures into one (often wrong) middle ground, GFNs are designed to discover and sample from all high-reward "modes." This makes them exceptionally good at representing complex, branching futures.
  • Stability over Smoothness: In comparing their STE approach to the popular Gumbel-Softmax (GS) trick, the authors found that while GS converges faster initially, STE provides more stable gradients and uses significantly fewer resources (35% less compute time and 41% less memory).

Key Results

Temporal GFNs establish a new standard for probabilistic forecasting, demonstrating significant gains over both traditional reinforcement learning methods and recent state-of-the-art foundation models.

Dominance over Baselines: When compared to traditional Reinforcement Learning (PPO, SAC) and MCMC methods, Temporal GFNs showed a massive 25-35% average improvement across key metrics like CRPS, MASE, and WQL.

Comparison of Temporal GFN against RL and MCMC baselines, showing a 25-35% average improvement.

Competitive with SOTA: The model outperformed or matched state-of-the-art foundation models like Chronos and Lag-Llama, particularly excelling in zero-shot and in-domain scenarios across multiple error and calibration metrics.

Performance comparison of Temporal GFN against state-of-the-art time series foundation models.

Superior Calibration: The model’s predicted probabilities align almost perfectly with actual outcomes, meaning when it says there is a 70% chance of an event, it happens almost exactly 70% of the time.

Mode Coverage: In multi-modal tests, Temporal GFN achieved 92% mode coverage, significantly better than standard deep learning forecasters.

Limitations and Future Work

  • Computational Intensity: Because GFNs generate forecasts step-by-step (autoregressively), they are more computationally expensive during inference than "one-shot" models.
  • Reward Sensitivity: The model's performance is tied to the reward function. While exponential MSE worked well here, more complex domains might require carefully hand-crafted rewards.
  • Univariate Focus: The current work focuses on single-variable forecasting. The authors identify multivariate extensions (predicting multiple related variables at once) and handling irregularly sampled data as the next frontiers for this framework.

Summary updated

BibTeX
@inproceedings{hassen2025adaptive,
  author = {Nadhir Hassen and Zhen Zhang and Johan W. Verjans},
  title = {{Adaptive Quantization in Generative Flow Networks for Probabilistic Sequential Prediction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=18GBPdnuXs},
}
Figure