Official code repository for "Constructing gauge-invariant neural networks for scientific applications", an extended abstract accepted at the AI4Science and GRaM workshops at ICML 2024.
It consists of an gauge-invariant architecture for predicting the energy configuration in the 2D XY model. The repository contains a folder data_gen wuth various files to generate and test datasets:
-
gen_gaugeis the main file: it generates a 2D XY model. It also, in the later part, adds a gauge field to the XY model, where the angles at each grid point are smoothly perturbed,gen_datasetuses the logic ofgen_gaugeto generate a whole dataset of 2D XY samples (without the smooth gauge),gen_dataset_gaugeupdates an already created dataset to have the smooth gauge,sample_datasetrandomly samples a created dataset, andtest_datasetis similar tosample_dataset, but iterates until a set number of high-, mid-, and low-energy states have been found.
The rest of the files are training and testing files for different architectures and they come in pairs. egnn_clean is from the official EGNN repo and is necessary for *_egnn.
The models that are available are:
- EGNN in
train_egnnandtest_egnn, - EMLP in
train_emlpandtest_emlp, - (Pretrained) ResNets in
train_pretrainedandtest_pretrained, and - Our proposed architecture to estimate the energy in the 2D XY model in
train_egnn_oursandtest_egnn_ours.