SSIN: Self-Supervised Learning for Rainfall Spatial Interpolation

Jia Li, Yanyan Shen, Lei Chen, Charles Wang Wai Ng

Abstract

Accurate rainfall spatial interpolation is vital for flood warnings and hydrological modeling. Traditional methods often rely on rigid mathematical assumptions that fail to capture dynamic weather patterns. This paper presents the Self-Supervised Interpolation Network (SSIN), which leverages a "SpaFormer" architecture to treat spatial interpolation as a masked language modeling task. By incorporating spatial relative position embeddings and shielded attention, SSIN achieves state-of-the-art performance across multiple real-world datasets.

The Challenge of Rainfall Interpolation

Spatial interpolation estimates rainfall at unobserved locations based on sparse station data. Traditional techniques like Kriging assume spatial correlation is a simple function of distance. However, rainfall is highly dynamic; a storm might affect two distant stations while leaving an intermediate one dry. Modern Graph Neural Networks (GNNs) often struggle because they require fixed adjacency matrices that cannot adapt to these shifting patterns.

Rainfall spatial interpolation examples showing dynamic trends and the need for data-driven inference.

Methodology: The SpaFormer Architecture

The authors introduce SSIN, powered by the SpaFormer architecture, which adapts Transformer logic for geographic contexts.

Mask-and-Recover Training

Borrowing from Natural Language Processing (NLP), SSIN is trained by randomly masking rainfall values from known stations and tasking the model with reconstructing them. This "Cloze task" approach allows the model to learn the latent spatial "context" of rainfall.

Comparison between the NLP Cloze task and the proposed spatial interpolation task.

Spatial Relative Position Embedding (SRPE)

Instead of absolute coordinates, SpaFormer calculates the distance and azimuth (direction) between every pair of locations. These are transformed into embeddings, allowing the model to capture directional weather fronts and terrain-driven rainfall patterns.

Shielded Attention and Numerical Embeddings

To handle continuous data, a two-layer Fully Connected Network (FCN) with bias maps rainfall values into a latent space. The inclusion of bias is critical; it ensures that "zero rainfall" is processed as a meaningful signal rather than an absence of signal. Additionally, a "Shielded Attention" mechanism ensures that unobserved locations do not influence the representations of other nodes, maintaining prediction consistency.

Key Results and Insights

SSIN was evaluated on rainfall datasets from Hong Kong (HK) and Baden-Württemberg (BW), as well as a traffic speed dataset (PEMS-BAY).

  • Superior Accuracy: On the HK dataset, SSIN reduced RMSE by 12.28% and MAE by 6.97% compared to the best traditional baseline.
  • Generality and Transferability: The model outperformed state-of-the-art GNNs on traffic data and showed strong cross-regional performance, suggesting it learns fundamental spatial physics.
  • Efficiency: A customized CUDA kernel using TVM enables inference in just ~2.6ms per sequence.

Conclusion

SSIN demonstrates the power of self-supervised learning for spatial interpolation. By treating geographic data like a language, it captures complex, dynamic patterns that traditional and graph-based methods miss. Future work will explore integrating temporal sequences to create a full spatiotemporal model.

Summary updated

BibTeX
@article{li2023ssin,
  author = {Jia Li and Yanyan Shen and Lei Chen and Charles Wang Wai Ng},
  title = {{SSIN: Self-Supervised Learning for Rainfall Spatial Interpolation}},
  journal = {Proc. ACM Manag. Data},
  year = {2023},
  doi = {10.1145/3589321},
}
Figure