OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-sensory commits / 3e25f27

"What is structure"?
3e25f27dc3a0e69662dea2fc9a0594d2514b10e5
by Linas Vepstas <linas@linas.org> · 2026-01-13T03:25:21.000Z

Changed files (1) +84 -1

DesignLearn-A.md +84 -1
……@@ -3,7 +3,7 @@ Structure Learning
33New set for notes concerning the learning of structure. Different
44chapter than the earlier notes.
55
6Start with a recap of the earlier proect for learning structure.
6Start with a recap of the earlier project for learning structure.
77
88Recap of Previous Learn Project
99-------------------------------
……@@ -81,3 +81,86 @@ Status: Punt. Item C) is the aspirational goal. The code located at the
8181https://github.com/opencog/atomese-simd directory is some pre-prototype
8282of A) and B) and I might yet tinker with it some more. I do not yet have
8383an firm road-map for getting to C).
84
85What is Structure?
86------------------
87I wish to define "structure" in some quasi-model-theoretic terms.
88"Quasi" because the goal is not to be slavish to the formal textbook
89definition, but to convert it into an artistic, sculptural impression.
90
91Structures consist of axioms, rules, n-ary function terms, relations.
92Formally, they also include the bool logical operators, but I want to
93convert those into yet more functional terms. Why? Lets take a detour
94into proof theory.
95
96Proof theory works with axioms and inference rules. We have some
97collection of axioms, asserted a priori, and some other collection of
98inference rules, also asserted a priori. A theorem prover chains these,
99forward or backward, to find "proofs" for "theorems". Instead, I want to
100think of this process as being a kind of generation, where rules and
101axioms are specific building blocks that are assembled.
102
103The rules and axioms are jigsaw pieces; theorem proving is the assembly
104of these. If it is free an unconstrained, then it is generation; if its
105constrained, then some sort of satisfiability solver is needed: the
106jigsaw much assmble so as to build be bridge between constraints. The
107satisfiability algorithm must be fast, but also the bridge that is build
108mst be minimal or optimal in some way.
109
110The words "minimal" and "optimal" make me personally think of minimal
111surfaces: soap bubbles, for instance. Geodesics in Rimannian geometry.
112Assemblies of jigsaws do not have smooth differentiable structure, but
113still, some of the ideas carry over analogously, because there are
114several natural ideas of "minimal" for jigaw assemblies. For example:
115the assembly that uses the minimal number of pieces. Or, if we weight
116each piece with e.g. log probability (i.e. "entropy" or "information")
117then minimize the sum of that.
118
119The general "feel" of continutity is taken up by the Scott topology,
120where we can talk about the homotopic deformation of jigsaw aassemblies.
121There is a very easy way of understanding this if you are a software
122programmer: a "homotopic deformation" is a "refactoring of the
123software". Any collection of small changes that can be made to a
124software program that does not alter it's function. Move if-statements
125out of loops. Unroll loops. Stuff like that. These are homotopic
126transformations: they alter the structure without altering function,
127and, when taken as small, tiny changes, can be thought of as providing
128a kind of "continuous deformation".
129
130Consider an optimizer inside a compiler: it has some assembly snippet,
131using some registers and some insns, and it can re-arrange some of the
132insns, replacing them with others, choosing different register
133assignments, thus creating more efficient, compact code without altering
134its function. The `-O2` flag on a C compiler. The optimizer does not
135work on bare assembly, but in abstract insn sets, the "intermediate
136langauge" being a way-point.
137
138But this analogy can be pushed "all the way": A compiler is a homotopic
139defomration of a C/C++ program into assembly code; an assembler is a
140further deformation (and linking!) into machine binary. A bridge between
141two different represenations that does not alter the function: Whatever
142the programmer wrote the C/C++ code to do, the machine binary will do
143the same thing. The transformation from one to the other was
144accomplished in a very long sequence of small steps.
145
146What about differentiability? Even that has an analog: finite
147differences. When collections of jigsaws can be assigned a number (e.g.
148total number of pieces; total weight; length of shortest path; total
149number of connections/connectors; width (fatness) of necks, or of
150waists... etc.) These may vary be discrete amounts, but differences can
151be taken, giving an analogy to differentiation.
152
153Can one write a finite-difference version of the Euler-Lagrange
154equations (the solution of which defines geodesics)? I don't know.
155Perhaps. People already run around claiming that one should maximize
156free energy (Gibbs free energy) or perhaps the "integrated information";
157all of these ideas imply some kind of differentiable stucture minimized
158or maximized via some Euler-Lagrange-style differentail or difference
159eqns. I don't want to get hung up on the details, but rather the
160artistic impression: when there is stuff to be minimized and maximzed,
161and when one has paths that can take you from here to there in some
162quasi-continuous fashion, then one has some local difference-type
163gradient that helps figure out how to move.
164
165
166pairs.