GCN-ReRAM vertex feature selective updating method based on staggered mapping

Through the GCN-ReRAM vertex feature selective update method based on interleaved mapping, the problems of high write delay and short service life of ReRAM Crossbar in the prior art are solved, and more efficient vertex feature update and system performance improvement are achieved.

CN119397229AActive Publication Date: 2025-02-07ZHEJIANG UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411452287.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-07
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

When using ReRAM to train GCN models, the existing technology adopts a full update method to cause the Crossbar write delay, short service life, and large calculation overhead.

Method used

The GCN-ReRAM vertex feature selective update method based on interleaved mapping is adopted. By calculating the degrees of the vertices and sorting them in descending order, it is divided into intervals of different important levels, interleaved vertices of different importance, and selectively updated when backpropagating. Highly important vertex features.

Benefits of technology

It reduces the number of writes of Crossbar, reduces the write delay, improves the service life of Crossbar, and ensures the consistent update time of each Crossbar, improving system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397229A_ABST
    Figure CN119397229A_ABST
Patent Text Reader

Abstract

The invention discloses a GCN-ReRAM vertex feature selective updating method based on staggered mapping. The method aims at solving the problems that when a ReRAM-based storage and calculation integrated system is used for training a graph convolutional neural network, the total delay of GCN related write operation is limited by the unit longest write delay due to the fact that the degree meets vertex random distribution of power law distribution, the wooden barrel short plate effect is generated, and the performance of an accelerator is seriously affected. According to the method, the importance of the vertex features is considered, the vertex features with higher importance are subjected to back propagation updating each time, and the vertex features with unimportant importance are subjected to back propagation updating for multiple times at intervals, so that the writing times of Crossbar are reduced, the writing delay of the Crossbar is reduced, the service life of the Crossbar is prolonged, meanwhile, the updating time of each Crossbar can be ensured to be consistent in a staggered mapping mode, and the updating efficiency of the Crossbar is improved. And the overall performance of the system is prevented from being reduced due to the fact that the updating time of individual Crossbar is too long.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer science artificial intelligence systems and relates to a GCN-ReRAM vertex feature selective updating method based on interleaved mapping. Background Art

[0002] The emergence of Graph Neural Networks (GNN) and related technologies has overcome the defects of traditional neural network models that are limited by Euclidean data, and is one of the hottest research directions today. First, in view of the irregularity and disorder of graph data, traditional deep learning methods can only process input features in a certain order, while GNN adopts a vertex-based message propagation mechanism, ignoring the input order of vertex features, which solves this problem well. Secondly, in view of the interdependence between vertices in graph data, traditional deep learning methods cannot record the graph structure, which will cause serious information loss problems, while GNN relies on the connection between vertices to transmit information, which can relatively completely retain the characteristics of the graph structure and the accuracy of calculation.

[0003] The calculation of graph convolutional neural network mainly includes two stages: vertex feature update (Combination) and vertex message passing (Aggregation). The Combination operation uses a multi-layer perceptron to perform linear transformation on vertex features, that is, matrix multiplication of the vertex feature matrix and the weight matrix is ​​performed to update the vertex features; the Aggregation operation transmits vertex feature information along the direction from the source vertex to the destination vertex, that is, each vertex stage collects the updated feature information of its source vertex, aggregates it with its own information, and finally activates it through the activation function to obtain the output features of this layer. The former is a dense matrix-vector multiplication operation, and its static and regular calculation mode makes it have a relatively stable calculation cost, while the latter is the dot product between the sparse adjacency matrix and the dense vertex feature matrix, which has dynamic and irregular characteristics. Its calculation cost is greatly affected by the size of the graph data, and often grows exponentially with the number of vertices in the graph.

[0004] PIM accelerator is an emerging hardware device, and its main application is to accelerate the training or reasoning process of computing and storage intensive applications such as traditional neural networks including CNN. The core unit of this device is ReRAM Crossbar, which can be used to simulate matrix vector multiplication (MVM). Its structure includes multiple Crossbar cells, digital-to-analog converters (DAC), analog-to-digital converters (ADC), shift and adders (S&A), and sample and hold (S&H).

[0005] When simulating the linear mapping transformation of a neural network, the encoded weight matrix (WeightMatrix, W) can be converted into a conductance map to the ReRAM unit at the intersection of each row and column, and then the input feature matrix (InputFeatureMap, IFM) is converted into a voltage by DAC and applied to each word line. Finally, the current output on each bit line is converted by ADC, which is the product of the input feature matrix and the weight matrix: IFM*W. The hardware simulation of the MVM operation reduces its computational time complexity from the original O(n) to O(1), greatly reducing the computational overhead and improving the training or inference efficiency of the neural network model.

[0006] When using ReRAM to train the GCN model, you need to first map the vertex features to the ReRAM Crossbar, and then use the adjacency matrix as input to complete the calculation of the Aggregation stage. Therefore, after each backpropagation, the vertex features mapped to the ReRAM Crossbar need to be updated.

[0007] Existing work usually adopts the method of mapping by vertex number and updating all vertex features after back propagation. This full update method based on sequential mapping does not consider the importance of distinguishing vertex features, and will generate a large number of crossbar write operations. ReRAM crossbar has the characteristics of high write latency and low write endurance. Therefore, this method will lead to a longer crossbar write latency and significantly reduce the service life of the crossbar. Summary of the invention

[0008] In view of the above-mentioned deficiencies in the prior art, an object of the present invention is to provide a GCN-ReRAM vertex feature selective updating method based on interleaved mapping.

[0009] The objective of the present invention is achieved through the following technical scheme: a GCN-ReRAM vertex feature selective update method based on interleaved mapping, which distinguishes the importance of each vertex according to the vertex degree, and then interleavedly maps vertices of different importance on each ReRAM Crossbar of the core computing unit ReRAM Crossbar array of the in-memory computing (Processing In Memory, PIM) chip, and finally selectively updates the vertex features with higher importance, which specifically includes the following steps:

[0010] Step 1: Assume that the number of vertices in the graph data is N V , the size of each ReRAM Crossbar is S*S, calculate the degrees of all vertices, and sort them in descending order to obtain a descending list of vertex degrees;

[0011] Step 2: Divide the descending list into S intervals in order, and each interval has no more than vertices, each interval has the same or similar importance, and different intervals represent vertex clusters of different importance levels;

[0012] Step 3: For each ReRAM Crossbar of data to be mapped, interleaved mapping is performed, and a vertex is selected from each interval to be mapped to the ReRAM Crossbar, and each vertex can only be mapped once, so that the vertices mapped on each ReRAM Crossbar are from different intervals, so that the degree distribution of the mapped vertices on each ReRAM Crossbar is close;

[0013] Step 4: Perform Graph Convolution Neural Networks (GCN) model training, complete a round of forward propagation and back propagation, and obtain updated vertex features;

[0014] Step 5: For each vertex mapped on the ReRAM Crossbar, according to the degree of the vertex, the low-degree vertices within M percent after the descending list are selectively updated, and the remaining high-degree vertices are updated every period. The parameter M can be dynamically adjusted according to the characteristics of the graph dataset used to train the graph convolutional neural network;

[0015] Step 6. Repeat steps 4 and 5 until the training of the graph convolutional neural network model is completed.

[0016] Furthermore, the selective update in step 5 is specifically as follows: reducing the update frequency of the low-degree vertices without losing model accuracy or with an acceptable loss of model accuracy, so as to speed up the training process of the graph neural network without significantly reducing the accuracy; using a predefined ratio to divide the vertices into important and unimportant categories, with important vertices updated in each period and unimportant vertices updated regularly; before selectively updating vertex features, in order to ensure that the update delays of each ReRAM Crossbar are as balanced as possible, an interleaved mapping method is used to evenly map vertices of different degrees to each ReRAM Crossbar to avoid the short board effect.

[0017] Furthermore, the combination of interleaved mapping and selective update not only makes the number of updated rows of the two ReRAM Crossbars equal, but also ensures that the two ReRAM Crossbars discard the same number of low-degree non-important vertices, thereby improving the system performance while avoiding excessive degradation of model accuracy.

[0018] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the GCN-ReRAM vertex feature selective update method based on interleaved mapping.

[0019] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the method for selectively updating vertex features of GCN-ReRAM based on interleaved mapping is implemented.

[0020] The beneficial effect of the present invention is that compared with the full update method based on sequential mapping, the present invention takes into account the importance of vertex features, vertex features with higher importance are updated each time through back propagation, and unimportant vertices are updated through back propagation multiple times at intervals, which not only reduces the number of Crossbar writes and reduces its write latency, but also increases the service life of the Crossbar. At the same time, the interleaved mapping method adopted by the method can ensure that the update time of each Crossbar is consistent, preventing the update time of individual Crossbars from being too long and reducing the overall performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Schematic diagram of the graph convolutional neural network calculation mode; (a) is the graph data structure diagram, (b) is the calculation mode diagram of the combination phase of the graph convolutional neural network, and (c) is the calculation mode diagram of the aggregation phase of the graph convolutional neural network;

[0022] Figure 2This is the ReRAM Crossbar structure and calculation principle diagram;

[0023] Figure 3 It is a schematic diagram of the interleaved mapping strategy;

[0024] Figure 4 A schematic diagram of selective update based on interleaved mapping;

[0025] Figure 5 Flowchart of the GCN-ReRAM vertex feature selective update method based on interleaved mapping. DETAILED DESCRIPTION

[0026] The present invention will be further described below in conjunction with embodiments and drawings.

[0027] like Figure 5 As shown, a GCN-ReRAM vertex feature selective updating method based on interleaved mapping provided by an embodiment of the present invention includes the following steps:

[0028] Step 1. Assume that the number of vertices in the graph data is N V ,The size of each ReRAM Crossbar is S×S. The degrees of all vertices are calculated and sorted in descending order to obtain a descending list of vertex degrees.

[0029] Step 2. Divide the list into S intervals in order, each interval has Because the degrees of vertices in the same interval are close, they can be considered to be of the same or similar importance, while different intervals represent vertex clusters of different importance levels. That is, each ReRAM Crossbar maps vertex features from different intervals in sequence, and vertices of the same importance (located in the same interval) are mapped to different ReRAM Crossbars.

[0030] Step 3. For each ReRAM Crossbar with data to be mapped, select a vertex from each interval to map to the ReRAM Crossbar, and each vertex can only be mapped once. This strategy ensures that the vertices mapped on each ReRAM Crossbar come from different intervals, so that the degree distribution of the mapped vertices on each ReRAM Crossbar is close. The structure of the ReRAM Crossbar is as follows: Figure 2 As shown, a row-by-row mapping method is adopted when mapping vertex features, that is, each row maps the features of a vertex, and each dimension of the feature vector is mapped to one or more Crossbar units.

[0031] Step 4. Perform graph convolution neural model training, complete a round of forward propagation and back propagation, and obtain updated vertex features. Figure 1 As shown in Figures (b) and (c), the forward propagation of the graph convolutional neural network is divided into two stages: combination and aggregation. Figure 1 In the graph dataset structure shown in Figure (a), the combination phase uses the weight matrix to update the features of each vertex, such as the feature of vertex A at layer l-1. After the weight matrix is ​​updated, it becomes the intermediate feature of layer l In the Aggregation stage, each vertex aggregates the intermediate features of its source vertices to obtain the output result of this layer. For example, the source vertices of vertex A are vertices B, C, and E, so vertex A is aggregated. The features of layer l are obtained The back propagation phase of the graph convolutional neural network starts from the last layer and calculates the gradient of the weight matrix and vertex features layer by layer for subsequent updates. The essence of Combination and Aggregation operations is matrix multiplication. The characteristics of ReRAMCrossbar enable it to efficiently simulate matrix multiplication operations, such as Figure 2 As shown, it is assumed that the conductance of the ReRAM cell at the intersection of the i-th word line and the j-th bit line is G i,j , the current applied to the i-th word line is V i According to Ohm's law and Kirchhoff's law, the current on the jth bit line is The result is the product of the input voltage of each row and the conductance on the same column. After each calculation, the result output on each bit line is the product of a single vector and the matrix mapped on the ReRAM Crossbar. The calculation result of multiple inputs is the product of the two matrices.

[0032] Step 5. For each vertex mapped on the ReRAM Crossbar, according to the degree of the vertex, the low-degree vertices within M percent after the descending list are selectively updated, and the remaining high-degree vertices are updated every period. The parameter M can be dynamically adjusted according to the characteristics of the graph dataset used to train the graph convolutional neural network.

[0033] Among them, the selective update is specifically: in the graph data, the degree of the vertex satisfies the power-law distribution, and the vast majority of the vertices are low-degree vertices, and only a very small number of vertices have a higher degree. Low-degree vertices have less impact on the training accuracy of the graph neural network because they receive and transmit less information, but a single low-degree vertex requires the same update time as a high-degree vertex. Therefore, the present invention proposes to reduce the update frequency of these low-degree vertices without losing model accuracy or with an acceptable loss of model accuracy, so as to speed up the training process of the graph neural network without significantly reducing accuracy. The vertices are divided into important and unimportant categories using a predefined ratio. Important vertices are updated in each period, while unimportant vertices are updated regularly. Before selectively updating vertex features, in order to ensure that the update delays of each ReRAM Crossbar are as balanced as possible, the present invention also uses an interlaced mapping method to evenly map vertices of different degrees to each ReRAM Crossbar to avoid the occurrence of the short board effect.

[0034] Step 6. Repeat steps 4-5 until the training of the graph convolutional neural model is completed.

[0035] The interleaving mapping proposed in the present invention is specifically as follows: Figure 3 As shown, assuming that the graph data has a total of N V vertices, the size of each ReRAM Crossbar is S×S, and the interleaving mapping strategy works as follows. First, the degrees of all vertices are calculated and sorted in descending order. Then, the reordered vertex list is divided into S intervals, each containing vertices. Since vertices in the same interval have similar degrees, they can be considered equally important. Different intervals represent vertex groups with different importance levels. When performing vertex feature mapping, a vertex is selected from each interval to be assigned to a specific ReRAM Crossbar, and each vertex can only be assigned once. This strategy ensures that each ReRAM Crossbar maps vertices from different intervals, thereby achieving a more balanced distribution of vertex degrees among all ReRAM Crossbars.

