Skip to content

kimbente/mass_conservation_on_rails

Repository files navigation

Mass conservation on rails

Reproducible code for Mass Conservation on Rails - Rethinking Physics-Informed Learning of Ice Flow Vector Fields (Kim Bente, Roman Marchant, Fabio Ramos), accepted at the NeurIPS 2025 Workshop on Tackling Climate Change with Machine Learning, which will take place on 7 December 2025 in San Diego, CA, USA.

arXiv Our paper is now on arXivhttps://arxiv.org/abs/2510.06286

We propose dfNNs (divergence-free neural networks, for implementation see models.py) to reconstruct divergence-free (i.e. locally mass conserving) vector fields in 2D and compare them to PINNs and NNs on real ice flux data from Antarctica's Byrd glacier. Generating physically consistent ice flux interpolation from noisy & sparse data - without flux artefacts - is crucial for numerical ice sheet models to work, and to reliably project future sea level rise from Antarctic ice sheet contributions (see this paper for example).

intro_vis

Models

  • dfNN (NEW)
  • PINN
  • NN

All models are implemented in PyTorch with a universal NN backbone (4 hidden layers, 64 hidden units per layer), and trained with AdamW (weight decay). All training/modelling hyperparamters are specified in configs.py . These hyperparameters correspond to the optimal configuration for each model, as determined by exploratory experiments.

Ablation variants

For all three models, we evaluate the following three variants, resulting in 9 models total.

  • (base)
  • dir (directional guidance) (NEW)
  • aux (auxiliary surface inputs, i.e. surface elevation)

The three models trained with directional guidance produce the following predictions over a small, selected test region:

predictions

Set up the environment

Follow these steps to set up the environment for reproducing our experimental results.

Create a new environment named dfnn_env with Python 3.10:

conda create -n dfnn_env python=3.10

Follow the prompts to complete creation. Then activate the environment with:

conda activate dfnn_env

To install the CUDA-enabled version of PyTorch, use the appropriate build for your system. Our experiments were run using a GPU with CUDA 12.1, so we install:

pip install torch==2.2.2 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

Next, use pip to install all required packages from the requirements.txt file, as well as their dependencies. If you are just running on CPU, this will install everything you need.

pip install -r requirements.txt

Installation may take a few minutes.

Run experiments

After the python environment is activated, all 9 experiments can be run via the terminal with python mass_conservation_on_rails/run_dfNN_aux.py and equivalent. This will save the trained models to trained_models and save results to results. After all experiments are run you can use the jupyter notebook visualise_results_and_convergences.ipynb to plot model convergence and view performance metrics on test.

The following results can be reproduced:

rmse_barplot

Data

Here we provide the already preprocessed training, testing and directional guidance data in data. After the reviewing process we will link to the full reproducible preprocessing pipeline (not anonoymous). We use the following data sets:

Contact

If you have any questions, input, or ideas, please don't hesitate to contact me at kim.bente@sydney.edu.au

About

Reproducible code for "Mass Conservation on Rails -- Rethinking Physics-Informed Learning of Ice Flow Vector Fields" (accepted to NeurIPS25 CCAI workshop)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors