OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomese-simd commits / d5b86aa

Thinking about embeddings
d5b86aa024b8cae80e2be7529c65228059f8ba43
by Linas Vepštas <linasvepstas@gmail.com> · 2025-09-18T20:45:49.000Z

Changed files (1) +31 -2

Design-F.md +31 -2
……@@ -4,12 +4,14 @@ September 2025
44
55Notes about implementing Atomese descriptions of RNN's an LSTM.
66
7Embedding Atoms into RNN and LSTM
8----------------------------------
7Describing NN's with Atomese
8----------------------------
99The task here is to be able to describe the structure of RNN's, LSTM and
1010similar networks in "pure Atomese", i.e. using PlusLink, TimesLink and
1111so on to describe the vector operations.
1212
13Embedding Atoms into RNN and LSTM
14----------------------------------
1315A subtrask is to create vector embeddings for Atoms. Several types of
1416vector embeddings are posible:
1517* Every Atom has a 64-bit hash value; this could be converted to a
……@@ -19,3 +21,30 @@ vector embeddings are posible:
1921* Conventional RNN's and LSTM's use float vector embeddings. How would this
2022 work?
2123
24Vector Embeddings
25-----------------
26A reasonable way of doing a vector embedding for some Atom is to have
27```
28 (cog-set-value! (Atom...) (Predicate "some-key") (FloatValue...))
29```
30where the `FloatValue` would be N floats long (for N=768 or 1024 or
31whatever), and the initial value would be generated using a deterministic
32algo that used the 64-bit atom hash value as an RNG seed, generating N
33floats (deterministically) from this seed.
34
35Several issues:
36* What should they key be?
37* How is the float vector generated?
38* What is being predicted/trained on?
39
40### What should they key be?
41We need to allow for (many) different embeddings, all available at the same
42time. The specific set of Atoms to be embedded in some specific network
43emerge as the result of running some QueryLink over the AtomSpace. This is
44similar to how the "matrix" code works today: the vocabulary is limited to
45a specific set of Atoms that respond to some specific Query (or other
46identification.)
47
48Thus, it makes sense for the key to be the specific Atom, usually a
49QueryLink, but also maybe any other atom that specifies the specific
50vocabulary for the specific embedding.