News for hackers. Stuff that matters.
Re:50 Years of Prolog and Beyond by YeGoblynQueenne on Sunday January 30, 2022 @05:53PM (#30142104)
Thank you for your patience! Looking at the github repository for aleph, under examples/abduce.pl I can see the source of my confusion: like you say, negative examples are now given as (FOL) atoms (Prolog "facts"). I seem to remember that in Aleph (as in Progol) examples are arbitrary definite clauses (with or without bodies) and _negative_ examples are arbitrary Horn _goals_ (from which "constraints" can be learned- i.e. Horn goals again). If that's so, then the notation "false:- <body>" is a convention to facilitate parsing of negative examples; because writing them as Horn goals (:-A,B,C...) would cause them to be parsed as directives by the Prolog interpreter- and executed...! So "false" in the head is a bit of a hack to begin with, or anyway a bit of syntactic sugar.

This actually points to a slight inconsistency between theory and practice in ILP, at least when the target language is Prolog. As a reminder, this is the standard setting for ILP: given background knowledge B and positive and negative examples E⁺, E⁻, find a hypothesis H such that H ∧ B ⊨ E⁺ and ∀e⁻ ∈ E⁻: H ∧ B ⊭ e⁻.

That makes a lot of sense intuitively: we want a correct hypothesis that entails all the positive and none of the negative examples, with respect to background knowledge. But it leaves open the question of what, exactly, are the negative examples. Especially when the target language is Prolog where we're operating under a closed-world assumption, where we only define the things we know to be true, it gets a bit tricky to explain how some examples (be they clauses or atoms) are "negative" when there's no real way to represent negation (only negation-as-failure) in a logic program (i.e. a set of definite clauses- no Horn goals in there!).

For me the ideal answer is that positive examples are atoms in the Herbrand base of a target predicate (the "top" predicate in H) that are assigned the value "true" by an interpretation ι, where H is a "name" for ι. So, negative examples must be the same as positive examples: atoms, assigned the value "false" by ι. So they should be written as atoms, without negation. That simplifies notation, allows learning a "contra-theory" (by switching the signs of E⁺ and E⁻) and avoids the need for syntactic conventions like "false:- <body>". But, my intuition is coloured from my experience with Meta-Interpretive Learning systems where examples are always atoms and learning is a proof by SLD-refutation of examples, both positive and negative (as opposed to inverse resolution which is... more complicated; let's just say that MIL makes a lot more sense to me than IR).

Digression, eh!

Re:50 Years of Prolog and Beyond by tannhaeuser on Monday January 31, 2022 @04:00AM (#30145991)
No worries, I enjoy discussing my favourite programming languages and stuff. Though tbh you lost me with those ILP details; it's not directly my area of expertise after all. I just wanted to point out that inclusion of false/0 in ISO Prolog wasn't well motivated and seems to create more trouble than it solves IMO.
Re:50 Years of Prolog and Beyond by YeGoblynQueenne on Monday January 31, 2022 @04:40AM (#30146227)
Yeah, sorry, I thought I was going a bit overboard with the ILP exposition there :)