ml-jku / DIffUCO

19 stars 3 forks source link

Maximum Cut replication. #1

Open utkuumur opened 2 weeks ago

utkuumur commented 2 weeks ago

Hello,

Thank you for making the codes public! I'm interested in applying your approach to the Maximum Cut problem. However, I couldn't find any examples or documentation related to Maximum Cut tasks in the repository.

I have a custom dataset for Maximum Cut and would love to test your models on it. Would it be possible to share any pointers or parameters used for training models on Maximum Cut datasets? Even if there aren't specific examples, any guidance would be greatly appreciated.

Thank you!

sanokows commented 2 weeks ago

Hello,

Yes, the Maximum Cut Problem is implemented and you should be able to apply our method to it.

How you can do it: First, create the dataset e.g.:

cd /DatasetCreator python prepare_datasets.py --dataset BA_small--problem MaxCut --time_limits 2. 0.1 1.

if you have your own dataset you will have to implement your own class in DIffUCO/DatasetCreator/loadGraphDatasets/.

Finally, after you have created your dataset you can run experiments by specifying the dataset with --IsingMode and the EnergyDunction with --EnergyFunction.

On the example of the BA_small dataset, this would look like that:

python argparse_ray_main.py --lrs 0.002 --GPUs 0 --n_GNN_layers 8 --temps 0.6 --IsingMode BA_small --EnergyFunction MaxCut --N_anneal 2000 --n_diffusion_steps 3 --batch_size 20 --n_basis_states 10 --noise_potential bernoulli --project_name FirstRuns --seed 123

Please let me know if you encounter any problems.

Best,

Sebastian Sanokowski

On Mon, Jun 17, 2024 at 9:46 PM utkuumur @.***> wrote:

Hello,

Thank you for making the codes public! I'm interested in applying your approach to the Maximum Cut problem. However, I couldn't find any examples or documentation related to Maximum Cut tasks in the repository.

I have a custom dataset for Maximum Cut and would love to test your models on it. Would it be possible to share any pointers or parameters used for training models on Maximum Cut datasets? Even if there aren't specific examples, any guidance would be greatly appreciated.

Thank you!

— Reply to this email directly, view it on GitHub https://github.com/ml-jku/DIffUCO/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEW4JJQJ6XHFZGMNSHXRQNTZH44ITAVCNFSM6AAAAABJOUBVZSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TQMJSGYYTMMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

utkuumur commented 2 weeks ago

Thank you so much for the swift answer. I managed to make it work. Should I use the last value of the eval/best_MaxCut_Value on Wandb as the reported objective function value?

sanokows commented 2 weeks ago

eval/best_MaxCut_Value is the best MaxCut value on the validation set out of "n_basis_states" that you chose as a hyperparameter. The best network is always chosen according to the best achieved eval/mean_energy during training.

What do you mean as "objective function value"? Do you mean the function according to which you want to optimize hyperparameters? If yes, I would recommend to use "eval/best_energy", which is the average_energy obtained by the best checkpoint on the validation set.

FYI: I will be on vacation until the 2. July, so unfortunately I will not respond until that day. However, feel free to ask further questions if something is unclear.