Non-volatile memory-based recommendation system network efficient training method and system

By employing a hybrid storage architecture and a dual-version checkpoint mechanism in the recommendation system, the problems of low training efficiency and lifespan loss of non-volatile memory in recommendation systems are solved, achieving high training performance and extended device lifespan.

CN115310605BActive Publication Date: 2026-03-24ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-25
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, non-volatile memory fails to fully utilize its bandwidth and non-volatile characteristics in recommendation systems, resulting in low training efficiency and excessive write operations that shorten device lifespan.

Method used

A hybrid storage architecture is adopted, which divides sparse feature data into hot and cold data according to access frequency and stores them in DRAM and NVM. A dual-version checkpointing mechanism is designed to optimize data access and checkpointing operations by taking advantage of the non-volatile characteristics of NVM, thereby reducing device lifespan loss.

Benefits of technology

This improved the training performance of the recommendation system, reduced the lifespan loss of non-volatile memory, and enhanced the overall efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115310605B_ABST
    Figure CN115310605B_ABST
Patent Text Reader

Abstract

The application provides a non-volatile memory-based recommendation system network efficient training method and system, efficiently utilizes bandwidth, delay characteristics and non-volatility characteristics of the non-volatile memory, and optimizes training performance of the recommendation system network. The method is specifically as follows: facing a dynamic memory (DRAM) and a non-volatile memory (NVM) hybrid storage architecture, utilizing cold and hot characteristics of Embedding data in the recommendation system network, intelligently placing the data, increasing data access efficiency, and improving training performance; secondly, utilizing the non-volatility characteristics, designing a new training mode and a checkpoint mode, utilizing a dual-version persistence technology and an incremental and parallel optimization technology, further improving system performance, and reducing NVM life loss.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the field of computer science artificial intelligence, and in particular to a recommendation system network efficient training method based on non-volatile memory. BACKGROUND

[0002] Artificial intelligence technology has played a role in many fields and has attracted great attention from the industry and academia. As a kind of artificial intelligence, the recommendation system network enables product and production recommendation, and its powerful recommendation capability can push targeted goods and advertisements, help merchants improve economic benefits, and promote the development of the national economy. In order to have a network model with good recommendation capability, more training data sets are often needed to iteratively train the model. In the recommendation system, the data set is often organized in the form of embedding table (Embedding). With the increase of the size of the data set, the Embedding has reached hundreds of GB or even TB level, forcing the recommendation system network to have higher requirements for storage devices. The existing method selects the number of stacked DRAM to meet the space requirements of Embedding. However, DRAM is very expensive, and the stacking of a large number of DRAM needs to be connected using distribution, and the performance is affected by network transmission. Secondly, the existing method can choose to use a larger capacity disk to load Embedding. However, the disk performance is poor, which seriously restricts the training efficiency of the deep learning network. In recent years, the newly developed non-volatile memory (NVM) has the characteristics of large capacity, fast performance, and low price, providing a new storage option for Embedding. However, directly using NVM in the recommendation system cannot fully utilize the advantages of NVM, that is, the bandwidth characteristics and non-volatile characteristics of NVM are not considered, and the system performance cannot be optimized. In the training process, a large number of write operations are performed on the non-volatile memory, which reduces the service life of the device and causes economic losses. Therefore, how to design an efficient recommendation system network training method for non-volatile memory devices to optimize the performance of the system and reduce the service life loss of the non-volatile memory device has become particularly important.

[0003] The running process of the recommendation system is as follows Figure 1The network model includes two parts: (1) Embedding data stored in DRAM; (2) neural network weights stored in GPU; the dataset includes dense feature data and sparse feature data, wherein the dense data is organized in the form of floating point numbers, for example, the height of a user is 183.3, and the sparse feature data is organized in the form of Embedding vectors, that is, a multi-dimensional floating point number array is used to represent a certain commodity. In the training process, the dense data is sent to the multilayer perceptron neural network for training, and the required sparse feature data will be selected, and then the recommendation system splices the dense feature data processed by the neural network and the selected sparse Embedding data, and sends them to the uppermost neural network for training. The training process includes forward propagation, backward propagation, gradient update and regular checkpoint operation. The forward propagation involves the read operation of Embedding in the memory, and the gradient update involves the write operation of Embedding. When the checkpoint operation is performed, the weights of the neural network and the Embedding data are written into the disk in the form of files, and the training of the model will be stopped during this process, waiting for the end of the checkpoint operation.

[0004] Because the Embedding data is large, the traditional DRAM cannot effectively support the storage of the Embedding data of the recommendation system. At this time, the emergence of NVM brings new opportunities to solve this problem. However, simply using NVM as a substitute for DRAM for the recommendation system is still not efficient enough, mainly facing the following challenges: (1) because the performance of NVM is lower than that of DRAM, how to place the Embedding data between DRAM and NVM to optimize the data access performance? (2) NVM has non-volatility, how to use this feature to optimize the checkpoint operation of the recommendation system, so as to further improve the training efficiency of the recommendation system and reduce the life loss of NVM? SUMMARY

[0005] The purpose of the present application is to overcome the shortcomings of the prior art, and to provide a recommendation system network efficient training method and system based on non-volatile memory. By using the non-volatile characteristics of NVM devices, a data placement mechanism is designed to speed up the access of Embedding data. The checkpoint mechanism of the recommendation system is optimized to reduce the checkpoint overhead, improve the training performance of the application, and alleviate the life loss of the NVM device.

[0006] The technical scheme adopted by the present application is as follows:

[0007] A recommendation system network efficient training method based on non-volatile memory, comprising:

[0008] The sparse feature data in the obtained data set is embedded into a table vector and stored in the DRAM and the non-volatile memory; the non-volatile memory is provided with two groups of spaces for storing the embedded table vector data;

[0009] The neural network model is trained by using the obtained data set; during gradient updating, the first embedded table data stored in the non-volatile memory is updated by persistent writing, and the updated data index and space position are recorded, wherein the two space positions corresponding to each data of the first embedded table data are updated alternately; the second embedded table data stored in the DRAM is updated in the original position, and the updated data index is recorded; the weight of the neural network model is updated and stored in the GPU; during the checkpoint operation, the updated second embedded table data and the neural network model weight data are transferred and stored in the non-volatile memory.

[0010] Further, the sparse feature data in the obtained data set is embedded into a table vector and stored in the DRAM and the non-volatile memory, specifically:

[0011] The sparse feature data in the obtained data set is embedded into a table vector, and is divided into first embedded table data and second embedded table data according to the access frequency, wherein the access frequency of the first embedded table data is lower than that of the second embedded table data, the second embedded table data is stored in the DRAM, and the first embedded table data is stored in the non-volatile memory.

[0012] Further, the data ratio stored in the DRAM and the non-volatile memory is 1:1-1:99.

[0013] Further, the updated space position is recorded by using a bitmap stored in the non-volatile memory.

[0014] Further, the updated data index is recorded by using a data modification record table stored in the DRAM.

[0015] Further, during the gradient updating, the first embedded table data stored in the non-volatile memory is first stored in the DRAM after being updated, and then is updated by persistent writing in the space corresponding to the data index in the non-volatile memory according to the recorded updated data index.

[0016] A high-efficiency training system of a recommendation system network based on a non-volatile memory, comprising:

[0017] A preprocessing module embeds sparse feature data in an obtained data set into a table vector and stores the table vector in a DRAM and a non-volatile memory; the non-volatile memory is provided with two groups of spaces for storing the embedded table vector data;

[0018] The training module trains the neural network model by using the obtained data set; wherein, when the gradient is updated, the first embedding table data stored in the non-volatile memory is updated by persistent writing, and the updated data index and space position are recorded, wherein the two spaces corresponding to each data of the first embedding table data are updated alternately; the second embedding table data stored in the DRAM is updated in the original position, and the updated data index is recorded; and the weight of the neural network model is updated and stored in the GPU;

[0019] The checkpoint module periodically transfers and stores the updated second embedding table data and the neural network model weight data to the non-volatile memory.

[0020] Further, in the preprocessing module, the sparse feature data embedding table in the obtained data set is vectorized and stored in the DRAM and the non-volatile memory, specifically:

[0021] The sparse feature data embedding table in the obtained data set is vectorized and divided into first embedding table data and second embedding table data according to the access frequency, wherein the access frequency of the first embedding table data is lower than that of the second embedding table data, the second embedding table data is stored in the DRAM, and the first embedding table data is stored in the non-volatile memory.

[0022] Further, the data ratio stored in the DRAM and the non-volatile memory is 1:1-1:99.

[0023] Further, in the training module, when the gradient is updated, the first embedding table data stored in the non-volatile memory is first stored in the DRAM after being updated, and then the corresponding data index in the non-volatile memory is updated by persistent writing in the space of the data index.

[0024] The beneficial effects of the present application are: the present application is directed to a hybrid storage architecture of dynamic memory (DRAM) and non-volatile memory (NVM), which utilizes the hot and cold characteristics of Embedding data in the recommendation system network to intelligently place the data, increase the data access efficiency, and improve the training performance. At the same time, by utilizing the non-volatile characteristics, a new type of training mode and checkpoint mode are designed, and by utilizing the dual version persistent technology and incremental and parallel optimization technology, the system performance is further improved, and the loss of NVM life is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 is a recommended system model structure diagram

[0026] Figure 2 is a structure diagram of the efficient training system of the recommendation system network based on the non-volatile memory proposed by the present application;

[0027] Figure 3is Embedding data access frequency CDF chart

[0028] Figure 4 is the update flow chart of Embedding in the default mechanism during training

[0029] Figure 5 is the checkpoint saving flow chart in the default mechanism

[0030] Figure 6 is the training flow chart of the dual version checkpoint mechanism

[0031] Figure 7 is the execution flow chart of the incremental technology and parallel technology proposed by the application

[0032] Figure 8 is the system execution flow chart without using the parallel technology

[0033] Figure 9 is the system execution flow chart after using the parallel technology

[0034] Figure 10 is the experimental test effect chart DETAILED DESCRIPTION

[0035] The application provides a non-volatile memory-based recommendation system network efficient training method, which comprises the following steps:

[0036] Step 1: embedding the sparse feature data in the obtained data set into a table vector, and storing the table vector in DRAM and non-volatile memory, so as to share the storage pressure of DRAM; the storage ratio can be set according to requirements, and in general cases, the data storage ratio in DRAM and non-volatile memory is 1:1 to 1:99.

[0037] Since the performance of the traditional memory DRAM and the new non-volatile memory NVM is different, the access bandwidth of the NVM is relatively low, if a large amount of access falls on the NVM, the system performance will be greatly lost, therefore, the data with high access frequency is placed on the fast device DRAM, and the data with low access frequency is placed on the slow device NVM, so that the advantages of the fast device can be maximized. Through tests, it is found that the recommendation system data set has typical hot and cold phenomena, for example, the access frequency of the embedding data is much higher than that of the other data, and the access frequency of the embedding data is much higher than that of the other data. Figure 3The first 20% of the data occupies 80% of the access. Therefore, as a preferred embodiment, the sparse feature data in the obtained data set is analyzed, the access frequency of the Embedding data obtained by embedding table vectorization is counted, and the descending order is arranged, and the first embedding table data and the second embedding table data are divided, wherein the access frequency of the first embedding table data is lower than that of the second embedding table data, the second embedding table data is stored in the DRAM, and the first embedding table data is stored in the non-volatile memory. Wherein, the first embedding table data and the second embedding table data can be divided into two parts according to the threshold value (for example, 5%) set by the user, and the data set is renumbered, the first 5% of the data with high access frequency is stored in the DRAM, and the remaining data with low access frequency is stored in the NVM.

[0038] Step two: training the neural network model using the obtained data set.

