Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markov Blanket #37

Open
cscherrer opened this issue Sep 22, 2020 · 3 comments
Open

Markov Blanket #37

cscherrer opened this issue Sep 22, 2020 · 3 comments

Comments

@cscherrer
Copy link
Contributor

Hi @mschauer, here you said,

I looked into making interfaces to https://github.com/mschauer/ZigZagBoomerang.jl 1 . It’s kind of the master level problem for a foreign inference interface because zigzag produces a piecewise linear trace (not just samples) and it ideally wants to know your Markov blanket. For Gen/Jaynes there is some progress, more to come: probcomp/Gen.jl#281

Can you help me understand how the Markov blanket helps? For Soss models, we can statically get turn a model into a collection of conditional models as you would need for Gibbs sampling. I'd love to find opportunities to exploit this for better performance

@mschauer
Copy link
Owner

The inner working of the ZigZag:

1.) all coordinates move independently all the time up or down with unit speed and each of them has an inner clock telling it when it might need to change direction.

2.) If a clock rings, you need to check the partial derivative of the score with respect to that coordinate to see if you actually want to change directions. The partial derivative of the score depends only on neighbours in the Markov blanket/members of the same factor... So you give me a $\partial_i \log p(x)$ computed efficiently using your internal information about the layout.

3.) If the partial derivative tells you actually want to change direction, you also need to reset some clocks, but only those of the neighbours in the Markov blanket... So you tell me the Markov blanket so I don't have to reset all the clocks, only those of neighbours.

@mschauer
Copy link
Owner

PS: The most relevant formal description is in https://arxiv.org/pdf/2001.05889.pdf in sections 4.2 and 4.3

@cscherrer
Copy link
Contributor Author

Thanks! This explanation is very clear and helpful. I definitely want to get this hooked up, but maybe there's too much to it to start it right now. I'll make some more progress with MeasureTheory.jl and hopefully get back to this soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants