Claims and contexts

From OpenCog
Jump to: navigation, search

This page summarizes several different possible representations for English-language sentences that assert claims or indicate thoughts. This includes sentences of the form He said that ..., I believe that ..., She thinks that.... I told you that.... For example, the verb tell almost always require both a direct object, and an indirect object. If the indirect object is missing, then it is always implied. That is, there is an implicit reference to some indirect object, probably appearing earlier in the conversation; reference resolution needs to find it. The indirect object will almost always be some complex idea: typically, an entire sentence with a verb in it. Thus, we need a generic referencing mechanism that allows the object (direct or indirect) to be a reference to an entire sentence or an entire idea.

Several different alternatives are proposed below. One alternative is to leave the object of the verb implicit; the object can be found by looking at the incoming set of the verb, until the PredicateNode "that" is found. A second alternative makes the object explicit, using a ReferenceNode to stand for the object, and a ReferenceLink to connect the reference to the thing being referred to. The Third alternative is to use a ContextLink, which is very similar to the second alternative, except that the scope of the reference is explicitly limited to not go outside of the ContextLink.

See also

Alternative: Implicit object

Consider the sentence: I tell you that small dogs can fly. This can be represented as:

EvaluationLink
   PredicateNode tell@111
   ListLink
        ConceptNode I@222
        ConceptNode you@333

InheritanceLink
      ConceptNode dogs@444
      ConceptNode small@555

EvaluationLink
   PredicateNode that
   ListLink
        PredicateNode tell@111
        EvaluationLink
            PredicateNode fly@666
            ListLink
                ConceptNode dogs@444

In the above, only the subject and direct object of "tell" appear in the first EvaluationLink. The indirect object is held off, and appears only implicitly, marked with a special "that" predicate.

To find the object, one starts at PredicateNode "tell@111", follows the incoming link to find the ListLink, then upwards to find the EvaluationLink, then down to find PredicateNode "that".

This representation is convenient for several reasons:

  • Easy to construct without completely rewriting hypergraphs
  • Can keep "adjective" as ConceptNode (eg. "happy" from sentence "He is happy that she won.")
  • It is easy to add more and more references: e.g "I tell you this and I tell you that and I tell you another thing..."
  • Each additional "that" can spawn additional "that" predicate.

Alternative: Explicit object

The same example sentence I tell you that small dogs can fly can also be represented as:

EvaluationLink
   tell@111
   ListLink
        I@222
        you@333
        ReferenceNode $reference-pQrs123

InheritanceLink
      ConceptNode dogs@444
      ConceptNode small@555

ReferenceLink
    ReferenceNode $reference-pQrs123
    EvaluationLink
        PredicateNode fly@666
        ListLink
            ConceptNode dogs@444

In the above, the trivalency of tell is explicit: The first EvaluationLink lists the subject, direct object and the indirect object. The indirect object is is then found by means of the ReferenceLink.

This representation is convenient for several reasons:

  • It is easy to add more and more references: e.g "I tell you this and I tell you that and I tell you another thing..."
  • References are easily chained. Each additional "that" spawns another reference: "I think that you know that X is Y" is just
EvaluationLink
   think
   ListLink
        I
        $that-abc

ReferenceLink
   $that-abc
   EvaluationLink
       know
       ListLink
            you
            $that-pqr

Alternative: ContextLink (scoped explicit object)

This is similar to the above approach, except that the reference itself is scoped, so that it only appears in a ContextLink. Here, a SatisfyingSetLink is used to establish the context. All statements following this are understood to hold within that context. So, in this example, the statement about flying dogs holds only within that context.

InheritanceLink
     ConceptNode dogs@444
     ConceptNode small@555

ContextLink
    SatisfyingSetLink
        VariableNode $X
        EvaluationLink
            ConceptNode tell@111
            ListLink
                ConceptNode I@222
                ConceptNode you@333
                VariableNode $X
    EvaluationLink
        PredicateNode fly@666
            ListLink
                ConceptNode dogs@444

This is somewhat similar to the above. The tri-valency of tell is again explicit. Unlike the the previous alternative, though, the reference variable is explicitly scoped by the SatisfyingSetLink. That is, the VariableNode $X has no meaning outside of the scope of the SatisfyingSetLink. By contrast, in the previous alternative, the ReferenceNode has global scope.

This does not seem to have any more or less expressive power: the TV on the context link in this alternative would be carried by the ReferenceLink in the previous example.

A disadvantage with this method is that it will be more difficult to chain longer sentences with multiple "that".

Negation

Example: Ruiting believes that frogs are not beautiful. How should the Not be indicated? One should use a NotLink for this. It is very tempting to change one of the truth values to indicates false, but this won't work, as illustrated below. In the examples below, let <FALSE> indicate the truth value <0,0.9>, which is meant to symbolize "false with high confidence". The reason this doesn't work is because the location of the "not" is important: the following sentences are inequivalent.

The two sentences "Ruiting thinks that frogs are not beautiful" and "Ruiting doesn't think that frogs are beautiful" are not the same. To illustrate the difference, change the word "think" to "know": "Ruiting knows that frogs are not beautiful" and "Ruiting doesn't know that frogs are beautiful". Or better yet: "Ruiting knows that I didn't break her coffee cup." vs. "Ruiting doesn't know I broke her coffee cup."

The three different schemes above give:

Implicit object

In this variant, the representation for "Ruiting thinks that frogs are not beautiful" would be:

EvaluationLink
   thinks
   ListLink
      Ruiting
      EvaluationLink
           PredicateNode that
           ListLink
              PredicateNode thinks
              NotLink
              Inheritance frog beautiful

This is not the same as:

EvaluationLink
   thinks
   ListLink
        Ruiting

EvaluationLink <FALSE>
   PredicateNode that
   ListLink
       PredicateNode thinks
       Inheritance frog beautiful

which implies that "Ruiting doesn't think that frogs are beautiful". Another way to write this would be:

EvaluationLink
   PredicateNode that
   ListLink
      NotLink
         PredicateNode thinks
      Inheritance frog beautiful

or perhaps:

EvaluationLink
   NotLink
       PredicateNode that
   ListLink
       PredicateNode thinks
       Inheritance frog beautiful

Explicit object

In this variant, the expression would be:

EvaluationLink
  thinks 
  ListLink
      Ruiting
      ReferenceNode $X-ref

ReferenceLink
     ReferenceNode $X-ref     
     NotLink
         Inheritance frog beautiful

The last bit cannot be written as:

ReferenceLink <FALSE>
     ReferenceNode $X-ref     
     Inheritance frog beautiful

because that would seem to imply that it's not true that $X-ref is a reference to the statement "frogs are beautiful". A somewhat strange work-around would be to write:

EmbeddedTruthValueLink <FALSE>
     ReferenceNode $X-ref     
     Inheritance frog beautiful

but this also seems wrong: there's no way to indicate that maybe the reference is incorrect. The correct way to write "Ruiting does not think that frogs are beautiful" is:

EvaluationLink
  thinks 
  NotLink <--- What? Shouldn't there be a ListLink somewhere
      Ruiting
      ReferenceNode $ZZ-ref

ReferenceLink
     ReferenceNode $ZZ-ref
     Inheritance frog beautiful

or perhaps:

EvaluationLink
  NotLink
      thinks 
  ListLink
      Ruiting
      ReferenceNode $ZZ-ref

ContextLink

In this variant, the expression would be:

ContextLink
    SatisfyingSetLink $X
        EvaluationLink
           thinks 
           ListLink
               Ruiting
               $X
    NotLink
        Inheritance frog beautiful

It is tempting to re-write this without the NotLink, as:

ContextLink <FALSE>
    SatisfyingSetLink $X
        EvaluationLink
           thinks 
           ListLink
               Ruiting
               $X
    Inheritance frog beautiful

but this seems to say that "frogs being beautiful" is not part of the satisfying set of what "ruiting thinks". This is not the same as before. The two sentences "Ruiting thinks that frogs are not beautiful" and "Ruiting doesn't think that frogs are beautiful" are not the same. To illustrate the difference, change the word "think" to "know": "Ruiting knows that frogs are not beautiful" and "Ruiting doesn't know that frogs are beautiful". Or better yet: "Ruiting knows that I didn't break her coffee cup." vs. "Ruiting doesn't know I broke her coffee cup."

The way to write "Ruiting doesn't think that frogs are beautiful" is:

ContextLink
    SatisfyingSetLink $X
        EvaluationLink
           thinks 
           NotLink
               Ruiting
               $X
    Inheritance frog beautiful

Or perhaps:

ContextLink
    SatisfyingSetLink $X
        EvaluationLink
           NotLink
               thinks 
           ListLink
               Ruiting
               $X
    Inheritance frog beautiful

An Example of Moderately Complex Semantic Embedding

Consider the sentence "I hope Ben will eat lunch today but I suspect that he forgot to."

A reasonably nice representation of this would look like

Evaluation [555]
    hope
    Aaron
    ContextAnchorNode "123"

EmbeddedTruthValueLink
        ContextAnchorNode "123"
        Evaluation eat@456 Ben lunch

atTime eat@456 today

   
Evaluation [666]
    suspect
    Aaron
    ContextAnchorNode "66"

EmbeddedTruthValueLink
        ContextAnchorNode "1666"
        Evaluation
                 forget@22
                  Ben
                  ContextAnchorNode "888"

atTime forget@22 today

atTimeeat@1212 today
 
EmbeddedTruthValueLink
        ContextAnchorNode "888"
        Evaluation eat@1212 Ben lunch


EvaluationLink but [555] [666]

Note that this is similar to representations used in the context of the Rule of Choice

An Alternate Approach

Amen Belayneh suggested an alternate representation (June 2016) which may be nicer, as it reuses ContextLink instead of introducing so many new constructs. Consider the example

"Aaron hopes Ben will eat lunch today"

This could be written...

ContextLink
    SatisfyingSet
        Evaluation
           hope
           Aaron
           $X
    Evaluation eat@456 Ben lunch


atTime today eat@456

and then if we want to say "Aaron very slightly hopes Ben will eat lunch today" we would have


ContextLink <.2>
    SatisfyingSet
        Evaluation
           hope
           Aaron
           $X
    Evaluation eat@456 Ben lunch


atTime today eat@456

or whatever...

Similarly, to say "at 3PM on June 16, 2016, women were utterly beautiful", one would say

ContextLink <1,1>
    SatisfyingSet
        AtTimeLink
           TimeNode "3PM, June 16, 2016"
           $X
    Inheritance women beautiful

To make this more sugary we have introduced AtTimeConceptLink to say

ContextLink <1,1>
    AtTimeConceptLink
       TimeNode "3PM, June 16, 2016"
    Inheritance women beautiful

Code

Some code to perform epistemic resoning was created, and can be found here: https://github.com/sumitsourabh/opencog/tree/patch-1/opencog/reasoning/pln/rules/epistemic-reasoning It does not employ the knowledge-representation format described on this page. It does invent new Link types: e.g. BeliefLink. Please do recall that the following two are equivalent:

 BeliefLink A B

and

  EvaluationLink
      PredicateNode "belief"
      ListLink  A B

so that code needs some porting before it can be usable.

Background reading

  • Grammatical mood is a feature of verbs that indicates modality, which includes statements about beliefs, suggestions and commands.
  • Doxastic logic deals with reasoning about beliefs, at least, in the narrow sense of using propositional logic together with the modal operator for belief.
  • Moore's Paradox covers sentences such as It is raining and I believe that it is not raining. Such sentences can be taken as the definition of absurdity. In AGI, they can arise when a belief system fails to update itself in light of the facts. It can also indicate various bugs: e.g. I can see with my eyes (sensors) that it is raining, but I can't believe that its raining because I believe my sensors to be broken. Or even paranoia: ... its some elaborate hoax involving watering cans. Similar situations lead to self-deception, and also to hypocrisy, which is important for creating models of political actors and political reasoning, as political actors often lie about their beliefs.
  • Stanford Encyclopedia of Philosophy, Situations in Natural Language Semantics (2007) Note, however, that the analysis of section 1 of that article is patently insane. Whoever wrote that section clearly speaks a very different version of the English language than I do, and has utterly bungled the meaning and common usage of the simple-past tense when combined with "that". In particular, the inference that results in the statement that the inference in (4) is invalid is itself an invalid inference. Alas. This is a not-uncommon problem in linguistics: the way that a single linguist understands a language can often be at odds with how most ordinary people actually use language. The rest of the article is also marred by the attempt to apply some sort of formulaic, crisp logical reasoning, and an insistence on crisp truth values, while failing to make use of the common-sense reasoning that people actually use, and that is actually used in the article's meta-discussion of the various problems. Clearly OpenCog simply does not, cannot work in the fashion described there..