[0039] In order to ensure that the model can be recovered after the system crashes, the recommendation system stores the Embedding data and network weight values into the persistent device (SSD or NVM) during the training process. If only NVM is regarded as the extension of DRAM, the embedding update scheme and the checkpoint saving scheme (referred to as the default scheme) during training are as shown in Figure 4 5 As shown in Figure 4 , assuming that the recommendation system needs to access Embedding-0 and Embedding-3, since Embedding-0 is high-frequency hot data, the recommendation system will read it in the DRAM, and Embedding-3 is read in the NVM (steps ① and ②), and then it is sent into the model for forward propagation training. When performing gradient update, the Embedding data needs to be updated and written to the original position, so the updated data can be written in the corresponding position (steps ③ and ④). As shown in Figure 5 , when saving the checkpoint, the high-frequency Embedding in the DRAM, the low-frequency Embedding in the NVM, and the weight data in the GPU are transferred to the NVM (steps ①②③). Since the amount of Embedding data is large (hundreds of GB or even TB of Embedding data), the checkpoint operation seriously affects the training time, and the additional write amount greatly reduces the service life of the NVM.

[0040] ​Such a solution does not make full use of the characteristics of NVM, thus resulting in low training efficiency, reducing NVM life and the like. The application makes full use of the non-volatile characteristics of NVM, and designs a double-version checkpoint mechanism, so that when data is written to NVM during training, it is persisted, thereby avoiding additional independent checkpoint operations, thereby improving the overall training performance. However, during the data writing process, in order to guarantee crash consistency, we need to guarantee that at least one complete version of the data in the system is used for crash recovery, so we cannot update the data in place. In order to solve this problem, a double-version mechanism is designed for the checkpoint persistence of Embedding, parallel technology is used for optimization, and a corresponding training module is designed to ensure normal program operation.

[0041] Specifically, as shown in Figure 6 , two groups of spaces for storing vectorized data of embedding tables are provided in the non-volatile memory, so that the Embedding data stored in the non-volatile memory has two versions in real time; one version always saves checkpoint data for crash recovery (i.e. the last round of updated Embedding data), and the data required to be updated at runtime is stored in the space position corresponding to the other version. Then during the gradient update of training, the first embedding table data stored in the non-volatile memory is directly persisted in the space position corresponding to the runtime version, in order to guarantee the normal operation of training, a lightweight index is needed in the system to record the specific positions of the runtime and the persistent version and the updated data index; the second embedding table data stored in the DRAM is updated in place, and the data index updated by the second embedding table data is recorded, i.e. the data number; the weight update of the neural network model is stored in the GPU; Figure 6 The specific steps of training are shown, wherein a bitmap is additionally added in the NVM to indicate the position of the checkpoint data, and a data modification record table is added in the DRAM to record which data is modified during the checkpoint period. During training, Embedding-0 and Embedding-3 need to be accessed, and Figures 4-5 , the system will read Embedding-0 in the DRAM (step ①). Different from Figures 4-5 , when reading Embedding-3, the system will first read the bitmap and find the space position of the runtime version data of Embedding-3 (step ②), and read the data (step ③), and after training, update the Embedding data in the corresponding space position (steps ④ and ⑤). Then the modified data number is counted into the data modification record table (step ⑥) for subsequent checkpoint saving.

[0042] Since the low-frequency Embedding data stored on NVM is persisted on NVM media during the training process, no additional checkpoint saving is needed for such data. Therefore, only the high-frequency data in DRAM and the weight data in GPU need to be transferred from volatile devices to non-volatile devices during the checkpoint operation. By utilizing the non-volatile characteristics of NVM devices, the checkpoint mechanism of the recommendation system is optimized, the checkpoint overhead is reduced, the application training performance is improved, and the life consumption of NVM devices is alleviated.

[0043] When the system triggers the checkpoint operation, the system packs the modified first embedding table data in the current DRAM and the weight data in the GPU, and transmits them to the NVM in parallel. At the same time, the system reads the "data modification record table", flips the bitmap value corresponding to the modified data on the NVM, and updates the position of the checkpoint version on the NVM.

[0044] Checkpoint recovery: when the system crashes, the system reads out the high-frequency data and weight data in the checkpoint data, and transmits them to the specified positions of DRAM and GPU after incremental processing. For the Embedding data in NVM, since the bitmap is persisted on NVM, no processing is needed, and the bitmap and data can be normally read during training.

