Modeling of Memory Mechanisms in Cerebral Cortex and Simulation of Storage Performance

Hui Wei [email protected] Chenyue Feng Jianning Zhang
Abstract

At the intersection of computation and cognitive science, graph theory is utilized as a formalized description of complex relationships and structures. Traditional graph models are often static, lacking dynamic and autonomous behavioral patterns. They rely on algorithms with a global view, significantly differing from biological neural networks, in which, to simulate information storage and retrieval processes, the limitations of centralized algorithms must be overcome. This study introduces a directed graph model that equips each node with adaptive learning and decision-making capabilities, thereby facilitating decentralized dynamic information storage and modeling and simulation of the brain’s memory process. We abstract different storage instances as directed graph paths, transforming the storage of information into the assignment, discrimination, and extraction of different paths. To address writing and reading challenges, each node has a personalized adaptive learning ability. A storage algorithm without a “God’s eye” view is developed, where each node uses its limited neighborhood information to facilitate the extension, formation, solidification, and awakening of directed graph paths, achieving competitive, reciprocal, and sustainable utilization of limited resources. Storage behavior occurs in each node, with adaptive learning behaviors of nodes concretized in a microcircuit centered around a variable resistor, simulating the electrophysiological behavior of neurons. Based on Ohm’s and Kirchhoff’s laws, we simulated the dynamics of this directed graph network on a computer, where the network could store and retrieve uploaded instances, confirming the model’s effectiveness and exploring its storage capacity. Under the constraints of neurobiology on the anatomy and electrophysiology of biological neural networks, this model offers a plausible explanation for the mechanism of memory realization, providing a comprehensive, system-level experimental validation of the memory trace theory.

keywords:
Memory Modeling, Directed Graph, Storage Simulation, Decentralized Algorithm
journal: arXiv
\affiliation

[]organization=Laboratory of Algorithms for Cognitive Models, School of Computer Science, Fudan University, addressline=No.2005 Songhu Road, postcode=200438, city=Shanghai, country=China

1 Introduction

The brain, as a complex information processing system, remains incompletely understood, particularly its memory mechanisms. Exploring how the brain encodes, stores, and retrieves information has always been a significant challenge in memory research. Modern neuroimaging technology is rapidly advancing, and through methods such as fluorescent tagging and two-photon imaging, humans are gradually unveiling the neural system’s connectivity and other details. However, such analyses can only offer limited insights, and we are still unfamiliar with the neural mechanisms and information flow directions underlying memory activities. From a neurobiological perspective, memory refers to neural system activities or physical changes in neuronal connections triggered by external stimuli or brain states [1]. Neurobiological research on memory mechanisms focuses on synaptic plasticity [2, 3, 4, 5], neurotransmitters [6, 7], and electrochemical signals [8, 9] at the cellular and molecular levels, while cognitive psychology likens memory to an information processing system responsible for encoding, storing, and retrieving information. These theories provide a reasonable starting point to map the brain’s coarse-scale organization using functional imaging technologies including EEG and fMRI [10].

Marr’s three-level theory divides the problem to be studied into three levels: behavioral, algorithmic, and implementation. We adopt this theory to stratify the study of memory mechanisms, comparing the storage functions of computers and the human brain in a layered manner, as illustrated in Figure 1. Current understanding of the brain’s algorithmic layer is relatively limited, especially intermediate models that are consistent with neurobiological experimental evidence. Therefore, it is necessary to combine computational theory with biological experiments, modeling and simulating the brain’s memory process based on neurobiological evidence, bridging the gap between the microscopic level of cells and the macroscopic level of cognitive behavior.

Refer to caption
Figure 1: Marr’s Hierarchical Diagram of Storage Memory Systems of Computers and the Brain

We model and simulate the biological neural network to explore the brain’s memory mechanism, focusing on how encoding, storage, consolidation, and retrieval of information occur in the brain’s memory process. Modern digital computers possess powerful storage capabilities, and comparing them with the brain can further our understanding of what is still missing in memory research. Table 1 compares computer storage and brain memory management, from which the implementation process of computer storage, from the bottom to the top layer, is clear. However, the implementation process of brain memory involves numerous unknowns, which motivates us to simulate and emulate the brain’s memory process based on neurobiological mechanisms.

Table 1: Comparison of Computer Storage Management and Brain Memory Management
Category Computer Storage Management Brain Memory Management
Minimum Functional Unit Data are stored in binary form, with hard drives using polarity of magnetic particles, charges in capacitors, etc., to represent 1s or 0s. In neural cells, membrane possesses resting and action potentials. In resting state, signal is inhibited; if activated, it generates an action potential, conducting signal.
Storage Device An HDD records data by changing the distribution of the two polarities of magnetic particles using an electromagnet on read/write head; an SDD stores 0s and 1s by altering the number of electrons in the floating gate layer through the application of an electric field. Memory refers to neural system activities or physical changes in neuronal connections triggered by external stimuli or brain states [1]. Many studies have begun to define engrams as basic units of memory, but there are unresolved issues such as how structure of engrams affects quality of memory, how multiple engrams interact with each other, and how engrams change over time [11].
Data Allocation Operating systems allocate disk space for files with blocks as the basic unit, using methods such as contiguous allocation, linked allocation, and indexed allocation. We have a very limited understanding of how a single memory item is structurally stored at the level of biological neurons, and how multiple memory items are allocated among neural cells (groups) in cerebral cortex.
Data Access Control circuits translate logical addresses into physical addresses. Read/write head of an HDD moves to the cylinder, track, and sector where the data are located for data access; for an SDD, controller directly performs read and write operations on storage units at physical address. When brain stores or recalls a memory, we know little about how it locates engram of memory content among vast number of neural cells in cerebral cortex, replacement of old memories with new ones, and neuronal network mechanisms during recall.

We focus on the algorithmic layer of the brain’s memory system, aiming to model and simulate the memory processes of the brain. We seek to explain the mechanism of memory realization from the algorithmic layer, exploring how the biological neural network encodes, stores, consolidates, and retrieves information. This contributes to the brain’s memory mechanisms and investigates their alignment with neurobiological experimental evidence.

The brain can be conveniently represented as a network of neurons and their interconnections, making graph theory a mathematical tool for studying its structure and functional systems. We utilize directed graphs from graph theory to model and simulate the algorithmic layer of the brain’s memory system, aiming to align anatomical and physiological data. As a branch of mathematics, graph theory provides tools for processing and analyzing network structures. Tracing back to Euler’s solution to the Seven Bridges of Konigsberg problem in the 18th century [12], it has been applied such as to design solutions for the Traveling Salesman Problem(TSP) [13], construct knowledge graphs [14], and create databases using graph structures [15], where graphs usually serve as structured representations of data or knowledge, inherently lacking dynamic behavior, with their functionality reliant on externally applied algorithms.

In these traditional applications of graph theory, algorithms typically operate on the graph structure from a global view, meaning that the executor of the algorithm (like a CPU) has access to global information and makes decisions. While biological neural networks lack such a global view or central controller and are characterized by decentralization, consisting of many simple units that are only connected to their neighbors. To better align with biological neural networks and more accurately model and simulate biological memory processes, we propose an algorithm that does not rely on a “God’s eye” view, focusing on implementing a storage function in a decentralized graph model. Just as neurons have only local connections, nodes in a directed graph can only see their connected neighbors. Each node makes decisions based on its local field of information. Nodes are no longer passive data storage units, but are active, autonomous units, which can adaptively learn how to respond in different contexts, simulating the behavior of biological neurons. Passive nodes with a single global algorithm and active nodes with numerous independent small algorithms represent two completely different paradigms. Contrasting these two modes in Figure 2, we see the difference between traditional centralized processing and the proposed decentralized processing. In the latter, each node stores information and can also process and transmit information, forming complex dynamic patterns across the entire network.

Refer to caption
(a) Centralized Mode: Single Global Module Operates on Graph from Detached, Overarching Perspective
Refer to caption
(b) Decentralized Mode: Each Node Possesses Attributes and Autonomous Capabilities, Such as Establishing Connections with Other Nodes
Figure 2: Comparison of Centralized and Decentralized Modes

We focus on the information processing mechanisms behind brain memory activities, using graph theory to comprehensively model and simulate memory, abstracting storage instances into directed graph paths. Through decentralized directed graphs and the pervasive learning algorithms inherent in each node, it dynamically learns and optimizes these paths, achieving a memory mechanism based on directed graphs, enabling efficient information storage and retrieval, and offering a novel perspective on the brain’s memory mechanisms.

2 Common Methods for Modeling Parallel Distributed Processes

The realization of memory functions in the biological cerebral cortex is a parallel distributed process, which can be modeled by several common methods.

2.1 Classical Graph Theory

Graph theory is widely applied in computer science, with current research focusing on the properties of static graphs. However, it relies on a “God’s eye” view and lacks research into the self-organizing dynamic behavior of graphs.

The TSP is a classic NP-hard problem, which involves finding the shortest path that visits each node exactly once and returns to the starting point in a complete graph [13]. It has a wide impact in areas including logistics, flight route planning, network design, and bioinformatics. Due to its high computational complexity, various methods have been proposed to solve or approximate it, such as branch and bound, nearest neighbor, simulated annealing, and genetic algorithms. These methods essentially act on a completely known graph, possessing a “God’s eye” view.

One of the earliest large-scale applications of classical graph theory in computer science is graph databases. Representing modern applications such as social networks in graph form is quite natural [15]. Graph databases represent data or patterns as graphs, with data structures modeled as directed, possibly labeled graphs. Data operations are represented by graphs, and operation-oriented and type constructors can be defined on graph structures along with appropriate integrity constraints [16]. As defined, the implementation of graph databases relies on external algorithms for different operations, such as graph construction, exhibiting a “God’s eye” view.

Another important application of classical graph theory is the knowledge graph, i.e., a structured representation of facts, entities, relationships, and semantic descriptions. Knowledge is interconnected, with knowledge nodes forming a graph network to integrate various knowledge domains [14]. Knowledge graphs possess a complete topology and leverage their structure to integrate knowledge, providing a “God’s eye” view. However, the graph remains static after information updates.

2.2 Graph Theory and Deep Learning

Graphs are now widely used in deep learning. Tasks involving models on graphs can categorized into two types: Node-centered tasks are associated with individual nodes in a graph and include node classification, link prediction, and node recommendation. Graph-centered tasks are related to the entire graph and include graph classification, estimation of various graph properties, and graph generation [17]. A well-known application, the Graph Convolutional Network (GCN), inputs graphs to convolutional networks for training [18]. Operations in deep learning involve manipulating graph data, relying on a “God’s eye” view, while the graph remains static.

Graph theory is extensively used in deep learning applications. In computer vision, node encoding methods include both non-neural networks, such as traditional graph embedding and probabilistic graph models, and neural networks, including Graph Recurrent Neural Networks, GCNs, and variants of Graph Neural Networks [19]. Again, these methods process graph data, and the graph itself is static.

2.3 Multi-agent Systems

Multi-agent systems have gained widespread attention in recent years. These decentralized systems accomplish a task through the collaborative effort of many small entities, each with independent behavior. The small entities make distributed independent decisions with individual tasks assigned to autonomous entities called agents, each determining the correct action for solving the task based on their inputs. Individual agents only have partial information and communicate with their neighbors. These are applied in areas such as computer networks, drones, and robot swarms [20].

Multi-agent systems are inspired by the natural world, such as in ant colonies and bee societies [21]. Each ant in a colony achieves complex tasks such as finding food, building nests, and collective defense through simple pheromone communication and collaborative behavior. Each bee communicates effective foraging information, temperature regulation, and new nest site selection through precise dances and collaboration. Through local interactions and simple rules, they achieve complex global behavior, providing inspiration and reference for computer science and promoting the development and innovation of artificial multi-agent systems.

Multi-agent systems are extensively used in robotic systems and to some extent can solve issues such as local positioning, obstacle detection, path planning, and navigation in multi-robot systems [22]. For example, a collision avoidance problem was solved for multiple robots in a decentralized, distributed framework, where input data were only collected from onboard sensors [23]. Each robot is an agent that shares its decision with all other robots, thereby achieving an optimal strategy among them.

Although multi-agent systems utilize distributed and decentralized decision-making, the connections between agents are relatively weak and do not form a fixed pattern for storage or other applications.

3 Modeling Based on Directed Graphs

Many researchers have modeled memory. The Hopfield network [24] is a type of recurrent neural network that can be abstracted as a directed complete graph, with many variants [25, 26, 27, 28, 29, 30]. Bidirectional associative memory networks [31] implement bidirectional associative functionality and have undergone many modifications [32, 33, 34, 35]. Structural learning has also been widely used [36, 37, 38, 39, 40], with some models considering the impact of memory retrieval on memory storage [36]. There are also sparse associative memory models [41] and models based on dictionary learning [42, 43]. Models based on graph theory, such as clique-based models [44] and competition graph models [45, 46], use graph theory and network flow theory to simulate human memory. These models have made progress in simulating human memory, but nevertheless have limitations. For instance, dense associative memory[25] lacks sufficient simulation of neuronal structure and function; the Hopfield [24] and BAM networks [31] have a gap in fully connected networks and biological realism; and clique-based models [44] process memory in a way not entirely consistent with actual mechanisms in the human brain. Many models face challenges in hardware implementation, computational resource requirements, and data processing efficiency.

Electronic components such as memristors [47, 48, 49] have also been proposed to model memory. Their resistance changes when electric current passes through, but remains constant if current flow stops. This memory of resistance makes them like biological neural synapses, and they are often used to construct memory computing models [50, 51, 52, 53, 54]. However, memristor-based memory models have shortcomings, such as only simulating a few neuronal synapses, and thus differing from biological reality [50], or focusing on circuit analysis and neglecting biological emulation [54].

These models provide valuable perspectives and tools to understand and simulate human memory. Based on them, our proposed model can more accurately simulate and understand the complex memory processes in the human brain, whose memory system consists of many structurally similar neurons connected by synapses, which can be abstracted as nodes and edges in a graph network, as shown in Figure 3. Abstractly modeling this as a locally connected directed graph aligns with biological reality. The process of signal transmission between neurons can be abstracted as a dynamic network flow.

Refer to caption
Figure 3: Abstraction of Human Brain Memory System into a Locally Connected Directed Graph

We utilize a two-dimensional matrix of directed graph nodes to abstractly model the biological neural network. Figure 4 depicts a generated 10×\times×10 scale node matrix of a directed graph network. Nodes, which possess their own behavior, are connected to neighbor nodes through directed edges. Edge nodes and internal nodes are shown in orange and gray, respectively. Arrows between nodes represent connections and directions of signal transmission. Notably, although there are bidirectional connections between edge and internal nodes, only one direction is activated at a time. When an edge node’s connection is directed toward an internal node, it is used as an input, representing the abstract definition of a storage instance, such as of an object’s name. When a connection is directed toward an edge node, it acts as an output node, representing specific features of a storage instance such as color or smell. A non-activated connection indicates that the storage instance lacks a certain specific feature. The proposed model’s underlying directed graph network should be capable of performing storage functions across different scales and topological structures.

Refer to caption
Refer to caption
Figure 4: (a):Abstract Modeling of Neuronal Network as Sparsely Connected Directed Graph (b):Directed Graph Path Modeling Representing Storage Instances

According to the memory trace theory, the content of memory is physically the propagation of neural excitation in a biological neural network caused by input stimuli, along with the reinforcement and awakening of propagation traces. The repeated occurrence of input stimuli can strengthen the connectivity between nodes. Inputs correspond to different propagation path traces, meaning that connected paths are specific physical carriers. This process does not require an overarching “God’s eye” view and is reasonable within the context of a biological neural network, which is massive and dynamic. Therefore, in our modeling, different paths are formed by arcs in the directed graph as the physical implementation of storage. For example, in Figure 4, the nodes at the top, bottom, left, and right, connected by some intermediate nodes and directed edges, form a subgraph that can be considered a storage instance in the directed graph.

4 Formation and Consolidation of Directed Graph Paths

Consider the implementation process of memory as the formation and consolidation of paths between nodes in a directed graph network is a natural approximation. Humans perceive external information through multiple senses to understand the characteristics of an object. Neurons, upon receiving stimuli, transmit signals to different downstream neurons in the network, forming various transmission paths. Repeated stimulation solidifies these paths, creating a memory. When similar signals are received again, they are transmitted along these established paths, in a process known as path consolidation.

Based on this process, our model, as shown in Figure 4, classifies nodes into edge nodes and internal nodes. Edge nodes represent the characteristic information of storage instances, serving as inputs and outputs of information. An activated edge node indicates the presence of a feature. Activated edge nodes can be in an input or output state (i.e., the respective starting point and endpoint of signal transmission), while inactivated nodes cannot input or output signals. Input edge nodes can connect and transmit signals to output edge nodes through internal nodes. The signal enters from an input node and continuously propagates outward, forming different paths, and the transmission ends when it reaches an output node or there is no further path. As the signal can only be output through output nodes, a stable signal flow is formed only on the directed graph paths that reach the output nodes; these interconnected paths form the path traces of an instance on the directed graph. Longer paths take more time to reach the output node, and signals are transmitted through the shortest path, which is the physical realization of storage, i.e., the connected path of the storage instance or simply the storage instance path.

Refer to caption
Refer to caption
Figure 5: (a):Numbering of Edge Nodes in Directed Graph (b):Forming Paths by Changing States of Edge Nodes

Figure 5 shows the numbering of each edge node. A vector can be constructed by connecting the states of edge nodes according to their numbers. This can be seen as a storage instance vector, representing different external stimulus features by altering the vector’s bits, forming different interconnected storage instance paths that can be remembered by the directed graph. Table 2 shows a vector of edge node states, where the first and second rows show node numbers and node states, respectively, where 1 indicates a node activated in the input state, –1 indicates the output state, and 0 represents inactivation. This vector is a storage instance, and the green path in Figure 5 represents the shortest transmission path of the signal at that time.

Table 2: Vector Representation of Edge Node State
Edge Node 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Status 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0
Edge Node 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Status 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0

Inspired by the complex regulation mechanisms of biological neuronal signal transmission, each node in the directed graph possesses independent and autonomous path learning capabilities, enabling nodes to record transmission paths. The directed graph can be divided into two working modes: storage and retrieval.

In the storage mode, the node’s path learning algorithm is activated. If there is a continuous flow of signals through a node, it will map the input path to the corresponding output path. If we upload the complete storage instance vector, activating the edge nodes, stable signal flow will be formed only on the shortest path. Once the path is formed, a stable and continuous signal flow will exist along it, and the path learning algorithm of each node will store the path that passes through, distributing the traces of the storage instance path across each node.

In retrieval mode, the node’s path learning algorithm is turned off. The vector uploaded during retrieval, i.e., the probe vector, may lose some bits compared with the original vector. When this is uploaded, edge nodes of the missing bits will be set to output status, allowing the activation of more output paths in the graph. This implies that in the absence of certain features, their possible existence is assumed, which is later determined by whether there is signal output, and the signal transmission path is the retrieved path. Notably, the input state bits cannot be lost, as otherwise signal transmission cannot be formed due to lack of input. In extreme cases, all bits except those in the input state are lost, in which case all other edge nodes are activated as output nodes, meaning that for each node, all possible output paths can be activated. At this time, nodes output signals according to the path traces stored during the storage process, activating and outputting signals through path traces previously formed in storage mode, thus achieving retrieval of the stored instance paths.

As can be seen from Figure 5, the paths in the directed graph network are a limited resource. Therefore, uploading multiple storage instances into one directed graph can result in competition for paths and node resources. When a path is occupied by one storage instance, other instances that also need this path can create resource competition, which can be incompatible and destructive. An ideal solution is to find a compatible path-sharing scheme for multiple storage instances. Then, during retrieval, additional features may be needed, not just the shared path for correct retrieval. This is like the human brain’s memory process, where the Hippocampus-Cortical two-tier system temporarily stores information. The hippocampus may undertake batch processing of different memory instances, forming an intensive, path-compatible, multi-instance composite representation to conserve resources, which is later separated and transferred to the cortex for long-term storage.

5 Current Path Formation and Consolidation Algorithm Based on Electric Field

In the neuronal network of the biological cerebral cortex, action potential pulses are transmitted along directed paths. Therefore, in our design, the directed graph network is endowed with the attributes of a circuit, using electric field theory to explain the establishment and consolidation of paths. This process is verified through computer simulation.

5.1 Internal Structure Design of Nodes

A single biological neuron cell can differentiate various signal inputs and output different signals to various neighboring neurons. Based on this, we model a single node of the directed graph network, as shown in Figure 6. There exists a path between each input and output, with diodes and variable resistors on each path. The total resistance value of the variable resistors is fixed, and they have collaborative change rules. Diodes ensure unidirectional current flow. These components enable path consolidation and resource competition learning between nodes.

Refer to caption
Figure 6: Modeling of Simulation Circuit Structure Inside Node of Directed Graph

The input and output of the node in Figure 6 is each connected to four nodes, where input nodes x1,x2,x3,x4𝑥1𝑥2𝑥3𝑥4x1,x2,x3,x4italic_x 1 , italic_x 2 , italic_x 3 , italic_x 4 have respective incoming current values of Ix1,Ix2,Ix3,Ix4subscript𝐼𝑥1subscript𝐼𝑥2subscript𝐼𝑥3subscript𝐼𝑥4I_{x1},I_{x2},I_{x3},I_{x4}italic_I start_POSTSUBSCRIPT italic_x 1 end_POSTSUBSCRIPT , italic_I start_POSTSUBSCRIPT italic_x 2 end_POSTSUBSCRIPT , italic_I start_POSTSUBSCRIPT italic_x 3 end_POSTSUBSCRIPT , italic_I start_POSTSUBSCRIPT italic_x 4 end_POSTSUBSCRIPT, and output nodes y1,y2,y3,y4𝑦1𝑦2𝑦3𝑦4y1,y2,y3,y4italic_y 1 , italic_y 2 , italic_y 3 , italic_y 4 have respective outgoing current values of Oy1,Oy2,Oy3,Oy4subscript𝑂𝑦1subscript𝑂𝑦2subscript𝑂𝑦3subscript𝑂𝑦4O_{y1},O_{y2},O_{y3},O_{y4}italic_O start_POSTSUBSCRIPT italic_y 1 end_POSTSUBSCRIPT , italic_O start_POSTSUBSCRIPT italic_y 2 end_POSTSUBSCRIPT , italic_O start_POSTSUBSCRIPT italic_y 3 end_POSTSUBSCRIPT , italic_O start_POSTSUBSCRIPT italic_y 4 end_POSTSUBSCRIPT. The variable resistors are Rx1_y1,Rx1_y2,,Rx4_y4subscript𝑅𝑥1_𝑦1subscript𝑅𝑥1_𝑦2subscript𝑅𝑥4_𝑦4R_{x1\_y1},R_{x1\_y2},...,R_{x4\_y4}italic_R start_POSTSUBSCRIPT italic_x 1 _ italic_y 1 end_POSTSUBSCRIPT , italic_R start_POSTSUBSCRIPT italic_x 1 _ italic_y 2 end_POSTSUBSCRIPT , … , italic_R start_POSTSUBSCRIPT italic_x 4 _ italic_y 4 end_POSTSUBSCRIPT, representing resistances on different paths inside nodes from input to output. Variable resistors have the function of distributing the output current.

Edge nodes input by connecting to an external power source and output by grounding, or they can disconnect. Internal nodes receive input and output currents from neighboring nodes. Unlike internal nodes, the resistors inside edge nodes do not have collaborative change rules, and they only function to limit current and prevent short-circuiting.

5.2 Voltage Application Method for Edge Nodes

We model the signal transmission of the neural network as the flow of electric current in a circuit, in which current always flows from a higher to a lower voltage level. The paths in the directed graph are abstracted as current transmission paths between nodes. Voltage levels are set depending on the states of edge nodes. An edge node in the input state is set to high voltage and in the output state is set to low voltage, which is seen as grounding. Inactive nodes are set to a high resistance state, which is equivalent to disconnection. The storage instance vector combines the states of edge nodes. Vector bits are changed to construct current transmission paths corresponding to different storage instances, representing their connected paths.

5.3 Formation of Connected Paths as Current Flows Through Nodes

In Figure 7, some edge nodes in the directed graph are set to high voltage, some to low voltage, and the rest to a high resistance state, which represents the uploading of an instance vector onto the directed graph. Under the influence of the electric field, positive charges move from high to low potential, forming connected paths through internal nodes. Current flows from high-voltage nodes to low-voltage nodes. A storage instance is distributed in the directed graph in the form of current transmission paths. The green path in the graph has the fastest potential drop and is the dominant path of the storage instance. The other edge nodes remain in a high-resistance, non-conductive state.

Refer to caption
Figure 7: Setting Different Voltage States for Edge Nodes

5.4 Node’s Adaptive Resource Competition Learning Algorithm

According to the trace theory of memory, a neural network can reinforce recurring signal flow paths to achieve memory. After constructing the storage network through a directed graph and node circuit, converting storage instances into current transmission paths through potential differences, the storage function requires simulation of the process of consolidating the dominant path into the directed graph. This relies on the changing rules of variable resistors in each node during storage mode.

Variable resistors in storage mode follow changing rules.

The sum of the resistances of multiple variable resistors in a single node remains constant, indicating that the total resource amount is constrained, i.e.,

i=1mj=1nRxi_yj=Rcsuperscriptsubscript𝑖1𝑚superscriptsubscript𝑗1𝑛subscript𝑅𝑥𝑖_𝑦𝑗subscript𝑅𝑐\sum_{i=1}^{m}\sum_{j=1}^{n}R_{xi\_yj}=R_{c}∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT italic_R start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT = italic_R start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT (1)

where Rcsubscript𝑅𝑐R_{c}italic_R start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT is a constant, and m𝑚mitalic_m and n𝑛nitalic_n are the respective numbers of input and output paths.

Like a rectangle, if the area on the left side increases, the area on the right side decreases. The resistance of variable resistors through which current greater than a threshold value Itsubscript𝐼𝑡I_{t}italic_I start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT flows gradually decreases. As the total resistance within a node is constant, the reduced resistance is evenly distributed to the other variable resistors in the same node,

