Compressing multidimensional weather and climate data into neural networks

Langwen Huang, Torsten Hoefler

TL;DR: Climate scientists are drowning in petabytes of simulation data. This paper introduces a novel compression method that "overfits" a coordinate-based neural network to weather data, treating the network's weights as the compressed format. This approach achieves staggering compression ratios of 300× to 3,000× while preserving critical atmospheric structures better than current state-of-the-art scientific compressors.

The Data Bottleneck in Climate Science

Numerical weather and climate simulations are among the most data-intensive tasks in modern computing, producing hundreds of terabytes to several petabytes of data. As researchers push toward kilometer-scale resolutions to better understand climate change, storage and data transfer have become massive bottlenecks.

Existing lossy compressors like SZ3 or ZFP typically use block-based approaches (similar to how JPEGs are compressed). While effective, these methods have a "hard ceiling": they struggle with very high compression ratios, often introducing visible artifacts or failing to capture information that flows across block boundaries. Furthermore, accessing a specific "slice" of data usually requires decompressing large chunks, which is inefficient for researchers who only need a subset of the data.

A Neural Representation Approach

To solve this, the authors propose a Neural Representation approach. Instead of storing values on a discrete grid, they train a neural network to act as a continuous mathematical function: mapping coordinates like time, pressure, latitude, and longitude directly to a specific data value.

Neural network architecture mapping spherical coordinates to data values.

Key technical innovations in this architecture include:

  • Spherical Coordinate Mapping: To avoid "seams" or artifacts at the poles and the international date line, the model transforms latitude and longitude into 3D Cartesian coordinates ($x, y, z$) on a unit sphere. This naturally enforces periodic boundary conditions.
  • Fourier Features: Standard neural networks have a "spectral bias," meaning they struggle to learn high-frequency details. The authors pass the coordinates through a Fourier feature layer to help the network capture sharp gradients and fine-scale weather patterns.
  • Architecture: The backbone is a series of fully connected blocks (FCBlocks) with skip connections, Batch Normalization, and GELU activations.
  • Post-Training Quantization: Once the network has "memorized" the data, its weights are converted from 32-bit floats to 16-bit floats, doubling the compression ratio with negligible loss in accuracy.

Key Insights: Overfitting as a Feature

  • Overfitting is the Goal: In most machine learning contexts, overfitting is a failure. Here, it is the exact objective. The more the network overfits the specific dataset, the more accurately its weights represent the original data.
  • Continuous vs. Discrete: Because the data is now a mathematical function rather than a grid, researchers get "free interpolation." You can query the neural network for a value at any coordinate, even if it wasn't a point on the original grid.
  • Global Context: Unlike block-based compressors, the neural network "sees" the entire dataset globally. This allows it to capture large-scale atmospheric structures (like pressure systems) more faithfully than local spline-based methods.
  • The "Free" 4× Gain: The authors found that when they increased the spatial resolution of the source data by 4×, the neural network didn't need 4× more parameters to maintain the same error level. This suggests that neural networks are exceptionally good at exploiting the inherent redundancy in high-resolution physical data.

Results: Extreme Compression Meets High Fidelity

The study evaluated the method using the ERA5 dataset (the gold standard for atmospheric reanalysis), specifically looking at Geopotential and Temperature data across various spatial and temporal resolutions.

  • Extreme Compression: The method achieved usable compression ratios ranging from 300× up to 3,000×.
  • Superior Accuracy: At high compression ratios (e.g., >400×), the neural method consistently outperformed the state-of-the-art SZ3 compressor in terms of Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE).
Visual comparison showing the neural network (NN) preserving large-scale structures better than SZ3, despite a much higher compression ratio.
  • Downstream Success: To prove the compressed data retains necessary physical signals, the authors used a 790× compressed dataset to train a WeatherBench forecasting model. The resulting forecast error increased by less than 2% compared to a model trained on raw data.
  • Random Access: Accessing random subsets of data is significantly faster and more parallelizable on GPUs compared to traditional compression formats.

Limitations and the Path Forward

While groundbreaking, the method has limitations. The biggest drawback is the "encoding" time. Training the network to overfit a large dataset takes about 8 hours on high-end GPUs, whereas traditional compressors take only minutes on a CPU. Additionally, because the model acts as a low-pass filter, it tends to "smooth out" the most extreme values, such as the intense, localized pressure drop at the center of a hurricane.

Future work will explore meta-learning—training a model to learn how to compress other models—to drastically speed up the initial encoding time. The authors also aim to expand the method to handle more complex, irregular data types like satellite imagery and weather station observations, further democratizing access to high-resolution climate data.

Summary updated

BibTeX
@inproceedings{huang2023compressing,
  author = {Langwen Huang and Torsten Hoefler},
  title = {{Compressing multidimensional weather and climate data into neural networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=Y5SEe3dfniJ},
}
Figure