[0045] Further, during the checkpoint operation, the transfer of a large amount of high-frequency data and weight data will still reduce the running efficiency of the system. In order to further optimize the performance of the checkpoint operation, as a preferred embodiment, as shown in Figure 7 , first, use the incremental technology to transfer only the updated part of the high-frequency data to the NVM, thereby greatly reducing the amount of data to be transferred; in addition, use parallel technology to parallelize the transfer of high-frequency data and weight data with the subsequent training of the recommendation system. As shown in Figure 8 , since there are only two versions of space (V1 and V2) in NVM, the subsequent training cannot be normally performed before the transfer of high-frequency data and weight data is completed (there is no suitable position for the modified Embedding in NVM to be updated). In order to solve this problem, a new parallel mechanism is designed, as shown in Figure 9As shown, during the gradient update, the first embedding table data (V3 version) required to be updated in the parallel stage is stored in the temporary buffer (Buffer) in the DRAM before the end of data transmission, and after the end of data transmission of the V2 version, the system will write the data in the Buffer back to the specified position in the NVM in the background. During the parallel stage, if the system needs to read the Embedding during the running process, the data in the Buffer will be accessed first to check whether the new data is in the Buffer, and if the new data exists, the new data in the Buffer will be directly read, and if the new data does not exist, the corresponding position in the NVM will be read.

[0046] The effects of the present application are further described below in combination with a specific embodiment:

[0047] The specific experiment is as follows:

[0048] Experimental configuration:

[0049] (1) Operating system: Ubuntu 18.04.6 LTS;

[0050] (2) CPU: Model 24-core Intel 5318Y Xeon CPU, with 128GB DRAM; 1TB Intel Optane NVM;

[0051] (3) GPU: NVIDIA A100 40GB graphics memory;

[0052] (4) Storage device: 1.6TB SSD;

[0053] Model configuration:

[0054] (1) Model: DLRM CuDNN standard code;

[0055] (2) Dataset: Kaggle, wherein the dimension of one Embedding array is 256 floating-point numbers, and a total of 32GB of storage space is required;

[0056] (3) Batch size: 2048 users / batch;

[0057] (4) Training rounds: 60 rounds (epochs);

[0058] Final test results:

[0059] The recommended system training method does not adopt the application, data is randomly placed, and checkpoint data is periodically transferred to the NVM device; the method of the application: the preprocessing module divides the Embedding data according to cold and hot, wherein 5% of the high-frequency data is placed in the DRAM as the second embedding table data, and the remaining Embedding is placed in the NVM as the first embedding table data, and the obtained data set is used to train the neural network model; wherein, the updated data is first stored in the DRAM, and the data modification record table stored in the DRAM is used to record the updated data index of the first embedding table data, then according to the recorded updated data index of the first embedding table data, the updated data stored in the DRAM is written in the non-volatile memory according to the updated data stored in the DRAM, and the bit map stored in the non-volatile memory is used to record the updated space position; the second embedding table data stored in the DRAM is updated in the original position, and the data modification record table stored in the DRAM is used to record the updated data index of the second embedding table data; the weight update of the neural network model is stored in the GPU; during the checkpoint operation, the updated second embedding table data and the modified data of the neural network model weight are periodically transferred and stored in the non-volatile memory.

[0060] As shown in Figure 10 , the method of the application improves the training performance by 14.1 times compared with the default method, reduces the checkpoint data write by 95%, and prolongs the device life by 19 times.

[0061] Corresponding to the foregoing embodiment of the non-volatile memory-based recommended system network efficient training method, the application also provides an embodiment of a non-volatile memory-based recommended system network efficient training system.

[0062] Referring to Figure 2 , the embodiment of the application provides a non-volatile memory-based recommended system network efficient training system, which comprises:

[0063] A preprocessing module, which vectorizes the sparse feature data embedding table in the obtained data set and stores it in the DRAM and the non-volatile memory; the non-volatile memory is provided with two groups of spaces for storing the vectorized embedding table data;

