You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Weirdly enough this inference error phenomenon doesn't always occur when we use non-grounded predicates, e.g. in the case of the graph coloring program and the fail condition:
fail :- edge(X, Y), color(X, C), color(Y, C).
Note that this program is non-stratified.
Inference Errors by number of models
The Program with the one non-grounded predicate
The program with predicate grounded
And for the graph coloring problem
The text was updated successfully, but these errors were encountered:
After some debugging I think I have found the source of this error. The issue is that we are not grounding any rules that have probabilistic facts in the body before doing inference.
Let's look at a minimal example:
0.5::f(1).
0.5::f(2).
a :- f(X).
#query a.
When doing exact inference, we have access to each total choice and thus can do "pregrounding": we know the values of f(1) and f(2) for a given total choice and so we can add them (or not) to the program as purely logic facts. We then do the usual grounding to get a :- f(1) and a :- f(2). This is doable because we create a new logic program for each total choice and then do inference on this purely logic program.
However, when doing ASEO we fix a single program and then optimize for a given loss function (proportional to the probabilities of probabilistic facts). For this reason, we cannot do pregrounding the same way. I'm unsure on how to properly do pregrounding such that for each iteration of ASEO (i.e. each function call of pasp/caseo.c:aseo_solve) we do not generate an inconsistent program.
An obvious solution would be to take every logic rule in the program and ground them exhaustively; this is probably an inefficient and implementation heavy way to do this though.
Another would be to use gringo: first assume all probabilistic facts to be logic facts, and then ground with gringo. I believe this will generate all the grounded rules we need.
In any case, this issue will require time to both read through the clingo documentation and come up with an efficient way to code this into our current implementation.
For a very simple (and stratified) program like:
we get non-converging inference errors with ASEO as opposed to the same program with the predicate
was_deal
grounded:fail
condition:Note that this program is non-stratified.
Inference Errors by number of models
The Program with the one non-grounded predicate
The program with predicate grounded
And for the graph coloring problem
The text was updated successfully, but these errors were encountered: