Table of Contents
Fetching ...

Zero-Shot Forecasting of Network Dynamics through Weight Flow Matching

Shihe Zhou, Ruikun Li, Huandong Wang, Yong Li

TL;DR

This work tackles zero-shot forecasting of network dynamics under changing environmental coefficients by proposing FNFM, a framework that generates specialized forecaster weights instead of predicting trajectories. FNFM combines a Transformer-based VAE to learn a smooth latent manifold of expert weights with a coefficient-conditioned flow matching model to map environmental coefficients to latent codes, enabling instant, single-pass weight generation for unseen environments. At test time, a simple ODE integration in latent space yields new forecaster weights, which are decoded into a ready-to-use predictor without any gradient-based fine-tuning. Across synthetic and real networks, FNFM demonstrates robust zero-shot accuracy under coefficient shifts, provides explainable weight-space structure, and shows resilience to data scarcity and noisy coefficient inputs.

Abstract

Forecasting state evolution of network systems, such as the spread of information on social networks, is significant for effective policy interventions and resource management. However, the underlying propagation dynamics constantly shift with new topics or events, which are modeled as changing coefficients of the underlying dynamics. Deep learning models struggle to adapt to these out-of-distribution shifts without extensive new data and retraining. To address this, we present Zero-Shot Forecasting of Network Dynamics through Weight Flow Matching (FNFM), a generative, coefficient-conditioned framework that generates dynamic model weights for an unseen target coefficient, enabling zero-shot forecasting. Our framework utilizes a Variational Encoder to summarize the forecaster weights trained in observed environments into compact latent tokens. A Conditional Flow Matching (CFM) module then learns a continuous transport from a simple Gaussian distribution to the empirical distribution of these weights, conditioned on the dynamical coefficients. This process is instantaneous at test time and requires no gradient-based optimization. Across varied dynamical coefficients, empirical results indicate that FNFM yields more reliable zero-shot accuracy than baseline methods, particularly under pronounced coefficient shift.

Zero-Shot Forecasting of Network Dynamics through Weight Flow Matching

TL;DR

This work tackles zero-shot forecasting of network dynamics under changing environmental coefficients by proposing FNFM, a framework that generates specialized forecaster weights instead of predicting trajectories. FNFM combines a Transformer-based VAE to learn a smooth latent manifold of expert weights with a coefficient-conditioned flow matching model to map environmental coefficients to latent codes, enabling instant, single-pass weight generation for unseen environments. At test time, a simple ODE integration in latent space yields new forecaster weights, which are decoded into a ready-to-use predictor without any gradient-based fine-tuning. Across synthetic and real networks, FNFM demonstrates robust zero-shot accuracy under coefficient shifts, provides explainable weight-space structure, and shows resilience to data scarcity and noisy coefficient inputs.

Abstract

Forecasting state evolution of network systems, such as the spread of information on social networks, is significant for effective policy interventions and resource management. However, the underlying propagation dynamics constantly shift with new topics or events, which are modeled as changing coefficients of the underlying dynamics. Deep learning models struggle to adapt to these out-of-distribution shifts without extensive new data and retraining. To address this, we present Zero-Shot Forecasting of Network Dynamics through Weight Flow Matching (FNFM), a generative, coefficient-conditioned framework that generates dynamic model weights for an unseen target coefficient, enabling zero-shot forecasting. Our framework utilizes a Variational Encoder to summarize the forecaster weights trained in observed environments into compact latent tokens. A Conditional Flow Matching (CFM) module then learns a continuous transport from a simple Gaussian distribution to the empirical distribution of these weights, conditioned on the dynamical coefficients. This process is instantaneous at test time and requires no gradient-based optimization. Across varied dynamical coefficients, empirical results indicate that FNFM yields more reliable zero-shot accuracy than baseline methods, particularly under pronounced coefficient shift.

Paper Structure

This paper contains 38 sections, 17 equations, 5 figures, 2 tables, 1 algorithm.

Figures (5)

  • Figure 1: The generalization trap in network dynamics. (a) A generalist model trained on mixed data struggles to outperform specialized expert models. Network dynamics adopts the classic information dissemination model vespignani2012modelling, in which the dynamic behavior is governed by the popularity coefficient. (b) Training and testing performance on cross-environment propagation dynamics, where $e_A$ and $e_B$ are propagation processes with different coefficients.
  • Figure 2: Overview of the Model Architecture. The framework comprises collecting expert model weights, tokenizing and encoding the model weight to latent vectors and conditional flow matching, working synergistically for zero-shot weight generation and dynamics forecasting.
  • Figure 3: The process of FNFM generating weights for a predictive model under different environmental conditions.
  • Figure 4: Case study on the Collab dataset. (a) Illustration of the network topology and governing equation. (b) The information propagation scale (network activity at the final time step) as a function of the environmental coefficient (popularity). (c) FNFM's generalized prediction of the propagation scale within the phase transition region closely matches the ground truth. (d) FNFM's predicted trajectories for two extreme scenarios: a declining case and an active case.
  • Figure 5: Robustness results on the Collab dataset.