Fluxyr

Research paper · Cognitive architecture

An Algorithmic Architecture for a Synthetic Brain Inspired by Human Memory

The SyntheticBrain — an architecture that gives AI a structured, persistent, human-inspired memory: short-term working memory plus distinct semantic, episodic, and implicit long-term stores, with algorithms for encoding, consolidation, context-aware retrieval, and pruning.

Download the paper (PDF)

Abstract

The quest for artificial intelligence systems exhibiting human-like cognitive flexibility requires architectures capable of managing knowledge and experience in a structured, persistent, and context-aware manner. Many current AI models lack robust memory systems comparable to the multi-faceted nature of human cognition. This paper details the algorithmic architecture of the SyntheticBrain, a system designed to emulate key aspects of human memory organization and processing. It features a multi-component memory system including Short-Term Memory (STM), and distinct Long-Term Memory (LTM) stores for Semantic, Episodic, and Implicit knowledge, drawing inspiration directly from cognitive science models.

The architecture incorporates algorithms for encoding incoming information, consolidating memories based on importance and usage, retrieving contextually relevant information, and adaptively pruning less significant data. By focusing on these cognitively inspired algorithmic principles — capacity-limited working memory, distinct LTM pathways, importance-based retention, and context-dependent retrieval — the SyntheticBrain architecture aims to provide a foundation for AI systems with enhanced consistency, reasoning, and adaptability.

Introduction

Artificial Intelligence has made significant strides, yet replicating the nuanced cognitive capabilities of the human mind, particularly its sophisticated memory functions, remains a formidable challenge. While models excel at specific tasks, they often fall short in maintaining long-term consistency, reasoning deeply from past experiences, and dynamically managing context over extended interactions. This limitation stems, in part, from the absence of persistent, structured memory systems akin to those observed in human cognition.

This paper introduces the SyntheticBrain, an algorithmic architecture designed explicitly to model key functional aspects of human memory systems. Inspired by cognitive science research, it implements a multi-component memory structure, including a capacity-limited Short-Term (Working) Memory and distinct Long-Term Memory stores for semantic (factual), episodic (experiential), and implicit (procedural/associative) knowledge.

The core contribution of this work lies in detailing the algorithmic principles that govern the architecture: encoding new information into appropriate memory stores, consolidating memories based on calculated importance and usage patterns, retrieving relevant knowledge based on current context, and adaptively pruning or forgetting less salient information. These processes are designed to mimic, at a functional level, the dynamics observed in human memory.

Background: Human Memory Systems

To provide a foundation for the SyntheticBrain architecture, we briefly review established models of human memory, focusing on the structures and processes that inspire its design.

Core Memory Systems

Human memory is understood as a collection of interacting systems rather than a single entity. Information often begins in Sensory Memory, a very brief, high-capacity buffer holding raw sensory input. Information selected by attention proceeds to Short-Term Memory (STM), characterized by its limited capacity (around 7±2 items) and short duration. The concept of Working Memory expands on STM, describing a more active system for temporarily holding and manipulating information essential for reasoning, comprehension, and learning.

Long-Term Memory (LTM)

Information successfully processed in Working Memory can be encoded into Long-Term Memory (LTM), the brain's vast repository for durable knowledge and experiences. LTM is typically categorized into:

  • Episodic Memory — stores personal experiences and events, tagged with specific times and places (autobiographical memory).
  • Semantic Memory — general knowledge about the world: facts, concepts, language, and schemas, detached from the specific learning context.
  • Procedural Memory — skills, habits, and motor patterns acquired through repetition (e.g., riding a bicycle).
  • Priming and Associative Learning — implicit influences on behavior, including classical and operant conditioning.

The SyntheticBrain architecture functionally models the distinction between STM/WM and the explicit LTM stores (Semantic and Episodic), while also providing a placeholder for Implicit memory.

Fundamental Memory Processes

  • Encoding — transforming incoming information into a format that can be stored, ranging from simple sensory registration to complex semantic elaboration.
  • Consolidation — a time-dependent process that stabilizes a memory trace after its initial acquisition, making it more resistant to disruption.
  • Retrieval — accessing stored information; often context-dependent, so cues present during encoding can facilitate later recall.
  • Forgetting — far from being solely a failure, an adaptive process that prioritizes relevant information and prevents cognitive overload, via decay, interference, or retrieval failure.

The SyntheticBrain incorporates algorithmic analogues for encoding, consolidation (including importance-based retention), retrieval (context-aware), and forgetting (pruning based on capacity and importance).