[0036] The present invention combines interleaved mapping with selective updating, which not only makes the number of updated rows of the two ReRAM Crossbars equal, but also ensures that the two ReRAM Crossbars discard the same number of low-degree non-important vertices, thereby improving system performance and avoiding excessive degradation of model accuracy. Figure 4As shown, assuming that the vertices with vertex degrees in the first fifty percent of the descending list are high-degree vertices, V2, V4, V1, and V3 with vertex degrees of 500, 450, 300, and 250 respectively are determined to be high-degree vertices. The higher the vertex degree, the more source vertices it has, and the richer the information collected, so the more important it is, the greater the impact on the accuracy of the model, and the more back-propagation updates are required each time; on the contrary, the less important it is, the more back-propagation updates can be performed at intervals. In this embodiment, these four high-degree vertices are classified into important groups, and they are evenly mapped to all ReRAM Crossbars (two vertices on each ReRAM Crossbar). The degrees of the discarded vertices on the two ReRAM Crossbars are 15, 2, 10, and 1 respectively, all of which are unimportant low-degree vertices.

[0037] An embodiment of the present invention also provides an electronic device, including a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the GCN-ReRAM vertex feature selective update method based on interleaved mapping.

[0038] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the method for selectively updating vertex features of GCN-ReRAM based on interleaved mapping is implemented.

[0039] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capability and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.

Claims

1. A GCN-ReRAM vertex feature selective update method based on interleaved mapping, characterized in that: The importance of each vertex is distinguished according to the vertex degree, and then the vertices of different importance are interleaved on each ReRAM Crossbar of the ReRAM Crossbar array, the core computing unit of the in-memory PIM chip, and finally the features of the vertices with higher importance are selectively updated. The specific steps include the following: (1) Assume that the number of vertices in the graph data is N V , the size of each ReRAM Crossbar is S*S, calculate the degrees of all vertices, and sort them in descending order to obtain a descending list of vertex degrees; (2) Divide the descending list into S intervals in order, each interval has no more than vertices, each interval has the same or similar importance, and different intervals represent vertex clusters of different importance levels; (3) For each ReRAM Crossbar of data to be mapped, interleaved mapping is performed, and a vertex is selected from each interval to be mapped to the ReRAM Crossbar, and each vertex can only be mapped once, ensuring that the vertices mapped on each ReRAM Crossbar are from different intervals, so that the degree distribution of the mapped vertices on each ReRAM Crossbar is close; (4) Train the graph convolutional neural network model, complete a round of forward propagation and back propagation, and obtain updated vertex features; (5) For each vertex mapped on the ReRAM Crossbar, based on the degree of the vertex, the low-degree vertices within M percent of the descending list are selectively updated, and the remaining high-degree vertices are updated every period. The parameter M can be dynamically adjusted according to the characteristics of the graph dataset used to train the graph convolutional neural network; (6) Repeat steps (4) to (5) until the training of the graph convolutional neural network model is completed.

2. A GCN-ReRAM vertex feature selective update method based on interleaved mapping as claimed in claim 1, characterized in that: The selective update in step (5) is specifically as follows: reducing the update frequency of the low-degree vertices without losing the model accuracy, so as to speed up the training process of the graph neural network without reducing the accuracy; using a predefined ratio to divide the vertices into important and unimportant categories, and the important vertices are updated in each period, while the unimportant vertices are updated regularly; before selectively updating the vertex features, in order to ensure that the update delay of each ReRAM Crossbar is as balanced as possible, the vertices of different degrees are evenly mapped to each ReRAM Crossbar by using an interleaved mapping method to avoid the short board effect.

3. An electronic device comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement a GCN-ReRAM vertex feature selective update method based on interleaved mapping as described in any one of claims 1-2.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a GCN-ReRAM vertex feature selective update method based on interleaved mapping as described in any one of claims 1 to 2 is implemented.

Citation Information

Patent Citations

  • Adjustable hardware aware pruning and mapping framework based on ReRAM neural network accelerator

    CN112598129A

  • Convolution operator mapping method for multi-core memristor storage and calculation integrated platform

    CN114418072A

  • Graph neural network compression method and device, electronic equipment and storage medium

    CN115357554A

  • Graph data processing method based on graph neural network and FPGA

    CN117036898A

  • Graph convolutional neural network storage and calculation integrated system based on resource copy

    CN118627563A