Hypergraph approach to inferences

52 views
Skip to first unread message

Clément Michaud

unread,
Dec 2, 2024, 5:44:28 AM12/2/24
to open-nars
Hi,

I read the book on NAL multiple times already and I felt like trying a different approach for the inference control mechanism and I would like to share my approach and challenge it with your opinion. I'm trying an approach where each concept would be a node of an hypergraph and edges would be the inferences. I have not considered time and events yet, please bear with me. 

In a nutshell my approach has two objectives:
1. Try to cut down the number of concepts in the KB and inferences to reduce the amount of computations.
2. Try to find inference pathways to a goal as fast as possible.

In this approach, the system would have only one instance of each concept by only keeping the concept with the biggest evidential base and best confidence at any point in time. One advantage of that is that the system can try to exploit the maximum of already existing relations before expanding with new concepts and inferences, which helps in reducing the explosion of nodes and paths.
Forward and backward inferences would be represented by edges in the system. Applying those inferences would propagate the truth-values throughout the graph until a stable state is reached (I have not proven that it exists yet though. It might not be trivial to prove if there are cycles in the graph, but given the evidential base is finite, I'm quite confident we can prove it).

A new piece of evidence coming into the system would merge with the previous one with revision and propagate its truth-value throughout the graph.

Answering questions would then be either queries on the nodes or finding a path between nodes in the hypergraph. I still need to figure out how to efficiently find the paths because the number of edges might be a pb.

Another advantage of this model is that I can also stir the system by defining a "global confidence" of the graph as being the sum of all confidences of all nodes and optimize this measure by rejecting nodes and edges that make the global confidence decrease by too much.

Here is an example of graph with basic forward inferences on syllogisms that I generated with my code. I'm currently working on the propagation of the truth-values.

graph.png

Have you considered such an approach? Do you see any problem with it?

Clément

Pei Wang

unread,
Dec 3, 2024, 9:21:35 AM12/3/24
to open...@googlegroups.com
Hi Clément,

Your approach is very reasonable, and I'm sure there are situations where such a memory structure and control strategy is suitable. I don't do something like that in OpenNARS, mainly for the following reasons:

1. Your hypergraph does not directly correspond to "what the system knows", but "how its knowledge can be used". I'm afraid the latter will be much larger than the former for the same content.
2. Conventional graph algorithms usually don't work in "real-time" in the sense used in NARS.
3. To treat problem-solving as "path-searching" usually assumes the possible paths already exist, while in NARS most efforts happens in constructing the paths.

I'm looking forward to the results of your exploration. In general, I don't think there is a "correct/optimal" implementation of NAL. Instead, there are many trade-offs to make, even under the same principles (such as AIKR).

Regards,

Pei

--
You received this message because you are subscribed to the Google Groups "open-nars" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-nars+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/open-nars/f1fe83b0-284a-471c-9b42-dffaec3b04f9n%40googlegroups.com.

Clément Michaud

unread,
Dec 3, 2024, 3:43:52 PM12/3/24
to open-nars
Hi Pei,

Thanks for your reply.

1. if we consider the set of all judgements (in my case, the statements with the biggest evidential base along with its truth value) in the system to be "what the system knows", then everything will be in the graph as nodes. If you consider what the system knows to be edges between the subject and the predicate of each statement represented as nodes, that's right, those are not in the graph yet but I might add that to help the system discover new hyperedges.
2. I see, I do not have this constraint indeed. I'm trying to solve puzzles with NAL reasoning, not in real-time though.
3. That's right, if the path does not exist, standard algorithms would probably visit all nodes before figuring out there is no path. My plan is to cut this search dynamically with some heuristic but I'm not there yet.

I'll let you know.

Regards,
Clément
Reply all
Reply to author
Forward
0 new messages