Computing in memory system based on memristor, and online deep learning method

Through the inter-array wear leveling strategy based on the mapping table and the weight update optimization in online deep learning, the lifespan reduction problem caused by unbalanced writing in the memristor storage and computing integrated system is solved, and more efficient wear leveling and performance are achieved. promote.

WO2024179183A1PCT designated stage expired Publication Date: 2024-09-06HUAZHONG UNIV OF SCI & TECH

Patent Information

Application Number
PCT/CN2024/070448
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-27
Filing Date
2024-01-03
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Memristor-based storage and computing integrated systems suffer from reduced lifespan due to unbalanced writing in large-scale streaming data scenarios. Existing in-array wear leveling strategies cannot achieve effective wear leveling at the system level, resulting in limited overall lifespan improvement.

Method used

Adopt a mapping table-based inter-array wear leveling strategy, by recording the total number of writes for each PE and the number of writes within the current wear leveling cycle, and rebuild the mapping table to remap 'hot' logical IDs to less worn physical ID, and only update the hidden layer weights with higher contribution rates in online deep learning to reduce writing frequency.

Benefits of technology

It significantly improves the wear leveling effect of the system and extends the overall life. By simplifying the architecture and optimizing the dispersion of computing tasks, it reduces communication overhead and energy consumption, achieving higher performance and life extension.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024070448_06092024_PF_FP
    Figure CN2024070448_06092024_PF_FP
Patent Text Reader

Abstract

The present invention relates to the field of information storage. Disclose are a computing in memory system based on a memristor, and an online deep learning method. The computing in memory system comprises a storage module and a controller; the storage module comprises a plurality of Tiles, each Tile comprises a plurality of PEs, and each PE comprises one or more memristor arrays; the controller is used for executing a mapping table-based cross-array wear-leveling strategy, comprising: classifying every M writes into one wear-leveling period; maintaining the total number of writes TWC and the number of writes IWC in the wear-leveling period for each PE; and circularly executing the following steps: setting the IWC of each PE to be 0; accumulating the number of writes of the array of the PE at an operation stage and recording same to IWC until the current wear-leveling period ends; accumulating the IWC of each PE to the corresponding TWC; reconstructing a mapping table, so that the larger the IWC is, the smaller the TWC corresponding to a physical ID mapped by a corresponding logic ID is; and carrying out data exchange. The present invention can improve the wear-leveling effect in the computing in memory system based on a memristor, thereby prolonging the overall service life of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Memristor-based storage and computing integrated system and online deep learning method

Technical field

[0001] The present invention belongs to the field of information storage, and more specifically, relates to a memristor-based storage and computing integrated system and an online deep learning method. [Background Technology]

[0002] With the advent of the big data era, demands on traditional computing systems for speed and power consumption are increasing. The von Neumann problem has become a major bottleneck restricting the further development of current computer systems. Since its introduction, memristors, with their non-volatility, high integration, and low power consumption, have become a highly promising candidate for next-generation semiconductor memory. The memristor's fusion of computing and storage also provides a powerful foundation for building new integrated computing and storage architectures. Due to their high density and high energy efficiency, memristor-based integrated computing and storage architectures have shown great potential in applications such as accelerating deep neural networks.

[0003] Figure 1 shows the classic neural network accelerator architecture based on memristor storage and computing integration, which adopts a three-layer architecture design (Tile / PE / Crossbar). The storage structure contains multiple tiles, each tile further contains multiple PEs, and each PE contains multiple memristor arrays. The memristor units in the memristor array are often organized in the form of a crossbar array.

[0004] In large-scale streaming data scenarios, such as those involving online deep learning, frequent writes to the memristor array pose a significant challenge to its limited lifespan. Furthermore, uneven writes can dramatically reduce the lifespan of memristor-based storage and computing systems, highlighting the "short board effect." This problem is particularly acute in large-scale streaming data scenarios.

