> How are you measuring computational cost in plot (d)? Is that wall-clock time or gradient evaluations or ?
Wall clock time for running Stan, not for the additional post processing to compute expectations and the like.
> The reason I ask is two fold. First the time spent computing the gradient for a Gaussian is going to be negligible because of the simple form of the posterior and heavy optimization that's been done for a multivariate normal. The second is that Stan's I/O (rendering floating point values into plain text) is pretty inefficient and dramatically increasing the number of samples that need to be kept is going to bog things down. (How much will also depend heavily on whether you're on a SSD, HDD or a networked disk.) I think showing both (c) and (d) relative to number of gradient evaluations provides a more relevant measure of computational effort than either number of transitions or wall clock time.
None of this is going to matter in practice. Even if all of the I/O overhead could be avoided, the improvements
are marginal.
> Tangentially, Radford proposed this a while back as part of [1] (See section 6 and reference [5] therein) and found some significant benefits to basic HMC. Also interesting, was that you don't need to use the same weights which are used in the Markov transition kernel for selecting states from the trajectory. This could, for instance, allow you to store only subsets of the simulated trajectory and reduce the I/O cost.
The improvements Radford saw were only in comparison to an HMC algorithm that takes the final point of
the trajectory. Uniformly sampling from the trajectory provides the significant improvement, and then
averaging over the entire trajectory yields only a marginal improvement.
You can use different weights but you still have to ensure the correct marginal probabilities or else you’ll
bias the expectations. In particular, any subsampling would have to include random decisions as to which
states to keep which reduces the efficacy of the Rao-Blackwellization.
Because I used the marginal probabilities exactly, this is the best that you’re going to do.