Skip to content

anaderix/project-sdrg

 
 

Repository files navigation

GNN-assisted Strong Disorder Renormalization Group (SDRG)

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

📁 Repository Structure

  • 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

🚀 Getting Started

1. Clone repository

git clone https://github.com/javahedi/project-sdrg.git
cd project-sdrg

2. Create environment

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Note: All scripts should be executed from the repository root. I recommend setting:

export PYTHONPATH=$(pwd)

🧠 Train the GNN (optional)

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.py

🔁 Using the Pretrained GNN Model

A 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).


📊 Evaluate & Compare Entanglement Entropy

Exact SDRG (ground state)

python sdrg_entropy.py
python plot_entropy.py

ML-SDRG vs Exact SDRG

python ml_sdrg_entropy_ratio.py

SDRG-X (finite temperature)

python sdrgX_entropy.py
python plot_entropy_T.py

📚 Citation

If you use this code in academic work, please cite:

@software{gnn_sdrg,
  title  = {GNN-assisted Strong Disorder Renormalization Group},
  author = {xxx},
  year   = {2025}
}

📝 License

MIT License

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%