{Rxi_yj(t+1)=Rxi_yi(t)+Δrxi_yj(t){kxi_yj=1,ifIxi_yj>itkxi_yj=0,otherwisek=i=1mj=1nkxi_yjC=i=1mj=1nRxi_yj(t)×kxi_yj×LrΔrxi_yi(t)={Rxi_yj(t)×Lr,ifIxi_yj>ItCm×nk,otherwisei=1mj=1nΔrxi_yj(t)=0casessubscript𝑅𝑥𝑖_𝑦𝑗𝑡1subscript𝑅𝑥𝑖_𝑦𝑖𝑡Δsubscript𝑟𝑥𝑖_𝑦𝑗𝑡casesformulae-sequencesubscript𝑘𝑥𝑖_𝑦𝑗1𝑖𝑓subscript𝐼𝑥𝑖_𝑦𝑗subscript𝑖𝑡subscript𝑘𝑥𝑖_𝑦𝑗0𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒𝑘superscriptsubscript𝑖1𝑚superscriptsubscript𝑗1𝑛subscript𝑘𝑥𝑖_𝑦𝑗𝐶superscriptsubscript𝑖1𝑚superscriptsubscript𝑗1𝑛subscript𝑅𝑥𝑖_𝑦𝑗𝑡subscript𝑘𝑥𝑖_𝑦𝑗subscript𝐿𝑟Δsubscript𝑟𝑥𝑖_𝑦𝑖𝑡casessubscript𝑅𝑥𝑖_𝑦𝑗𝑡subscript𝐿𝑟𝑖𝑓subscript𝐼𝑥𝑖_𝑦𝑗subscript𝐼𝑡𝐶𝑚𝑛𝑘𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒superscriptsubscript𝑖1𝑚superscriptsubscript𝑗1𝑛Δsubscript𝑟𝑥𝑖_𝑦𝑗𝑡0\left\{\begin{array}[]{c}R_{xi\_yj}(t+1)=R_{xi\_yi}(t)+\Delta r_{xi\_yj}(t)\\ \left\{\begin{array}[]{l}k_{xi\_yj}=1,\quad if\quad I_{xi\_yj}>i_{t}\\ k_{xi\_yj}=0,\quad otherwise\\ k=\sum_{i=1}^{m}\sum_{j=1}^{n}k_{xi\_yj}\\ C=\sum_{i=1}^{m}\sum_{j=1}^{n}R_{xi\_yj}(t)\times k_{xi\_yj}\times L_{r}\end{% array}\right.\\ \Delta r_{xi\_yi}(t)=\left\{\begin{array}[]{l}-R_{xi\_yj}(t)\times L_{r},\quad if% \quad I_{xi\_yj}>I_{t}\\ \frac{C}{m\times n-k},\quad otherwise\end{array}\right.\\ \sum_{i=1}^{m}\sum_{j=1}^{n}\Delta r_{xi\_yj}(t)=0\end{array}\right.{ start_ARRAY start_ROW start_CELL italic_R start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT ( italic_t + 1 ) = italic_R start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_i end_POSTSUBSCRIPT ( italic_t ) + roman_Δ italic_r start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT ( italic_t ) end_CELL end_ROW start_ROW start_CELL { start_ARRAY start_ROW start_CELL italic_k start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT = 1 , italic_i italic_f italic_I start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT > italic_i start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL italic_k start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT = 0 , italic_o italic_t italic_h italic_e italic_r italic_w italic_i italic_s italic_e end_CELL end_ROW start_ROW start_CELL italic_k = ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT italic_k start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL italic_C = ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT italic_R start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT ( italic_t ) × italic_k start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT × italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_CELL end_ROW end_ARRAY end_CELL end_ROW start_ROW start_CELL roman_Δ italic_r start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_i end_POSTSUBSCRIPT ( italic_t ) = { start_ARRAY start_ROW start_CELL - italic_R start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT ( italic_t ) × italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT , italic_i italic_f italic_I start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT > italic_I start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL divide start_ARG italic_C end_ARG start_ARG italic_m × italic_n - italic_k end_ARG , italic_o italic_t italic_h italic_e italic_r italic_w italic_i italic_s italic_e end_CELL end_ROW end_ARRAY end_CELL end_ROW start_ROW start_CELL ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT roman_Δ italic_r start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT ( italic_t ) = 0 end_CELL end_ROW end_ARRAY (2)

where t𝑡titalic_t is the number of iterations, Rxi_yi(t)subscript𝑅𝑥𝑖_𝑦𝑖𝑡R_{xi\_yi}(t)italic_R start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_i end_POSTSUBSCRIPT ( italic_t ) is the resistance of the variable resistor between input node xi𝑥𝑖xiitalic_x italic_i and output node yi𝑦𝑖yiitalic_y italic_i at the tthsuperscript𝑡𝑡t^{th}italic_t start_POSTSUPERSCRIPT italic_t italic_h end_POSTSUPERSCRIPT iteration, Δrxi_yi(t)Δsubscript𝑟𝑥𝑖_𝑦𝑖𝑡\Delta r_{xi\_yi}(t)roman_Δ italic_r start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_i end_POSTSUBSCRIPT ( italic_t ) is the resistance change at the tthsuperscript𝑡𝑡t^{th}italic_t start_POSTSUPERSCRIPT italic_t italic_h end_POSTSUPERSCRIPT iteration, Ixi_yjsubscript𝐼𝑥𝑖_𝑦𝑗I_{xi\_yj}italic_I start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT is the current between input node xi𝑥𝑖xiitalic_x italic_i and output node yi𝑦𝑖yiitalic_y italic_i, kxi_yjsubscript𝑘𝑥𝑖_𝑦𝑗k_{xi\_yj}italic_k start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT indicates whether Ixi_yjsubscript𝐼𝑥𝑖_𝑦𝑗I_{xi\_yj}italic_I start_POSTSUBSCRIPT italic_x italic_i _ italic_y italic_j end_POSTSUBSCRIPT exceeds the threshold Itsubscript𝐼𝑡I_{t}italic_I start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT, k𝑘kitalic_k is the total number of variable resistors where current is greater than the threshold, Lrsubscript𝐿𝑟L_{r}italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT is the proportion of resistance reduction in resistors with current flow after one iteration, Lrsubscript𝐿𝑟L_{r}italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT can be considered the learning rate, and C𝐶Citalic_C is the total value of the reduced resistance.

5.5 Path Current Calculation Based on Kirchhoff’s Laws

To evaluate the effectiveness of storage, it is necessary to calculate the current flowing through each path. For complex meshed circuits, Kirchhoff’s Voltage Law (KVL) and Kirchhoff’s Current Law (KCL) can be applied. KVL states that the algebraic sum of the potential differences (voltages) across all elements in a closed loop is zero, and KCL states that the sum of currents entering a node is the sum of currents leaving it.

Refer to caption
Figure 8: Currents on Multiple Connected Path Branches in Directed Graph

In the directed graph, we know the variable resistors of each path and the input voltage. The positive pole of the input power source is connected to the nodes in the input state and the negative pole to the nodes in the output state. By applying KVL in the loop from the output-state edge nodes to the input-state edge nodes and using KCL at the internal nodes, a set of equations can be established to solve for the current values in each branch. Nodes that are not activated can be considered to have no current flow and can be ignored in the calculations. Taking the current flow paths in the directed graph in Figure 8 as an example, the input and output currents of each node are numbered. The equations obtained by applying KCL to internal nodes are

{I1I3=0I2I4I5=0I3I6=0I4I7=0I5I8=0casessubscript𝐼1subscript𝐼30subscript𝐼2subscript𝐼4subscript𝐼50subscript𝐼3subscript𝐼60subscript𝐼4subscript𝐼70subscript𝐼5subscript𝐼80\left\{\begin{array}[]{c}I_{1}-I_{3}=0\\ I_{2}-I_{4}-I_{5}=0\\ I_{3}-I_{6}=0\\ I_{4}-I_{7}=0\\ I_{5}-I_{8}=0\\ \end{array}\right.{ start_ARRAY start_ROW start_CELL italic_I start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT - italic_I start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT = 0 end_CELL end_ROW start_ROW start_CELL italic_I start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT - italic_I start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT - italic_I start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT = 0 end_CELL end_ROW start_ROW start_CELL italic_I start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT - italic_I start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT = 0 end_CELL end_ROW start_ROW start_CELL italic_I start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT - italic_I start_POSTSUBSCRIPT 7 end_POSTSUBSCRIPT = 0 end_CELL end_ROW start_ROW start_CELL italic_I start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT - italic_I start_POSTSUBSCRIPT 8 end_POSTSUBSCRIPT = 0 end_CELL end_ROW end_ARRAY (3)

and, applying KVL to loops, we obtain

{I1×R1+I3×R3+I6×R6Uinput=0I2×R2+I5×R5+I8×R8Uinput=0I2×R2+I4×R4+I7×R7Uinput=0casessubscript𝐼1subscript𝑅1subscript𝐼3subscript𝑅3subscript𝐼6subscript𝑅6subscript𝑈𝑖𝑛𝑝𝑢𝑡0subscript𝐼2subscript𝑅2subscript𝐼5subscript𝑅5subscript𝐼8subscript𝑅8subscript𝑈𝑖𝑛𝑝𝑢𝑡0subscript𝐼2subscript𝑅2subscript𝐼4subscript𝑅4subscript𝐼7subscript𝑅7subscript𝑈𝑖𝑛𝑝𝑢𝑡0\left\{\begin{array}[]{c}I_{1}\times R_{1}+I_{3}\times R_{3}+I_{6}\times R_{6}% -U_{input}=0\\ I_{2}\times R_{2}+I_{5}\times R_{5}+I_{8}\times R_{8}-U_{input}=0\\ I_{2}\times R_{2}+I_{4}\times R_{4}+I_{7}\times R_{7}-U_{input}=0\\ \end{array}\right.{ start_ARRAY start_ROW start_CELL italic_I start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT × italic_R start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + italic_I start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT × italic_R start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT + italic_I start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT × italic_R start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPT - italic_U start_POSTSUBSCRIPT italic_i italic_n italic_p italic_u italic_t end_POSTSUBSCRIPT = 0 end_CELL end_ROW start_ROW start_CELL italic_I start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT × italic_R start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT + italic_I start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT × italic_R start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT + italic_I start_POSTSUBSCRIPT 8 end_POSTSUBSCRIPT × italic_R start_POSTSUBSCRIPT 8 end_POSTSUBSCRIPT - italic_U start_POSTSUBSCRIPT italic_i italic_n italic_p italic_u italic_t end_POSTSUBSCRIPT = 0 end_CELL end_ROW start_ROW start_CELL italic_I start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT × italic_R start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT + italic_I start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT × italic_R start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT + italic_I start_POSTSUBSCRIPT 7 end_POSTSUBSCRIPT × italic_R start_POSTSUBSCRIPT 7 end_POSTSUBSCRIPT - italic_U start_POSTSUBSCRIPT italic_i italic_n italic_p italic_u italic_t end_POSTSUBSCRIPT = 0 end_CELL end_ROW end_ARRAY (4)

The voltage is calculated using Ohm’s Law, U=IR𝑈𝐼𝑅U=IRitalic_U = italic_I italic_R, where Uinputsubscript𝑈𝑖𝑛𝑝𝑢𝑡U_{input}italic_U start_POSTSUBSCRIPT italic_i italic_n italic_p italic_u italic_t end_POSTSUBSCRIPT is the input voltage, and Risubscript𝑅𝑖R_{i}italic_R start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is the resistance value of the variable resistor on the corresponding path within the node for current Iisubscript𝐼𝑖I_{i}italic_I start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT.

Through the above process, we can evaluate the retrieval effect of storage instances by calculating the current flowing through each path in retrieval mode. A significant current still flowing through the dominant path in retrieval mode indicates successful retrieval. We next discuss the storage and retrieval processes.

5.6 Storage and Retrieval Process of Current Flowing Paths

The storage and retrieval of paths simulate the respective biological processes of memory and recall. According to a node’s adaptive learning algorithm, in storage mode, the resistance of variable resistors through which a substantial current continually flows will gradually decrease. Continuously uploading the same storage instance vector to the edge nodes will establish stable current transmission paths between nodes from high to low voltage. Among the paths within each node, the path with the fastest potential drop will dominate, and the resistance of variable resistors on this dominant path will gradually decrease through natural competition, while the resistance on other paths increases. This change solidifies the current transmission path traces in the directed graph. The longer the current flow, the lower the resistance, making it easier for current to flow, for the path to be more likely activated, and for the stored content to be more profound, reinforcing the path.

In retrieval mode, some bits of the storage instance vector may be lost, such as remembering an object’s shape but not its color. When such a partial valid vector, the so-called probe vector, is loaded onto the directed graph, only certain edge nodes are set to their corresponding states, and lost edge nodes are set to low voltage. This assumes the possible existence of uncertain features, and later judgments are made based on the current level, with larger output currents indicating retrieved paths. The input state bits in the probe vector must not be lost; otherwise, no retrieval can occur due to the lack of input. In extreme cases, all bits except those corresponding to the input nodes in the probe vector may be lost. From Ohm’s Law, sub-paths with smaller resistance receive more current. Since the resistance on the dominant path of the storage instance is relatively low, a larger proportion of current will flow along this path. The longer the duration of the storage process, the less the resistance on the path, and the greater the proportion of current flowing along the dominant path, making selective current flow the basis for path retrieval.

Notably, when more than one storage instance is stored in a directed graph and their current flow paths overlap, new stored instances will disrupt the path traces of the original instances solidified in the graph, in a process known as retroactive inhibition. In such cases, for accurate retrieval, the number of permissible lost bits in the probe vector decreases, which is like requiring more detailed features to distinguish similar objects. For example, from Figure 9, it can be seen that, after sequentially uploading green and red instances into the directed graph, since the paths overlap (black path), the graph stores the composite paths of the two storage instances.

Refer to caption
Figure 9: Distribution of Two Storage Instance Paths in Directed Graph

6 Simulation Experiment

We conducted a series of simulation experiments to investigate the role of directed graphs in modeling memory systems. Our focus was on exploring the generation, functionality, and capacity of these graphs, simulating the varied microstructural complexities found in biological memory systems. The experiments ranged from initial graph generation to comprehensive storage functionality tests, including capacity testing for single and multiple memory instances. We also conducted comparative analyses with other models.

6.1 Generation of Directed Graph

Considering that the memory systems of biological entities have many microscopic structural differences, for better simulation, we first initialize the directed graph, to generate directed graph networks of varying scales and connection relationships. For ease of visualization, the directed graph is set in a grid format, with its width and depth determining its size and scale. After determining the number of nodes based on the side length, the node matrix is traversed, and connections in random directions are established between adjacent nodes to generate directed graph networks with different topological structures, as shown in Algorithm 1. Figure 4 shows an example of randomly generated directed graph networks with a side length of 10.

Result: Directed graph node matrix represented by adjacency list
Input: Width and Depth of Directed Graph Node Matrix x,y𝑥𝑦x,yitalic_x , italic_y;
Output: Directed graph node matrix;
Function genGraphNodeMatrix(x,y𝑥𝑦x,yitalic_x , italic_y):
       Initialization: Node matrix nodeMatrix with width and depth x,y𝑥𝑦x,yitalic_x , italic_y. For each node in the matrix, attributes include input node list inList, output node list outList, bidirectional node list 2wList;
       for i1𝑖1i\leftarrow 1italic_i ← 1 to x𝑥xitalic_x do
             for j1𝑗1j\leftarrow 1italic_j ← 1 to y𝑦yitalic_y do
                   The current node is represented by selfNode;
                   neighbors \leftarrow getNeighbor(selfNode);
                   neiLen \leftarrow len(neighbors);
                   for neighbor \leftarrow neighbors[0] to neighbors[neiLen - 1] do
                         xN,yN𝑥𝑁𝑦𝑁xN,yNitalic_x italic_N , italic_y italic_N represent the horizontal and vertical coordinates of the node neighbor in the matrix;
                         if the edge between node selfNode and neighbor has not been assigned a direction then
                               if not (isEdge(selfNode) and isEdge(neighbor)) then
                                     direct \leftarrow Random Boolean value;
                                     if direct then
                                           nodeMatrix[i][j][’inList’].add(neighbor);
                                           nodeMatrix[xN][yN][’outList’].add(selfNode);
                                          
                                    else
                                           nodeMatrix[i][j][’outList’].add(neighbor);
                                           nodeMatrix[xN][yN][’inList’].add(selfNode);
                                          
                                     end if
                                    
                              else
                                     nodeMatrix[i][j][’2wList’].add(neighbor);
                                     nodeMatrix[xN][yN][’2wList’].add(selfNode);
                                    
                               end if
                              
                         end if
                        
                   end for
                  
             end for
            
       end for
      return nodeMatrix;
      
End Function;
Algorithm 1 Directed Graph Generation Algorithm

6.2 Assigning Activation States to Edge Nodes

In biological neural networks, different stimuli lead to the formation of memories. In our simulation, a storage instance is uploaded through the edge nodes of the directed graph. For visualization purposes, the top edge of the directed graph is defined as the input edge, where activated nodes are assigned a high-voltage state. The others are output edges, with activated nodes assigned a grounding state. Nodes corresponding to nonzero vector bits are activated. Inactive edge nodes are assigned a high-resistance state. Each storage instance is divided into component A, which corresponds to the input edge, and components B, C, and D, corresponding to the three output edges. In the directed graph network, electric current flows from A to B, C, and D. Like water, the current always flows downstream, where A acts as the upstream, and B, C, D as the downstream. Figure 10 shows a schematic representation of the correspondence between each component of a storage instance and the directed graph.

Refer to caption
Figure 10: Correspondence of Storage Instance Vector to Edges of Directed Graph

In storage mode, stable current can only form on the paths between nodes in a high-voltage state and grounding state. According to their changing rules, as the current continues to flow, the resistance values of variable resistors on the dominant path with the fastest potential drop decrease continuously. The path is solidified into the directed graph through the reduction of resistance values of variable resistors on the path.

Retrieval has two modes: awakening based on upstream information, and awakening based on both upstream and downstream information. However, in either mode, the edge node corresponding to component A, serving as the energy source of the directed graph, must not be omitted from the probe vector. The difference between the probe vector and the storage instance vector is quantified by the Hamming distance, d=ρn𝑑𝜌𝑛d=\rho nitalic_d = italic_ρ italic_n, where n𝑛nitalic_n is the length of the vector, and ρ𝜌\rhoitalic_ρ is the proportion of differing bits.

When using awakening based on upstream information, all bits in the probe vector, except for the input bit corresponding to component A, are set to be missing, testing the effect of retrieval in the most extreme case. In this mode, the map** method of the edge nodes corresponding to component A remains unchanged, and all edge nodes corresponding to the output state of B, C, and D are grounded to simulate the complete loss of this characteristic information, intending to activate all output paths. Here, ρ𝜌\rhoitalic_ρ reaches its maximum, ρmax=1x+f×(2y+x)nsubscript𝜌𝑚𝑎𝑥1𝑥𝑓2𝑦𝑥𝑛\rho_{max}=1-\frac{x+f\times(2y+x)}{n}italic_ρ start_POSTSUBSCRIPT italic_m italic_a italic_x end_POSTSUBSCRIPT = 1 - divide start_ARG italic_x + italic_f × ( 2 italic_y + italic_x ) end_ARG start_ARG italic_n end_ARG, where x𝑥xitalic_x, y𝑦yitalic_y are the respective width and depth of the directed graph, and f𝑓fitalic_f is the proportion of activated nodes in the storage instance.

When multiple instances are stored in the directed graph, there is interference between the paths of each instance, including partial sharing, partial destruction, or even breakage. The original paths are no longer complete, and continuing to use awakening based on upstream information may lead to retrieval failure. Therefore, awakening based on both upstream and downstream information is introduced. Compared with awakening based on upstream information, the probe vector in this mode retains more information and has fewer missing bits, i.e., some edge nodes corresponding to the output state of components B, C, and D remain in their original high-resistance state. This aims to reduce available output paths, better retrieve the composite paths stored in the directed graph, and improve the retrieval effect of each instance path.

6.3 Storage Functionality Testing

We tested the storage functionality of the directed graph when storing a single instance. A storage instance was loaded into the directed graph network to observe if it could be successfully stored. The experiment checked if the current on the connected path of the storage instance in the directed graph during upstream information-based awakening was significantly greater than that of other paths. This allowed for a clear distinction between old and new paths. For a directed graph with only one storage instance, if the storage is successful, it should be able to accurately restore the original path. Since the resistance values on the original path are relatively small, only the previously reinforced dominant path of the storage instance will maintain a larger proportion of current, while the current on other paths will be smaller. This is an important criterion to differentiate between established and temporary traces.

Refer to caption
Figure 11: Randomly Generated 20 ×\times× 20 Directed Graph Where Directed Connections Between Nodes Form the Basis for Path Creation

In this experiment, the learning rate Lrsubscript𝐿𝑟L_{r}italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT was set at 10%. The storage functionality was tested in a 20 ×\times× 20 directed graph network, as shown in Figure 11, which was randomly generated using Algorithm 1. In each test, a storage instance, with 30% of the edge nodes randomly activated, was uploaded to the directed graph, for 30 iterations of the storage process, like rehearsing to reinforce memory. This learning process iteratively adjusts the resistance values of the variable resistors on connected paths, gradually forming a so-called dominant path with relatively low resistance. After each iteration, the graph was switched to retrieval mode, the probe vector was uploaded, and the output current of each path was calculated. The proportion of the current of the storage instance’s dominant path to the total current of all paths is

α=i=1kijj=1mij,m>kformulae-sequence𝛼superscriptsubscript𝑖1𝑘subscript𝑖𝑗superscriptsubscript𝑗1𝑚subscript𝑖𝑗𝑚𝑘\alpha=\frac{\sum_{i=1}^{k}i_{j}}{\sum_{j=1}^{m}i_{j}},m>kitalic_α = divide start_ARG ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT italic_i start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT end_ARG start_ARG ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT italic_i start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT end_ARG , italic_m > italic_k

where ijsubscript𝑖𝑗i_{j}italic_i start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT represents the output current values of each path, m𝑚mitalic_m is the total number of paths, and the dominant path consists of the first k𝑘kitalic_k paths. At this point, ρ𝜌\rhoitalic_ρ=0.525.

Refer to caption
(a) Proportion of Current Output on Dominant Path of Storage Instance
Refer to caption
(b) Changes in Variable Resistors within Single Node
Figure 12: Changes in Directed Graph Metrics at Different Iteration Counts

The results, as shown in Figure 12(a), indicate that with increasing iterations, randomly generated storage instances 1 and 2 have differences in the α𝛼\alphaitalic_α curve after iterative reinforcement, but both achieve significant improvement, similar to the varying efficiency humans experience when memorizing different content. A random node was selected to observe the changes in the resistance values of its internal variable resistors, as depicted in Figure 12(b). The resistance values of variable resistors on the dominant path inside the node gradually decreased, and the reduced resistance was evenly distributed to the variable resistors on the other paths of the same node, causing the resistance on these paths to increase gradually. The dominant paths of storage instances 1 and 2 in the directed graph are shown in Figures 13(a) and 13(b). Figure 12(a) also shows the average value of α𝛼\alphaitalic_α from experiments with 1000 test cases, which showed an increase after iteration. This demonstrates that the storage function of the directed graph operates well. With different storage instances, after a certain number of iterations, the current flowing through the original dominant path in retrieval mode is significantly greater than that of other paths, solidifying this path as the representation of the storage instance, thereby realizing the storage function. The experimental results indicate that storage instances 1 and 2 require a similar number of iterations to achieve the same storage effect. Random testing on another 1000 examples yielded similar results, indicating that the directed graph and path-finding algorithms are not dependent on specific examples and are universally applicable to a wide variety of content.

Refer to caption
(a) Instance 1
Refer to caption
(b) Instance 2
Figure 13: Dominant Path of Storage Instance in Directed Graph

Taking storage instance 2 as an example, the currents in various paths were calculated and visualized at the 0th, 10th, 20th, and 30th iterations of storage, visually demonstrating the process by which the dominant path gradually becomes more prominent among many paths with increasing iterations, as shown in Figure 14, where the thickness of paths and opacity of nodes represent the magnitude of the current. Thicker paths and lower opacity indicate greater current. Green paths have the fastest potential drop from the activated input nodes to each connected output node. Paths with a current less than 0.4 mA are not displayed. Green edge nodes are activated output nodes corresponding to the storage instance, and gray nodes are inactivated output nodes. It can be observed that as iterations proceed, the current on the dominant path continuously increases, and the path is gradually solidified into the graph.

Refer to caption
(a) 0thsuperscript0𝑡0^{th}0 start_POSTSUPERSCRIPT italic_t italic_h end_POSTSUPERSCRIPT Iteration
Refer to caption
(b) 10thsuperscript10𝑡10^{th}10 start_POSTSUPERSCRIPT italic_t italic_h end_POSTSUPERSCRIPT Iteration
Refer to caption
(c) 20thsuperscript20𝑡20^{th}20 start_POSTSUPERSCRIPT italic_t italic_h end_POSTSUPERSCRIPT Iteration
Refer to caption
(d) 30thsuperscript30𝑡30^{th}30 start_POSTSUPERSCRIPT italic_t italic_h end_POSTSUPERSCRIPT Iteration
Figure 14: Currents of Various Paths at Different Numbers of Iterations

The activation proportion of edge nodes affects the number of directed graph resources occupied by a storage instance. A higher activation proportion may lead to the occupation of more paths, and the dominant path may be more expansive. We conducted experiments on storage instances with different activation proportions of edge nodes. The experimental results are the average value of α𝛼\alphaitalic_α with 1000 test cases, as shown in Figure 15, indicating that storage instances with higher proportions have higher proportions of current output α𝛼\alphaitalic_α on their dominant paths after storage. This may be because such instances can access more path resources for output during retrieval. At the same time, according to the definition of ρmaxsubscript𝜌𝑚𝑎𝑥\rho_{max}italic_ρ start_POSTSUBSCRIPT italic_m italic_a italic_x end_POSTSUBSCRIPT, the higher the proportion of activated nodes, the smaller ρmaxsubscript𝜌𝑚𝑎𝑥\rho_{max}italic_ρ start_POSTSUBSCRIPT italic_m italic_a italic_x end_POSTSUBSCRIPT becomes, reducing the difference between the probe vector and the original vector.

Refer to caption
Refer to caption
Figure 15: (a):Proportion of Current Output on Dominant Paths Under Different Node Activation Ratios (b):Directed Graphs of Different Sizes and Topological Connections Demonstrate Similar Learning Capabilities, Indicating Universality

Neural networks in different people’s brains vary in terms of the number of neurons, topological connections, and other microscopic details. Despite these numerous and fine structural differences, they do not seem to affect memory function, indicating universality. To verify the effectiveness of the storage function of the directed graph network under different topological structures and sizes, Algorithm 1 was used to generate randomly topologized directed graphs of sizes 10 ×\times× 10, 30 ×\times× 30, and 20 ×\times× 30, as illustrated in Figures 4, 16(a), and 16(b), respectively. Using the parameters from Figure 12, storage experiments were conducted in these directed graphs, and the average α𝛼\alphaitalic_α was calculated from 1000 test cases. The results, as shown in Figure 15, indicate that despite the different sizes and topologies of the three directed graphs, they all achieve improvements after iterations, meaning they all can perform the storage function.

Refer to caption
(a) 30 ×\times× 30
Refer to caption
(b) 20 ×\times× 30
Figure 16: Directed Graphs Randomly Generated with Significant Variations in the Number of Nodes and Connectivity Relationships

The results show that as the number of iterations in the storage process increases, the current flowing through the dominant path of the storage instance gradually increases. This indicates that the path is progressively solidified into the directed graph after the sample is repeatedly uploaded. The learning algorithm may exhibit slight differences in storage effectiveness in directed graph networks of different sizes and topological structures, but it can generally achieve memory of path traces. This demonstrates that directed graphs generally possess storage functionality when combined with path representation and path solidification algorithms.

6.4 Incremental Storage and Retrieval Testing of Multiple Storage Instances

Both the human brain and computer storage devices contain a large amount of varied content, and their storage mechanisms must ensure compatibility. In computers, file management systems ensure that different files exclusively occupy different storage spaces, making compatibility issues relatively simple. However, in directed graphs, there is an issue of sharing small units. When more than one memory instance is stored in the same directed graph, the dominant paths of different memory instances will likely partially overlap. Subsequent stored memory instances will interfere with and potentially disrupt paths already stored due to resource competition, a phenomenon known as retroactive inhibition.

We conducted a two-part experiment in a 20 ×\times× 20 directed graph, as shown in Figure 11. First, testing was done using awakening based on upstream information, followed by tests using probe vectors with different ρ𝜌\rhoitalic_ρ values for awakening based on both upstream and downstream information. Storage instances with 30% of edge nodes randomly activated were generated and incrementally stored in the same directed graph in a certain order. The learning rate Lrsubscript𝐿𝑟L_{r}italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT was set at 10%, and each instance was iterated 30 times in the storage process.

In the retrieval of each instance, the proportion of the output current of each branch on the dominant path to the total output current on the dominant path is calculated as

βo=ioj=1kij,1okformulae-sequencesubscript𝛽𝑜subscript𝑖𝑜superscriptsubscript𝑗1𝑘subscript𝑖𝑗1𝑜𝑘\beta_{o}=\frac{i_{o}}{\sum_{j=1}^{k}i_{j}},1\leq o\leq kitalic_β start_POSTSUBSCRIPT italic_o end_POSTSUBSCRIPT = divide start_ARG italic_i start_POSTSUBSCRIPT italic_o end_POSTSUBSCRIPT end_ARG start_ARG ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT italic_i start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT end_ARG , 1 ≤ italic_o ≤ italic_k

The primary evaluation metric was α𝛼\alphaitalic_α, while secondary metrics included the similarity of β1βksubscript𝛽1subscript𝛽𝑘\beta_{1}-\beta_{k}italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT - italic_β start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT at this point to its value when the instance was stored alone in the same directed graph for the same number of iterations. Similarity was quantified using cosine similarity; the values of β1βksubscript𝛽1subscript𝛽𝑘\beta_{1}-\beta_{k}italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT - italic_β start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT were arranged in the same order to form vectors, and the cosine similarity between them was calculated. This was used to assess the deviation in the output balance of each branch. These β𝛽\betaitalic_β values form a vector,

V=[β1β2βk]𝑉subscript𝛽1subscript𝛽2subscript𝛽𝑘V=[\beta_{1}\quad\beta_{2}\quad\cdots\quad\beta_{k}]italic_V = [ italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_β start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ⋯ italic_β start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ]

The cosine similarity is

φ=VpreVcurrVpreVcurr𝜑subscript𝑉𝑝𝑟𝑒subscript𝑉𝑐𝑢𝑟𝑟normsubscript𝑉𝑝𝑟𝑒normsubscript𝑉𝑐𝑢𝑟𝑟\varphi=\frac{V_{pre}\cdot V_{curr}}{\|V_{pre}\|\|V_{curr}\|}italic_φ = divide start_ARG italic_V start_POSTSUBSCRIPT italic_p italic_r italic_e end_POSTSUBSCRIPT ⋅ italic_V start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r end_POSTSUBSCRIPT end_ARG start_ARG ∥ italic_V start_POSTSUBSCRIPT italic_p italic_r italic_e end_POSTSUBSCRIPT ∥ ∥ italic_V start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r end_POSTSUBSCRIPT ∥ end_ARG

where Vpresubscript𝑉𝑝𝑟𝑒V_{pre}italic_V start_POSTSUBSCRIPT italic_p italic_r italic_e end_POSTSUBSCRIPT and Vcurrsubscript𝑉𝑐𝑢𝑟𝑟V_{curr}italic_V start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r end_POSTSUBSCRIPT refer to the vectors of β𝛽\betaitalic_β values from the previous (stored alone) and current (with other instances stored) retrieval scenarios, respectively.

Refer to caption
Refer to caption
Refer to caption
Figure 17: (a):Retrieval Effectiveness with Different Subsequent Storage Instance Counts (b):Impact of Probe Vectors with Different ρ𝜌\rhoitalic_ρ Values on Retrieval Effectiveness (c):Different Iteration Counts in Storage Process Influence Retrieval Effects

In the same directed graph, 10 memory instances were incrementally stored, and after completing the storage process of each instance, retrieval based on upstream information was conducted for the stored instances. The experiment was repeated 1000 times with different test cases, and the results were averaged. As shown in Figure 17, the retrieval effectiveness significantly decreased compared with when stored alone, as discussed earlier. The number of subsequent instances (reflecting the original position of the extracted instance) showed a negative correlation with both α𝛼\alphaitalic_α and β𝛽\betaitalic_β, indicating that the storage of new instances continuously interferes with paths already stored in the graph, but the impact on φ𝜑\varphiitalic_φ is relatively minor.

The results of the experiment in Figure 17 also indicate that the directed graph retains the ability to distinguish whether a particular instance has been stored before, even after storing 10 instances. During retrieval, α𝛼\alphaitalic_α remains higher than the average value shown in Figure 12(a) without iterative storage, indicating that the current still preferentially flows through the previously established paths. This is akin to recognizing a person whose name we cannot recall.

Testing based on both upstream and downstream information was conducted after all 10 memory instances were stored in each experiment. Probe vectors with different ρ𝜌\rhoitalic_ρ values were uploaded to test the retrieval effectiveness. The experiment was repeated 1000 times with different test cases, and the results were averaged. As shown in Figure 17, the retrieval effectiveness gradually improves as ρ𝜌\rhoitalic_ρ decreases, with both metrics showing significant improvement. The results are markedly better than those from awakening based on upstream information alone. This is like a human better recalling things after receiving some hints.

From the previous experiments and the definition of the storage learning algorithm, it is known that the number of storage iterations and the learning rate affect the proportion of the dominant path output during retrieval. In an incremental storage process, the number of iterations for subsequent instances can also be considered an indicator of the degree of interference of preceding instances on solidified paths. To test the impact of the number of storage process iterations on the retrieval effectiveness of multiple storage instances, two storage instances with 30% of edge nodes activated were randomly generated and uploaded to a 20 ×\times× 20 directed graph network, with the learning rate Lrsubscript𝐿𝑟L_{r}italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT maintained at 10%. The number of iterations in the storage process was set to 10, 20, and 30. The first and second instances stored were the disturbed and disturbing instance, respectively. After storage, the disturbed instance was subjected to upstream information-based awakening retrieval testing. The experiment was repeated 1000 times under different iteration counts, and the results were averaged. The results, as shown in Figure 17, indicate that the number of iterations in the storage process positively correlates with α𝛼\alphaitalic_α, and negatively with φ𝜑\varphiitalic_φ, which is consistent with theoretical analysis. The increase in α𝛼\alphaitalic_α is due to the deeper solidification of the paths of the preceding instance, while the decrease in φ𝜑\varphiitalic_φ is due to increased interference from subsequent storage instances on the preceding instance.

In summary, the experiments observed the retroactive inhibition phenomenon in the graph and verified the impact of probe vectors with different ρ𝜌\rhoitalic_ρ values on retrieval effectiveness through awakening based on both upstream and downstream information after storing multiple instances. ρ𝜌\rhoitalic_ρ is negatively correlated with retrieval effectiveness, confirming the influence of the number of iterations in the storage process on retrieval effectiveness.

6.5 Capacity Testing

As previously mentioned, different instances stored in the directed graph interfere with each other to some degree, affecting their retrieval. In the capacity testing experiment, a certain number of storage instances were randomly generated, and all were subsequently stored in the same directed graph. Each stored instance was then individually retrieved, and α𝛼\alphaitalic_α was calculated. Storage was considered successful if α90%𝛼percent90\alpha\geq 90\%italic_α ≥ 90 %. Retrieval was conducted using the awakening method based on upstream information, which reflects the number of instances that can be successfully and completely stored in a directed graph after storing multiple instances.

The experiment was conducted in 10 ×\times× 10, 20 ×\times× 20, and 30 ×\times× 30 networks. Several sets of storage instances with 30% activated edge nodes were randomly generated, with varying numbers in each set. The instances were incrementally stored in the same directed graph, group by group. The learning rate Lrsubscript𝐿𝑟L_{r}italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT was set at 10%, and each instance underwent 30 iterations of the storage process. The results, as shown in Figure 18, indicate that the storage capacity of directed graph networks is limited, and larger networks are not necessarily better; smaller-scale networks seem to have a larger capacity. For the same network, more samples can be stored when internal resource competition is not intense. Once the storage limit is reached, storing more samples can disrupt the paths occupied by previous instances, leading to retrieval failure of instances that were originally remembered.

Refer to caption
Refer to caption
Refer to caption
Figure 18: (a):Capacity Measured by Individually Retrieving Instances After Storing Different Quantities (b):Capacity Measured After Changing Number of Activated Nodes in Storage Instances (c):Network Capacity Measured with Consistent Network Depth

We conducted further testing regarding the issue of larger directed graph networks having smaller capacities. To control variables, the number of activated edge nodes in storage instances randomly generated for 20 ×\times× 20 and 30 ×\times× 30 networks was 12 (10×\times×4×\times×30%) in both cases, and experiments were conducted in these networks with the same parameters as in Figure 18. The results, as shown in Figure 18, indicate that reducing the number of activated nodes can increase the storage capacity of directed graphs. However, larger networks still have a lesser capacity than smaller-scale networks.

In capacity tests based on square directed graphs, the phenomenon of larger network sizes corresponding to smaller capacities was observed. A possible reason for this is that the square network topology, with equal length and width, is not conducive to resource conservation, as the paths formed tend to be deeper. Therefore, we tested networks with a consistent depth but varying widths. Capacity tests were conducted in 20 ×\times× 10 and 30 ×\times× 10 networks, with experimental parameters consistent with those in Figure 18. The results, as shown in Figure 18, indicate that in networks with consistent depth, larger network sizes correspond to greater capacities. The cerebral cortex has a similar structure, with consistent depth across different areas (six layers of cells), but also has the ability to laterally expand, forming a flat structure.

A total of 1000 storage instances with 12 activated edge nodes were randomly generated and uploaded to 30 ×\times× 10, 30 ×\times× 20, and 30 ×\times× 30 directed graphs. The average numbers of nodes and node connections in the paths formed were calculated, to compare the resource consumption of networks with different depths. The experimental results are shown in Table 3, and indicate that, with the same width, networks with smaller depths consume fewer resources per instance, forming paths with fewer nodes. This explains why the directed graph networks with smaller depths performed better in the earlier experiments. A related biological fact is that the cerebral cortex has relatively few layers, forming a flat structure that is not deep, but that has extensive horizontal expansion capabilities.

Size of Directed Graph Network Number of Connections Between Nodes in Connected Subgraph of Instance Average Number of Nodes Constituting Path
30 × 10 364.459 54.439
30 × 20 813.775 83.721
30 × 30 1385.789 113.686
Table 3: Attributes of Dominant Paths of Storage Instances Uploaded to Networks of Different Depths

6.6 Capacity Comparison

We compare the capacity of the proposed model with that of the Hopfield network measured in experiments. Like the criterion of α90%𝛼percent90\alpha\geq 90\%italic_α ≥ 90 % set in this paper, in the Hopfield network, a retrieved vector is considered successfully remembered if its similarity with the original vector exceeds 90%. The memory efficiency of the Hopfield network is optimal when each binary bit of a storage instance is independently generated with a 50% probability of being one of two values [55], which corresponds to randomly activating 50% of the edge nodes in the proposed model. To control variables, other parameter settings remained the same as in Section 6.5, but we randomly activated 50% of the edge nodes. At the same time, ρ𝜌\rhoitalic_ρ for the probe vector used in the Hopfield network was the same as ρmaxsubscript𝜌𝑚𝑎𝑥\rho_{max}italic_ρ start_POSTSUBSCRIPT italic_m italic_a italic_x end_POSTSUBSCRIPT.

Table 4: Capacity of Our Method and Hopfield Network
Our Method Hopfield
Size Measured Capacity Size Measured Capacity
30×10301030\times 1030 × 10 108 300300300300 20
30×20302030\times 2030 × 20 32 600600600600 22
30×30303030\times 3030 × 30 15 900900900900 25

The experimental results, as shown in Table 4, are similar to our earlier conclusions. The proposed model shows higher storage efficiency in networks with smaller depths and outperforms the Hopfield network in capacity. However, as the depth increases, the capacity gradually becomes less than that of the Hopfield network. Furthermore, in the experiments, the capacity of the Hopfield network dropped rapidly when the binary bits of the storage instance were unevenly distributed, which corresponds to a decrease in the activation ratio in the proposed method. As mentioned above, reducing the activation ratio in our method can increase the storage capacity. Therefore, our model can flexibly adjust storage capacity by varying the proportion of activated nodes, whereas the Hopfield network cannot. In addition, compared with the fully connected network of the Hopfield model, our model’s sparsely connected network consumes fewer resources and achieves greater storage capacity, especially in networks with smaller depths.

However, our method of retrieval is based on extracting downstream nodes from upstream nodes, and it cannot retrieve information represented by downstream nodes if upstream nodes are lost, meaning it cannot extract upstream nodes based on downstream nodes. Meanwhile, the Hopfield network does not differentiate between upstream and downstream nodes.

6.7 Capacity Testing of Networks with Six Layers of Depth

The cerebral cortex of higher primates has a vertical depth of six layers of cells and the capability for lateral expansion. Mimicking this form of the brain’s cortex, the depth of the directed graph network was set to six layers. In this configuration, the storage instance retains components A and D, with no B or C. Component A is used for input and D for output, consistent with previous capacity testing experiments, and retrieval is based on upstream information. To control variables, the number of bits in the storage instance vectors was maintained at 20 bits (10 bits each for A and D), with an activation ratio of 50%. Random starting positions were selected on the top edge of the directed graph, with component A continuously uploaded from the starting position and D uploaded to the symmetric position on the bottom edge, as illustrated in Figure 19. In this case, the storage instances are said to be compactly distributed on the directed graph, with each instance being uploaded on consecutive edge nodes of the graph.

Refer to caption
Figure 19: Compactly and Randomly Uploading Memory Instances to Different Positions on Directed Graph
Refer to caption
(a) Compactly Distribution
Refer to caption
(b) Dispersed Distribution
Figure 20: Capacity of Directed Graph Networks with Six Layers of Depth and Different Widths

The experiment was conducted in networks of sizes 50 ×\times× 6, 100 ×\times× 6, and 200 ×\times× 6. Several groups of storage instances were randomly generated, each with varying numbers of instances. Instances were incrementally stored in the same directed graph, group by group. The learning rate Lrsubscript𝐿𝑟L_{r}italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT was set at 10%, and each instance underwent 30 iterations of the storage process. The capacity testing rules were the same as in Section 6.5, and the test results were as shown in Figure 20(a), indicating that as the network width increases, its capacity gradually improves, roughly linearly.

We also experimentally tested the storage capacity of the directed graph when instances were uploaded in a dispersed distribution. In this case, A and D components were no longer continuously uploaded from a certain position to the top and bottom edges. Instead, bits of these components were randomly mapped to different positions on the top and bottom edges. The corresponding nodes of each storage instance were no longer concentrated in a continuous area, to test the storage capacity of the directed graph when instances were stored randomly.

The experimental results of the dispersed distribution, as shown in Figure 20(b), indicate that except for the network with a width of 50, whose capacity remained largely unchanged compared with the compact distribution, the capacities of the other directed graph networks showed a significant decrease and almost stopped increasing as the network widened.

To explore the reasons for this phenomenon, the resource occupation of individual instances was analyzed. The results, as shown in Table 5, indicate that in the case of a compact distribution, the resource occupation of individual instances does not increase as the network widens. In a dispersed distribution, the horizontal distance between activated nodes is typically greater, requiring more resources to connect, leading to a linear increase in resource occupation per instance with increasing width. The resource occupation in a dispersed distribution at a width of 50 was still relatively close to that of a compact distribution, which may explain why the network capacity in a dispersed distribution remains close to that of a compact distribution at this width. Subsequently, as the gap in resource occupation widens and shows linear growth, the capacity becomes significantly lower than in a compact distribution and almost stops growing with the widening of the network.

Table 5: Resource Occupation of Single Instances in 6-Layer Depth Directed Graphs with Compact and Dispersed Distribution of Different Widths
Network Width Number of Connections Between Nodes in Connected Subgraph of Instance Average Number of Nodes Constituting Path
Compact Distribution
50 50.174 35.735
100 50.171 35.934
200 50.957 35.447
Dispersed Distribution
50 63.042 53.373
100 90.687 73.097
200 131.151 101.649

6.8 Chain Awakening Experiment with Long Chains

Many brain activities, such as sequential working memory, are related to temporal information [56]. A long-chain sequential awakening experiment examined a series of instances with sequential associations, where the output component of a memory instance is the input for the following instance, i.e., it acts as an awakening cue. The experiment observed whether such a chain-style awakening can be successful. Multiple vectors of the same length were randomly generated and combined in pairs to form memory instances, with the output vector (D component) of one instance serving as the input vector (A component) of the next. The method of uploading memory instances is similar to Figure 19 and illustrated in Figure 21, the edge nodes used by each instance do not overlap, indicating that the instances do not share input or output nodes.

Refer to caption
Figure 21: Uploading Pairs of Vectors as Memory Instances to Non-overlap** Positions on Directed Graph

The experiment was conducted in a 200 ×\times× 6 network. Sixteen vectors of length 10 were randomly generated, with adjacent vectors paired to form storage instances, totaling 15 pairs. In this setup, the output of one pair of instances served as the awakening cue for the next pair. The instances were incrementally stored in the same directed graph in sequential order, with the learning rate Lrsubscript𝐿𝑟L_{r}italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT set at 10%, and each instance underwent 30 iterations of the storage process. After storage, each instance was sequentially retrieved in order. Retrieval of the next instance proceeded only if the previous retrieval was successful; otherwise, the retrieval chain was broken, and subsequent instances were not retrieved. In this experiment, α80%𝛼percent80\alpha\geq 80\%italic_α ≥ 80 % was considered successful storage, and other capacity testing rules were the same as in Section 6.5. The experiment was repeated 1000 times. The test results are shown in Figure 22 and indicate that the model can successfully chain-awaken sequentially stored memory instances, but the probability of successful awakening decreases for instances closer to the end of the chain. This is because the failure to retrieve any instance leads to the failure of all subsequent instances in the chain.

Refer to caption
Figure 22: Distribution of Chain Lengths in Chain Awakening Across 1000 Experiments

7 Conclusion

We simulated the memory mechanism of the cerebral cortex and its storage performance under the constraints of the anatomical and electrophysiological principles of neurobiology. A parallel distributed storage model based on directed graphs and an autonomous path learning algorithm were proposed, offering a new perspective on how biological neural networks achieve memory. Our model provides an explanatory framework to understand the implementation mechanisms of the memory trace theory.

The directed graph model in the algorithm is active, with each node capable of personalized adaptive learning based on local neighborhood information, modeling the memory system of biological neural networks. This breaks away from the reliance of the traditional graph model on a global view for operation, lacking autonomous parallel distributed processing capabilities, and is closer to actual biological neural networks. Inspired by the capability of biological neurons to transmit electrical signals, this adaptive learning behavior was simulated through microcircuits centered on variable resistors, successfully realizing the simulation of the storage and retrieval processes in the entire directed graph network on a computer. In simulations, the model could distribute storage instances across the directed graph, transforming them into connected paths, and achieving path storage and retrieval within the graph. The model’s generalizability was verified, and it was shown to be capable of achieving memory functions in different topological structures of directed graphs. Tests determine the capacity of networks of various scales, verifying factors influencing capacity size, as network scales, edge node activation ratios, and dispersion of storage instances all affect network capacity. Particularly, referencing the structure of the cerebral cortex in higher primates, the storage capabilities of networks with six layers of depth were verified, exploring the relationship between the capacity of six-layer networks and their width.

The process of storing and retrieving instances simulates the biological processes of memory and recall. Experimental results showed certain similarities between the model and biological neural networks. For example, the number of iterations required for a directed graph network to store different memory instances and achieve the same retrieval effectiveness varies, as does the time required for humans to remember different content. Furthermore, our model universally possesses memory functions in directed graphs of different sizes and topological structures, similar to how the microscopic differences in people’s brain networks do not affect the effectiveness of memory functions. Our model performed better and had a larger capacity in networks with smaller depths, with capacity increasing linearly with width, resembling the flat morphology and horizontally expansive cortical structure of the brains of higher primates.

In summary, we proposed a self-learning directed graph model that does not require a global perspective, based on the simulation of biological neural networks. The directed graph achieves storage functionality while decentralized, based on local information and adaptive learning capabilities. The model exhibits biological plausibility, aiding in elucidating the neural activities underlying memory. It also serves as an inspiration for further research into memory neural mechanisms, enriches neural computational models, and offers new perspectives and ideas for neural computation research.

Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Data availability

No data was used for the research described in the article.

Acknowledgments

The authors gratefully acknowledge the support given by the National Natural Science Foundation of China (Grant No. 61771146).

References