Switching DMM in pyro?


I was looking the HMM and the DMM example. I was wondering if there is a way to combine the two to make a Switching DMM (like Switching linear dynamical system).

y1 โ€”> y2 ----> y3
z1----> z2 ----> z3

Note: there are also arrows between y2 --> z2 and y3 --> z3

i was thinking alternating optimization between the vae z --> x and a standard HMM y1 --> z (using message passing)

any pointers on that? or would you recommend using Gumbel trick to build this kind of model and train the whole thing using variational inference.


1 Like

You should be able to do something like that if you write a guide for the zs and use the dev branch of Pyro and TraceEnum_ELBO to automatically perform message-passing for the discrete variables. That stuff is unreleased and still being cleaned up and optimized, so you may find it a bit rough around the edges.

Have a look at the HMM examples on dev for some code snippets: pyro/hmm.py at dev ยท pyro-ppl/pyro ยท GitHub