Contrastive Learning Boosts Deterministic and Generative Models for Weather Data
Organizations: Supervised by Dr Sibo Cheng, Faculty of Engineering, Imperial College London and Dr Cesar Quilodran-Casas, The Grantham Institute for Climate Change, Faculty of Natural Sciences, Imperial College London.
Abstract
Weather data, comprising multiple variables, poses significant challenges due to its high dimensionality and multimodal nature. Creating low-dimensional embeddings requires compressing this data into a compact, shared latent space. This compression is required to improve the efficiency and performance of downstream tasks, such as forecasting or extreme-weather detection. Self-supervised learning, particularly contrastive learning, offers a way to generate low-dimensional, robust embeddings from unlabelled data, enabling downstream tasks when labelled data is scarce. Despite initial exploration of contrastive learning in weather data, particularly with the ERA5 dataset, the current literature does not extensively examine its benefits relative to alternative compression methods, notably autoencoders. Moreover, current work on contrastive learning does not investigate how these models can incorporate sparse data, which is more common in real-world data collection. It is critical to explore and understand how contrastive learning contributes to creating more robust embeddings for sparse weather data, thereby improving performance on downstream tasks. Our work extensively explores contrastive learning on the ERA5 dataset, aligning sparse samples with complete ones via a contrastive loss term to create SPARse-data augmented conTRAstive spatiotemporal embeddings (SPARTA). We introduce a temporally aware batch sampling strategy and a cycle-consistency loss to improve the structure of the latent space. Furthermore, we propose a novel graph neural network fusion technique to inject domain-specific physical knowledge. Ultimately, our results demonstrate that contrastive learning is a feasible and advantageous compression method for sparse geoscience data, thereby enhancing performance in downstream tasks.
Figures & tables
| Look-Back Window 30, Sampling Interval 1 | ||||
| RRMSE (%) T=25 | RRMSE (%) T=50 | RRMSE (%) T=75 | RRMSE (%) T=100 | |
| SPARTA - Early-Fusion HN + Cycle | 15.71 | 16.45 | 16.84 | 17.04 |
| Autoencoder | 19.73 | 20.13 | 20.09 | 20.15 |
| Look-Back Window 5, Sampling Interval 5 | ||||
| RRMSE (%) T=25 | RRMSE (%) T=50 | RRMSE (%) T=75 | RRMSE (%) T=100 | |
| SPARTA - Early-Fusion HN + Cycle | 14.89 | 17.30 | 17.74 | 17.71 |
| Autoencoder | 16.51 | 17.02 | 17.13 | 17.30 |
| Look-Back Window 5, Sampling Interval 10 | ||||
| RRMSE (%) T=25 | RRMSE (%) T=50 | RRMSE (%) T=75 | RRMSE (%) T=100 | |
| SPARTA - Early-Fusion HN + Cycle | 13.62 | 14.11 | 14.75 | 15.03 |
| Autoencoder | 18.83 | 19.28 | 19.05 | 19.05 |
| Mean Temporal Distance | Mean Cycle Distance | |
| Autoencoder | ||
| SPARTA - Early-Fusion HN + Cycle |
| Conditional Latent Diffusion | Latent Classification | ||||
| RRMSE (%) | Latent Density Score | Realism Score | Std Dev | Test Loss | |
| SPARTA - Early-Fusion HN + Cycle | 12.19 | 0.92 | 0.90 | 0.4695 | 0.1640 |
| Autoencoder | 12.15 | 0.66 | 1.13 | 0.5358 | 0.1935 |
| Look-Back Window 30, Sampling Interval 1 | ||||
| RRMSE (%) T=25 | RRMSE (%) T=50 | RRMSE (%) T=75 | RRMSE (%) T=100 | |
| SPARTA - Early-Fusion | 22.92 | 23.68 | 24.17 | 24.50 |
| SPARTA - Early-Fusion Cycle | 21.63 | 22.06 | 22.42 | 22.92 |
| SPARTA - Early-Fusion HN | 18.44 | 20.17 | 20.39 | 20.67 |
| SPARTA - Early-Fusion HN + Cycle | 15.71 | 16.45 | 16.84 | 17.04 |
| Look-Back Window 5, Sampling Interval 5 | ||||
| RRMSE (%) T=25 | RRMSE (%) T=50 | RRMSE (%) T=75 | RRMSE (%) T=100 | |
| SPARTA - Early-Fusion | 18.87 | 20.72 | 21.57 | 22.02 |
| SPARTA - Early-Fusion Cycle | 22.58 | 25.01 | 24.95 | 25.16 |
| SPARTA - Early-Fusion HN | 17.48 | 17.04 | 16.61 | 16.57 |
| SPARTA - Early-Fusion HN + Cycle | 14.89 | 17.30 | 17.74 | 17.71 |
| Look-Back Window 5, Sampling Interval 10 | ||||
| RRMSE (%) T=25 | RRMSE (%) T=50 | RRMSE (%) T=75 | RRMSE (%) T=100 | |
| SPARTA - Early-Fusion | 18.91 | 19.25 | 19.03 | 19.26 |
| SPARTA - Early-Fusion Cycle | 19.63 | 20.45 | 20.70 | 21.54 |
| SPARTA - Early-Fusion HN | 18.64 | 19.46 | 19.51 | 19.69 |
| SPARTA - Early-Fusion HN + Cycle | 13.62 | 14.11 | 14.75 | 15.03 |
| Conditional Latent Diffusion | Latent Classification | ||||
| RRMSE (%) | Latent Density Score | Realism Score | Std Dev | Test Loss | |
| SPARTA - Early-Fusion | 11.43 | 0.91 | 1.00 | 0.4265 | 0.1454 |
| SPARTA - Early-Fusion Cycle | 11.65 | 0.92 | 0.98 | 0.4456 | 0.1620 |
| SPARTA - Early-Fusion HN | 11.64 | 0.91 | 1.02 | 0.4551 | 0.1597 |
| SPARTA - Early-Fusion HN + Cycle | 12.19 | 0.92 | 0.90 | 0.4695 | 0.1640 |
| Mean Temporal Distance | Mean Cycle Distance | |
| SPARTA - Early-Fusion | ||
| SPARTA - Early-Fusion Cycle | ||
| SPARTA - Early-Fusion HN | ||
| SPARTA - Early-Fusion HN + Cycle |
| Look-Back Window 30, Sampling Interval 1 | ||||
| RRMSE (%) T=25 | RRMSE (%) T=50 | RRMSE (%) T=75 | RRMSE (%) T=100 | |
| SPARTA - Early-Fusion HN + Cycle | 15.71 | 16.45 | 16.84 | 17.04 |
| SPARTA - Late-Fusion, Self-Attention | 16.97 | 18.26 | 19.00 | 19.54 |
| SPARTA - Late-Fusion, GNN | 16.36 | 18.78 | 18.94 | 18.76 |
| Look-Back Window 5, Sampling Interval 5 | ||||
| RRMSE (%) T=25 | RRMSE (%) T=50 | RRMSE (%) T=75 | RRMSE (%) T=100 | |
| SPARTA - Early-Fusion HN + Cycle | 14.89 | 17.30 | 17.74 | 17.71 |
| SPARTA - Late-Fusion, Self-Attention | 14.02 | 15.60 | 15.99 | 15.93 |
| SPARTA - Late-Fusion, GNN | 11.41 | 11.98 | 12.56 | 12.85 |
| Look-Back Window 5, Sampling Interval 10 | ||||
| RRMSE (%) T=25 | RRMSE (%) T=50 | RRMSE (%) T=75 | RRMSE (%) T=100 | |
| SPARTA - Early-Fusion HN + Cycle | 13.62 | 14.11 | 14.75 | 15.03 |
| SPARTA - Late-Fusion, Self-Attention | 12.99 | 13.20 | 13.16 | 13.36 |
| SPARTA - Late-Fusion, GNN | 12.11 | 12.68 | 12.63 | 12.77 |
| Conditional Latent Diffusion | Latent Classification | ||||
| RRMSE (%) | Latent Density Score | Realism Score | Std Dev | Test Loss | |
| SPARTA - Early-Fusion HN + Cycle | 12.19 | 0.92 | 0.90 | 0.4695 | 0.1640 |
| SPARTA - Late-Fusion, Self-Attention | 12.47 | 0.95 | 0.91 | 0.4352 | 0.1264 |
| SPARTA - Late-Fusion, GNN | 12.23 | 0.96 | 0.90 | 0.4378 | 0.1412 |
| Mean Temporal Distance | Mean Cycle Distance | |
| SPARTA - Late-Fusion, Self-Attention | ||
| SPARTA - Late-Fusion, GNN |
Contrastive Learning
Contrastive learning trains representations by bringing related examples together and separating unrelated ones for recognition, retrieval, and transfer.
See all 322 papers