Skip to content

Commit 57c9b7b

Browse files
authored
feat: README tip (#71)
1 parent 1f0e188 commit 57c9b7b

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ In this repository, we implement FAB and provide the code to reproduce our exper
1414
details about our method and the results of our experiments, please read
1515
[our paper](https://arxiv.org/abs/2208.01893).
1616

17+
**Note**: The most important thing to get right when applying FAB to a given problem is to make sure that AIS is returning reasonable samples,
18+
where by reasonable we mean that the samples from AIS are closer to the target than the flow.
19+
See [About the code](#about-the-code) for further details on how to use the FAB codebase on new problems.
20+
21+
1722
## Methods of Installation
1823

1924
The package can be installed via pip by navigating in the repository directory and running
@@ -102,10 +107,23 @@ The main FAB loss can be found in [core.py](fab/core.py), and we provide a simpl
102107
train a flow with this loss (or other flow - loss combinations that meet the spec) in [train.py](fab/train.py)
103108
The FAB training algorithm **with** the prioritised buffer can be found in [train_with_prioritised_buffer.py](fab/train_with_prioritised_buffer.py).
104109
Additionally, we provide the code for running the SNR/dimensionality analysis with p and q set to independent Gaussians.
105-
in the [fab-jax](https://github.com/lollcat/fab-jax) repository.
110+
in the [fab-jax](https://github.com/lollcat/fab-jax-old) repository.
106111
For training the CRAFT model on the GMM problem we forked the
107112
[Annealed Flow Transport repository](https://github.com/deepmind/annealed_flow_transport).
108-
This fork may be found [here](https://github.com/lollcat/annealed_flow_transport), and may be used for training the CRAFT model.
113+
This fork may be found [here](https://github.com/lollcat/annealed_flow_transport), and may be used for training the CRAFT model.
114+
115+
116+
#### Applying FAB to a new problem:
117+
The most important thing to get right when applying FAB to a given problem is to make sure that AIS is returning reasonable samples,
118+
where by reasonable we just mean that the samples from AIS are closer to the target than the flow.
119+
Simply visualising the samples from the flow and AIS provides a good check for whether this is the case.
120+
Making sure that the transition kernel (e.g. HMC) is working well (e.g. has well tuned step size) is key for AIS to work well.
121+
122+
An additional source of instability can be if the target energy function gives spurious values to points that have extreme values.
123+
For example, evaluating the density of a zero-mean unit variance Gaussian on a point that has a value of 100 will give a spurious values.
124+
One can fix this by manually setting the log prob of the target to be -inf for regions that are
125+
known to be far outside of where samples from the target lie.
126+
109127

110128
### Normalizing Flow Libraries
111129
We offer a simple wrapper that allows for various normalising flow libraries to be plugged into

0 commit comments

Comments
 (0)