Generated quantites as a mechanism to define model-specific proposals

It just struck me that we might be able to use generated quantities to define proposals other than NUTS. We would need to adapt Stan (once) to do this and figure out how to get it to work but it would dramatically lower the bar in terms of people wanting to define alternative sampling schemes (eg something that exploits the model structure via NUTS in Gibbs or similar) and, once we had the infrastructure, would mean that trying out new proposals would require no changes to Stan’s code. Before getting someone to try this out, I’m curious if this is viewed as insane and/or if someone tried this before. Thoughts?

This seems like a language question as much as anything. Like, what language features would be needed to target a certain type of MCMC algorithm.

And so if someone is imagining an extension to the Stan language, what is the roadmap for them to experiment with that?

We do have the new stanc3 compiler which should make making changes to the language easier. So I think if this is something you wanna do, what you’ll need is docs on how the compiler works, etc, to see if it’s feasible to adapt it to your problem.

I don’t know how transferable a lot of the Stan algorithms would be for something like this.