OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-matrix commits / 78cb603

write an intro
78cb6034dfef7ea088b7d668800ef0523b50d688
by Linas Vepštas <linasvepstas@gmail.com> · 2025-01-25T01:53:39.000Z

Changed files (1) +30 -1

design/Design-similarity.md +30 -1
……@@ -5,7 +5,7 @@ core problem that the matrix API was invented to solve. Tries to do this
55at a deeper, more abstract and simpler way.
66
77Motivation
8---------
8----------
99The current matrix API provides an extensive set of objects and
1010functions for working with sparse vector embeddings. The vast selection
1111is characteristic of what human programmers wnt and expect when
……@@ -16,3 +16,32 @@ Almost all of the matrix API was developed to support one generic
1616problem: obtaining the similarity between two things. Thus, the task at
1717hand is find some simpler, easier, more basic way of thinking about and
1818working with similarity.
19
20(Vector) Embeddings
21-------------------
22All things have a local neighborhood of other things that are connected
23and related to them. They have properties, aspects, relationships to
24other nearby things. This embedding can be (mathematically) abstracted
25in several ways:
26
27* The "thing" is a vertex in a graph, and (labelled) graph edges connect
28 it to other "things". This automatically defines the local
29 neighborhood: anything that is only on edge away is necessarily local.
30
31* Edges may be assigned a real number (floating point) weight, giving a
32 more refined sense of distance.
33
34* Same as above, but with hyperedges and hypergraphs.
35
36* Graph theory notes that every graph has a corresponding adjacency
37 matrix. The rows and columns of this matrix are vectors, from here on
38 called the 'embedding vectors'. These vectors are sparse (not all
39 vertices are connected by edges), and usually extremely sparse
40 (because scale-free networks are extremely sparse, and most things
41 in nature are scale-free.)
42
43These last four bullets lead to the existing matrix API. The network
44graph is "already there", in the AtomSpace; the edges are clearly
45marked, the embedding vectors are already implicit in the graph, and
46all that was needed was an API to work with these (sparse) vectors.
47Given a vector API, a cornucopia of similarity measures can be created.