storing concepts with opencog

52 views
Skip to first unread message

aymeric

unread,
Jan 3, 2022, 2:08:06 PM1/3/22
to opencog

Hello everyone,

I am defining my Phd subject which will revolve around Neuro-symbolim. The goal would be to make an agent to learn as much knowledge as it can from its environement, and I found the opencog and the atomspace graph very interesting for the implementation.

My questions might be too vague, but maybe somebody can provide an answer or at least some guiding ideas.

How can we use the opencog system to store increasingly more complex concepts of the environment an agent is exploring ? Can the concepts be casted as atoms ? How would the relations between atoms be constructed ? Is there already a solution in the opencog ecosystem to store concepts in a hierarchical or composed manner ? (I am thinking for instance of the Option framework, where long sequences of actions are stored (as RL algos) and guided by a meta-policy, can this framework be "easily" implemented with opencog?).

Hope my questions are a bit clear. I am reading a lot of papers now and it sometimes difficult to grasp all the concepts and be articulated when talking about them.

Thanks!

Aymeric

Linas Vepstas

unread,
Jan 3, 2022, 9:36:05 PM1/3/22
to opencog
Hi Aymeric

On Mon, Jan 3, 2022 at 1:08 PM aymeric <aymeric...@hotmail.fr> wrote:
>
>
> Hello everyone,
>
> I am defining my Phd subject which will revolve around Neuro-symbolim. The goal would be to make an agent to learn as much knowledge as it can from its environement, and I found the opencog and the atomspace graph very interesting for the implementation.
>
> My questions might be too vague, but maybe somebody can provide an answer or at least some guiding ideas.

In principle, your questions are answered in various wiki pages and
demos, but I don't recall if we have a single simple approachable wii
page for this. Nil, do you know of anything?

> How can we use the opencog system to store increasingly more complex concepts of the environment an agent is exploring ? Can the concepts be casted as atoms ? How would the relations between atoms be constructed ?

You have many choices in how to do this. A common and popular way to
do this is to write

(EvaluationLink
(PredicateNode "relative who is an uncle")
(ListLink
(ConceptNode "Bob")
(ConceptNode "Alice")))

which encodes that Bob is Alice's uncle. There are ways to attach
numbers to the above, to signify propabilities, certainties, weights,
and so on. You can attach key-value pairs to the five atoms above, as
you wish.

You don't even have to use EvaluationLinks or PredicateNodes or
ConceptNodes as above; you can represent this data in other ways,
depending on how clever and fancy you want to get. But the above is a
good place to start.

> Is there already a solution in the opencog ecosystem to store concepts in a hierarchical or composed manner ?

Sure. It's called the "AtomSpace". You can read about it here:

https://github.com/opencog/atomspace

The above points to additional documentation and demos.

> (I am thinking for instance of the Option framework,

I don't know what the "Option framework" is, and neither does
duckduckgo or google.

> where long sequences of actions are stored (as RL algos) and guided by a meta-policy,

I don't know what an "RL algo" is, or a "meta-policy".

> can this framework be "easily" implemented with opencog?).

OpenCog consists of dozens of pieces-parts. Some are strong, solid and
mature; some are broken and obsolete, and some are brand new and in
active development.

The AtomSpace is by far the most mature, stable and well-tested
component. It's the foundation stone for everything else. There are
other components you might be interested in, but you'd have to
describe what you want to do in greater detail.

-- Linas

aymeric

unread,
Jan 4, 2022, 12:09:59 AM1/4/22
to opencog
Thank you for the answer Linas,

> I don't recall if we have a single simple approachable

I did not find an "Hello world" for opencog. I think it could be a good useful (especially if it displays the potential possibilities of using the framework). But I will go with the https://github.com/opencog/atomspace page, I think it will be enough for me.

> I don't know what the "Option framework"is

Sorry, should have provided a link, here it is: https://www.youtube.com/watch?v=x_QjJry0hTc (up till 5"10 you have a good explantion of the concept)

> I don't know what an "RL algo" is, or a "meta-policy".

see the video above


