Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flow_Perturbation

We introduce the flow perturbation method, which incorporates optimized stochastic perturbations into the flow. By reweighting trajectories generated by the perturbed flow, our method achieves unbiased sampling of the Boltzmann distribution with orders of magnitude speedup compared to both brute force Jacobian calculations and the Hutchinson estimator.

Flow Perturbation

Flow Perturbation++ (FP++)

FP++ Overview

Flow Perturbation++ (FP++) is a variance-reduced extension of Flow Perturbation for unbiased Boltzmann sampling with continuous normalizing flows (CNFs).
High-dimensional CNFs are limited by the computational cost of Jacobian-determinant evaluation, which requires (D) backpropagation passes through the flow layers. Existing stochastic Jacobian estimators, such as the Hutchinson trace estimator, reduce computation but introduce bias. FP++ discretizes the probability-flow ODE and performs unbiased stepwise Jacobian estimation, retaining unbiasedness while substantially reducing estimator variance.


Features

  • Unbiased stepwise Jacobian estimation via multi-step flow decomposition
  • Variance reduction compared with single-step Flow Perturbation
  • Seamless integration with SMC-based CNF sampling pipelines
  • Benchmarked on high-dimensional synthetic and molecular systems

Dependencies

Training

  • All hyper-parameters and training details are provided in config files (), and free feel to tune these parameters../configs/*.yml
python train.py ./configs/GMM10D_default.yml ./models/GMM10D
python train.py ./configs/GMM1000D_default.yml ./models/GMM1000D
python train.py ./configs/CGN_default.yml ./models/CGN
  • The model checkpoints will be saved in the specified directory,e.g., ./models/GMM10D

Metropolis Monte Carlo (MC) simulations

  • The Metropolis MC simulations are provided in the following files:
python MC.py ./configs/CGN_default.yml ./models/CGN --method 0 --M 1
python MC.py ./configs/GMM1000D_default.yml ./models/GMM1000D --method 0 --M 1
  • The first argument specifies the configuration file, while the second argument indicates the model directory. The --method option determines the approach for running the Monte Carlo (MC) simulations:
  • 0: Flow Perturbation (FP)
  • -1: Jacobian-based method
  • -2: Stochastic Normalizing Flow (SNF)
  • 1-n: Hutchinson trace estimator
  • --eps_type parameter: Defines the type of perturbation to use, such as Rademacher, Gaussian, etc.
  • --M 'Multiple Noises: Noise Vectors Generated by the FP Method.

Sequential Monte Carlo (SMC)

  • The Sequential Monte Carlo in the following files:
python SMC.py ./configs/GMM10D_default.yml ./models/GMM10D --method 0 --eps_type Rademacher --M 1
python SMC.py ./configs/GMM1000D_default.yml ./models/GMM1000D --method 0 --eps_type Rademacher --M 1
python SMC.py ./configs/CGN_default.yml ./models/CGN --method 0 --eps_type Rademacher --M 1
  • The first argument specifies the configuration file, while the second argument indicates the model directory. The --method option determines the approach for running the Sequential Monte Carlo (SMC) simulations:
    • -3: Original Flow Perturbation (FP)
    • -2: FP++
    • -1: Jacobian-based method
    • 0: Stochastic Normalizing Flow (SNF)
    • 1-n: Hutchinson trace estimator
  • --eps_type parameter: Defines the type of perturbation to use, such as Rademacher, Gaussian, etc.
  • --M 'Multiple Noises: Noise Vectors Generated by the FP Method.

Model and Data

  • The result datasets presented in the paper can be found in the Result folder of this repository.

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages