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

"No possible resolution of perplexity" + no results #399

Open
OliverHex opened this issue Jan 12, 2024 · 11 comments
Open

"No possible resolution of perplexity" + no results #399

OliverHex opened this issue Jan 12, 2024 · 11 comments

Comments

@OliverHex
Copy link

Hi,

I have been using boomer for some ontology merging tests and sometimes I get a "No possible resolution of perplexity" message. Then boomer stops without producing any result.

What does it mean exactly and how to solve the issue ?

I am using the binary "boomer-0.2" version.

I have attached the input ptable and ontology (that contains the two ontologies that I try to merge) that leads to this issue.

The ontologies merged are the VIDO (Virus Infectious Disease Ontology) and the IDO (Infectious Disease Ontology).

The ptable file is an arbitrary probabilistic reinterpretation of an alignment generated with LOGMAP (I have converted the logmap mappings into a ptable).

I have also attached the prefixes.yaml file.

This is my command line (launched on Windows 11) :

boomer --ptable logmap-mappings-converted-to-ptable.tsv --ontology union-ido-vido-owl-functional-syntax.ofn --window-count 1 --runs 100 --prefixes prefixes.yaml --output boomer_output

Thanks for helping
_BOOMER-INPUT-DATA.zip

@balhoff
Copy link
Member

balhoff commented Jan 15, 2024

Hi! "Perplexity" refers to a data structure in the application which is a clump of mappings that it's an attempting to resolve exhaustively. So it likely means there is no mutually compatible solution among that group of mappings. I will try to run your input and see if I have any further ideas. Thanks for trying out the tool! It's very rough around the edges.

@balhoff
Copy link
Member

balhoff commented Jan 15, 2024

@OliverHex I think what might be going on is that the ontology is incoherent (i.e., contains unsatisfiable classes) even without adding any of the mappings. I loaded it into Protege to check this. I thought there was better error reporting for this situation, but it might be in a different branch I was working on. Every time boomer tries to add axioms for a mapping, it checks whether any unsatisfiable classes have been found (and so that mapping is rejected). The ontology needs to start off without any unsatisfiable classes.

@OliverHex
Copy link
Author

OliverHex commented Jan 15, 2024

Thank you very much. Indeed, I missed this issue.

When I have created the "union" ontology with the IDO and the VIDO, I didn't expect that some IRIs were identical between both ontologies. Both ontologies are consistent but each contains its own specific definitions, and when the ontologies are joined in the "union" ontology these definitions might get in conflict.

After running ELK on the union ontology, I can see that some classes (such as "drug-based immunosuppression") have super-classes that are disjoint, which leads to the inconsistency.

I will search a way to solve this issue (renaming the IRIs before alignment/union/merging, or solving the inconsistencies after creating the union ontology).

@OliverHex
Copy link
Author

OliverHex commented Jan 16, 2024

Hi,

I have modified the two original ontologies so their union in a single file is not inconsistent anymore.

Unfortunately, boomer is still stopping with a "No possible resolution of perplexity" message and does not produce any result.

Here is the input data : _BOOMER-INPUT-DATA.zip

What could possibly go wrong ?

PS :

Just for your information, this is the modification done to keep the union ontology consistent : I have suffixed all the class IRIs in the IDO with "_O1" and in the VIDO with "_O2" (while preserving the references) so that they don't merge nor conflict when creating the union ontology. The probabilistic mappings have been recreated accordingly.

@balhoff
Copy link
Member

balhoff commented Jan 17, 2024

Hi @OliverHex I think the issue is with boomer's expectations of the prefixes file. This is not really explained in the readme. In our typical inputs, the ptable TSV uses curies like IDO:0000564 instead of the full IRI. So one use of the prefixes file is to allow the expansion of those curies. But another way the prefixes are used is to add another level of constraint in the reasoning, besides preventing unsatisfiability. The constraint is that for every prefix in the prefixes file, boomer is not allowed to infer any terms using the same namespace to be equivalent classes. This is operating under the assumptions that all the terms in a given input ontology are meant to remain distinct. So there is no need to include prefixes for namespaces you aren't mapping, e.g. xsd. But now in your current file you have an entry like ido : http://purl.obolibrary.org/obo/IDO_. And in the input you have terms like http://purl.obolibrary.org/obo/IDO_0000610_O1 and http://purl.obolibrary.org/obo/IDO_0000610_O2. If these are proposed to be equivalent, they will be considered to both be in the ido namespace and that configuration will be rejected.

