probcomp / GenExperimental.jl

Featherweight embedded probabilistic programming language and compositional inference programming library
MIT License
17 stars 2 forks source link

Inference algorithms as probabilistic programs #60

Open marcoct opened 6 years ago

marcoct commented 6 years ago

Due to our featherweight tagging approach, I don't see a performance reason why we can't implement everything as a Gen probabilistic program, including our inference algorithms.

Figuring out the semantics of using tag on a call to generate! will be important pre-requisite for this.

A possible challenge with implementing inference algorithms as Gen probabilistic programs is that certain inference algorithms like SMC are often parallelized, and implementing parallelized probabilistic programs will require threadsafe traces, or equivalent.