Fast Few-Shot Graph Flow Prediction

Akhilan Boopathy, Zhiyan Yi, Gil Wolff, Amber Roy Chowdhury · Submission to ICLR 2026 · Rejected

TL;DR

This paper introduces a novel traffic simulation algorithm that combines the theoretical grounding of traditional simulations with the flexibility of neural networks to predict traffic flow in unseen cities. By factorizing origin-destination patterns and leveraging a computationally efficient approximation, the model achieves state-of-the-art "few-shot" generalization—outperforming Graph Neural Networks (GNNs) while running significantly faster.

What Problem Does This Paper Address?

Predicting traffic flow (the number of vehicles on a road segment) is vital for urban planning, but it’s notoriously difficult to do for "unseen" cities where historical data is missing.

Current solutions fall into two camps, both with major flaws:

  1. Graph Neural Networks (GNNs): While powerful, GNNs require massive amounts of training data. When trained on just a few cities (the "few-shot" scenario), they tend to overfit to specific local patterns and generalize poorly to new geographies.
  2. Traditional Simulations: These model individual agent trips from every possible origin to every possible destination. While accurate, this is a combinatorial nightmare; for large cities, enumerating all origin-destination (O-D) pairs is computationally infeasible.

The authors seek a middle ground: a model that can learn the "physics" of flow from a few examples and apply it efficiently to entirely new road networks.

Methods

The core innovation is a neural-parameterized flow simulation that avoids the brute-force enumeration of O-D pairs.

The approach relies on two clever mathematical assumptions:

  • Factorization of Demand: They assume the number of trips between an origin ($O$) and a destination ($D$) can be approximated by the dot product of two learned feature vectors: $\phi(O)^T \psi(D)$. This represents the "push" of an origin (like a residential area) and the "pull" of a destination (like a business district).
  • Efficient Approximation: Instead of calculating every path, they derive a formula that approximates flow as a weighted average of these feature vectors. The weighting is based on "progress"—how much an edge actually helps move a traveler from $O$ to $D$ relative to the estimated travel cost (modeled via Euclidean distance).

To make this work in the real world, they use three neural networks to map raw features (like road width from OpenStreetMap or population density from NASA) into the costs and embeddings used by the simulation. Crucially, these NNs are applied independently to nodes and edges, avoiding the expensive message-passing overhead of GNNs.

Datasets

The study uses a multi-modal dataset across five Texas cities:

  • Training Cities: Austin, Dallas, and San Antonio.
  • Test Cities: Houston and Fort Worth.
  • Feature Sources:
    • OpenStreetMap (OSM): Road types, lane counts, and speed limits.
  • Satellite Imagery: European Space Agency (ESA) images processed via a CNN.
  • Population Data: NASA estimates assigned to road intersections.
  • Labels: Real-world road traversal data (GPS trajectories) used to calculate Average Annual Daily Traffic (AADT).

Key Insights and Ideas

  • Asymptotic Optimality: The authors prove that their per-edge computation time of $O(n)$ is the theoretical limit. You cannot accurately predict flow without at least "looking" at every node in the graph once, and their algorithm hits that floor.
  • Simulation as a Regularizer: By forcing the neural network to operate within the structure of a flow simulation, the model is "constrained" to learn physically plausible patterns. This prevents the overfitting common in pure GNNs.
  • The "Progress" Metric: The model assigns more flow to edges that make significant progress toward a destination. This captures the intuition of "shortest path" routing without needing to run expensive pathfinding algorithms for every agent.

Key Results

  • Superior Generalization: In the test cities (Houston and Fort Worth), the proposed simulation significantly outperformed GNNs across nearly all road categories (Motorway, Primary, Secondary, etc.). For example, in Houston, the average RMSE was 102.02 for the simulation vs. 167.79 for the GNN.
  • Massive Speedups: The proposed model trained roughly 10 times faster than the GNN baseline.
  • Feasibility vs. Brute Force: A full, traditional simulation was estimated to take roughly 10 years to run for these city scales; the authors' approximation provides results in minutes.

Limitations and Future Work

The most significant limitation is the Euclidean distance assumption. Currently, the model assumes travel cost is proportional to the straight-line distance between points. This ignores the reality of one-way streets, complex highway interchanges, and varying traffic lights, which likely explains why the model still struggles with high-variance areas like highway on-ramps.

Future work aims to replace the simple Euclidean metric with a learned, neural-parameterized cost function that can handle non-planar and non-Euclidean graph geometries, potentially extending this work beyond traffic to fields like logistics or communication network routing.

Summary updated

Abstract

Accurate prediction of traffic flow is crucial for optimizing transportation networks, mitigating congestion, and improving urban planning. However, existing approaches like graph neural networks (GNNs) and traffic simulations face challenges in predicting flow for unseen road networks without historical data. Without abundant training data, GNNs often generalize poorly to new graphs, while simulations can be computationally infeasible for large-scale networks. This paper tackles the problem of few-shot traffic flow prediction in unseen road networks. We propose a novel traffic simulation algorithm that efficiently predicts flow based on node and edge attributes. Through theoretical analysis, we demonstrate our approach closely approximates true flow with asymptotically optimal runtime complexity. Experiments on real-world road networks show our simulation algorithm outperforms GNNs for predicting traffic in unseen cities after training on only three cities. While motivated by traffic prediction in road networks, we expect our contributions to have broader applicability to general graph flow prediction problems across domains.
BibTeX
@misc{boopathy2026fast,
  author = {Akhilan Boopathy and Zhiyan Yi and Gil Wolff and Amber Roy Chowdhury},
  title = {{Fast Few-Shot Graph Flow Prediction}},
  year = {2026},
  url = {https://openreview.net/forum?id=Rn6rzJBCfA},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure