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

Bug in MPE implementation #21

Closed
yoojungchoi opened this issue Aug 21, 2020 · 5 comments
Closed

Bug in MPE implementation #21

yoojungchoi opened this issue Aug 21, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@yoojungchoi
Copy link

The top-down pass to get MPE states maximizes the marginals of children nodes rather than their MPE values. In fact, there is no bottom-up maximizing pass.

https://github.com/Juice-jl/ProbabilisticCircuits.jl/blob/af25169b9715c857a3cdb4d7b7345f7e27c0d425/src/Probabilistic/ProbCircuits.jl#L505

The current test cases fail to catch this bug--it turns out the branch with the largest MPE value often has the largest marginal as well.

@guyvdbroeck
Copy link
Member

Great catch. Let's first introduce a unit test that catches this bug, before we fix it.

@khosravipasha
Copy link
Contributor

Yeah the tests were not good enough to catch this. The circuit used was too simple.
We discussed with YooJung and Nikil over email, they have the correct implementations, and we have counterexamples for unit tests, for temporary fix maybe we can push those.

MPE currently is using the old flow codes and they are going away in v0.2, probably would need to reimplement MPE. This isssue is around mostly so we don't forget about the bug.

@khosravipasha khosravipasha added the bug Something isn't working label Aug 30, 2020
@guyvdbroeck
Copy link
Member

I have removed the incorrect MPE implementation. I will close this bug report and make a new one asking to implement MPE from scratch.

@guyvdbroeck
Copy link
Member

Somehow this bug was not fixed...
there is now at least a unit test to warn us about MAP being broken.

@guyvdbroeck
Copy link
Member

The bug seems to be properly fixed now: 028d90c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants