PartitionLink, biological pathways, human bodies, etc.

216 views
Skip to first unread message

Ben Goertzel

unread,
Jul 21, 2017, 10:41:25 PM7/21/17
to opencog, Michael Duncan
Some interesting representational issues have come up in the context
of Atomspace representation of pathways, which appear to have more
general implications…

It seems the semantics we want for a biological pathway is sort of
like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
the same sense that “the human body is a set of organs: brain, heart,
lungs, legs, etc.”

First of all it seems what we have here is a part of relationship… maybe we want

PartLink
ConceptNode “heart”
ConceptNode “human-body”

and

PartLink
>relationship<
>pathway<

PartLink and PartOfLink have come and gone in
OpenCog/Novamente/Webmind history...

An argument that PartLink should have fundamental status and a
well-defined fuzzy truth value is given in this paper:

https://www.academia.edu/1016959/Fuzzy_mereology

However what we need for biological pathways and human bodies seems
like a bit more. We want to say that a human body consists of a
certain set of parts... not just that each of them is a part... We're
doing a decomposition.

One way to do this would be

PartitionLink
ConceptNode “human-body”
ListLink
ConceptNode “legs”
ConceptNode “arms”
ConceptNode “brain”
etc.

Relatedly, we could also have

OverlappingPartitionLink
C
L

if we want to encompass cases where the partition elements in L can overlap; or

CoveringLink
C
L

if we want to encompass cases where the partition elements in L can
overlap, AND the elements in L may encompass some stuff that’s not in
C

For the pathway case, we could then say

PartitionLink
ConceptNode “Krebs cycle”
ListLink
>relationship 1<
>relationship 2<
etc.


Now this solves the semantics problem but doesn’t solve the problem of
having a long ListLink…. A biological pathway might have 100s or
1000s of relationships in it, and we don't usually want to make lists
that big in the Atomspace...

To solve this we could do something like (for the human body case)

PartitionLink
ConceptNode “human-body”
PartitionNode “body-partition-1”

PartitionElementLink
PartitionNode “body-partition-1"
ConceptNode “legs”

PartitionElementLink
PartitionNode “body-partition-1"
ConceptNode “arms”

etc.

and similarly (for the biological pathway case)

PartitionLink
ConceptNode “Krebs cycle”
PartitionNode “krebs-partition-1”

PartitionElementLink
PartitionNode “krebs-partition-1"
>relationship 1<

PartitionElementLink
PartitionNode “krebs-partition-1”
>relationship 2<

...

There could be some nice truth value math regarding these, e.g. we
could introduce Ellerman's "logical entropy" which is really a
partition entropy. There are also connections with some recent
theoretical work I've been doing on "graphtropy" (using "distinction
graphs" that generalize partitions), which I'll post a paper on
sometime in the next week or two.... But that will be another email
for another day...

-- Ben


--
Ben Goertzel, PhD
http://goertzel.org

"I am God! I am nothing, I'm play, I am freedom, I am life. I am the
boundary, I am the peak." -- Alexander Scriabin

Linas Vepstas

unread,
Jul 31, 2017, 5:55:16 PM7/31/17
to opencog, Michael Duncan
Hi Ben, Mike,

As mentioned earlier, there are several problems with this format.  One is the "oops I forgot to mention xyz in the list" or "gosh I should have left out pqr" and this becomes a big problem:  you have to delete the PartitionLink, delete the ListLink, create a new list and partition.  In the meanwhile, some other subsystem might be holding a handle to the old, now-wrong PartitionLink, and there is no effective way of announcing "hey stop using that old thing, get my new thing now".

A second problem is that the above doesn't have anywhere to hang addtional data: e.g. "legs are a big part of the human body, having a mas of nearly half of the body." You can't just slap that on as a (truth)value, cause there's no where  to put that value.

Third problem is that large list-links are hard to handle in the pattern matcher. Its much much harder to write a query of the form  "find me all values of $X where


PartitionLink
   ConceptNode “human-body”
   ListLink
      ConceptNode “legs”
      VariableNode  “$X”
      ConceptNode “brain”

because, ... well the ListLink is an ordrerd link, not an unordered link. If you forget to include the pqr (added above) then the search will fail. You could try to use unordered links and globnodes, but these lead to other difficulties, including the n! possible permutations of an unordered link become large n-factorial large when the unordered link has n items in it.   Recall that old factorial-70 trick used to make calculators overflow.

In general, any link with more than 3 or 4 or 5 items in it is bad news. This is a generic statement about knowledge representation in opencog.
Yeah, sure. Not sure why the existing MemberLink is not sufficient for your purposes. The MemberLink has reasonably-well-defined semantics, there are already rules for handling it in PLN (or there will be rules -- I think its something Nil has thought about)   I'm not clear on why you'd want to invent something that is just like MemberLink but is different.
 

...

There could be some nice truth value math regarding these, e.g. we
could introduce Ellerman's "logical entropy" which is really a
partition entropy.   There are also connections with some recent
theoretical work I've been doing on "graphtropy" (using "distinction
graphs" that generalize partitions), which I'll post a paper on
sometime in the next week or two....   But that will be another email
for another day...

Yeah graphical-entropy is something that I keep trying to work on, except that every new urgent disaster of the day distracts me from it.

--linas

-- Ben

Ben Goertzel

unread,
Aug 1, 2017, 2:24:55 AM8/1/17
to opencog, Michael Duncan
Hi Linas,

The difference between PartitionLink and MemberLink is pretty obvious,
right? A PartitionNode defines a partition of the set denoted by a
ConceptNode. The partition elements that are linked to the
PartitionNode by a PartitionLink can of course also be linked via a
MemberLink to the ConceptNode that corresponds to the PartitionNode.
However, the unique semantics of a partition is that of mutual
exclusivity and completeness, i.e. the intersection between two
distinct elements of the partition is null, and the union of the
elements of the partition is the set being partitioned. This
semantics is implicit in PartitionNode, whereas if you just use
MemberLink you'd need to spell out this "partition" semantics using a
bunch of AndLinks each time...

As a world-class advocate of the partition function I think you may
like PartitionNode after you reflect on it infinitesimally more...

-- ben
> --
> You received this message because you are subscribed to the Google Groups
> "opencog" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to opencog+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/CAHrUA35kQx%3DyDcLTynrThvi%3DrAVa15D-1PSwZpK_37Q%3DjZhcfw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Nil Geisweiller

unread,
Aug 1, 2017, 7:04:11 AM8/1/17
to ope...@googlegroups.com
SUMO uses partitions

http://sigma.ontologyportal.org:8080/sigma/Browse.jsp?kb=SUMO&lang=EnglishLanguage&flang=SUO-KIF&term=partition

it feels right we'd have a partition link (which is just a shorthand for
exclusion * completeness as Ben said).

>> As mentioned earlier, there are several problems with this format. One is
>> the "oops I forgot to mention xyz in the list" or "gosh I should have left
>> out pqr" and this becomes a big problem: you have to delete the
>> PartitionLink, delete the ListLink, create a new list and partition. In the
>> meanwhile, some other subsystem might be holding a handle to the old,
>> now-wrong PartitionLink, and there is no effective way of announcing "hey
>> stop using that old thing, get my new thing now".

This is a recurrent problem, but I think that if a partition turns out
to be false then its TV can be brought down, and a new partitioning fact
can be created with a high TV.

Nil

Linas Vepstas

unread,
Aug 3, 2017, 3:07:14 AM8/3/17
to opencog, Michael Duncan
On Tue, Aug 1, 2017 at 1:24 AM, Ben Goertzel <b...@goertzel.org> wrote:
Hi Linas,

The difference between PartitionLink and MemberLink is pretty obvious,
right? 

Not to me ... I realize now that perhaps you mean "SubSetLink" and I thought we had one of those, but perhaps it has different semantics.  See below.

 
 A PartitionNode defines a partition of the set denoted by a
ConceptNode.  The partition elements that are linked to the
PartitionNode by a PartitionLink can of course also be linked via a
MemberLink to the ConceptNode that corresponds to the PartitionNode.
However, the unique semantics of a partition is that of mutual
exclusivity and completeness, i.e. the intersection between two
distinct elements of the partition is null, and the union of the
elements of the partition is the set being partitioned.   

OK. well .. where, exactly, does my hip end, and my body start?

In intro-to-diff-geom there is a concept of "partition of unity" which is a collection of functions that sum up to one. and  each one individually smoothly interpolates between zero and one. They indicate a general area. They do NOT have a null intersection -- they can have a big huge sloppy intersection, but that works just fine because they have derivatives that cancel out (because the derivative of one is zero).

Practically, a problem with partitions is, what do you do if you forget to specify one of the parititions? should one assume that the unspecified part is "everything else?"

There's also a problem of editing: what if, half-way through, you want to change the partition? Can you? should you? should users instead be told that a partition, once-created, is immutable, so you can only create and destroy them?

Do you truly need a partition link? I mean -  I invent new link types all the time, since that's usually pretty cheap. But I also do not expect my new link types to work with PLN. In this case, don't you want pln interop?

An alternate way of thinking about partitions is as "coloring". Pick a set, pick N colors, and then insist that every member of the set must be colored with one of the N colors.  Then coloring is a lot like partitioning. e.g.

ColorLink
      ColorNode "Red"
      SomeAtom

or maybe

EvaluationLink
     ColorNode "red"
     SomeAtom


Color names could, of course, be anything: e.g. the names of the partitions. 

In one sense, colorings are identical to partitions; on the other hand, they can feel "more general" because you can insist or demand that certain properties of colorings hold, e.g. ramsey theory and reverse mathematics.

You could *force* aka gaurantee uniqueness of color assignment by using a StateLink:

StateLink
     Some Atom
     ColorNode "red"

The atomspace automatically gaurantees that one and only one color can be assigned. (although it can be changed)  The UniqueLink allows only one assignment, and it cannot be changed.  These are nice, because they help avoid programmer error. by offering automatic guarantees.

You don't have to use atoms for this, either. You could use values.   Recall, values are almost just like atoms, except that you can't put them into the atomspace, and you cannot pattern-match or patttern-mine them.   But you can store color or partition data in values, if you wanted to.  Note that values *can* hold atoms!  There is a LinkValue that is like a link, but it can hold atoms or values or a mixture of both.

--linas



 

> To post to this group, send email to ope...@googlegroups.com.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit
--
Ben Goertzel, PhD
http://goertzel.org

"I am God! I am nothing, I'm play, I am freedom, I am life. I am the
boundary, I am the peak." -- Alexander Scriabin

--
You received this message because you are subscribed to the Google Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.

Nil Geisweiller

unread,
Aug 4, 2017, 4:07:40 AM8/4/17
to ope...@googlegroups.com, Linas Vepstas, Michael Duncan
On 08/03/2017 10:06 AM, Linas Vepstas wrote:
> There's also a problem of editing: what if, half-way through, you want
> to change the partition? Can you? should you? should users instead be
> told that a partition, once-created, is immutable, so you can only
> create and destroy them?

But isn't the same true for almost any link?

(Equivalence (stv 1 1) A (Or B C))
(And (stv 0 1) B C)

is immutable too, and could be equivalent to

(Partition (stv 1 1) A (Set B C))

saying that A is partitioned into block B and C.

>
> Do you truly need a partition link? I mean - I invent new link types
> all the time, since that's usually pretty cheap. But I also do not
> expect my new link types to work with PLN. In this case, don't you want
> pln interop?

I agree about not creating new links up the wazzoo, it must be carefully
thought. However, you don't necessarily need to upgrade PLN to reason on
new links, if you can express the semantics of a new link as a
combination of old links, all you need is to write a higher order fact
such as

EquivalenceScope (stv 1 1)
$A $B $C
Partition $A (Set $B $C)
And
Equivalence $A (Or $B $C)
And $B $C

to enable PLN to reason about it.

Nil
> > email to opencog+u...@googlegroups.com
> <mailto:opencog%2Bunsu...@googlegroups.com>.
> > To post to this group, send email to ope...@googlegroups.com <mailto:ope...@googlegroups.com>.
> <https://groups.google.com/group/opencog>.
> <https://groups.google.com/d/msgid/opencog/CAHrUA35kQx%3DyDcLTynrThvi%3DrAVa15D-1PSwZpK_37Q%3DjZhcfw%40mail.gmail.com>.
> > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>
>
>
> --
> Ben Goertzel, PhD
> http://goertzel.org
>
> "I am God! I am nothing, I'm play, I am freedom, I am life. I am the
> boundary, I am the peak." -- Alexander Scriabin
>
> --
> You received this message because you are subscribed to the Google
> Groups "opencog" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to opencog+u...@googlegroups.com
> <mailto:opencog%2Bunsu...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> <https://groups.google.com/group/opencog>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/CACYTDBdm6M1y18G%3DQi%3D_rjJcdrEb5eAmx8ntxffKoRw_dG1OYw%40mail.gmail.com
> <https://groups.google.com/d/msgid/opencog/CACYTDBdm6M1y18G%3DQi%3D_rjJcdrEb5eAmx8ntxffKoRw_dG1OYw%40mail.gmail.com>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "opencog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to opencog+u...@googlegroups.com
> <mailto:opencog+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/CAHrUA34XVDQHNeYjb4r9eFjmrZxN%3DfNmE6wDQTV%2B__cJpEF3qw%40mail.gmail.com
> <https://groups.google.com/d/msgid/opencog/CAHrUA34XVDQHNeYjb4r9eFjmrZxN%3DfNmE6wDQTV%2B__cJpEF3qw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Ben Goertzel

unread,
Aug 4, 2017, 4:38:03 AM8/4/17
to opencog, Linas Vepstas, Michael Duncan
Yes!
> email to opencog+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/8aa12595-28a0-f983-be51-db8c8d3719c3%40gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



Michael Duncan

unread,
Aug 4, 2017, 1:07:18 PM8/4/17
to opencog, mjsd...@gmail.com, linasv...@gmail.com
i actually think an AndLink-like semantics better fits biochemical pathways at a computationally tractable level than partitions in that below the level of a whole organism, where one pathway ends and another begins is largely arbitrary.  also,  if one link is missing then the whole thing doesn't work but the last bit of a dead end might be the start of another path that goes to the same place, more like words and phrases that can be rearranged and swapped in different ways to say the same thing.  linus idea of AndMemberLinks and OrMemeberLinks would get around the size limitation and also seem like they would be useful for reasoning on moses models.

Linas Vepstas

unread,
Aug 5, 2017, 7:12:47 PM8/5/17
to Nil Geisweiller, opencog, Michael Duncan
On Fri, Aug 4, 2017 at 3:07 AM, Nil Geisweiller <ngei...@googlemail.com> wrote:
On 08/03/2017 10:06 AM, Linas Vepstas wrote:
There's also a problem of editing: what if, half-way through, you want to change the partition? Can you? should you? should users instead be told that a partition, once-created, is immutable, so you can only create and destroy them?

But isn't the same true for almost any link?

No. I think you're missing the point. Equivalence is normally between pairs of things, and that is very manageable.  You can say a=b and say b=c and then later change your mind about b=c without affecting a=b at all.  That is very different than saying {a,b,c} is an equivalence-set.

That is, the atomspace is optimized for relations between pairs of things, or maybe triples. quadruple-relations are very rare.  By contrast, sets with hundreds or thousands or millions of members are not uncommon.

We are not the first to deal with this.  So both SQL and no noSQL are  are both very explicitly be a "relational algebras", and are very explicitly not "set theories". In SQL, the table forms a "set", and it is very easy to add/remove rows in that set. A single row is a relation.  The table of employees has one row per employee. It does NOT have all of the employees jammed into one big giant arbitrary-length row.
 

(Equivalence (stv 1 1) A (Or B C))
(And (stv 0 1) B C)

Both AndLink and OrLink are set-like in their behavior, and this is a problem.  They are not relational, as currently defined.

In SQL, And and Or's are handled between rows, (as inner/outer joins) and not within the same row.
 

is immutable too, and could be equivalent to

(Partition (stv 1 1) A (Set B C))

saying that A is partitioned into block B and C.


Do you truly need a partition link? I mean -  I invent new link types all the time, since that's usually pretty cheap. But I also do not expect my new link types to work with PLN. In this case, don't you want pln interop?

I agree about not creating new links up the wazzoo, it must be carefully thought. However, you don't necessarily need to upgrade PLN to reason on new links, if you can express the semantics of a new link as a combination of old links, all you need is to write a higher order fact such as

EquivalenceScope (stv 1 1)
  $A $B $C
  Partition $A (Set $B $C)
  And
    Equivalence $A (Or $B $C)
    And $B $C

to enable PLN to reason about it.