[0005] In order to address the impact of uneven writes on the life of memristors, researchers have proposed corresponding wear-leveling strategies. The overall idea is to distribute writes as evenly as possible to different units. Figure 2 shows the execution diagram of three existing wear-leveling strategies within the array, where (a) is the column shift (CS) scheme, which achieves wear leveling by cyclically shifting all columns within the array; (b) is the row swap (RS) scheme, which achieves wear leveling by swapping matrix rows; and (c) is the row column swap (RCS) scheme, which achieves wear leveling by swapping rows and columns within the array. These wear-leveling strategies can extend the life of the array to a certain extent. However, the existing wear-leveling strategies are all performed within the array and cannot perform wear leveling at the system level, so the life-extending effect is very limited.

[0006] [Summary of the invention]

[0007] In response to the defects of the existing technology and the need for improvement, the present invention provides a memristor-based storage and computing integrated system and an online deep learning method, the purpose of which is to improve the wear leveling effect in the memristor-based storage and computing integrated system to increase the overall life of the system.

[0008] To achieve the above object, according to one aspect of the present invention, a storage and computing integrated system based on a memristor is provided, comprising: a storage module and a controller;

[0009] The storage module includes multiple interconnected tiles, each tile includes multiple interconnected PEs, and each PE includes N memristor arrays. The mapping relationship between the logical ID and the physical ID of each PE is recorded in a mapping table. N is a positive integer, and N ≥ 1.

[0010] The controller is used to implement the wear leveling policy between arrays based on the mapping table, including:

[0011] Divide every M writes into a wear leveling cycle, where M is a preset positive integer. Maintain metadata TWC and IWC for each PE, which are used to record the total number of writes to the PE and the number of writes in the current wear leveling cycle, respectively. Perform the following steps in each wear leveling cycle:

[0012] (S1) Set the IWC of each PE to 0;

[0013] (S2) accumulating and recording the number of writes to the memristor array in the PE during the operation phase into the corresponding IWC until the current wear leveling cycle ends;

[0014] (S3) adding the IWC of each PE to the corresponding TWC;

[0015] (S4) Rebuilding the mapping table so that the larger the IWC is, the smaller the TWC corresponding to the physical ID mapped by the corresponding logical ID is;

[0016] (S5) The data stored in the PE is exchanged based on the current mapping table.

[0017] Furthermore, N=1.

[0018] Furthermore, the IWC of each PE is stored in a register inside its memristor array.

[0019] Furthermore, multiple tiles in the storage module are interconnected through Torus routing.

[0020] Further, one or more memristor arrays in the storage module are divided into dedicated metadata storage areas;

[0021] Furthermore, the TWC of each PE is stored in the metadata storage area.

[0022] According to another aspect of the present invention, an online deep learning method based on the memristor-based storage and computing integrated system provided by the present invention is provided, wherein the memristor-based storage and computing integrated system is used to accelerate online deep learning;

[0023] Online deep learning methods include:

[0024] During the back propagation process, if the contribution rate α of any k-th hidden layer k is less than the preset threshold ε, and the hidden layer weight W k The number of data instances between the last update is less than the preset value γ, and the weight W of the hidden layer is not adjusted. k Update; otherwise, the weight W of the hidden layer k to update.

[0025] Furthermore, the online deep learning method provided by the present invention also includes: updating the hidden layer weights and executing step (S5) simultaneously.

[0026] Furthermore, γ=2.

[0027] Furthermore, the memristor-based storage and computing integrated system further includes: an auxiliary computing unit for performing vector operations;

[0028] Moreover, during the back-propagation process of the online deep learning method, the calculation of the weight gradient is completed by the auxiliary computing unit.

[0029] Furthermore, the memristor-based storage and computing integrated system further includes: a global cache;

[0030] Moreover, during the back-propagation process of online deep learning methods, the intermediate data required for weight gradient calculation is stored in the global cache.

[0031] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:

[0032] (1) The memristor-based integrated storage and computing system provided by the present invention adopts an inter-array wear leveling strategy based on a mapping table. This strategy maintains metadata TWC and IWC for each PE. TWC is used to record the total number of writes to the PE, reflecting the total wear degree of the array in the entire life cycle. IWC is used to record the number of writes in the current wear leveling cycle, reflecting the short-term write heat of the array. At the end of each wear leveling cycle, the mapping table will be rebuilt so that the larger the IWC, the smaller the TWC corresponding to the physical ID mapped by the corresponding logical ID. In this way, the "hot" logical array is remapped to the physical array with less wear, realizing wear leveling between arrays. Compared with the existing intra-array wear leveling method, it can improve the wear leveling effect and ultimately improve the overall life of the system.

[0033] The inter-array wear leveling strategy based on the mapping table is orthogonal to the existing intra-array wear leveling strategy and can be used in combination with the existing intra-array wear leveling strategy to achieve intra-array wear leveling on the basis of inter-array wear leveling, thereby further improving the wear leveling effect.

[0034] In addition, the wear leveling strategy between arrays based on the mapping table may cause the physical arrays belonging to the same logical matrix to be distributed in multiple tiles after the mapping table is rebuilt, thereby dispersing the computing tasks to multiple tiles and alleviating bandwidth contention within the tile.

[0035] (2) In the preferred embodiment of the memristor-based storage and computing integrated system provided by the present invention, each PE contains only a single memristor array, which is equivalent to removing the PE layer in the original three-level (Tile / PE / Crossbar) architecture, and simplifying the system architecture from a three-level (Tile / PE / Crossbar) hierarchical architecture to a two-level (Tile / Crossbar) hierarchical architecture, thereby reducing unnecessary communication overhead, accelerating computing speed, and further improving the overall performance of the system.

[0036] (3) In the present invention, the IWC is temporary metadata and is frequently updated. In a preferred embodiment of the present invention, the IWC is stored in registers within the memristor array under a two-level hierarchical architecture, thereby avoiding frequent writes to the memristor array due to IWC updates.

[0037] (4) In the preferred embodiment of the present invention, under the two-level hierarchical architecture, multiple tiles in the storage module are interconnected through Torus routing, which can further reduce communication overhead.

[0038] (5) In the present invention, TWC is important metadata that records the total number of unit writes during the life cycle of the memristor array. In the preferred embodiment of the present invention, the metadata TWC of each PE is centrally stored in a dedicated memristor array, realizing non-volatile storage of the metadata TWC and ensuring the storage security of the metadata TWC.

[0039] (6) The online deep learning method provided by the present invention utilizes the memory-computing integrated system based on memristors provided by the present invention to realize a deep learning network. In the back-propagation process, only the weights of the hidden layers with higher contribution rates are updated, while the weights of the non-critical hidden layers are not updated. In addition, the hidden layer weights are forced to be updated every γ data instances. While ensuring the deep learning effect, the number of times the hidden layer weights are updated is effectively reduced, thereby reducing the writing of the array in the memory-computing integrated system, reducing energy consumption and extending the system life.

[0040] (7) In the preferred embodiment of the online deep learning method provided by the present invention, the hidden layer weights are updated while executing the data exchange operation in the inter-array wear leveling strategy based on the mapping table. Since the data exchange is hidden in the weight update, the present invention reduces the additional writing introduced by the data exchange by overlapping the data exchange and the weight update.

[0041] (8) In the preferred embodiment of the online deep learning method provided by the present invention, the number of data instances between which the weight update is forced is set to γ ​​= 2, which can achieve the greatest balance between the deep learning effect and the effect of improving the life of the memristor array.

[0042] (9) The data that online deep learning relies on is large-scale streaming data. During the back-propagation process, the matrix operation of gradient calculation will degenerate into vector operation. In the preferred embodiment of the present invention, the calculation of weight gradient is transferred from the memristor array to the auxiliary computing unit, which can reduce the writing of the memristor array, reduce energy consumption and improve lifespan, while avoiding wasting space.

[0043] (10) In deep learning, the calculation of weight gradients requires intermediate data as input, while in online deep learning, the storage requirements for intermediate data are relatively small. In the preferred embodiment of the present invention, the storage location of the intermediate data required for the weight gradient calculation is transferred from the memristor array to the global cache, which can avoid space waste.

Brief Description of the Drawings

[0044] Figure 1 is a diagram of the existing memristor-based storage and computing integrated system architecture;

[0045] Figure 2 shows the execution of three existing wear-leveling strategies within an array; (a) is the column shift (CS) scheme, (b) is the row swap (RS) scheme, and (c) is the row column swap (RCS) scheme.

[0046] FIG3 is a schematic diagram of a memristor-based storage and computing integrated system according to an embodiment of the present invention;

[0047] FIG4 is a flow chart of an inter-array wear leveling strategy based on a mapping table according to an embodiment of the present invention;

[0048] FIG5 is an example diagram of an inter-array wear leveling strategy based on a mapping table provided by an embodiment of the present invention;

[0049] Figure 6 is a schematic diagram of the existing HBP online deep learning network structure; where (a) is the forward propagation process and (b) is the backpropagation process. [Specific implementation method]

[0050] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

[0051] In the present invention, the terms "first", "second", etc. (if any) in the present invention and the drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0052] To address the technical problem that existing wear-leveling methods within arrays in memristor-based integrated storage and computing systems are ineffective in improving the overall lifespan of the system, the present invention provides a memristor-based integrated storage and computing system. The overall concept is to improve the wear-leveling algorithm by periodically remapping "hot" logical arrays to less-worn physical arrays to achieve wear leveling between arrays, ultimately improving the overall lifespan of the system. Furthermore, an online deep learning method is proposed. The overall concept is to reduce writes to the memristor array without affecting the effectiveness of online deep learning, thereby addressing the drawbacks of online deep learning in memristor-based integrated storage and computing systems, such as frequent weight update writes and uneven writes, which lead to a reduced system lifespan.

[0053] The following are examples.

[0054] Example 1:

[0055] A memristor-based storage and computing integrated system, as shown in FIG3 , includes a storage module and a controller.

[0056] The storage module includes multiple interconnected tiles, each tile includes multiple interconnected PEs, and each PE contains N memristor arrays; the mapping relationship between the logical ID of each PE and the physical ID is recorded in the mapping table; the logical ID is a virtual reference assigned by the system to the upper-level application and is used to access the physical array. The physical ID uniquely represents the PE in the storage and computing integrated system.

[0057] As shown in Figure 3, in this embodiment, each PE only contains a single memristor array, that is, N=1. Therefore, the memristor-based storage and computing integrated system provided in this embodiment is equivalent to removing the PE level in the original three-level (Tile / PE / Crossbar) architecture, simplifying the system architecture from the traditional three-level (Tile / PE / Crossbar) hierarchical architecture to a two-level (Tile / Crossbar) hierarchical architecture, thereby reducing unnecessary communication overhead and speeding up the computing speed. Moreover, in order to further reduce the communication overhead, in this embodiment, multiple Tiles are interconnected through Torus routing. It should be noted that the interconnection method of Tiles here is only a preferred embodiment and should not be understood as the only limitation of the present invention. Other interconnection methods, such as Mesh, can also be used in the present invention.

[0058] As shown in FIG3 , in this embodiment, each tile is composed of multiple memristor arrays and tile-level input / output buffers, and are interconnected through an H-Tree.

[0059] As shown in FIG3 , the memristor units in each memristor array are connected via a crossbar, i.e., a crosspoint array. Optionally, in this embodiment, in order to reduce the influence of write disturbance and sneak current, the memristor units in the memristor array are 1T1R units.

[0060] In this embodiment, the controller is configured to implement a table-based inter-crossbar wear-leveling (TIWL) strategy. The strategy includes:

[0061] Divide every M writes into a wear-leveling cycle, where M is a preset positive integer that can be determined based on actual needs. Maintain metadata TWC and IWC for each PE, which are used to record the total number of writes to the PE and the number of writes in the current wear-leveling cycle, respectively. Since each PE in this embodiment contains only one memristor array, the maintained TWC and IWC are the TWC and IWC of each memristor array.

[0062] As shown in Figures 4 and 5, TIWL performs the following steps in each wear leveling cycle:

[0063] (S1) Set the IWC of each PE to 0;

[0064] (S2) accumulating and recording the number of writes to the memristor array in the PE during the operation phase into the corresponding IWC until the current wear leveling cycle ends;

[0065] (S3) adding the IWC of each PE to the corresponding TWC;

[0066] (S4) Rebuilding the mapping table so that the larger the IWC is, the smaller the TWC corresponding to the physical ID mapped by the corresponding logical ID is;

[0067] Similarly, each PE contains only one memristor array, and the logical ID and physical ID of the PE are the logical ID and physical ID of the memristor array respectively;

[0068] IWC reflects the short-term write heat of the memristor array, while TWC reflects the total wear of the memristor array over its lifecycle. This embodiment remaps the "hot" logical array to the less worn physical array by rebuilding the mapping table, thereby achieving system-level wear leveling, i.e., inter-array wear leveling. Compared with existing intra-array wear leveling, this method has better wear leveling effect and can effectively extend the life of the entire system.

[0069] (S5) exchanging the data stored in the PE based on the current mapping table;

[0070] During the process of rebuilding the mapping table, the mapping relationship between the logical ID and the physical ID may change. For the physical ID whose mapping relationship has changed, the data stored in the corresponding memristor array needs to be exchanged to ensure the correctness of the mapping relationship.

[0071] IWC is temporary metadata and is frequently updated. To avoid frequent writes to the memristor array due to IWC updates, as a preferred implementation, this embodiment records the IWC in a register within each memristor array, namely the "wear counter" in Figure 3. TWC is important metadata that records the total number of cell writes during the life cycle of the memristor array and requires non-volatile storage media for storage. To ensure the storage security of TWC, in this embodiment, one or more memristor arrays in the storage module are divided into a dedicated metadata storage area.

[0072] Furthermore, the TWC of each PE is stored in the metadata storage area.

[0073] Compared to in-array wear leveling methods, TIWL does not require recording the aging status of each wordline or bitline, nor does it require obtaining the cell temperature. Therefore, it reduces storage and computational overhead. A brief analysis of the related overhead is as follows:

[0074] Assuming the IWC and TWC are 32-bit and 64-bit, respectively, a 4GB memristor-based integrated storage and computing system is constructed using a 128×128 array. The wear metadata occupies 24MB (0.59% of 4GB) and the mapping table occupies 16MB (0.15% of 4GB), which are acceptable storage overheads. When the array size is increased to 512×512, the storage overheads of the wear metadata and mapping table drop to 1.14MB (0.03% of 4GB) and 1.5MB (0.04% of 4GB), respectively. The array metadata is fixed at 96 bits, which is much smaller than the existing wear-leveling strategy within the array—the row swap strategy (N×T, where N is the number of rows and T is the bit width of the register).

[0075] In general, the memristor-based integrated storage and computing system provided in this embodiment uses a mapping table-based inter-array wear leveling strategy (TIWL), which can remap the "hot" logical array to the physical array with less wear, thereby achieving wear leveling between arrays. Compared with the existing intra-array wear leveling method, it can improve the effect of wear leveling and ultimately improve the overall life of the system. In addition, the inter-array wear leveling strategy of the mapping table provided in this embodiment is orthogonal to the existing intra-array wear leveling strategy and can be used in combination with the existing intra-array wear leveling strategy to achieve intra-array wear leveling on the basis of achieving inter-array wear leveling, thereby further improving the wear leveling effect. Moreover, the inter-array wear leveling strategy based on the mapping table may cause the physical arrays belonging to the same logical matrix to be distributed in multiple tiles after the mapping table is rebuilt, thereby dispersing the computing tasks to multiple tiles and alleviating bandwidth contention within the tile.

[0076] It should be noted that the mapping table-based inter-array wear leveling strategy (TIWL) provided in this embodiment, while improving wear leveling effectiveness, introduces additional communication overhead due to the distribution of computing tasks across multiple tiles. However, this communication overhead is within an acceptable range. Furthermore, this embodiment can effectively mitigate the communication overhead introduced by TIWL by optimizing the system architecture and tile interconnection method. Overall, this embodiment can achieve significant benefits with minimal overhead in terms of improving the overall lifespan of a memristor-based integrated storage and computing system.

[0077] It is easy to understand that the above two-level (Tile / Crossbar) hierarchical architecture is only a preferred embodiment of the present invention and should not be understood as the sole limitation of the present invention. TIWL can achieve an architecture-friendly balance between mapping overhead and mapping benefit by adjusting the scheduling granularity (i.e., PE size). When the number of memristor arrays contained in a PE is greater than 1, the implementation of TIWL in the storage-computing integrated architecture is similar to the above process. The difference is that after reconstructing the mapping table to determine the mapping relationship between the logical ID and physical ID of the PE, it is also necessary to complete the remapping of the logical ID of the memristor array to the physical ID according to the order of the memristor arrays inside the PE; in addition, the metadata IWC of the PE is shared by multiple memristor arrays therein and needs to be stored in the register corresponding to the PE.

