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

Pointmass constraints with sum-product message passing (interventions Pearl) #32

Open
bartvanerp opened this issue Nov 25, 2022 · 1 comment
Assignees

Comments

@bartvanerp
Copy link
Member

bartvanerp commented Nov 25, 2022

In RxInfer, constraints are enforced after the product of two messages as f(q(x)). For sum-product message passing, this means that first all messages in the graph are computed, after which the constraint is enforced. As a result messages are passed right through the constrained edges and marginals on other edges do not reflect this constraint. Specifically when using PointMass constraints, which can be interpreted as interventions from Pearl, this behaviour is likely not desired as the purpose of the constraints is to prevent an information flow. As a result, marginals on other edges do not reflect this constraint and might be considered wrong: this should be checked.

For now there is a workaround. Consider the constrained variable z as

@constraints function constraints_z()
    q(z) :: PointMass
end

When performing SP this constraint is only enforced after all messages are computed. However, the inference procedure can be enforced to use this marginal distribution for further computations outward of this edge. This can be achieved by adding where { pipeline = RequireMarginal(interfacename) } to the nodes adjacent to the z edge, where the interfacename describes the interface connected to z.

@bartvanerp
Copy link
Member Author

@bvdmitri As discussed today, this should automatically enforce an appropriate factorization.

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

No branches or pull requests

2 participants