SqLinear: Balanced Square Partitioning Makes Linear Interaction Sufficient for Large-Scale Traffic Forecasting

Yongfeng Su, Hongwen Li, Zijian Zhang, Ziquan Fang, Lu Chen, Christian S. Jensen, Hong Gao, Yinjun HanarXiv 2026

TL;DR

Mainstream traffic forecasting models fail to scale to city-sized sensor networks due to the quadratic complexity of graph convolutions and attention mechanisms. SqLinear solves this by introducing a theoretically grounded "Square Partitioning" algorithm that groups sensors into perfectly balanced, padding-free spatial patches, paired with a Hierarchical Linear Interaction module that drops attention entirely. This combination achieves state-of-the-art accuracy with strictly linear computational complexity, significantly cutting down training time and memory usage.

What Problem Does This Paper Address?

Real-world intelligent transportation systems rely on thousands of sensors distributed across massive urban networks (for example, California's traffic monitoring system tracks nearly 20,000 nodes). Mainstream Spatio-Temporal Graph Neural Networks (STGNNs) and Transformer-based models scale quadratically ($O(N^2)$) with the number of nodes, making them computationally infeasible at city-scale.

To bypass this bottleneck, researchers have tried spatial partitioning methods (like Grid, Quadtree, or K-D Tree algorithms) to break down the network into smaller patches. However, these general-purpose geometric heuristics often produce highly irregular or imbalanced patches. This leads to severe boundary fragmentation, massive padding overheads (up to 43% in some models), and degraded accuracy because they fail to preserve local geographic context.

Comparison of spatial partitioning quality and training cost scaling across different methods.

Methods

The authors introduce SqLinear, an architecture that scales linearly ($O(N)$) with the number of nodes by combining two core innovations:

  1. Geometry-Adaptive Square Partition: Instead of rigid grids or fixed midpoints, this algorithm dynamically selects splitting axes based on the maximum spatial span and uses a capacity-aware split position. This guarantees perfectly balanced, non-overlapping, and compact spatial regions without requiring any padding operations.
  2. Hierarchical Linear Interaction (HLI): To avoid expensive $O(P^2)$ attention mechanisms across $P$ patches, HLI decouples spatial modeling into two stages:
  3. Inter-Patch Communication: Uses a low-rank projection matrix to capture global, network-wide dependencies across patches in linear time.
  4. Intra-Patch Refinement: Fuses this global context down to the individual node level using position-wise feature mixers.
Figure 2: The architecture and workflow of SqLinear.

Datasets

The model was evaluated on four large-scale traffic benchmarks from the LargeST suite:

  • SD (San Diego): 716 nodes
  • GBA (Greater Bay Area): 2,352 nodes
  • GLA (Greater Los Angeles): 3,834 nodes
  • CA (California): 8,600 nodes

All datasets were split chronologically (6:2:2) and evaluated across standard (12-step) and long-horizon (up to 672-step) forecasting tasks.

Key Insights and Ideas

  • The Low-Rank Nature of Urban Traffic: The authors analyzed real-world traffic data and found that the global dependency matrix across spatial patches is inherently low-rank—the leading singular component captures 97.3%–98.0% of the energy. This justifies replacing full self-attention with a highly efficient low-rank linear projection.
  • Geometry Matters for Tensorization: Traditional spatial indexing (like K-D Trees) creates elongated, irregular shapes that destroy local neighborhood context. By enforcing a "longest-span" split rule, SqLinear keeps patches compact and square, preserving Tobler’s First Law of Geography (nearby things are more related).
  • Padding is an Efficiency Killer: Previous patch-based models required padding irregular clusters to a uniform size to enable batch processing, adding massive computational overhead. SqLinear's capacity-aware split completely eliminates the need for padding.

Key Results

  • Accuracy: SqLinear consistently outperformed 11 state-of-the-art baselines, reducing Mean Absolute Error (MAE) by an average of 2.30% under standard settings and by up to 6.78% in long-horizon, extreme scalability settings.
  • Efficiency & Scaling: It achieved a 13.27%–30.84% reduction in training runtime. On the largest CA dataset under a massive 672-step forecasting horizon, SqLinear reduced per-sample training time by 46.78% compared to the next most efficient baseline while maintaining a compact parameter footprint (< 1.25M parameters).

Limitations and Future Work

  • Handling Anomalies: Because the Hierarchical Linear Interaction module relies on a lightweight linear structure, it may have limited capacity to capture sudden, highly non-linear disruptions, such as traffic accidents or abrupt road closures.
  • Future Directions: The authors suggest investigating hybrid linear-nonlinear architectures that maintain linear efficiency while boosting expressive power for anomalous and abrupt urban events.

Summary updated

BibTeX
@misc{su2026sqlinear,
  author = {Yongfeng Su and Hongwen Li and Zijian Zhang and Ziquan Fang and Lu Chen and Christian S. Jensen and Hong Gao and Yinjun Han},
  title = {{SqLinear: Balanced Square Partitioning Makes Linear Interaction Sufficient for Large-Scale Traffic Forecasting}},
  year = {2026},
  eprint = {2606.21072},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.21072},
}
Figure