[0078] It is also easy to understand that in this embodiment, the implementation of TIWL does not depend on the specific structure inside the Tile. When the internal structure of the Tile changes, for example, when the memristor unit changes, the overall life of the memristor-based storage and computing integrated system provided by the present invention can still be effectively improved.

[0079] Example 2:

[0080] An online deep learning method based on the memristor-based storage and computing integrated system provided in the above-mentioned embodiment 1, wherein the memristor-based storage and computing integrated system is used to accelerate online deep learning.

[0081] Before explaining the technical solution of this embodiment in detail, a brief introduction to existing online deep learning methods is given as follows:

[0082] Online deep learning can learn from streaming data and keep the model continuously trained and evolving. Compared with offline batch training, it can better learn in streaming data scenarios. Figure 6 shows a schematic diagram of the classic HBP online deep learning network structure, where (a) is the forward propagation process and (b) is the back propagation process. The online deep learning network structure consists of two parts. One part is the hidden layer h. The hidden layer is the same as the traditional offline learning deep neural network, which propagates from the first layer to the back layer; the other part is the output layer o. Each output layer is connected to a Softmax classifier to evaluate the learning status of the current hidden layer. In the figure, α n Indicates the contribution weight ratio of the nth layer in all hidden layers, o k represents the Softmax output of the k-th classifier output layer, h k Represents the output after the kth hidden layer is activated.

[0083] Assuming that the number of hidden layers in a deep neural network is N, the final output of the online deep learning HBP model can be expressed by the following formula:

[0084] in

[0085]

[0086]

[0087] h0=x

[0088] There are three parameters that need to be learned in the HBP model, namely Θ k , W k and α k .

[0089] where Θ k represents the parameter weight of the k-th output layer, W k represents the parameter weight of the kth hidden layer, α k The contribution of each layer to the output is controlled, and the classifier output of each layer is weighted and summed to obtain the final output result. The loss function of the model can be defined as: That is, the classifier loss function of each layer is weighted summed.

[0090] The contribution weight of each layer is α k Initialize to a uniform distribution: In each iteration, the output of each layer of classifier is o k , after calculating the loss function with the actual results, the contribution weight of each layer accounts for α k Will be updated by the following formula: Where t represents the iteration round, β∈(0,1) is the attenuation coefficient, and the contribution weight of each layer is α (l) After each iteration, the loss function is decayed. After all contribution weights are updated, they will be standardized to meet

[0091] For the weights Θ of the output layer k , which uses the online gradient descent method to update the weights, which is the same as traditional offline learning. The weight Θ k The update process is as follows:

[0092] For the hidden layer weight W k Unlike the traditional back propagation method, the error derivative is updated by all output layers (i.e. each classifier o k ) is obtained by back propagation, so the following formula is used to express its update process:

[0093] in It is obtained by back propagating the error of each classifier. It should be noted that the weight update of the kth hidden layer requires the weighted accumulation of the error partial derivatives of all the hidden layers behind it. get.

[0094] Since the HBP optimization method will increase the weight of the deep network to α k The decrease is very small, so in order to limit its impact on learning, the smoothing parameter s (s∈(0,1)) is used to control α k The weight is updated after each update: Prevent deep networks from being unable to participate in the backpropagation process.

[0095] Online deep learning involves a large number of matrix operations. Memristor arrays can accelerate matrix-vector multiplication operations. Deep learning applications involve a large number of matrix-vector multiplication operations, so memristor arrays can be used for acceleration. Specifically, the network weights W are stored in the array, the array input is a vector, and the array output is the calculation result.