The SyntheticBrain Architecture

The architecture provides a modular framework designed to equip AI systems with more structured and persistent memory, drawing functional inspiration from human cognitive models. It manages information flow, storage, and retrieval in a way that supports more coherent and context-aware interactions. The figure below illustrates the overall architecture and data flow.

Figure 1 — SyntheticBrain architecture and data flow.

Architectural Components

  • Input Processor / Encoder — receives external inputs (text, images, files) and structures them for internal processing.
  • Short-Term Memory (STM) / Working Memory Buffer — a capacity-limited buffer for the immediate context of an interaction. It holds recent messages and prunes older ones when capacity is exceeded, prioritizing retention of system messages so core instructions persist.
  • Semantic Memory Store — a key-value store of factual and conceptual knowledge, tracking importance, access count, and last-accessed time per item.
  • Episodic Memory Store — stores sequences of events or interaction snippets with a defined capacity; pruning prioritizes retention by importance, recency, and access count.
  • Implicit Memory Store — captures procedural knowledge, biases, and learned patterns (e.g., tool-usage statistics), updated from interaction history and outcomes.
  • Memory Processing Unit — the algorithms managing memory dynamics: consolidation (transferring important pruned STM items into LTM), importance calculation, context-aware retrieval, and forgetting/pruning.
  • Prompt Constructor — dynamically assembles the model input from system instructions, current STM content, and relevant retrieved LTM items.
  • Tool Execution Interface & State Management — manages interactions with external tools, and serializes/deserializes the entire cognitive state for persistence and resumption.

Algorithmic Flow Example

A typical interaction follows this algorithmic flow:

  1. Receive and encode the user message.
  2. Add the message to Short-Term Memory.
  3. Construct a prompt from system instructions, STM content, and memories retrieved from LTM based on context.
  4. Send the prompt to the underlying AI model via the provider adapter.
  5. Receive the model's response and add it to Short-Term Memory.
  6. Handle any tool calls, pausing or looping back after tool execution.
  7. Consolidate memory: prune STM, identify important pruned items, and add/update them in the appropriate LTM stores; update Implicit memory.
  8. Return the final response, execution state, required tool calls, and token usage.

Discussion

Cognitive plausibility. The architecture deliberately mirrors several key aspects of human memory. The distinction between a capacity-limited STM/WM buffer and distinct LTM stores aligns with dominant cognitive models. Capacity-based pruning, importance/recency-based retention, context-dependent retrieval, and consolidation are functional analogues of biological memory processes — though these are high-level abstractions rather than simulations of neural mechanisms.

Advantages. Distinct memory components offer advantages over extending context windows or using undifferentiated vector stores: improved consistency across longer dialogues, better context management via the interplay of a limited STM buffer and context-aware LTM retrieval, structured knowledge with retrieval strategies tailored to each type, and a basis for adaptation through importance updates and pruning.

Algorithmic considerations & limitations. Retrieval from LTM could become a bottleneck as stores grow; sophisticated indexing and semantic vector search would be needed for scalability. The current consolidation is simple, and the importance metric relies heavily on access counts and recency. Semantic understanding for encoding and retrieval largely depends on the external AI model integrated via the provider adapter.

Future work. Promising directions include more sophisticated consolidation that performs abstraction (e.g., deriving semantic rules from multiple episodes), richer importance models incorporating feedback from task success, advanced data structures (graph databases for semantic memory, vector indices for similarity search), and a more developed implicit-memory component modelling skill acquisition.

Conclusion

This paper detailed the algorithmic architecture of the SyntheticBrain, a system designed to provide AI with a more structured and human-like memory framework. Inspired by cognitive models, it features distinct Short-Term and Long-Term (Semantic, Episodic, Implicit) memory components, governed by algorithms for encoding, consolidation, context-aware retrieval, and importance-based pruning. While a functional abstraction of complex biological processes, its modular design and focus on algorithmic memory management provide a valuable blueprint for developing more sophisticated and capable artificial cognitive agents.

References

  • NeuronUP (2022). A memória: definição, tipos, exercícios e avaliação.
  • Wikipedia (n.d.). Memória humana.
  • Cecierj (n.d.). A aquisição de memórias. Neurocognição.
  • Meu Cérebro (2024). Memória e esquecimento: duas faces necessárias da mesma função cerebral?
  • Anderson, J. R., Bothell, D., Byrne, M. D., Douglass, S., Lebiere, C., & Qin, Y. (2004). An Integrated Theory of the Mind. Psychological Review, 111(4), 1036–1060.