Causality-inspired Federated Learning for Dynamic Spatio-Temporal Graphs

Yuxuan Liu, Wenchao Xu, Haozhao Wang, Zhiming He, Zhaofeng Shi, Chongyang Xu, Peichao Wang, Boyuan ZhangarXiv 2026

TL;DR

The paper introduces SC-FSGL, a causality-inspired federated learning framework designed for dynamic spatio-temporal graphs (like traffic networks). By explicitly separating globally shared causal knowledge from local, client-specific noise using conditional masking and a contrastive causal codebook, it achieves state-of-the-art forecasting accuracy while drastically reducing communication overhead to less than 8KB per round.

What Problem Does This Paper Address?

Spatio-Temporal Graphs (STGs) are widely used to model systems that change over both space and time, such as urban traffic flows or sensor networks. When training models on this data, privacy concerns often prevent centralizing the data, making Federated Graph Learning (FGL) an attractive alternative.

However, existing FGL methods assume that all features are equally transferable across different clients (e.g., different cities or regions). In reality, real-world STGs exhibit massive spatial and temporal heterogeneity. For instance, Los Angeles and San Francisco have entirely different road layouts (spatial) and distinct rush-hour behaviors (temporal).

Figure 1: Spatial and temporal heterogeneity across clients and shared causal patterns. (a) differences in graph struc- tures (nodes and edges). (b) variation in traffic trends at the same time. (c) similar road layouts imply shared spa- tial causal structures. (d) recurrent temporal patterns suggest shared temporal causality.

Forcing a standard federated model to average its parameters across such diverse clients triggers a vicious cycle:

  1. Representation Entanglement: General patterns get fused with local noise.
  2. Specific Interference: The global model overfits to non-transferable local signals, poisoning updates for other clients.
  3. Negative Transfer: The improperly aggregated global model degrades local performance.

This paper tackles the challenge of extracting invariant, generalizable causal knowledge across clients while suppressing client-specific noise.

Methods

The authors propose SC-FSGL (Shared Causality-inspired Federated Spatio-Temporal Graph Learning). Instead of explicitly building complex structural causal models, it uses representation-level interventions to decouple features.

Figure 3: The figure illustrates the overall architecture of SC-FSGL, including the client-side feature extraction, causal codebook construction, and global aggregation process. The model extracts spatio-temporal features, separates shared and client-specific causal variables, and leverages the causal codebook to enhance the prediction accuracy through soft intervention and contrastive representation alignment.

The framework consists of three main components:

  1. Conditional Separation Module (CSM): Operating on the assumption that shared causal factors remain stable across communication rounds while client-specific noise fluctuates, CSM uses a learnable soft mask. This mask adaptively filters the input features, separating them into shared causal features and client-specific components.
  2. Contrastive Causal Codebook: To ensure that the "shared" features are actually semantically aligned across different clients, the server maintains a global Causal Codebook (a matrix of learnable prototype vectors). Local client features are aligned with these prototypes using a contrastive loss function, pulling representations closer to matching codebook anchors and pushing them away from suboptimal ones.
  3. Invariant Risk Minimization (IRM) Regularization: The optimization objective includes an IRM-inspired penalty. This forces the client's predictor to find feature representations that perform optimally across all client environments, reinforcing the extraction of truly invariant causal mechanisms.

Communication Efficiency Boost

Crucially, instead of transmitting massive neural network weights (encoders/decoders) during federated aggregation, clients only exchange the lightweight causal codebook updates.

Datasets

The framework was evaluated on five real-world traffic forecasting datasets, where each dataset acts as an independent federated client to preserve natural spatio-temporal heterogeneity:

  • METRLA (Los Angeles highway sensors)
  • PEMSD4 (San Francisco Bay Area)
  • PEMSD7(M) (California weekdays)
  • PEMSD8 (San Bernardino Area)
  • PEMSBAY (San Francisco Bay Area)

Data on each client was partitioned into training, validation, and test sets using a 7:1:2 ratio.

Key Insights and Ideas

  • Causal Decomposition in Graphs: The core "aha" moment is realizing that graph knowledge isn't monolithic. It can be cleanly categorized into shared causal knowledge (e.g., universal traffic peak behaviors or standard highway merges) and client-specific knowledge (e.g., a unique local roundabout).
  • Intervention via Masking: Simulating causal interventions ($do$-calculus) in a decentralized setting is hard. SC-FSGL elegantly bypasses this by using client-conditioned soft masks in the latent space to simulate the attenuation of non-causal features.
  • Privacy and Efficiency Alignment: Exchanging abstract, non-instance-level causal prototypes (the codebook) rather than raw model weights serves a dual purpose. It inherently protects privacy (the process is mathematically irreversible) and slashes bandwidth requirements.

Key Results

SC-FSGL was compared against eight baselines, including standard federated learning (FedAvg, FedProx), personalized FL (FedRep, Moon), structural graph FL (FedStar), and centralized spatio-temporal models (GMAN, MegaCRN).

  • Superior Forecasting Accuracy: Across all prediction horizons (15, 30, and 60 minutes), SC-FSGL consistently achieved the lowest Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE). For 60-minute forecasts, it achieved an average MAE of 4.21, outperforming the closest federated spatio-temporal baseline, FUELS (4.51).
  • Extreme Communication Efficiency: Because only the codebook is shared ($\phi=32$ prototypes, $d=64$ dimensions), the total communication per round per client was less than 8KB—a negligible fraction of what is required to transmit full GNN weights.

Limitations and Future Work

The authors note a few areas ripe for improvement:

  • Fixed Codebook Size: The causal codebook has a fixed size and global scope, which might restrict its expressiveness if client semantics evolve drastically over time or become highly diverse.
  • Temporal Causal Drift: While the model handles spatial and temporal heterogeneity, it does not explicitly account for causal drift over long periods (e.g., permanent changes in traffic patterns due to new infrastructure).
  • Domain Scope: The empirical evaluation was strictly limited to traffic datasets. Future work should validate the framework on other spatio-temporal domains like smart grids or environmental sensor networks.

Summary updated

BibTeX
@misc{liu2026causality,
  author = {Yuxuan Liu and Wenchao Xu and Haozhao Wang and Zhiming He and Zhaofeng Shi and Chongyang Xu and Peichao Wang and Boyuan Zhang},
  title = {{Causality-inspired Federated Learning for Dynamic Spatio-Temporal Graphs}},
  year = {2026},
  eprint = {2603.29384},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.29384},
}
Figure