GFNOrg / torchgfn

GFlowNet library
https://torchgfn.readthedocs.io/en/latest/
Other
215 stars 25 forks source link

About having graph in the States #153

Open wang422003 opened 8 months ago

wang422003 commented 8 months ago

Hello and thank you for developing the torchgfn package! It's been a fantastic resource, and I appreciate all the work that's gone into it.

I'm exploring the package and am particularly interested in integrating graph data within the states, specifically including node features and the adjacency matrix. However, I'm currently unsure of the best approach to achieve this within the framework of torchgfn.

Could you provide any guidance, instructions, or suggestions on how to incorporate graph structures into the states? Any help or pointers towards relevant documentation or examples would be greatly appreciated!

josephdviviano commented 7 months ago

This is something we're also interested in building into torchgfn.

I believe we would need to take inspiration from https://github.com/recursionpharma/gflownet to do it properly.

This is one of a few major features that need to be added to the package for it to be fully featured. Would you be interested in assisting on the development of this?

wang422003 commented 7 months ago

Many thanks for the reply! I will definitely check the link.

I am really interested in GFlowNet and interested in assisting on the development of getting graphs in the states!

josephdviviano commented 7 months ago

@saleml for reference : https://github.com/recursionpharma/gflownet/blob/ef5f2cbb14f3f35bc2b95d33b9b3cf86cc558d17/src/gflownet/envs/graph_building_env.py#L18

@wang422003 for now, if you want a library that works well with graphs, you can check the above work from Emmanuel Bengio's group at Recursion. We plan to support similar functionality but it will take us some time to decide exactly how.

wang422003 commented 7 months ago

@wang422003 for now, if you want a library that works well with graphs, you can check the above work from Emmanuel Bengio's group at Recursion. We plan to support similar functionality but it will take us some time to decide exactly how.

Many thanks for sharing. Actually, I checked the link and figured out that their current implementation only supports undirected graphs. So I am now thinking about how to make it work for directed graphs as well.

josephdviviano commented 7 months ago

We would love to collaborate with you on this, this would be quite useful for multiple domains and some older work that was never successfully integrated e.g., https://github.com/GFNOrg/torchgfn/pull/26

It seems very likely we should be heavily influenced by this project https://github.com/tristandeleu/jax-dag-gflownet