[TOC]
This repository is the official repository for the paper Cross-Problem Solving for Network Optimization: Is Problem-Aware Learning the Key? (Accepted by IEEE JSAC).
conda env create -f environment.yml
conda activate PADdatatool/ includes problem formulations, dataset creation tools, dataset preprocessing tools, and problem feature embedding creation and analysis tools.
diffusion/ includes encoder-decoder model, constraint-aware module, PAD model.
runner/ includes training and testing files of encoder-decoder model, constraint-aware module, PAD model.
scripts/ includes scripts that call each run file in runner/.
If you want to add new problems, you can add them in the problem_settings.py and diff_train_test_cfg.json according to the specified format.
# Prepare datasets
# If new problems are added, the corresponding data producing tools and related data processing functions need to be implemented
# in data_producing.py, data_preprocess.py, solution_process.py
cd datatool/
python data_producing.py
# Before this, please download the corresponding MathBert or DeepSeek model to your local machine
# Generate and store all problem embeddings
python formula_embedding.py
# Train and test
cd scripts/
./enc_dec.sh
# Add the trained encoder-decoder model path to the script and run
./cons_module.sh
# Add the trained encoder-decoder model path and constraint-aware module path to the script and run
./pad.shPlease refer to the paper for detailed data introduction. If you need data files or the results (ckpts, etc.) in the paper, please contact us by email.