A workaround would be to provide an empty prefixes file (actually that confuses boomer so I provided a single irrelevant prefix in the prefixes file). If you do this, it runs successfully. However it ends up with many "singleton" cliques, so I don't think it's really checking what you want to check, which is mainly a consequence of having rewritten the input ontologies to not share an IDs. I think the best approach would be to first fix the logical issues in the previous input ontology and then try the mappings.

@OliverHex
Copy link
Author

Thank you for helping, it works.

Actually, I am heavily relying on the quality of the alignment in order to merge the ontologies.
If the alignment tool is accurate enough, it should match the renamed IRIs in a similar way as the original IRIs do.

@OliverHex
Copy link
Author

OliverHex commented Jan 19, 2024

Hi,

There is something I don't understand in Boomer (maybe a bug ?).

When I provide to Boomer the following input data :

  • the previous "union" ontology (where class IRIs have been renamed with a suffix "_O1" for one source ontology and a suffix "_O2" for the other source in order to avoid class IRI collisions).
  • the previous probabilistic mapping (produced by an alignment tool) ; but this time I have added all the entries <IRI>_O1 <IRI>_O2 0 0 1 0 between classes from both ontologies that were identified with the same <IRI> before the renaming (provided that the probabilistic mapping does not contain already an entry for <IRI>_O1 <IRI>_O2)

Boomer still stops without producing any result and with a message "No possible resolution of perplexity".

The reason is that among the newly added entries ending with 0 0 1 0 there are these two entries :
- IDO_0001007_O1 IDO_0001007_O2 0 0 1 0
- IDO_0001008_O1 IDO_0001008_O2 0 0 1 0

And when I assert manually the corresponding two "equivalence axioms" in the union ontology, it becomes inconsistent.
After removing these two entries, Boomer works correctly (it generates the boomer_output.ofn file).

The problem is that, in my understanding of how Boomer works, Boomer should test itself if these entries lead to an inconsistency.
And if so, Boomer should not create the corresponding equivalence axioms in the boomer_output.ofn ontology file (since they make the ontology inconsistent).

Am I correct ?

The data is here : 20240119-BOOMER_INPUT_DATA.zip

Oliver

PS : I have found a workaround that consists in not adding in the probabilistic mapping such entry <IRI>_O1 <IRI>_O2 0 0 1 0 if after programmatically asserting the corresponding equivalent axiom in the union ontology between <IRI>_O1 and <IRI>_O2, the union ontology becomes inconsistent (the consistency check is done with ELK). But this is just a partial solution since the whole "Boom" combinatorics is not done. And as I said, up to my knowledge, this job should be done by Boomer (since it is testing all possibilities). Am I right ?

@balhoff
Copy link
Member

balhoff commented Jan 19, 2024

@OliverHex I think the issue is the probabilities you're using for those lines. 0 0 1 0 makes the equivalence a certainty rather than probabilistic. You could try something like 0.1 0.1 0.8 0.

@OliverHex
Copy link
Author

Hi, thanks for your message.

I did these two tests that failed :

  • I have replaced 0 0 1 0 by 0.1 0.1 0.8 0
  • I have also added the two problematic entries with the probabilities 0.1 0.1 0.8 0 (the rest of the "additional entries" remaining at 0 0 1 0).

But with my workaround, it works.

My workaround preprocess the ptable so that :

  1. all "additional entries" that lead to the inconsistency of the ontology are removed
  2. all other "additional entries" keep being associated with 0 0 1 0 probabilities

But I still think that in step 1 I'm doing the job of Boomer (am I not ?)

@OliverHex
Copy link
Author

Hi,

When I say "fail" in the previous message, it means that boomer is stopping with a "No possible resolution of perplexity" message and does not produce any result.

Do you think it is a bug in boomer or am I doing something wrong ?

@balhoff
Copy link
Member

balhoff commented Jan 30, 2024

Hi @OliverHex, sorry for the delay. I suggest trying without any 0 entries in your table (e.g. 0.1 0.1 0.75 0.05. You may need to allow that there could be no valid relationship between the terms. It is expected that, based on boomer output, you need to make some axiom changes in the ontology. Typically we go back and forth between a boomer run and then either ontology change or mapping change. I hope this helps. Thanks for your patience—I hope it turns out to be useful for you.

Here is a workflow I've used to look at mappings between GO, Rhea, and EC: https://github.com/geneontology/go-rhea-boom. It leads to issues like this: geneontology/go-ontology#21796

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