Riemannian HMC Q

Diaconis et al consider the torus only for methods that generate independent samples, namely rejection sampling. The problem with a surface that is topologically distinct from R^{N} is that it can no longer be covered by a global coordinate system, so there will always be boundaries outside of which any given coordinate system will no longer be valid. For example, in a torus there will be the circle at theta = 0/theta = 2pi and phi = 0/phi = 2pi and for the sphere it will be at a pole. For independent sampling methods these defects can be ignored because they are measure zero. Markov chain Monte Carlo, however, cannot ignore them because the Markov chains have to pass through these defects in some principled fashion.

Note that Diaconis et al do discuss a Gibbs sampler on a scaled simplex, but that it isomorphic to R^{N} which is why we have a simplex type in Stan.

Long story short, Stan is currently written to assume distributions specified with densities over some version of R^{N}. Because we can’t map a topologically distinct space into R^{N} isomorphically we cannot implement distributions over those spaces without some kind of hack, such as adding auxiliary variables with an implicit prior that identifies the larger model as we do for the unit vector.