[0096] Currently, accelerating online deep learning using memristor-based integrated storage and computing systems still faces challenges. First, when conducting online deep learning on large-scale streaming data, the number of weight updates (typically exceeding millions) far exceeds that of traditional offline batch training. This results in frequent writes to the memristor array, posing a significant challenge to the memristor array's limited lifespan. Second, uneven writes to the array during weight updates can lead to a sharp decline in system lifespan, highlighting the "short board effect." Furthermore, large-scale, continuous training in online deep learning scenarios exacerbates this write imbalance.

[0097] The online deep learning method provided in this embodiment utilizes the memristor-based integrated storage and computing system provided in the above-mentioned embodiment 1 to implement a deep learning network. Since the integrated storage and computing system adopts an inter-array wear leveling strategy based on a mapping table, even when the weight update causes uneven array writes, it can also alleviate the impact of the weight update of the online deep learning method on the system life, thereby ensuring the effective implementation of the online deep learning method.

[0098] Taking into account that with the input of training data, the contribution rate α of the shallow network gradually decreases, while the contribution rate of the deep network gradually increases, the training of online deep learning networks such as HBP starts from the shallow neurons and then gradually trains the neurons of the deep network. The final result of the network is obtained by weighted summing of the classifiers of all layers according to the contribution rate α. The network layer with low α has little effect on the output of the network. Based on this consideration, this embodiment improves the weight update method in the back propagation process of the online deep learning method, and proposes a write-optimized parameter update strategy (WARP). This strategy dynamically controls the weight update of the hidden layer according to the weight ratio of the network layer, avoids unnecessary weight writing, and reduces array wear.

[0099] More specifically, at each training iteration, if α of the kth hidden layer k When it is less than the threshold ε (a set constant, preferably 1 / N), the contribution of this layer to the final output of the network is also small, so the weight W of the hidden layer is reduced. k At the same time, considering that if the hidden layer weights are not updated continuously, the network convergence will be too slow. In order to control and reduce the degree of weight update, the hidden layer weights are forced to be updated every γ data instances. The weight update process can be expressed as follows:

[0100] Based on the above weight update method, this embodiment effectively reduces the number of hidden layer weight updates while ensuring deep learning results, thereby reducing array writes in the integrated storage and computing system, reducing energy consumption and extending system life. As a preferred implementation, in this embodiment, γ = 2. Experiments have shown that setting the number of data instances between forced weight updates in this way can achieve the greatest balance between deep learning results and the effect of improving the life of the memristor array.

[0101] As a preferred implementation, this embodiment also includes: the updating of the hidden layer weights is performed simultaneously with step (S5), that is, in the memristor-based storage and computing integrated system, the data exchange operation in TIWL. Since the data exchange is hidden in the weight update, this embodiment reduces the additional writing introduced by the data exchange by overlapping the data exchange and weight update, further reducing energy consumption and improving the system life.

[0102] In online deep learning methods, weight gradients The calculation requires intermediate data x as input: Therefore, the forward phase needs to store x. In the existing memristor-based integrated storage and computing system for online deep learning methods, the main calculation and storage are completed by the memristor array, and the weight gradient is calculated using the memristor. There are two problems: (1) Frequently rewriting the memristor array will introduce energy overhead and shorten its lifespan. In addition, in online deep learning based on large-scale streaming data, the matrix operations of gradient calculation will degenerate into vector operations. Directly using the memristor array to store vector data will also waste the memristor array space. (2) Storing striped intermediate data in the memristor array will waste space and aggravate wear imbalance. The intermediate data storage of online deep learning is smaller than that of offline batch training. For example, when using HBP to train a 16-layer network (with a hidden layer size of 100), only about 9KB of intermediate data is required.

[0103] Therefore, as shown in Figure 3, in this embodiment, an auxiliary computing unit (ACU) is further set in the memristor-based storage and computing integrated system to perform vector operations. In addition, in this embodiment, during the back-propagation process of the online deep learning method, the calculation of the weight gradient is completed by the auxiliary computing unit. By transferring the calculation of the weight gradient from the memristor array to the auxiliary computing unit, the writing of the memristor array can be reduced, the energy consumption can be reduced and the life can be improved, while avoiding the waste of space. Based on the same considerations, as an optional implementation method, in this embodiment, the auxiliary computing unit is also used to complete the processing of array results from different tiles, including ReLU activation, Pooling and cumulative summation.

