Giter VIP home page Giter VIP logo

Comments (13)

thjashin avatar thjashin commented on May 29, 2024

Unfortunately, as most of probabilistic programming libraries, we currently only support directed models. How to deal with undirected models in a general way is still an open problem for probabilistic programming.

If you are using MRFs for structured prediction, I guess deep generative models can do equally well (even much better).

from zhusuan.

thjashin avatar thjashin commented on May 29, 2024

Wait, what kind of markov random field are you dealing with? @cjf00000 made me realize that you can deal with continuous markov random field with zs.HMC.

from zhusuan.

DanqingZ avatar DanqingZ commented on May 29, 2024

@thjashin I am having a high-order discrete Markov random field that is a part of my larger model, I am now using some MCMC techniques, but it is too slow, so I am looking for some alternatives.
Because of my assumption of the joint distribution, the naive mean field and loopy belief don't have a closed form update rule, so I am looking for some other techniques.

from zhusuan.

thjashin avatar thjashin commented on May 29, 2024

@DanqingZ Ok, that's clear. I think there are several ways to address this problem,

  • Have you heard about Perturb-and-MAP? This a trick to sample from discrete MRFs. Once you have samples, you can use EM for parameter learning.
  • Alternatively you can make use of ZhSuan. You can use the Gumbel-softmax trick, or Concrete distribution (See ZhuSuan's Concrete distribution) to transform your model into a continuous MRF, and then you can use zs.HMC to sample from it (faster than plain Gibbs since you could work in the whole latent space and use parallel chains on GPUs).

from zhusuan.

DanqingZ avatar DanqingZ commented on May 29, 2024

Thanks! let me check the links.

from zhusuan.

DanqingZ avatar DanqingZ commented on May 29, 2024

@thjashin , what is the capacity of zhusuan with continuous MRF? Can it deal with thousands of nodes or even millions of nodes? thanks.

from zhusuan.

thjashin avatar thjashin commented on May 29, 2024

That really depends on whether your tuned HMC is scalable to thousands of dimensions (whether it can efficiently explores the space). I don't have much experience for this specific scene but you could give it a try first with tens of nodes to see how it works.

On the computation side, when you have large models, you may do it with a mix of Gibbs and HMC, that is, you could divide the total nodes into several groups, and use Gibbs as an outer loop, with the inner step as a HMC iteration.

from zhusuan.

DanqingZ avatar DanqingZ commented on May 29, 2024

Hi, Could you point me to where the continuous markov random field is used? It looks to me most of the models in the tutorial uses bayes net, which is directed.

from zhusuan.

thjashin avatar thjashin commented on May 29, 2024

I may write a small prototype (with two or three nodes) when I have free time. Maybe @miskcoo can help also?

from zhusuan.

DanqingZ avatar DanqingZ commented on May 29, 2024

@thjashin @miskcoo , sure, a small prototype, with fewer than 10 nodes, is enough for me to learn. Thanks.

from zhusuan.

thjashin avatar thjashin commented on May 29, 2024

@DanqingZ See #62 for a simple gaussian markov random field with 2 nodes, using HMC to sample.

from zhusuan.

DanqingZ avatar DanqingZ commented on May 29, 2024

@thjashin Thank you! let me check it.

from zhusuan.

misssprite avatar misssprite commented on May 29, 2024

Hi, @thjashin
I plan to do some unsupervised image segmentation. It seem that MRF makes sense and I'm wondering if it can be accelerated with gpu.
What do you mean by 'deep generative models'? VAE?
Could you give me some suggestions about work on unsupervised image segmentation?

from zhusuan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.