google-deepmind / annealed_flow_transport

Apache License 2.0
49 stars 11 forks source link

Several suggestions re. SMC implementation #1

Open dblueeye opened 10 months ago

dblueeye commented 10 months ago
  1. Ineffective option hmc_steps_per_iter has no effect. In markov_kernel.py, there should be a loop and run hmc_steps_per_iter times hmc_wrapped()
  2. optimization: the normalization/log_solftmax() operation in reweight_no_flow() does not seem to be necessary. The unnormalized weights would be normalized in the end anyway in get_log_normalizer_increment_no_flow()
  3. optimization: using Eq. (15) in Del Moral, Douce, and Jasra (2006) is more optimal, as many normalization/log_solftmax() and expectation/ logsumexp() operations can be spared in between resampling events. In all the models we ran, only a few (<10) resampling events occurred.

Not sure how much juice one can squeeze out by removing these redundant operations though.

dongqian0206 commented 8 months ago

Hi @dblueeye, thank you for pointing out. You mean we can still improve the implementation for SMC?

dblueeye commented 8 months ago

Yes, as explained in the original post. I'm not sure how much more efficiency one can gain though.