I don't want to argue about it here, but I think that turning everything explicitly into a scope link is a minor mistake.  I think it's just fine to have scoping be implicit.  We don't need to invent a brand new BlahScopeLink for each and every BlahLink.   Just pretend that BlahLink is a BlahScopeLink with zero variables. That's all. Don't special-case zero variables as being different from more-than-zero variables. 

--linas

Nil

    <mailto:opencog%2Bunsubscribe@googlegroups.com>.
    > To post to this group, send email to ope...@googlegroups.com <mailto:opencog@googlegroups.com>.




    --
    Ben Goertzel, PhD
    http://goertzel.org

    "I am God! I am nothing, I'm play, I am freedom, I am life. I am the
    boundary, I am the peak." -- Alexander Scriabin

    --
    You received this message because you are subscribed to the Google
    Groups "opencog" group.
    To unsubscribe from this group and stop receiving emails from it,

    To post to this group, send email to ope...@googlegroups.com
    <mailto:opencog@googlegroups.com>.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com <mailto:opencog+unsubscribe@googlegroups.com>.
To post to this group, send email to ope...@googlegroups.com <mailto:opencog@googlegroups.com>.

Nil Geisweiller

unread,
Aug 6, 2017, 3:09:47 AM8/6/17
to linasv...@gmail.com, opencog, Michael Duncan
Linas,

On 08/06/2017 02:12 AM, Linas Vepstas wrote:
> No. I think you're missing the point. Equivalence is normally between
> pairs of things, and that is very manageable. You can say a=b and say
> b=c and then later change your mind about b=c without affecting a=b at
> all. That is very different than saying {a,b,c} is an equivalence-set.
>
> That is, the atomspace is optimized for relations between pairs of
> things, or maybe triples. quadruple-relations are very rare. By
> contrast, sets with hundreds or thousands or millions of members are not
> uncommon.
>
> We are not the first to deal with this. So both SQL and no noSQL are
> are both very explicitly be a "relational algebras", and are very
> explicitly not "set theories". In SQL, the table forms a "set", and it
> is very easy to add/remove rows in that set. A single row is a
> relation. The table of employees has one row per employee. It does NOT
> have all of the employees jammed into one big giant arbitrary-length row.
>
>
> (Equivalence (stv 1 1) A (Or B C))
> (And (stv 0 1) B C)
>
>
> Both AndLink and OrLink are set-like in their behavior, and this is a
> problem. They are not relational, as currently defined.

Regarding set-like-behavior of And and Or, I suppose doing

(And A (And B C))

instead of

(And A B C)

wouldn't fix it, right?

I do sorta feel what you mean about keeping relationships small, but I
don't concretely understand why its a problem (letting aside that the
backing store cannot store more than 330 outgoins).

> I agree about not creating new links up the wazzoo, it must be
> carefully thought. However, you don't necessarily need to upgrade
> PLN to reason on new links, if you can express the semantics of a
> new link as a combination of old links, all you need is to write a
> higher order fact such as
>
> EquivalenceScope (stv 1 1)
> $A $B $C
> Partition $A (Set $B $C)
> And
> Equivalence $A (Or $B $C)
> And $B $C
>
> to enable PLN to reason about it.
>
>
> I don't want to argue about it here, but I think that turning everything
> explicitly into a scope link is a minor mistake. I think it's just fine
> to have scoping be implicit. We don't need to invent a brand new
> BlahScopeLink for each and every BlahLink. Just pretend that BlahLink
> is a BlahScopeLink with zero variables. That's all. Don't special-case
> zero variables as being different from more-than-zero variables.

EquivalenceScope (stv 1 1)
<vardecl>
P
Q

is merely sugar syntax for

Equivalence (stv 1 1)
Lambda <vardecl> P
Lambda <vardecl> Q

This sugar syntax is mostly useful for humans, because <vardecl> is not
duplicated in the AtomSpace anyway.

Nil
> <mailto:linasv...@gmail.com <mailto:linasv...@gmail.com>>>
> wrote:
> > Hi Ben, Mike,
> >
> > On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel
> <b...@goertzel.org <mailto:b...@goertzel.org>
> > email to opencog+u...@googlegroups.com
> <mailto:opencog%2Bunsu...@googlegroups.com>
> <mailto:opencog%2Bunsu...@googlegroups.com
> <mailto:opencog%252Buns...@googlegroups.com>>.
> > To post to this group, send email to
> ope...@googlegroups.com <mailto:ope...@googlegroups.com>
> <mailto:ope...@googlegroups.com <mailto:ope...@googlegroups.com>>.
> send an email to opencog+u...@googlegroups.com
> <mailto:opencog%2Bunsu...@googlegroups.com>
> <mailto:opencog%2Bunsu...@googlegroups.com
> <mailto:opencog%252Buns...@googlegroups.com>>.
> To post to this group, send email to
> ope...@googlegroups.com <mailto:ope...@googlegroups.com>
> <mailto:ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>>.
> it, send an email to opencog+u...@googlegroups.com
> <mailto:opencog%2Bunsu...@googlegroups.com>
> <mailto:opencog+u...@googlegroups.com
> <mailto:opencog%2Bunsu...@googlegroups.com>>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>
> <mailto:ope...@googlegroups.com <mailto:ope...@googlegroups.com>>.
> Visit this group at https://groups.google.com/group/opencog
> <https://groups.google.com/group/opencog>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/CAHrUA34XVDQHNeYjb4r9eFjmrZxN%3DfNmE6wDQTV%2B__cJpEF3qw%40mail.gmail.com
> <https://groups.google.com/d/msgid/opencog/CAHrUA34XVDQHNeYjb4r9eFjmrZxN%3DfNmE6wDQTV%2B__cJpEF3qw%40mail.gmail.com>
> <https://groups.google.com/d/msgid/opencog/CAHrUA34XVDQHNeYjb4r9eFjmrZxN%3DfNmE6wDQTV%2B__cJpEF3qw%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
>

Linas Vepstas

unread,
Aug 6, 2017, 4:42:24 PM8/6/17
to Nil Geisweiller, opencog, Michael Duncan
On Sun, Aug 6, 2017 at 2:09 AM, Nil Geisweiller <ngei...@googlemail.com> wrote:
Linas,

On 08/06/2017 02:12 AM, Linas Vepstas wrote:
No. I think you're missing the point. Equivalence is normally between pairs of things, and that is very manageable.  You can say a=b and say b=c and then later change your mind about b=c without affecting a=b at all.  That is very different than saying {a,b,c} is an equivalence-set.

That is, the atomspace is optimized for relations between pairs of things, or maybe triples. quadruple-relations are very rare.  By contrast, sets with hundreds or thousands or millions of members are not uncommon.

We are not the first to deal with this.  So both SQL and no noSQL are  are both very explicitly be a "relational algebras", and are very explicitly not "set theories". In SQL, the table forms a "set", and it is very easy to add/remove rows in that set. A single row is a relation.  The table of employees has one row per employee. It does NOT have all of the employees jammed into one big giant arbitrary-length row.


    (Equivalence (stv 1 1) A (Or B C))
    (And (stv 0 1) B C)


Both AndLink and OrLink are set-like in their behavior, and this is a problem.  They are not relational, as currently defined.

Regarding set-like-behavior of And and Or, I suppose doing

(And A (And B C))

instead of

(And A B C)

wouldn't fix it, right?

No, because if I decide to drop C, then I have to erase (And B C) and before I can do that, I have to erase (And A (And B C)) first.

I do sorta feel what you mean about keeping relationships small, but I don't concretely understand why its a problem (letting aside that the backing store cannot store more than 330 outgoins).

Search becomes a problem. Say I want to find (using the pattern matcher) all sets that contain, as members, A B C. With set notation, I have to search for (Set X A B C) where X==(VariableNode "X") for 4-elelemnt sets, and then (Set X Y A B C) for 5-element sets, and so on.  To search all N-element sets, I can use the GlobeNode G and search for (Set G A B C) ... and I believe this works correctly today.  However...

However, there's a problem. Sets are UnorderedLinks, and so performing the search for all six-element sets (Set X Y Z A B C) requires searching 6!=120 permutations. Well, since A B C are fixed, only 6!/3!= 20 permutations have to be searched. Of the 20, many are duplicates, since (Set X Y Z A B C) == (Set Y C X B Z  A)  and so on. The returned results will include all possible matchups of X Y Z to the other three members -- 3! in all -- so of the 20 permutations, only 3!=6 are actually different.

For the GlobNode, it would be similar, Now consider a set with 20 elements -- this requires 20! permutations and 20!=2.4e18 which would be months or years of CPU time.  Which is absurd.. well, we could stop after finding exactly one permutation, because that is all we really want... (not sure if the current glob code does this -- probably not. Man Hin is reworking the glob code now.).

This is in contrast to the much easier problem of finding all values of X for which (Member A X) AND (Member B X) AND (Member C X) which can be done easily and quickly, without requiring permutation exploration.

I don't know, but I suspect that Shujing's Pattern Miner will have trouble mining patterns for sets, but not for members.   I won't try to give any PLN arguments, but I suspect that similar considerations apply there.
   

    I agree about not creating new links up the wazzoo, it must be
    carefully thought. However, you don't necessarily need to upgrade
    PLN to reason on new links, if you can express the semantics of a
    new link as a combination of old links, all you need is to write a
    higher order fact such as

    EquivalenceScope (stv 1 1)
       $A $B $C
       Partition $A (Set $B $C)
       And
         Equivalence $A (Or $B $C)
         And $B $C

    to enable PLN to reason about it.


I don't want to argue about it here, but I think that turning everything explicitly into a scope link is a minor mistake.  I think it's just fine to have scoping be implicit.  We don't need to invent a brand new BlahScopeLink for each and every BlahLink.   Just pretend that BlahLink is a BlahScopeLink with zero variables. That's all. Don't special-case zero variables as being different from more-than-zero variables.

EquivalenceScope (stv 1 1)
  <vardecl>
  P
  Q

is merely sugar syntax for

Equivalence (stv 1 1)
  Lambda <vardecl> P
  Lambda <vardecl> Q

This sugar syntax is mostly useful for humans, because <vardecl> is not duplicated in the AtomSpace anyway.

Well, but that's not true!  (Scope X   P(X)==Q(X)) is not the same as (Scope X  P(X)) == (Scope X  Q(X)) because the latter can be alpha-rewritten as (Scope X  P(X)) == (Scope Y  Q(Y)) which is something completely different!
-------
But whatever. All I am saying is that we should allow the following form:

EquivalenceScope (stv 1 1)
  <empty vardecl>
  P
  Q

 That's all, nothing more.

--linas


Nil

             > email to opencog+unsubscribe@googlegroups.com
        <mailto:opencog%2Bunsubscribe@googlegroups.com>
             <mailto:opencog%2Bunsu...@googlegroups.com
        <mailto:opencog%252Bunsubscribe...@googlegroups.com>>.

             > To post to this group, send email to
             send an email to opencog+unsubscribe@googlegroups.com
        <mailto:opencog%2Bunsubscribe@googlegroups.com>
             <mailto:opencog%2Bunsu...@googlegroups.com
        <mailto:opencog%252Bunsubscribe...@googlegroups.com>>.

             To post to this group, send email to
        ope...@googlegroups.com <mailto:opencog@googlegroups.com>
             <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>>.

             Visit this group at https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>
             <https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>>.
             To view this discussion on the web visit
        https://groups.google.com/d/msgid/opencog/CACYTDBdm6M1y18G%3DQi%3D_rjJcdrEb5eAmx8ntxffKoRw_dG1OYw%40mail.gmail.com
        <https://groups.google.com/d/msgid/opencog/CACYTDBdm6M1y18G%3DQi%3D_rjJcdrEb5eAmx8ntxffKoRw_dG1OYw%40mail.gmail.com>
                    <https://groups.google.com/d/msgid/opencog/CACYTDBdm6M1y18G%3DQi%3D_rjJcdrEb5eAmx8ntxffKoRw_dG1OYw%40mail.gmail.com
        <https://groups.google.com/d/msgid/opencog/CACYTDBdm6M1y18G%3DQi%3D_rjJcdrEb5eAmx8ntxffKoRw_dG1OYw%40mail.gmail.com>>.
             For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>
             <https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>>.


        --         You received this message because you are subscribed to the
        Google Groups "opencog" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to opencog+unsubscribe@googlegroups.com
        <mailto:opencog%2Bunsubscribe@googlegroups.com>
        <mailto:opencog+unsubscribe@googlegroups.com
        <mailto:opencog%2Bunsubscribe@googlegroups.com>>.

        To post to this group, send email to ope...@googlegroups.com
        <mailto:opencog@googlegroups.com>
        <mailto:opencog@googlegroups.com <mailto:opencog@googlegroups.com>>.

Ben Goertzel

unread,
Aug 7, 2017, 2:11:28 PM8/7/17
to opencog, Michael Duncan, Linas Vepstas
I don't understand the proposed semantics of AndMemberLink, could you explain?
> --
> You received this message because you are subscribed to the Google Groups
> "opencog" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to opencog+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/e1df7273-da14-45f5-8d0d-5ebad0d31217%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Ben Goertzel

unread,
Aug 7, 2017, 2:20:12 PM8/7/17
to opencog, Michael Duncan, Linas Vepstas
I mean, if a pathway is just viewed as a semi-arbitrary set of
relationships, then why not just make the pathway a ConceptNode, with
MemberLinks to the relationships contained in the pathway?
MemberLInks can then have fuzzy weights as needed. I am unsure why
we want conjunction semantics here...

-- Ben

Linas Vepstas

unread,
Aug 7, 2017, 2:20:17 PM8/7/17
to Ben Goertzel, opencog, Michael Duncan
First, lets review SetLink:

 SetLink
    ConceptNode "x"
    ConceptNode "y"
    ConceptNode "z" 


EquivalenceLink ConceptNode "last three letters of the alphabet" SetLink ConceptNode "x" ConceptNode "y" ConceptNode "z"

MemberLink ConceptNode "x" ConceptNode "last three letters of the alphabet" MemberLink ConceptNode "y" ConceptNode "last three letters of the alphabet" MemberLink ConceptNode "z" ConceptNode "last three letters of the alphabet"

Again, with TV's:
  MemberLink  <1.0>
     ConceptNode "z"
     ConceptNode "last letters of the alphabet"
  MemberLink  <0.9>
     ConceptNode "w"
     ConceptNode "last letters of the alphabet"
  MemberLink  <0.8>
     ConceptNode "s"
     ConceptNode "last letters of the alphabet"
  MemberLink  <0.2>
     ConceptNode "m"
     ConceptNode "last letters of the alphabet"


Sooo .. AndMemberLink would be just like the above, except that whereever you see SetLink above, you would have AndLink, and wherever you see MmeberLink above, you would have AndMemeberLink.

--linas





> To post to this group, send email to ope...@googlegroups.com.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit

Ben Goertzel

unread,
Aug 7, 2017, 2:21:32 PM8/7/17
to Linas Vepstas, opencog, Michael Duncan
OK I get that... but I don't see why it is appropriate for biological
pathways...
>> > email to opencog+u...@googlegroups.com.

Linas Vepstas

unread,
Aug 7, 2017, 2:25:42 PM8/7/17
to Ben Goertzel, opencog, Michael Duncan
no clue why its appropriate for biological pathways. Mike is designing that, not me.

Anyway, a "pathway" is an ordered sequence where the ordering matters. Neither SetLink, nor AndLink are ordered. So if you actually want to have a path, i.e. a sequence of directed arrows, well .. you  need to find a representation of  biological pathways as directed arrows. But this is familiar ground, for opencog...

--linas

Ben Goertzel

unread,
Aug 7, 2017, 2:31:59 PM8/7/17
to Linas Vepstas, opencog, Michael Duncan
a pathway in biology is actually a network with directed arrows and generally lots of loops.... there are even some hyperlinks e.g. for catalysis... a pathway is a subhypergraph...


Linas Vepstas

unread,
Aug 7, 2017, 3:20:03 PM8/7/17
to Ben Goertzel, opencog, Michael Duncan, link-grammar, Amir P
Nothing wrong with lots of arrows arranged into loops. If I were doing this, this is what I would propose:

The single most important #1 special super-duper innovation I have recently discovered is to represent biological pathways like so:

SectionLink
    CatalystNode "alpha-ketoglutarate dehydrogenase"
    ConnectorSet
         Connector
              SubstanceNode "NAD^+"
              Direction "input"
         Connector
               Substancenode "COA-SH"
               Direction "input"
         Connector
               Substancenode "alpha-ketoglutarate"
               Direction "input"
         Connector
               Substancenode"NADH"
               Direction "output"
         Connector
               Substancenode"H^+"
               Direction "output"
         Connector
               Substancenode"CO^2"
               Direction "output"
         Connector
              Substancenode"Succynil-COA"
              Direction "output"

The above describes a single step in the Krebs cycle, having the indicated inputs and outputs -- three inputs, four outputs, the directionality of the half-arrows (i.e. the "connectors" explicitly indicated with the DirectionLink). At the center of it all is the CatalystNode


See https://en.wikipedia.org/wiki/Citric_acid_cycle#/media/File:Citric_acid_cycle_with_aconitate_2.svg  lower-right-hand side.

The correct way to visualize this is like a spider: the spider-body is the CatalystNode and the spider has seven legs: three input legs, four output legs.

Alternately, visualize this as a jigsaw puzzle piece, with seven tabs on it: four tabs sticking out, and three hole areas cut in.  You can assemble the entire Krebs cycle by fitting together these jigsaw puzzle pieces.

In link-grammar, these sections are called "disjuncts". In sheaf theory, these objects are called "sections of a sheaf". In biology, they are called "catalysts".

--linas

p.s. note that I am using a "ConnectorSet" in the above, instead of a "ConnectorMemberLink"  ... perhaps I should use a ConnectorMemberLink... However I doubt that there are biological catalysts with more than 3-4-5 inputs and 3-4-5 outputs.  So I'm willing to let it slide, for now. The alternative rep would be this:

ConnectorMemberLink
    CatalystNode "alpha-ketoglutarate dehydrogenase"
    Connector
          SubstanceNode "NAD^+"
          Direction "input"

plus six more of the above.  it is very very suspicious that the above resembles this:

EvaluationLink
    PredicateNode "alpha-ketoglutarate dehydrogenase"
    ListLink
          ConceptNode "NAD^+"
          ConceptNode "input"

however, I would strongly urge against this last representation!

--linas

mjsduncan

unread,
Aug 7, 2017, 3:53:08 PM8/7/17
to Ben Goertzel, Linas Vepstas, opencog
if any pathway link is missing/false, the whole pathway is false.  all the links have to be present/true for the pathway to be in effect/true

Linas Vepstas

unread,
Aug 7, 2017, 4:04:06 PM8/7/17
to mjsduncan, Ben Goertzel, opencog
How can you determine if a pathway link is missing?  I mean, if you created the AndLink, then its necessarily present/true, unless you are changing the truth value to 0.0 under some cases.

what I'm trying to say is that determining if a biological pathway is present/active is very similar to parsing an english-language sentence. For a sentence to be valid, the words have to be present, and have to be connected in the right order.

That is, a "path" in English is a "sentence", and for various reasons, we never try to make a list of all possible sentences; instead opting to make a list of sentence-parts, and then seeing how they can hook together ("parsing")

Perhaps, in biology, it is possible to make an exhaustive list of all possible biological pathways. Maybe. But again: not that AndLink is unordered: (AndLink A B)  is exactly the same atom as (AndLink B A)  ... perhaps you want SequentialAndLink ??

--linas


Ben Goertzel

unread,
Aug 8, 2017, 3:21:19 AM8/8/17
to link-grammar, opencog, Michael Duncan, Amir P
This representation makes sense to me for biological pathways

Although, making PLN deal with these is another problem...
>>>> >> > email to opencog+u...@googlegroups.com.
>>>> >> > To post to this group, send email to ope...@googlegroups.com.
>>>> >> > Visit this group at https://groups.google.com/group/opencog.
>>>> >> > To view this discussion on the web visit
>>>> >> >
>>>> >> >
>>>> >> > https://groups.google.com/d/msgid/opencog/e1df7273-da14-45f5-8d0d-5ebad0d31217%40googlegroups.com.
>>>> >> >
>>>> >> > For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Ben Goertzel, PhD
>>>> >> http://goertzel.org
>>>> >>
>>>> >> "I am God! I am nothing, I'm play, I am freedom, I am life. I am the
>>>> >> boundary, I am the peak." -- Alexander Scriabin
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Ben Goertzel, PhD
>>>> http://goertzel.org
>>>>
>>>> "I am God! I am nothing, I'm play, I am freedom, I am life. I am the
>>>> boundary, I am the peak." -- Alexander Scriabin
>>>
>>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "link-grammar" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to link-grammar...@googlegroups.com.
> To post to this group, send email to link-g...@googlegroups.com.
> Visit this group at https://groups.google.com/group/link-grammar.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/link-grammar/CAHrUA35VJrBXkcyvbVqppXkH6Mq%3DSWHdQPQn6xBdiRL_x2qKAw%40mail.gmail.com.

Nil Geisweiller

unread,
Aug 8, 2017, 3:37:06 AM8/8/17
to linasv...@gmail.com, Nil Geisweiller, opencog, Michael Duncan
On 08/06/2017 11:41 PM, Linas Vepstas wrote:
> Search becomes a problem. Say I want to find (using the pattern matcher)
> all sets that contain, as members, A B C. With set notation, I have to
> search for (Set X A B C) where X==(VariableNode "X") for 4-elelemnt
> sets, and then (Set X Y A B C) for 5-element sets, and so on. To search
> all N-element sets, I can use the GlobeNode G and search for (Set G A B
> C) ... and I believe this works correctly today. However...
>
> However, there's a problem. Sets are UnorderedLinks, and so performing
> the search for all six-element sets (Set X Y Z A B C) requires searching
> 6!=120 permutations. Well, since A B C are fixed, only 6!/3!= 20
> permutations have to be searched. Of the 20, many are duplicates, since
> (Set X Y Z A B C) == (Set Y C X B Z A) and so on. The returned results
> will include all possible matchups of X Y Z to the other three members
> -- 3! in all -- so of the 20 permutations, only 3!=6 are actually different.
>
> For the GlobNode, it would be similar, Now consider a set with 20
> elements -- this requires 20! permutations and 20!=2.4e18 which would be
> months or years of CPU time. Which is absurd.. well, we could stop
> after finding exactly one permutation, because that is all we really
> want... (not sure if the current glob code does this -- probably not.
> Man Hin is reworking the glob code now.).
>
> This is in contrast to the much easier problem of finding all values of
> X for which (Member A X) AND (Member B X) AND (Member C X) which can be
> done easily and quickly, without requiring permutation exploration.

I understand. In the first case, you ask to produce all assignments to
complete the set(s), which grows exponentially. While in the second case
you only asks sets containing A, B and C.

But these are 2 different queries.

Anyway, I see your point, I suppose we want to have both representations

Set .... A B C

and

Member
A
...
Member
B
...
...

and use which ever one fits best. Converting from one to another should
be easy using PLN.

Regarding other set-like operators, And, Or, etc, I think I agree with
your proposal to be able to break them up. So for instance we may turn

And A B C

into

AndMember
A
And A B C
AndMember
B
And A B C
...

However I don't think the more "atomic" representation should replace
the more "holistic" one, both should be allowed in parallel, right?
Would that be for backward compatibility at least. Then if it becomes
obvious that the atomic form is superior we can deprecate the holistic form.

> EquivalenceScope (stv 1 1)
> <vardecl>
> P
> Q
>
> is merely sugar syntax for
>
> Equivalence (stv 1 1)
> Lambda <vardecl> P
> Lambda <vardecl> Q
>
> This sugar syntax is mostly useful for humans, because <vardecl> is
> not duplicated in the AtomSpace anyway.
>
>
> Well, but that's not true! (Scope X P(X)==Q(X)) is not the same as
> (Scope X P(X)) == (Scope X Q(X)) because the latter can be
> alpha-rewritten as (Scope X P(X)) == (Scope Y Q(Y)) which is something
> completely different!

Agreed, they're not the same in the logic that you describe, but in PLN
they are, because the former

(Scope X P(X)==Q(X))

is just *syntactic sugar* for the latter,

(Scope X P(X)) == (Scope X Q(X))

which is what really matters in a probabilistic interpretation.

I recall that the probabilistic interpretation of

Equivalence (stv 1 1) A B

is

P(A inter B|A union B)

It is explained here but unfortunately the wiki can't render it

http://wiki.opencog.org/w/ExtensionalSimilarityLink

Nil
> <mailto:opencog%2Bunsu...@googlegroups.com
> <mailto:opencog%252Buns...@googlegroups.com>
> <mailto:opencog%252Buns...@googlegroups.com
> <mailto:opencog%25252Bun...@googlegroups.com>>>.
> > To post to this group, send email to
> ope...@googlegroups.com <mailto:ope...@googlegroups.com>
> <mailto:ope...@googlegroups.com>>>.
> <mailto:opencog%2Bunsu...@googlegroups.com
> <mailto:opencog%252Buns...@googlegroups.com>
> <mailto:opencog%252Buns...@googlegroups.com
> <mailto:opencog%25252Bun...@googlegroups.com>>>.
> To post to this group, send email to
> ope...@googlegroups.com <mailto:ope...@googlegroups.com>
> <mailto:ope...@googlegroups.com>>>.
> <mailto:opencog+u...@googlegroups.com
> <mailto:opencog%2Bunsu...@googlegroups.com>
> <mailto:opencog%2Bunsu...@googlegroups.com
> <mailto:opencog%252Buns...@googlegroups.com>>>.
> To post to this group, send email to
> ope...@googlegroups.com <mailto:ope...@googlegroups.com>
> <mailto:ope...@googlegroups.com>>>.
> https://groups.google.com/d/msgid/opencog/CAHrUA34XVDQHNeYjb4r9eFjmrZxN%3DfNmE6wDQTV%2B__cJpEF3qw%40mail.gmail.com

Michael Duncan

unread,
Aug 8, 2017, 2:00:54 PM8/8/17
to opencog, linasv...@gmail.com, mjsd...@gmail.com
the AndLink semantics are for the simplified pathway representation for the current demo/toy bio-atomspace which only has binary links between proteins and abstracts out small molecules. so the pathway for the krebs cycle for instance is just directed links between the enzymes:  ... -> isocitrate dehydrogenase -> alpha-ketoglutarate dehydrogenase -> Succinyl-CoA synthetase -> ...

linus semantics look good for when the complete biopax pathway representation is translated into atomese.

even then my intuition is that the AndLink semantics should be useful in pln inference about say the likelihood of a pathway being involved in distinguishing a case-control phenotype based on moses models of relative gene expression levels.

Michael Duncan

unread,
Aug 8, 2017, 4:11:51 PM8/8/17
to opencog, linasv...@gmail.com, mjsd...@gmail.com
the pathway links are predicates defined here.  the pathways are

DefineLink
     DefinedPredicateNode "GO pathway term name"
     AndLink
          Predicate "protein relationship 1"
                ProteinNode "x"
                ProteinNode "y"
          Predicate "protein relationship 2"
                ProteinNode "y"
                ProteinNode "z"
          ....

Linas Vepstas

unread,
Aug 9, 2017, 4:41:09 PM8/9/17
to Nil Geisweiller, opencog, Michael Duncan
On Tue, Aug 8, 2017 at 2:37 AM, Nil Geisweiller <ngei...@googlemail.com> wrote:

However I don't think the more "atomic" representation should replace the more "holistic" one, both should be allowed in parallel, right? Would that be for backward compatibility at least. Then if it becomes obvious that the atomic form is superior we can deprecate the holistic form.

I've personally concluded that in many, most cases, using SetLink is a complete disaster. Again -- look at SQL as an example. You *could* create a table that places all employees on a single row. The language supports this. But every textbook written on it will explain why this would be exactly the wrong way of doing things, and then talk about "normalization" for the next 6 chapters.

Same deal here: I am saying that, in general, we should be careful, and apply good-practices to knowledge-base design. Read the books on knowledge bases, study the concept of data normalization, data orthogonality, and avoid making those kind of mistakes, when designing structures for opencog.

I didn't notice it at first, but now I do: relex2logic, sureal and microplanning abuse SetLink. Not sure what the rule-engine is doing, but I suspect its abusing to too. The people who designed SQL were smart, it took them a decade+ to figure this shit out, and we should not abandon their good advice for random, willy-nilly reasons.  We should avoid repeating old, well-known mistakes.


    EquivalenceScope (stv 1 1)
       <vardecl>
       P
       Q

    is merely sugar syntax for

    Equivalence (stv 1 1)
       Lambda <vardecl> P
       Lambda <vardecl> Q

    This sugar syntax is mostly useful for humans, because <vardecl> is
    not duplicated in the AtomSpace anyway.


Well, but that's not true!  (Scope X   P(X)==Q(X)) is not the same as (Scope X  P(X)) == (Scope X  Q(X)) because the latter can be alpha-rewritten as (Scope X  P(X)) == (Scope Y  Q(Y)) which is something completely different!

Agreed, they're not the same in the logic that you describe, but in PLN they are, because the former

(Scope X   P(X)==Q(X))

is just *syntactic sugar* for the latter,

(Scope X  P(X)) == (Scope X  Q(X))

You keep saying that, but I don't see how it can possibly be true. It is always, 100% legal to rewrite Scope X  P(X)) == (Scope X  Q(X)) a (Scope X  P(X)) == (Scope Y  Q(Y)) and, in classical logic, they have completely different meanings.

let P(x) == "x can fly"   and Q(x) == "x has two legs"

then  (Scope X   P(X)==Q(X))  means "x has two legs and can fly" 

which might or might not be true, depending on the value of x. while

(Scope X  P(X)) == (Scope y  Q(y)) means "the statement that  "x can fly" is identical to the statement that "y has two legs"

which is clearly always false. (and cannot depend on the values for x,y) Now, there might be models which that statement is true: for example, on planet nimrod, all flying things have two legs, and all two-legged things fly.  Thus, planet nimrod is a "model" where that statement is true. However, the "theory" that (Scope X  P(X)) == (Scope y  Q(y)) is still false on planet nimrod, even though the model is true. I think maybe you are failing to distinguish theories and models? they are not the same thing....


which is what really matters in a probabilistic interpretation.

OK, so perhaps they are equal in PLN, its just that they are not equal in general.

The formal way of saying this is that two models of a theory might be equal, but this does not mean the two theories are equal.  Its the difference between equality and equivalence: two things can be "accidentally" equal and not be equivalent.

Here, PLN would be one possible model, classical logic is another possible model, Bayesian probability a third possible model.  The truth value of a statement can be different in each of these different  models, and is not, in general, the same as the truth value of a statement in a theory.

It is the case that when something is true in a theory, then it is also true in every model of that theory.  So for example,

let P(x) == "x can fly"   and Q(x) == "x has property of flight"

Then (Scope X  P(X)) == (Scope y  Q(y)) is true as a theory, always, and so it had also better always be true in every model -- i.e. it must be true in PLN, classical logic and Bayesian probability.

--linas
 
                 <mailto:linasvepstas@gmail.com
                      > email to opencog+unsubscribe@googlegroups.com
        <mailto:opencog%2Bunsubscribe@googlegroups.com>
                 <mailto:opencog%2Bunsu...@googlegroups.com
        <mailto:opencog%252Bunsubscribe...@googlegroups.com>>
                      <mailto:opencog%2Bunsubscribe@googlegroups.com
        <mailto:opencog%252Bunsubscribe...@googlegroups.com>
                 <mailto:opencog%252Bunsubscrib...@googlegroups.com
        <mailto:opencog%25252Bunsubscri...@googlegroups.com>>>.

                      > To post to this group, send email to
        ope...@googlegroups.com <mailto:opencog@googlegroups.com>
        <mailto:opencog@googlegroups.com <mailto:opencog@googlegroups.com>>
                 <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>
        <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>>>.
                      <mailto:opencog%2Bunsubscribe@googlegroups.com
        <mailto:opencog%252Bunsubscribe...@googlegroups.com>
                 <mailto:opencog%252Bunsubscrib...@googlegroups.com
        <mailto:opencog%25252Bunsubscri...@googlegroups.com>>>.

                      To post to this group, send email to
        ope...@googlegroups.com <mailto:opencog@googlegroups.com>
        <mailto:opencog@googlegroups.com <mailto:opencog@googlegroups.com>>
                      <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>
                 <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>>>.
                 <mailto:opencog%2Bunsu...@googlegroups.com
        <mailto:opencog%252Bunsubscribe...@googlegroups.com>>
                 <mailto:opencog+unsubscribe@googlegroups.com
        <mailto:opencog%2Bunsubscribe@googlegroups.com>
                 <mailto:opencog%2Bunsu...@googlegroups.com
        <mailto:opencog%252Bunsubscribe...@googlegroups.com>>>.

                 To post to this group, send email to
        ope...@googlegroups.com <mailto:opencog@googlegroups.com>
                 <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>>
                 <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>
        <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>>>.

                 Visit this group at
        https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>
                 <https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>>.
                 To view this discussion on the web visit

Linas Vepstas

unread,
Aug 9, 2017, 4:54:16 PM8/9/17
to Michael Duncan, opencog
Quick comment, I did not review the Doc.

On Tue, Aug 8, 2017 at 3:11 PM, Michael Duncan <mjsd...@gmail.com> wrote:
the pathway links are predicates defined here.  the pathways are

DefineLink

I strongly urge that EquivalenceLink be used here, and not DefineLink.  DefineLink is meant for something else.
 
     DefinedPredicateNode "GO pathway term name"
Isn't an ordinary Predicatenode enough??
 
     AndLink

Again: the anlink is completely unordered, so in this case, would be exactly the same thing as a SetLink: its just a collection of "stuff" (a collection of protein relationships, it seems)  Because its not ordered, its not a "path" per se, its just a set.

You keep saying that you use AndLink because its "true" when everything is in it, but that is also the case for SetLink.  When I say "x and y are in set A", that always true that x is in A and Y is in A, and you don't need an AndLink to say this.  The SetLink is enough. The SetLink is effectively an AndLink, from the truthiness of it.
 
          Predicate "protein relationship 1"
                ProteinNode "x"
                ProteinNode "y"
          Predicate "protein relationship 2"
                ProteinNode "y"
                ProteinNode "z"
          ....


I'm proposing this:

MemberLink

      DefinedPredicateNode "GO pathway term name"
          Predicate "protein relationship 1"
                ProteinNode "x"
                ProteinNode "y"

 

MemberLink

      DefinedPredicateNode "GO pathway term name"
          Predicate "protein relationship 2"

                ProteinNode "y"
                ProteinNode "z"
          ....

  
--linas

Michael Duncan

unread,
Aug 16, 2017, 8:29:12 PM8/16/17
to opencog, mjsd...@gmail.com, linasv...@gmail.com
thanks for the feedback, linus!  i copied the form using DefineLink and AndLink from the wiki because it was the closest example i could find to what i was trying to do.  i'm happy to implement pathways using your formalism.
one thing i don't understand from your explanation is that you first say the PredicateNode can be used instead of DefinedPredicateNode but then use both in your proposed implementation.  can you elaborate further on why your proposal is optimal?  also, what are the options for scheme functions to invoke all the members of one of the resulting DefinedPredicateNodes?

mike

Linas Vepstas

unread,
Aug 29, 2017, 7:25:07 PM8/29/17
to Michael Duncan, opencog
Hi Mike,

On Wed, Aug 16, 2017 at 7:29 PM, Michael Duncan <mjsd...@gmail.com> wrote:
thanks for the feedback, linus!  i copied the form using DefineLink and AndLink from the wiki

Do you know where in the wiki it says this?
 
because it was the closest example i could find to what i was trying to do.  i'm happy to implement pathways using your formalism.

For plain-old knowledge representation, you probably should be using EquivalenceLink, instead of DefineLink.  DfineLink is imperative, while EquivalenceLink is declarative. 

So, for example:  when you say "A is the same as B" that is a declaration that A is equivalent to B.  This is an EquivalenceLink.

When you say "A is the name of B", and then later say "do something with A" that is an imperative command to actually do something with B.  That is, replace A by B immediately, and do something with B.  This an imperative command,  This is the DefineLink. its a definition, kind-of-like in a dictionary.

Thus, both DefineLink and EquivalenceLink are a certain kind of equality; but DefineLink is was invented to make it easier for humans to write code in atomese, while EquivalenceLink was designed to be used by PLN and other reasoning subsystems.  EquivelanceLink declares knowledge.  Since you are not hand-crafting code in atomese, there is really no valid reason for you to use DefineLink.

 
one thing i don't understand from your explanation is that you first say the PredicateNode can be used instead of DefinedPredicateNode but then use both in your proposed implementation.  can you elaborate further on why your proposal is optimal? 
 
DefinedPredicateNode is simply a hack to make it easier for the pattern matcher to look up the definition.  Since you are not writing pattern-matcher rules, there's no reason for you to use it.

also, what are the options for scheme functions to invoke all the members of one of the resulting DefinedPredicateNodes?

I don't understand the question. First, one cannot "invoke" an atom. Second, neither PredicateNodes nor DefinedPredicateNodes have "members". Finally, you should try to avoid or minimize the writing or creation of "scheme functions"; you should design your data so that either PLN, or the pattern matcher, or the pattern miner, or the rule engine can work with it directly.  Writing new code by hand, whether in C++, scheme or python, is best done to create generic data processing subsystems, instead of hand-tailloring something for your particular dataset.  There are exceptions to this rule, but these should be avoided.

--linas



--
"The problem is not that artificial intelligence will get too smart and take over the world," computer scientist Pedro Domingos writes, "the problem is that it's too stupid and already has."

Michael Duncan

unread,
Sep 20, 2017, 2:37:15 AM9/20/17
to opencog
hi linus, finally getting back to this knowledge representation discussion.

On Wednesday, August 30, 2017 at 7:25:07 AM UTC+8, linas wrote:
Hi Mike,

On Wed, Aug 16, 2017 at 7:29 PM, Michael Duncan <mjsd...@gmail.com> wrote:
thanks for the feedback, linus!  i copied the form using DefineLink and AndLink from the wiki

Do you know where in the wiki it says this?
 
because it was the closest example i could find to what i was trying to do.  i'm happy to implement pathways using your formalism.

