Patterns as contextually invoked procedures

January 3, 2009

Followup to: Continuous balancing of changing structure.

Patterns present in the memory direct the change of current context. They are instantiated depending on state of the scene, and resulting state of the scene depends on their structure. Thus, apart from declarative interpretation, patterns can be considered as contextually invoked procedures.

In simpler cases, declarative patterns build new structures in the current scene, adding content, and displacing other content. The resulting structure can be mostly predetermined, perhaps as reconstruction of past episodes, verbatim or distilled into semantic memory.

In other cases, procedural patterns implement more elaborate procedures that recombine existing patterns in a scene, even if those existing patterns never occurred in the same combination before. The operation of procedural patterns can be thought of as based on controlled conceptual slippages.

The structure of the scene is supported on a network of contextual interfaces between patterns. When interfaces change, so does the structure. When previously unconnected patterns somehow acquire compatible interfaces, these patterns become connected, which in turn leads to interference between them, and a wave of integration of their structures. The scene gets rebalanced around a new connection.

To implement nontrivial procedure, a pattern is invoked for a combination of cues on existing patterns. Its application attaches new cues to these patterns, that act as interfaces connecting them in a new way and starting a recombination process.

The operation of procedural patterns is slightly analogous to the way complex biochemical processes work in a cell, with molecules being produced step by step, new cues appearing at each step, allowing new reactions to proceed at various active sites, protein folding acting as structure-changing rebalancing, enzymes implementing global context, and structures like ribosomes reliably transforming elements of representation. Analogy is rather weak, but shows some of the elements of the process. It applies more to the declarative patterns than to procedural ones, and doesn’t include learning.

When patterns are interpreted as contextually executed procedures, the balancing process can be interpreted as a process of parallel procedure execution, where multiple procedures are running in their local contexts, interacting with each other through that context. Each procedure has activation conditions, and each procedure has its own structure that determines its effect when applied at the call site. External input introduces the change in the context, but gets processed the same way. A balanced scene that doesn’t change corresponds to a stable point, with procedures running in a loop. Declarative patterns are simple procedures, and procedural patterns are more general. Declarative patterns are “nouns”, and procedural patterns are “verbs”. Some patterns contain just a few steps, and some initiate complex processes, transforming the scene along one of the many possible paths, chosen based on context along the way, branching out into multiple parallel procedures.