[0104] In addition, in this embodiment, a global cache is further set in the memristor-based storage and computing integrated system, as shown in Figure 3, and in this embodiment, the intermediate data required for weight gradient calculation is stored in the global cache; this embodiment can avoid space waste by transferring the storage location of the intermediate data from the memristor array to the global cache.

[0105] In general, this embodiment implements an online deep learning method based on the memristor-based storage and computing integrated system provided in the above-mentioned embodiment 1, and through further improvements, it can overcome the defects faced by online deep learning in the memristor-based storage and computing integrated architecture, such as frequent weight update and write, and uneven write, which lead to low system life.

[0106] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A memristor-based storage and computing integrated system, characterized in that: include: Storage modules and controllers; The storage module includes a plurality of interconnected Tiles, each Tile includes a plurality of interconnected PEs, and each PE includes N memristor arrays; the mapping relationship from the logical ID to the physical ID of each PE is recorded in a mapping table; N is a positive integer, and N≥1; The controller is used to execute an inter-array wear leveling strategy based on a mapping table, including: Divide every M writes into a wear leveling cycle, where M is a preset positive integer; maintain metadata TWC and IWC for each PE, which are used to record the total number of writes to the PE and the number of writes in the current wear leveling cycle respectively; perform the following steps in each wear leveling cycle: (S1) Set the IWC of each PE to 0; (S2) accumulating and recording the number of writes to the memristor array in the PE during the operation phase to the corresponding IWC until the current wear leveling cycle ends; (S3) adding the IWC of each PE to the corresponding TWC; (S4) rebuilding the mapping table so that the larger the IWC is, the smaller the TWC corresponding to the physical ID mapped by the corresponding logical ID is; (S5) The data stored in the PE is exchanged based on the current mapping table.

2. The storage and computing integrated system based on memristor as claimed in claim 1, characterized in that: N=1。 3. The memristor-based storage and computing integrated system as claimed in claim 2, characterized in that: The IWC of each PE is stored in a register inside its memristor array.

4. The memristor-based storage and computing integrated system as claimed in claim 2, characterized in that: The multiple tiles in the storage module are interconnected through Torus routing.

5. The memristor-based storage and computing integrated system according to any one of claims 1 to 4, characterized in that: One or more memristor arrays in the storage module are divided into dedicated metadata storage areas; Furthermore, the TWC of each PE is stored in the metadata storage area.

6. An online deep learning method based on the memristor-based storage and computing integrated system according to any one of claims 1 to 5, characterized in that: The memristor-based storage and computing integrated system is used to accelerate online deep learning; The online deep learning method comprises: In the back propagation process, if the contribution rate α of any k-th hidden layer k is less than the preset threshold ε, and since the hidden layer weight W k If the number of data instances between the last update is less than the preset value γ, the weight W of the hidden layer will not be adjusted. k Update; otherwise, the weight W of the hidden layer k to update.

7. The online deep learning method according to claim 6, characterized in that: Also includes: The updating of the hidden layer weights is performed simultaneously with the step (S5).

8. The online deep learning method according to claim 6, characterized in that: γ=2.

9. The online deep learning method according to any one of claims 6 to 8, characterized in that: The memristor-based storage and computing integrated system further includes: an auxiliary computing unit, configured to perform vector operations; Furthermore, during the back-propagation process of the online deep learning method, the calculation of the weight gradient is completed by the auxiliary computing unit.

10. The online deep learning method according to claim 9, characterized in that: The memristor-based storage and computing integrated system further includes: a global cache; Furthermore, during the back-propagation process of the online deep learning method, intermediate data required for weight gradient calculation is stored in the global cache.

Citation Information

Patent Citations

  • Method and apparatus for controlling disk array to be subjected to read-write operation

    CN106933490A

  • Abrasion balance method for hybrid SSDs and SSD

    CN108108128A

  • Intelligent partition processing method for weight information

    CN110298442A

  • Memristor-based neural network training method and memristor-based neural network training device

    CN110796241A

  • Intelligent addressing system based on memristor synapse

    CN110837253A

Cited By

  • Storage and calculation integrated parallel processing system and method

    CN120179606A

  • Storage and calculation integrated microcontroller and data processing method

    CN120872899A