[0064] A training module, which uses the obtained data set to train the neural network model; wherein, when the gradient is updated, the first embedding table data stored in the non-volatile memory is updated by persistent writing, and the updated data index and space position are recorded, wherein the two spaces corresponding to each data of the first embedding table data are updated alternately; the second embedding table data stored in the DRAM is updated in the original position, and the updated data index is recorded; the weight update of the neural network model is stored in the GPU;

[0065] A checkpoint module periodically transfers updated second embedding table data and neural network model weight data to storage in non-volatile memory.

[0066] Obviously, the above embodiments are merely exemplary and are not intended to limit the implementation. Based on the above description, those skilled in the art can make other different forms of changes or modifications. All the implementations do not need to be exhausted here. The obvious changes or modifications derived therefrom are still within the protection scope of the present application.

Claims

1. An efficient training method for recommender system networks based on non-volatile memory, characterized in that, include: The sparse feature data from the acquired dataset is embedded into a table vector and stored in DRAM and non-volatile memory. The non-volatile memory contains two sets of spaces, both used to store the embedded table vector data. Specifically, the process of embedding the sparse feature data from the acquired dataset into a table vector and storing it in DRAM and non-volatile memory is as follows: The sparse feature data in the acquired dataset is embedded into a table vector and divided into a first embedded table data and a second embedded table data according to the access frequency. The access frequency of the first embedded table data is lower than that of the second embedded table data. The second embedded table data is stored in DRAM and the first embedded table data is stored in non-volatile memory. The acquired dataset is used to train the neural network model. During gradient updates, the first embedding table data stored in non-volatile memory is persistently written and updated, while the updated data index and spatial location are recorded. The two spaces corresponding to each data in the first embedding table are updated alternately. The second embedding table data stored in DRAM is updated in its original position, while the updated data index is recorded. The weight updates of the neural network model are stored in the GPU. During checkpoint operations, the updated second embedding table data and the neural network model weight data are periodically transferred and stored in non-volatile memory.

2. The method according to claim 1, characterized in that, The ratio of data stored in DRAM and non-volatile memory is 1:1 to 1:

99.

3. The method according to claim 1, characterized in that, The spatial location of the record update is recorded using a bitmap stored in non-volatile memory.

4. The method according to claim 1, characterized in that, The updated data index is recorded using a data modification record table stored in DRAM.

5. The method according to claim 1, characterized in that, During the gradient update, the first embedded table data stored in non-volatile memory first stores the updated data in DRAM, and then persists the update in the space of the corresponding data index in non-volatile memory according to the recorded updated data index.

6. An efficient training system for recommender network based on non-volatile memory, characterized in that, include: The preprocessing module embeds the sparse feature data from the acquired dataset into a vectorized table and stores it in DRAM and non-volatile memory. The non-volatile memory has two sets of spaces, both used to store the embedded vectorized data. Specifically, the process of embedding the sparse feature data from the acquired dataset into a vectorized table and storing it in DRAM and non-volatile memory is as follows: The sparse feature data in the acquired dataset is embedded into a table vector and divided into a first embedded table data and a second embedded table data according to the access frequency. The access frequency of the first embedded table data is lower than that of the second embedded table data. The second embedded table data is stored in DRAM, and the first embedded table data is stored in non-volatile memory. The training module uses the acquired dataset to train the neural network model. During gradient updates, the first embedding table data stored in non-volatile memory is persistently written and updated, while recording the updated data index and spatial location. The two spaces corresponding to each data in the first embedding table are updated alternately. The second embedding table data stored in DRAM is updated in its original position, while recording the updated data index. The weight updates of the neural network model are stored in the GPU. The checkpoint module periodically transfers and stores updated second embedding table data and neural network model weight data to non-volatile memory.

7. The system according to claim 6, characterized in that, The ratio of data stored in DRAM and non-volatile memory is 1:1 to 1:

99.

8. The system according to claim 6, characterized in that, In the training module, during gradient updates, the first embedded table data stored in non-volatile memory is first stored in DRAM after the update, and then the updated data is persistently written to the space of the corresponding data index in the non-volatile memory according to the recorded updated data index.

Citation Information

Patent Citations

  • Method for keeping data consistency of distributed persistent memory file system

    CN113961150A

  • Database system recovery using non-volatile system memory

    US9684686B1