This repository contains implementations of exact SDRG, SDRG-X, and a Graph Neural Network (GNN) surrogate for SDRG decimation rules, applied to disordered long-range interacting spin chains.
The project combines:
- Physics-based SDRG algorithms
- Machine learning (GNNs via PyTorch Geometric)
- Post-processing and entanglement entropy analysis
- gnn_ml_train/ # GNN model, training, evaluation, dataset generation
- ml_post_processing/ # Comparison of ML-SDRG vs exact SDRG observables
- sdrg_ground_state/ # Exact SDRG ground-state entanglement entropy
- sdrg_X/ # Finite-temperature SDRG-X implementation
git clone https://github.com/javahedi/project-sdrg.git
cd project-sdrgpython -m venv venv
source venv/bin/activate
pip install -r requirements.txtNote: All scripts should be executed from the repository root. I recommend setting:
export PYTHONPATH=$(pwd)
If you want to retrain the GNN from scratch:
cd gnn_ml_train
python generate_data_train.py # data generation (see config.py)
python train_with_validation.pyA pretrained GNN checkpoint is provided and can be used out-of-the-box.
- Checkpoint:
gnn_ml_train/checkpoint.pt - Model architecture & hyperparameters:
gnn_ml_train/config.py
The checkpoint is compatible only with the model definition specified in
config.py. Modifying the architecture (e.g. hidden dimensions or number of
layers) requires retraining.
The pretrained model is automatically loaded in the ML-assisted SDRG analysis scripts (see below).
python sdrg_entropy.py
python plot_entropy.pypython ml_sdrg_entropy_ratio.pypython sdrgX_entropy.py
python plot_entropy_T.pyIf you use this code in academic work, please cite:
@software{gnn_sdrg,
title = {GNN-assisted Strong Disorder Renormalization Group},
author = {xxx},
year = {2025}
}MIT License