this was my starting point (from http://wiki.opencog.org/w/DefineLink):

...

Examples

DefinedPredicateNode

The following uses DefineLink to define a DefinedPredicateNode

DefineLink
   DefinedPredicateNode "MyPredicate"
   AndLink
...

i wanted a predicate defined over an arbitrarily long list of links between proteinNodes to represent a pathway that is probabilistically true based the truth value of the links "anded" together.

For plain-old knowledge representation, you probably should be using EquivalenceLink, instead of DefineLink.  DfineLink is imperative, while EquivalenceLink is declarative. 

So, for example:  when you say "A is the same as B" that is a declaration that A is equivalent to B.  This is an EquivalenceLink.

When you say "A is the name of B", and then later say "do something with A" that is an imperative command to actually do something with B.  That is, replace A by B immediately, and do something with B.  This an imperative command,  This is the DefineLink. its a definition, kind-of-like in a dictionary.

Thus, both DefineLink and EquivalenceLink are a certain kind of equality; but DefineLink is was invented to make it easier for humans to write code in atomese, while EquivalenceLink was designed to be used by PLN and other reasoning subsystems.  EquivelanceLink declares knowledge.  Since you are not hand-crafting code in atomese, there is really no valid reason for you to use DefineLink.

 
one thing i don't understand from your explanation is that you first say the PredicateNode can be used instead of DefinedPredicateNode but then use both in your proposed implementation.  can you elaborate further on why your proposal is optimal? 
 
DefinedPredicateNode is simply a hack to make it easier for the pattern matcher to look up the definition.  Since you are not writing pattern-matcher rules, there's no reason for you to use it.

well i'm using scheme code to construct an atomese representation that i want to use as a knowledge base for PLN queries.  in it's current toy state the only real function the DefinedPredicateNode is serving is a flag to pick out pathways since those are the only DPNs in the atomspace so i am using it as a hack!
 

also, what are the options for scheme functions to invoke all the members of one of the resulting DefinedPredicateNodes?

I don't understand the question. First, one cannot "invoke" an atom. Second, neither PredicateNodes nor DefinedPredicateNodes have "members". Finally, you should try to avoid or minimize the writing or creation of "scheme functions"; you should design your data so that either PLN, or the pattern matcher, or the pattern miner, or the rule engine can work with it directly.  Writing new code by hand, whether in C++, scheme or python, is best done to create generic data processing subsystems, instead of hand-tailloring something for your particular dataset.  There are exceptions to this rule, but these should be avoided.

so if i use your pathway contruction:

MemberLink
      DefinedPredicateNode "GO pathway term name"
          Predicate "protein relationship 1"
                ProteinNode "x"
                ProteinNode "y"

 

MemberLink
      DefinedPredicateNode "GO pathway term name"
          Predicate "protein relationship 2"
                ProteinNode "y"
                ProteinNode "z"
          ....
 
what i mean by "invoke" is just how do i access the members of the pathway DPN to apply them to ProteinNodes and their interaction predicates in a particular context?

Nil Geisweiller

unread,
Sep 20, 2017, 6:59:38 AM9/20/17
to ope...@googlegroups.com
Hi Mike,

> MemberLink
> DefinedPredicateNode "GO pathway term name"
> Predicate "protein relationship 1"
>
> ProteinNode "x"
> ProteinNode "y"
>
>
>
> MemberLink
> DefinedPredicateNode "GO pathway term name"
>
> Predicate "protein relationship 2"
> ProteinNode "y"
> ProteinNode "z"
> ....

just a little remark, these look wrong. A MemberLink link elements
concepts, not predicates.

Nil

>
> what i mean by "invoke" is just how do i access the members of the
> pathway DPN to apply them to ProteinNodes and their interaction
> predicates in a particular context?
>
>
> mike
>
> On Wednesday, August 9, 2017 at 1:54:16 PM UTC-7, linas wrote:
>
> Quick comment, I did not review the Doc.
>
> On Tue, Aug 8, 2017 at 3:11 PM, Michael Duncan
> <mjsd...@gmail.com> wrote:
>
> the pathway links are predicates defined here
> <https://docs.google.com/document/d/1R_AiCCRuWKI92JUCYXJRnKeYw-MiwKLR3kr9fJyYZfs/edit>.
> <https://groups.google.com/group/opencog>.
> >> > To view this discussion on the web
> visit
> >> >
> >> >
> https://groups.google.com/d/msgid/opencog/e1df7273-da14-45f5-8d0d-5ebad0d31217%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/e1df7273-da14-45f5-8d0d-5ebad0d31217%40googlegroups.com>.
> >> >
> >> > For more options, visit
> https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
> >>
> >>
> >>
> >> --
> >> Ben Goertzel, PhD
> >> http://goertzel.org
> >>
> >> "I am God! I am nothing, I'm play, I
> am freedom, I am life. I am the
> >> boundary, I am the peak." --
> Alexander Scriabin
> >
> >
>
>
>
> --
> Ben Goertzel, PhD
> http://goertzel.org
>
> "I am God! I am nothing, I'm play, I am
> freedom, I am life. I am the
> boundary, I am the peak." -- Alexander
> Scriabin
>
>
>
>
>
>
> --
> /"The problem is not that artificial intelligence will get too smart
> and take over the world," computer scientist Pedro Domingos writes,
> "the problem is that it's too stupid and already has." /
>
> --
> You received this message because you are subscribed to the Google
> Groups "opencog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to opencog+u...@googlegroups.com
> <mailto:opencog+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/b413685a-5d9a-45f4-879f-5647e67d3f5e%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/b413685a-5d9a-45f4-879f-5647e67d3f5e%40googlegroups.com?utm_medium=email&utm_source=footer>.

Michael Duncan

unread,
Sep 20, 2017, 8:20:59 AM9/20/17
to opencog
ok maybe that was a typo on linus' part, then his responses would make more sense to me.
defining a pathway as:

MemberLink
      ConceptNode "GO pathway term name"
      Predicate "protein relationship 1"
                ProteinNode "x"
                ProteinNode "y"


MemberLink
      ConceptNode "GO pathway term name"
      Predicate "protein relationship 2"
                ProteinNode "y"
                ProteinNode "z"
....

would follow from his comments.

Nil Geisweiller

unread,
Sep 20, 2017, 12:25:34 PM9/20/17
to Michael Duncan, opencog
Hi Mike (sending back to opencog list, I think you forgot to reply all),

On 09/20/2017 06:24 PM, Michael Duncan wrote:
> ok i have the list order wrong and i'm trying to use shorthand "sugar"
> to write down the h-graph.
> i'm trying to say:
>
> MemberLink
> Predicate "protein relationship 1"
> ProteinNode "x"
> ProteinNode "y"
> ConceptNode "GO pathway term name"
>
> MemberLink
> ConceptNode "GO pathway term name"
> Predicate "protein relationship 2"
> ProteinNode "y"
> ProteinNode "z"
> ....

OK, that looks correct.

>
> where
>
> Predicate "protein relationship 1"
> ProteinNode "x"
> ProteinNode "y"
>
> is shorthand for one of the fully spelled out h-graphs defined for
> specific protein concepts "x" and "y" here
> <https://docs.google.com/document/d/1R_AiCCRuWKI92JUCYXJRnKeYw-MiwKLR3kr9fJyYZfs/edit>.
>
> my original formulation was
>
> DefineLink
> DefinedPredicateNode "GO pathway term name"
> AndLink
> Predicate "protein relationship 1"
> ProteinNode "x"
> ProteinNode "y"
> Predicate "protein relationship 2"
> ProteinNode "y"
> ProteinNode "z"
> ....
> which was originally problematic because of the sql storage limit on the
> size of incoming sets.

You say "originally problematic", you mean it no longer is problematic?

Do you mean outgoing set? I think it's unfortunate that the SQL encoding
has such limit, there must be a way to alleviate that, I hope.

Nil

>
>
>
> On Wed, Sep 20, 2017 at 9:36 PM, Nil Geisweiller
> <ngei...@googlemail.com <mailto:ngei...@googlemail.com>> wrote:
>
> On 09/20/2017 03:20 PM, Michael Duncan wrote:
>
> ok maybe that was a typo on linus' part, then his responses
> would make more sense to me.
> defining a pathway as:
>
> MemberLink
> ConceptNode "GO pathway term name"
> Predicate "protein relationship 1"
> ProteinNode "x"
> ProteinNode "y"
>
>
> Also, it's not clear what
>
> > Predicate "protein relationship 1"
> > ProteinNode "x"
> > ProteinNode "y"
>
> is.
>
> Usually we write
>
> Evaluation
> Predicate "P"
> List
> <arg1>
> ...
> <argn>
>
> Nil
> <mailto:mjsd...@gmail.com>> wrote:
> >
> > the pathway links are predicates defined
> here
> >
> <https://docs.google.com/document/d/1R_AiCCRuWKI92JUCYXJRnKeYw-MiwKLR3kr9fJyYZfs/edit
> <https://docs.google.com/document/d/1R_AiCCRuWKI92JUCYXJRnKeYw-MiwKLR3kr9fJyYZfs/edit>
>
> <https://docs.google.com/document/d/1R_AiCCRuWKI92JUCYXJRnKeYw-MiwKLR3kr9fJyYZfs/edit
> <mailto:b...@goertzel.org>> wrote:
> >
> > OK I get that... but I
> don't see
> why it
> > is appropriate for
> biological
> > pathways...
> >
> > On Tue, Aug 8, 2017 at
> 2:19 AM,
> Linas
> > Vepstas
> <b...@goertzel.org <mailto:b...@goertzel.org>> wrote:
> > >>
> > >> I don't understand
> the proposed
> > semantics of
> AndMemberLink, could
> you
> > >> explain?
> > >>
> > >>
> > >>
> > >> On Sat, Aug 5, 2017
> at 1:07 AM,
> > Michael Duncan
> <mjsd...@gmail.com <mailto:mjsd...@gmail.com>>
> <b...@goertzel.org <mailto:b...@goertzel.org>>
> <mailto:opencog%2Bu...@googlegroups.com>.
> > >> > To post to this
> group, send
> email
> > to
> ope...@googlegroups.com <mailto:ope...@googlegroups.com>.
> > >> > Visit this group at
> <https://groups.google.com/d/msgid/opencog/e1df7273-da14-45f5-8d0d-5ebad0d31217%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/e1df7273-da14-45f5-8d0d-5ebad0d31217%40googlegroups.com>>
>
> >
> <https://groups.google.com/d/msgid/opencog/e1df7273-da14-45f5-8d0d-5ebad0d31217%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/e1df7273-da14-45f5-8d0d-5ebad0d31217%40googlegroups.com>

Linas Vepstas

unread,
Sep 20, 2017, 9:29:55 PM9/20/17
to opencog
Once again: let me reiterate:

I believe that using DefineLink for this kind of data prepresentation is an abuse, and it will only lead to trouble and heart-ache down the road.   Please use EquivalenceLink instead.  That link type was designed and intended for what you are trying to do here.

The DefineLink was designed for a very different use case -- its for beta reduction and not for knowledge representation (KR). Your biology application is a KR problem, it is NOT a beta reduction problem.  You are trying to define a KR (knowledge representation) structure for biological knowledge.   The EuqivalenceLink is a KR link. The defineLink is a beta-reduction link.  Just don't use it!

--linas

To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.

For more options, visit https://groups.google.com/d/optout.



--

Michael Duncan

unread,
Sep 20, 2017, 10:52:43 PM9/20/17
to Nil Geisweiller, opencog
thanks, nil; i just replied to just you because you replied to me twice personally ;)  according to linus the 330 atom limit on outgoing sets is hard wired in the sql code.  the MemberLink formulation was meant to get around that.  more generally what i'm trying to do with the pathway representation is to have a graph model of the protein interactions that can be compared to experimental data to infer which subsets of the interaction graph are likely to be active in the experimental sample.
Reply all
Reply to author
Forward
0 new messages