To specify my search:

I am looking for a solution (idealy a ready-to-use solution but I am dreaming of course) or a set of solutions that enable the agent to "store repetive patterns (concepts) that it observes while evolving in its world" (a "pattern" can be a sequence of objects appearing in the scene over time, can be its own actions that lead to one same observation etc.).

I guess I will need to use several components of opencog to achieve this.


Aymeric

Linas Vepstas

unread,
Jan 4, 2022, 1:28:47 AM1/4/22
to opencog
On Mon, Jan 3, 2022 at 11:10 PM aymeric <aymeric...@hotmail.fr> wrote:

> I did not find an "Hello world" for opencog.

Please take a look at the demos in
https://github.com/opencog/atomspace/tree/master/examples/atomspace

The demos are written in scheme, but you can also do them in python.
It's more or less the same.

> I am looking for a solution (idealy a ready-to-use solution but I am dreaming of course) or a set of solutions that enable the agent to "store repetive patterns (concepts) that it observes while evolving in its world" (a "pattern" can be a sequence of objects appearing in the scene over time, can be its own actions that lead to one same observation etc.).
>
> I guess I will need to use several components of opencog to achieve this.

You need only the atomspace. The atomspace stores arbitrary graphs
(hypergraphs, metagraphs), to which you can attach arbitrary weights,
vectors, probabilities or other data. This means that you can store
any kind of neural net, bayesian net, markov net, whatever, in the
atomspace, and you have a large number of different ways to represent
this data. The hard part is to understand the performance
implications of storing things one way vs. another way, because
different representations run at different speeds, and use different
amounts of RAM (in exchange for making queries or other manipulations
go faster.)

The Options Framework appears to have lots of probabilities and
vectors & stuff in it. For these, it is probably best to use the
FloatValue https://wiki.opencog.org/w/FloatValue and attach it to
whatever graph you design.
https://github.com/opencog/atomspace/blob/master/examples/atomspace/values.scm

Now, the AtomSpace is meant for storing things (in RAM, or to disk)
and for querying them. It is not optimized for performing high-speed
arithmetic on floating point numbers. (I could show you how to write a
custom module to do this, but that is an "advanced" topic.) You can
update Atoms and Values tens of thousands, maybe hundreds of thousands
of times per second, but that's it, that's the limit. It is not meant
to compete with conventional programming languages for performing
conventional high-performance numerical algorithms.

You can use the AtomSpace to save, restore, query, rewrite, transform,
manipulate and reason about graphs. However, it does not have any
generic deep reinforcement learning module. (I guess I could show you
a way that this could be done. We'd have to have a long discussion.)
It does have a generic way of working with vectors and matrices, but
this is a more advanced topic that might not suit your needs. See
https://github.com/opencog/atomspace/tree/master/opencog/matrix

-- Linas

Nil Geisweiller

unread,
Jan 4, 2022, 7:38:11 AM1/4/22
to ope...@googlegroups.com, aymeric
Hi Aymeric,

I think you want to have a look at ROCCA

https://wiki.opencog.org/w/ROCCA

If possible you may join our monthly community call, next one is Friday.

Regarding recognizing, storing and reusing abstractions, as Linas said,
the AtomSpace provides that, you don't even need to name your
abstractions due to the graphical nature of the data store. However the
more abstractions you have, the more focus you need to overcome
information overload.

Nil
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/f6de7a4a-d91c-4acb-9cf3-41dbdf27d6f2n%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/f6de7a4a-d91c-4acb-9cf3-41dbdf27d6f2n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Aymeric

unread,
Jan 4, 2022, 8:34:08 AM1/4/22
to opencog
Thanks for these insights Linas and Nil. I was wondering how I could "name" the concepts, but indeed, being graphs each of them should be unique.

Regarding the monthly community call, how should I join it ?

Regards

Aymeric

Aymeric

unread,
Jan 5, 2022, 6:23:31 AM1/5/22
to opencog
Found the link eventually, if anyone needs it: https://meet.jit.si/rocca
Reply all
Reply to author
Forward
0 new messages