alexhernandezgarcia/gflownet
Generative Flow Networks - GFlowNet
What it solves
This library provides a framework for training and extending Generative Flow Networks (GFlowNets), which are designed to sample diverse objects proportionally to a reward function. This is particularly useful for scientific discovery problems—such as the inverse design of proteins, molecules, or crystals—where the goal is to find multiple high-reward solutions rather than a single optimal one.
How it works
GFlowNets use the principle of compositionality, breaking down the generation of a complex object into a sequence of intermediate states. The library implements this through four core components:
- Environment: Defines the state and action spaces (e.g., a Tetris board or a Scrabble word).
- Proxy: A function or model that provides the reward for a given state (e.g., a scorer for word value or a pre-trained model predicting molecular energy).
- Policy Models: Neural networks (typically MLPs) that model the forward and backward transitions between states.
- GFlowNet Agent: The central orchestrator that manages interactions between the environment, policies, and proxy, and optimizes the policy using various loss functions.
Who it’s for
Researchers and developers working on probabilistic generative modeling, particularly those focused on scientific discovery, materials science, and molecular design.
Highlights
- Multiple Optimization Objectives: Supports Flow-matching (FM), Trajectory Balance (TB), Detailed Balance (DB), and Forward-looking (FL) loss functions.
- Extensible Architecture: Designed for easy implementation of custom environments and reward proxies.
- PyTorch Integration: Built on PyTorch and integrates with Weights & Biases for experiment tracking.
- Scientific Application Support: Includes specific dependencies for materials and molecular modeling (e.g., Crystal-GFN).
Related
- Project
- Project
- Project
- Project
- Project