-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89c1c01
commit 2a53543
Showing
1 changed file
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,39 @@ | ||
Introduction by Example | ||
======================= | ||
======================= | ||
|
||
Welcome to the introduction of **gflownet**, a library designed to facilitate training and extending Generative Flow Networks (GFlowNets) for a wide range of applications, especially in scientific discovery. GFlowNets provide a framework for probabilistic and generative modeling. | ||
|
||
What are GFlowNets? | ||
------------------- | ||
|
||
Generative Flow Networks, or GFlowNets, are a type of generative model that sample objects $x \in \mathcal{X}$ proportionally to a reward function $R(x)$. This framework is particularly suited for applications where the goal is to generate diverse high-reward samples, such as in scientific discovery. | ||
|
||
.. image:: ../figures/reward_landscape.png | ||
:align: center | ||
:width: 400 | ||
:alt: Reward landscape | ||
|
||
The model learns to transition between states in a way that the frequency of generating any given state is proportional to its reward. For instance, a GFlowNet trained on a 2D space with four high-reward areas would learn to sample those areas more frequently. | ||
|
||
Compositionality and Sampling | ||
------------------------------ | ||
|
||
GFlowNets utilize compositionality by decomposing samples $x$ into sequences of intermediate states, such as: | ||
|
||
.. image:: ../figures/tetris_flows.png | ||
:align: center | ||
:width: 400 | ||
:alt: Tetris flows | ||
|
||
In the example of generating Tetris-like boards, each board configuration is built by adding one piece at a time, starting from an empty board. Each intermediate state has potential "parents" and "children," forming a directed graph over states, where each edge (transition from one state to another) is modeled and learned. | ||
|
||
|
||
Key Components | ||
-------------- | ||
|
||
**gflownet** comprises several core components essential for its operation: | ||
|
||
- **Environment**: Defines the state and action spaces for tasks, such as the Tetris or Scrabble environments. | ||
- **Proxy**: Manages the reward function logic, essential for evaluating states. | ||
- **Policy Models**: Neural networks that model the transitions between states. | ||
- **GFlowNet Agent**: Orchestrates interactions between the environment, policies, and proxy, among other functions. |