Machine learning model recovery
By maintaining logs and backup representations during the training of machine learning models and storing only modified parameters, the problem of model loss or tampering is solved, achieving efficient model recovery and business continuity while reducing storage resource consumption.
Patent Information
- Application Number
- CN202510476797.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-08-29
- Filing Date
- 2025-04-16
- Publication Date
- 2026-03-10
AI Technical Summary
Machine learning models are easily lost or tampered with during training, making it impossible to restore them to their previous state, wasting resources and affecting business continuity. Existing backup methods consume too much storage resources.
By maintaining logs and backup representations of the machine learning model during training, with the logs storing only modified parameters and the backup representations being updated periodically or triggered by events, the target version can be restored using the log and backup controller.
It achieves efficient model recovery, reduces storage requirements and downtime, and ensures business continuity and efficient resource utilization.
Smart Images

Figure CN121638358A_ABST
Abstract
Description
BACKGROUND
[0001] Machine learning models can be used to make predictions based on a set of input data. Training of a machine learning model involves updating parameters associated with the machine learning model. BRIEF DESCRIPTION OF DRAWINGS
[0002] Some embodiments of the disclosure are described with respect to the following drawings.
[0003] Figure 1 is a block diagram of an arrangement including a source repository storing a source model representation, a log repository, and a backup repository storing a backup model representation, according to some examples.
[0004] Figure 2 is a block diagram of an example of creating a restored neural network using the log repository and the backup model representation, according to some examples.
[0005] Figure 3 is a block diagram of a storage medium storing machine-readable instructions, according to some examples.
[0006] Figure 4 is a block diagram of a system, according to some examples.
[0007] Figure 5 is a flowchart of a process, according to some examples.
[0008] In all drawings, like reference numerals refer to like but not necessarily identical elements. The drawings are not necessarily to scale and the size of some parts can be exaggerated to more clearly illustrate the examples shown; thus, the drawings are provided for illustrative purposes only and should not be interpreted as limiting the description. In addition, the drawings provide examples and / or embodiments consistent with the description; however, the description is not limited to the examples and / or embodiments provided in the drawings. DETAILED DESCRIPTION
[0009] Training a machine learning model can be very time consuming and can involve a large amount of usage of resources, including processing resources, storage resources, and communication resources. A machine learning model can accept an initial training, where a training dataset can be used to train the machine learning model. Further, after the initial training, the machine learning model can be updated based on further training to improve the accuracy of the machine learning model.
[0010] Failures or errors of the storage system can cause the machine learning model to be lost or corrupted. Furthermore, as the machine learning model is updated through multiple training iterations, the machine learning model can be corrupted (or modified in an unintended manner) due to the use of incorrect training data or due to an attacker tampering with the training data. If the machine learning model is lost or modified in an unintended manner, it can not be possible to restore the machine learning model to a previous state. As a result, the machine learning model can have to be recreated from scratch, which wastes labor costs and resource usage. Additionally, the unavailability of the machine learning model can cause downtime if the organization is unable to perform operations that rely on the machine learning model.
[0011] In some examples, as the machine learning model changes during training, different versions of the machine learning model can be backed up in a backup storage. However, maintaining a complete copy of previous versions of the machine learning model can consume a large amount of storage resources.
[0012] According to some embodiments of the present disclosure, different checkpoints of the machine learning model can be maintained by using a log, into which modified parameters of the machine learning model are copied during training of the machine learning model. The log only stores the modified parameters of the machine learning model (i.e., the log does not store unmodified parameters of the machine learning model). Thus, the amount of storage space consumed by the log can be much smaller than the amount of storage space consumed to store the entire machine learning model. In addition to the log, a backup representation of the machine learning model can also be maintained. The backup representation is a complete copy of the machine learning model. The backup representation of the machine learning model can be updated by applying (replaying) the modified parameters in the log periodically or in response to another event (e.g., a user request, the number of modified parameters in the log has exceeded a threshold, or any other event).
[0013] In response to a query to restore a target version of the machine learning model, the backup controller can construct the target version of the machine learning model by retrieving selected modified parameters in the log. The selected modified parameters in the log, in combination with the backup representation of the machine learning model, are used to create the target version of the machine learning model. This target version of the machine learning model can then be tested to confirm proper functioning, and based on the confirmation, the target version of the machine learning model can be submitted as the restored version of the machine learning model.
[0014] An example of a machine learning model is a neural network, which includes a graph structure that contains nodes (artificial neurons) and edges between the nodes. The nodes of a neural network can be included in layers of nodes. For example, a neural network can include an input layer, one or more hidden layers, and an output layer, where each layer includes a set of nodes. Each node is connected to one or more other nodes. A neural network can be trained to improve the accuracy of the neural network. Each node (artificial neuron) receives one or more signals (at the input of the neural network or from one or more other nodes of the neural network). The node processes the received signal(s) and generates an output signal that is sent to one or more other connected nodes. A weight can be associated with an edge of the neural network. In an example, a first node can receive a signal from another node through an input edge. The weight associated with the input edge represents the strength of the signal received through the respective input edge. The first node generates an output signal based on the weight. The weight can be adjusted during training of the neural network.
[0015] The weights of a neural network are an example of model parameters that can be associated with a machine learning model. More generally, model parameters of a machine learning model are updated (modified) during training.
[0016] Another example of a machine learning model that includes a graph structure is a random forest model, which includes a set of decision trees. A decision tree includes nodes and edges connecting the nodes. A random forest model includes model parameters that can be updated during training.
[0017] The following discussion involves examples that employ a neural network. In other examples, techniques or mechanisms in accordance with some embodiments of the present disclosure can be applied to other types of machine learning models that include a graph structure.
[0018] Figure 1 is a block diagram of an example arrangement that includes a source repository 102, a log repository 104, and a backup repository 106. A “repository” can refer to any storage structure that contains information. Examples of a repository can include a database, a file, or other types of storage structures. A repository can be stored in one or more storage devices.
[0019] Although Figure 1 Examples of include one source repository 102, in other examples, there can be multiple source repositories. Similarly, in other examples, there can be multiple backup repositories and / or multiple log repositories. The source repository 102 contains a source model representation 114 of a neural network, which can be protected from data loss or corruption by copying the source model representation 114 to another storage structure.
[0020] The log repository 104 is a repository of modified weights that are updated during training of the neural network in respective log entries of the log repository. The log entries can include an indication of the edge associated with the modified weight. The indication can be in the form of an identifier of the node to which the edge is connected, or some other identifier of the edge.
[0021] In some examples, it is noted that the graph structure of the neural network (e.g., the neural network represented by the source model representation 114) does not change. In other words, the nodes of the neural network, as well as the edges connecting the nodes, remain unchanged during training of the neural network. What changes are the weights associated with the edges of the neural network. Since the graph structure of the neural network does not change, the log entries of the log repository 104 can only store the modified weights, as well as an indication of the edge associated with the modified weight. The log entries do not have to store information describing the graph structure of the neural network. As a result, the size of the log repository 104 can remain relatively small (compared to the size of a representation of the complete neural network).
[0022] The log entries can be applied to the backup model representation 116 contained in the backup repository 106. Applying the log entries to the backup model representation 116 results in updating the respective weights in the backup model representation 116.
[0023] The backup model representation 116 in the backup repository 106 includes a copy of the neural network represented by the source model representation 114. If the log repository 104 is not empty, the backup model representation 116 is outdated with respect to the source model representation 114; in other words, at least one weight in the backup model representation 116 is outdated with respect to at least one corresponding weight in the source model representation 114.
[0024] Figure 1 The example arrangement further includes a replication controller 108 and a backup controller 110. Although shown as two separate controllers, it is noted that in other examples, the replication controller 108 and the backup controller 110 can be integrated into one controller. In further examples, the functionality of the replication controller 108 and / or the backup controller 110 can be separated into additional controllers.
[0025] In addition, the training controller 112 can be used to train the neural network represented by the source model representation 114. Training the neural network results in updating one or more weights of the neural network.
[0026] As used herein, a "controller" can refer to one or more hardware processing circuits, which can include any or a combination of a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or another hardware processing circuit. Alternatively, a "controller" can refer to a combination of one or more hardware processing circuits and machine-readable instructions (software and / or firmware) executable on the one or more hardware processing circuits.
[0027] In Figure 1 the example, the neural network represented by the source model representation 114 includes nodes represented by circles. The neural network includes an input layer including nodes N1, N2, and N3, a hidden layer including nodes N11, N12, N13, and N14, and an output layer including nodes N21 and N22. Although Figure 1 a particular number of nodes and layers are shown in
[0028] Edges connecting nodes of a neural network are associated with weights. Generally, a weight W X-Y is associated with an edge connecting a node X and a node Y. For example, the weight W 11-21 is associated with an edge connecting the node N11 and the node N21, and the weight W 14-22 is associated with an edge connecting the node N14 and the node N22.
[0029] Initially, prior to training the neural network, initial weights are associated with respective edges of the neural network. In some examples, the initial weights can include random weights. In other examples, the initial weights can include zero or null weights. As the neural network is trained, updated weights can be assigned for at least some edges. One or more weights can be further modified as the neural network is further refined.
[0030] In Figure 1 the example, after initial training, refinement of the neural network causes the value of the weight W 11-21 to change from 3.2 to 3.1, and the value of the weight W 14-22 to change from 1.2 to 1.9.
[0031] The replication controller 108 replicates (at 109) the modified weights (including W 11-21 and W 14-22 ) to the log repository 104 over the network 120. The replication is performed by the log write agent 125 in the backup controller 110. The modified weights are replicated into respective log entries 132 and 134 of the log repository 104. The modified weight W 11-21 is added to the log entry 132, and the modified weight W 14-22added to the log entry 134. In addition to the value of the modified weight, each log entry 132 or 134 includes an indication of the edge associated with the modified weight. The indication can be in the form of an identifier of the node to which the edge is connected, or some other identifier of the edge.
[0032] Before applying the log entries 132 and 134 to the backup model representation 116, the backup model representation 116 represents a neural network in which the weights are set to values prior to the modification of the weights W 11-21 and W 14-22 . Thus, for example, before applying the log entries 132 and 134 to the backup model representation 116, the copy of the neural network represented by the backup model representation 116 has W 11-21 set to 3.2 (rather than the updated value of 3.1), and the weight W 14-22 is set to 1.2 (rather than the updated value of 1.9).
[0033] The backup controller 110 includes a log write agent 125 for writing log entries to the log store 104 in response to replication requests from the replication controller 108. The replication requests can include requests to replicate one or more write events to the log store 104. The log write agent 125 generates write commands to write the respective log entries to the log store 104. A “agent” in a controller can refer to a portion of hardware processing circuitry of the controller, or machine-readable instructions executed by the controller.
[0034] The backup controller 110 includes a replay agent 122 for applying (at 124) the log entries 132 and 134 in the log store 104 to the backup model representation 116. The replay agent 122 can apply (at 124) the log entries to the backup model representation 116 in response to a user request or in response to another trigger (e.g., a periodic trigger associated with periodically applying the log entries to the backup model representation 116, or any other type of trigger). In some examples, the log entries are applied to the backup model representation 116 in the same order in which the log entries were added to the log store 104. After applying the log entries in the log store 104 to the backup model representation 116, the log entries can be deleted from the log store 104.
[0035] The backup controller 110 further includes a restore agent 126 that can restore a target version of the neural network based on the contents of the log store 104 and the backup model representation 116. The target version of the neural network can be a version of the neural network prior to the current version of the neural network. The target version of the neural network refers to a “restored neural network” that can be used to replace a damaged or lost neural network.
[0036] In some examples, recovery agent 126 includes a recovery application programming interface (API) 128 accessible to client devices (such as client device 130). Recovery API 128 includes various routines that can be invoked by client device 130 to perform model recovery operations. For example, in response to a request from a user or another entity at client device 130, client device 130 can invoke routines of recovery API 128 to initiate a model recovery operation. The invoked routines of recovery API 128 can send recovery queries to log repository 104 and backup repository 106 to recover the target version of the neural network.
[0037] A "recovery query" refers to a query submitted to retrieve data for recovering the neural network. A recovery query may include filtering conditions specifying one or more criteria (or predicates). Any log entries from log repository 104 that meet the filtering conditions are retrieved. The retrieved log entries are merged with the backup model representation 116 to produce the target version of the neural network.
[0038] In other examples, instead of recovery API 128, recovery agent 126 may include another type of interface that is accessible to client devices to initiate recovery queries.
[0039] In some examples, client device 130 includes a recovery user interface (UI) 150, such as a graphical user interface (GUI), a command-line interface, or another type of interface. A user of client device 130 can input a request to recovery UI 150 to initiate a model recovery operation. As part of the request, the user can specify a checkpoint in log repository 104 (e.g., a version of the neural network at a specific point in time) for recovering the neural network (e.g., for disaster recovery or testing). Checkpoints will be discussed further below. In response to the request input to recovery UI 150, client device 130 invokes a routine of recovery API 128 to perform the model recovery operation. Furthermore, the user can specify in recovery UI 150 which neural network to protect using techniques according to some examples of this disclosure.
[0040] Once the recovery agent 126 generates a recovery neural network in response to a recovery query, it sends recovery neural network information 152 to the client device 130, which can be presented in the recovery UI 150. Recovery neural network information 152 may include the name (or another identifier) of the recovery neural network. The user of the client device 130 can then submit a request to use the recovery neural network. This use may include testing the recovery neural network to determine if it functions as expected. If not, the user can initiate another model recovery operation, using another checkpoint to recover the neural network.
[0041] The filtering criteria for the recovery query can specify selected checkpoints used to generate the recovery neural network. The modified weights of the neural network copied to log repository 104 can be a subset of different checkpoints. For example, as... Figure 2 As shown, three checkpoints CP1, CP2, and CP3 have been added to log repository 104. A "checkpoint" includes data from the neural network at a given time point. Different checkpoints can be created in log repository 104 at different time points. Each checkpoint can include one or more log entries. In some examples, log entries can be assigned to checkpoints as follows: First, a first checkpoint is defined in log repository 104. When log entries are added to log repository 104, these log entries are assigned to the first checkpoint. After a specified checkpoint time interval, a second checkpoint is defined in log repository 104, and subsequent log entries are assigned to the second checkpoint. More generally, a new checkpoint is defined in log repository 104 each time a specified checkpoint time interval elapses. More generally, other types of triggers (e.g., triggers associated with different training phases of the neural network) can cause new checkpoints to be defined in log repository 104.
[0042] For example, checkpoint CP1 includes log entries 132 and 134. Log entry 132 includes the modified weight W. 11-21 Furthermore, log entry 134 includes the modified weight W. 14-22 Checkpoint CP2 includes log entry 202, which contains the modified weight W. 2-14 Checkpoint CP3 includes log entries 204, 206, and 208. Log entry 204 includes the modified weight W. 13-22 Log entry 206 includes the modified weight W. 1-12 Furthermore, log entry 208 includes the modified weight W. 3-13 .
[0043] Checkpoints CP1 through CP3 contain modified data at their respective points in time. In the example, checkpoint CP2 was created later than checkpoint CP1, and checkpoint CP3 was created later than checkpoint CP2. Figure 2 In the example, recovery agent 126 has received recovery query 210 that includes a filter specifying checkpoint CP2. For example, recovery query 210 could be in response to a request from... Figure 1 Provided in response to a request from client device 130.
[0044] In response to a recovery query 210 specifying checkpoint CP2, recovery agent 126 retrieves log entry 202 for checkpoint CP2 and log entries for any previous checkpoints, including log entries 132 and 134 for checkpoint CP1, from log repository 104. Recovery agent 126 merges log entry 214 retrieved from checkpoints CP1 and CP2 with a copy of the neural network represented by backup model representation 116 to generate a recovery neural network represented by view model representation 212.
[0045] exist Figure 2 In the example, the backup model represents a copy of the neural network represented by 116, which includes the following weight values: W 1-12 =1.9 (Updated, as shown in log entry 206 in checkpoint CP3), W 3-13 =0.5 (updated, as shown in log entry 208 in checkpoint CP3), W 2-14 =1.8 (Updated, as shown in log entry 202 in checkpoint CP2), W 11-21 =3.2 (updated, as shown in log entry 132 in checkpoint CP1), and W 14-22 =1.2 (Updated, as shown in log entry 134 in checkpoint CP1). The weights of the other edges of the neural network replica are not shown.
[0046] To generate the view model representation 212, the recovery agent 126 applies the retrieved log entries 214 to a copy of the neural network. As a result of applying the retrieved log entries 214, the recovery neural network represented by the view model representation 212 has the following weight values: W 1-12 =1.9 (This weight value was not updated in the recovery neural network because log entry 206 in checkpoint CP3 was not selected for recovery), W 3-13 =0.5 (This weight value was not updated in the recovery neural network because log entry 208 in checkpoint CP3 was not selected for recovery), W 2-14 =1.4 (This weight value has been updated in the recovery neural network because log entry 202 in checkpoint CP2 was selected for recovery), W 11-21 =3.1 (This weight value has been updated in the recovery neural network because log entry 132 in checkpoint CP1 was selected for recovery), W 13-22 =0.6 (This weight value was not updated in the recovery neural network because log entry 208 in checkpoint CP3 was not selected for recovery), and W 14-22 =1.9 (This weight value has been updated in the recovery neural network because log entry 134 in checkpoint CP1 was selected for recovery). The weights of the other edges of the recovery neural network are not shown.
[0047] In a specific example, recovery agent 126 merges log entries with backup model representation 116 by partially constructing a recovery neural network using selected log entries retrieved from log repository 104 and completing the remainder of the recovery neural network using backup weights retrieved from backup model representation 116. Partially constructing the recovery neural network involves assigning modified weights of the selected log entries to the corresponding edges of the recovery neural network. Completing the remainder of the recovery neural network involves assigning backup weights associated with edges of the neural network copy represented by backup model representation 116 to any edges that have not been assigned modified weights to the selected log entries.
[0048] Recovery agent 126 can send information about view model representation 212 to the client device (e.g., Figure 1 (Client device 130). The user of the client device (or another entity at the client device) can use this information to recover the neural network represented by the view model representation 212. For example, the user or another entity can test the recovered neural network to determine its accuracy or performance. If the recovered neural network performs as expected, the user or another entity can submit the recovered neural network to replace the current neural network represented by the source model representation 114.
[0049] Using techniques or mechanisms exemplified by some examples of this disclosure, neural networks can be protected efficiently by using a relatively small log repository containing log entries that can be selected based on recovery queries to be combined with a backup model representation of a copy of the neural network to generate a recoverable neural network. The generation of the recoverable neural network can be accomplished through relative Recovery Point Objective (RPO) and Recovery Time Objective (RTO). RPO refers to the amount of data that would be lost in the event of model corruption or loss. By providing checkpoints at relatively short intervals (e.g., one checkpoint every five seconds or every other time interval), the requester can select a relatively new version of the neural network, thereby reducing data loss.
[0050] RTO refers to the length of downtime. Recovery Agent 126 can quickly merge selected log entries from the log repository with a backup model representation to generate a recovery neural network. Therefore, downtime until the recovery neural network is provided can be reduced.
[0051] Figure 3 This is a block diagram of a non-transitory machine-readable or computer-readable storage medium 300 that stores machine-readable instructions that, when executed, cause the system to perform various tasks. The system can be implemented using one or more computers and may include, for example... Figure 1 The replication controller 108 and the backup controller 110.
[0052] The machine-readable instructions include a modified parameter copy instruction 302, used to copy modified parameters of the machine learning model to a log. The modified parameters relate to elements of the graph structure of the machine learning model, and the modified parameters in the log will be applied to a backup representation of the machine learning model. Examples of machine learning models can include any one or a combination of the following: neural networks, random forest models, or any other machine learning model that includes a graph structure. Elements of the graph structure can include edges connecting nodes of the graph structure. Alternatively, elements of the graph structure can include nodes of the graph structure, trees within the graph structure, or any other elements forming the graph structure.
[0053] Machine-readable instructions include recovery model building instructions 304, which, based on a received recovery query associated with a target version of the machine learning model, construct the target version of the machine learning model by retrieving selected modified parameters from the modified parameters in the log and merging the selected modified parameters with a copy of the machine learning model represented by a backup representation of the machine learning model. Retrieving the selected modified parameters from the log can refer to retrieving a single modified parameter or retrieving multiple modified parameters from the log.
[0054] In some examples, merging involves elements of a graph structure that assign selected modified parameters to a copy of the machine learning model, wherein the selected modified parameters update the previous parameters (referred to as "backup parameters") of the elements of the graph structure assigned to the copy of the machine learning model.
[0055] In a further example, the merging process involves partially constructing a target version of the machine learning model using selected modified parameters retrieved from the logs, and completing the remaining version of the machine learning model using backup parameters retrieved from a backup representation of the machine learning model.
[0056] In some examples, the query specifies the first checkpoint among multiple checkpoints associated with different versions of the machine learning model, and the selected modified parameters retrieved from the log are based on the first checkpoint specified by the query.
[0057] In some examples, machine-readable instructions can retrieve multiple selected modified parameters from the log in response to a query, where the selected modified parameters include modified parameters in a first checkpoint and modified parameters in a second checkpoint prior to the first checkpoint. The machine-readable instructions can then merge the multiple selected modified parameters with a copy of the machine learning model represented by a backup representation of the machine learning model to construct a target version of the machine learning model.
[0058] In some examples, each of the multiple checkpoints includes one or more modified parameters associated with one or more corresponding elements of the graph structure.
[0059] In some examples, the modified parameters are generated as part of training a machine learning model.
[0060] In some examples, the log stores the modified parameters of the machine learning model, but not the unmodified parameters.
[0061] In some examples, the graph structure of the machine learning model remains unchanged when the parameters associated with the elements of the graph structure are changed during training based on the machine learning model.
[0062] In some examples, machine-readable instructions can apply modified parameters from the log to the machine's backup representation to update the backup representation of the machine learning model. Machine-readable instructions can also remove modified parameters from the log in response to applying them to the backup representation of the machine learning model.
[0063] Figure 4 This is a block diagram of a system 400 that can be implemented using one or more computers, based on some examples. System 400 includes a hardware processor 402 (or multiple hardware processors). The hardware processor may include a microprocessor, the core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or other hardware processing circuitry.
[0064] System 400 includes a storage medium 404 that stores machine-readable instructions that can be executed on a hardware processor 402 to perform various tasks. The machine-readable instructions executable on the hardware processor can refer to instructions that can be executed on a single hardware processor or instructions that can be executed on multiple hardware processors.
[0065] The machine-readable instructions in storage medium 404 include modified parameter copy instructions 406 for copying modified parameters of the machine learning model to a log, wherein these modified parameters are related to elements of the graph structure of the machine learning model, and the modified parameters in the log will be applied to a backup representation of the machine learning model.
[0066] The machine-readable instructions in storage medium 404 include recovery model building instructions 408, which are used to build a version of the machine learning model based on a query received that is associated with a version of the machine learning model being recovered, by retrieving selected modified parameters from the modified parameters in the log and merging the selected modified parameters with a copy of the machine learning model represented by a backup representation of the machine learning model.
[0067] In some examples, the log includes multiple checkpoints corresponding to different points in time, where a first checkpoint includes one or more first modified parameters of the machine learning model, and a second checkpoint includes one or more second modified parameters of the machine learning model. A recovery query specifies a checkpoint, and the selected modified parameters retrieved from the log are based on the checkpoint specified by that query.
[0068] Figure 5 It is a flowchart of process 500 based on some examples, which can be represented by, for example Figure 1 The replication controller 108 and backup controller 110 perform this.
[0069] Process 500 includes: as part of training a machine learning model, receiving (at 502) modified parameters of the machine learning model, wherein the modified parameters are associated with elements of the graph structure of the machine learning model. These elements may include edges, nodes, or other elements forming the graph structure.
[0070] Procedure 500 involves copying the modified parameters (at 504) to the log, where the modified parameters in the log will be applied to a backup representation of the machine learning model. The modified parameters can be added to log entries in the log. A log entry can be part of one or more checkpoints in the log.
[0071] Procedure 500 includes receiving (at 506) a query associated with recovering a version of the machine learning model. The query can specify one of the checkpoints.
[0072] Process 500 includes constructing (at 508) a version of the machine learning model based on a query by retrieving selected modified parameters from the modified parameters in the log and merging the selected modified parameters with a copy of the machine learning model represented by a backup representation of the machine learning model.
[0073] In some examples, the Process 500 test uses logs and backups of the machine learning model to represent the version of the machine learning model that was built.
[0074] In some examples, based on this test, process 500 submits a version of the machine learning model for use in restoring the machine learning model.
[0075] Client devices (e.g., Figure 1 Examples of 130) may include any one or a combination of the following: desktop computer, laptop computer, smartphone, or any other type of electronic device.
[0076] "Network" (e.g., Figure 1The 120 in the text can refer to a local area network (LAN), a wide area network (WAN), the Internet, a storage area network (SAN), or any other type of communication structure.
[0077] Storage media (e.g., Figure 3 300 or Figure 4 The 404 clause may include any one or a combination of the following: semiconductor memory devices, such as dynamic or static random access memory (DRAM or SRAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and flash memory; disks, such as fixed disks, floppy disks, and removable disks; another magnetic medium, including magnetic tape; optical media, such as optical discs (CDs) or digital video discs (DVDs); or another type of storage device. Note that the instructions discussed above may be provided on a single computer-readable or machine-readable storage medium, or alternatively, on multiple computer-readable or machine-readable storage media distributed across a large system having potentially multiple nodes. Such one or more computer-readable or machine-readable storage media are considered part of an article (or article of manufacture). An article or article of manufacture may refer to any single or multiple manufactured components. One or more storage media may be located in a machine that executes the machine-readable instructions or at a remote site from which the machine-readable instructions can be downloaded via a network for execution.
[0078] In this disclosure, unless the context clearly indicates otherwise, the terms “a,” “an,” or “the” are intended to include the plural form as well. Similarly, when used in this disclosure, the terms “includes / including / comprises / comprising” or “have / having” indicate the presence of the stated element but do not preclude the presence or addition of other elements.
[0079] In the foregoing description, numerous details have been set forth to facilitate understanding of the subject matter disclosed herein. However, embodiments may be practiced without some of these details. Other embodiments may include modifications and variations of the details discussed above. The appended claims are intended to cover such modifications and variations.
Claims
1. A non-transitory machine-readable storage medium comprising instructions that, when executed, cause a system to: copying the modified parameters of the machine learning model to a log, wherein the modified parameters relate to elements of a graph structure of the machine learning model, and the modified parameters in the log are to be applied to a backup representation of the machine learning model; and based on receiving a query associated with restoring a version of the machine learning model, construct the version of the machine learning model by retrieving selected modified parameters from the modified parameters in the log and merging the selected modified parameters with a copy of the machine learning model represented by the backup representation of the machine learning model.
2. The non-transitory machine-readable storage medium of claim 1, wherein, the merging includes: assigning the selected modified parameters to elements of a graph structure of the copy of the machine learning model, the selected modified updates assigned to previous parameters of the elements of the graph structure of the copy of the machine learning model.
3. The non-transitory machine-readable storage medium of claim 2, wherein, the elements of the graph structure include edges connecting nodes in the graph structure.
4. The non-transitory machine-readable storage medium of claim 3, wherein, the machine learning model includes a neural network, and the selected modified parameters in the log include modified weights of edges of the neural network.
5. The non-transitory machine-readable storage medium of claim 1, wherein, the query specifies a first checkpoint of a plurality of checkpoints related to a corresponding different version of the machine learning model, and the selected modified parameters retrieved from the log are based on the first checkpoint specified by the query.
6. The non-transitory machine-readable storage medium of claim 5, wherein, the instructions, when executed, cause the system to: retrieve a plurality of selected modified parameters from the log in response to the query, wherein the plurality of selected modified parameters includes modified parameters in the first checkpoint and modified parameters in a second checkpoint prior to the first checkpoint; and merge the plurality of selected modified parameters with the copy of the machine learning model represented by the backup representation of the machine learning model to construct the version of the machine learning model.
7. The non-transitory machine-readable storage medium of claim 5, wherein, each checkpoint of the plurality of checkpoints includes one or more modified parameters related to a respective one or more elements of the graph structure.
8. The non-transitory machine-readable storage medium of claim 1, wherein, the modified parameters are produced as part of training the machine learning model.
9. The non-transitory machine-readable storage medium of claim 1, wherein, the log stores the modified parameters of the machine learning model without storing unmodified parameters of the machine learning model.
10. The non-transitory machine-readable storage medium of claim 9, wherein, the graph structure of the machine learning model remains unchanged when parameters related to elements of the graph structure are changed based on training of the machine learning model.
11. The non-transitory machine-readable storage medium of claim 1, wherein, the merging includes: partially constructing the version of the machine learning model using the selected modified parameters retrieved from the log, and completing a remaining portion of the version of the machine learning model using backup parameters retrieved from the backup representation of the machine learning model.
12. The non-transitory machine-readable storage medium of claim 1, wherein, the instructions, when executed, cause the system to: apply the modified parameters in the log to the backup representation of the machine learning model to update the backup representation of the machine learning model; and In response to applying the modified parameters to the backup representation of the machine learning model, deleting the modified parameters from the log.
13. A method comprising: receiving, at a system comprising a hardware processor, modified parameters of a machine learning model as part of a training of the machine learning model, wherein the modified parameters relate to elements of a graph structure of the machine learning model; copying, by the system, the modified parameters to a log, wherein the modified parameters in the log are to be applied to a backup representation of the machine learning model; receiving, by the system, a query associated with restoring a version of the machine learning model; and based on the query, constructing, by the system, the version of the machine learning model by retrieving selected modified parameters from the modified parameters in the log and merging the selected modified parameters with a copy of the machine learning model represented by the backup representation of the machine learning model.
14. The method of claim 13, further comprising: testing the version of the machine learning model constructed using the log and the backup representation of the machine learning model.
15. The method of claim 14, further comprising: based on the testing, submitting the version of the machine learning model for restoring the machine learning model.
16. The method of claim 13, wherein, the log comprises a plurality of checkpoints corresponding to different points in time, wherein a first checkpoint comprises one or more first modified parameters of the machine learning model and a second checkpoint comprises one or more second modified parameters of the machine learning model, wherein the query specifies a checkpoint, and wherein the selected modified parameters retrieved from the log are based on the checkpoint specified by the query.
17. A system comprising: a processor; and a non-transitory storage medium storing instructions executable on the processor to: copy modified parameters of a machine learning model to a log, wherein the modified parameters relate to elements of a graph structure of the machine learning model and the modified parameters in the log are to be applied to a backup representation of the machine learning model; and based on receiving a query associated with restoring a version of the machine learning model, construct the version of the machine learning model by retrieving selected modified parameters from the modified parameters in the log and merging the selected modified parameters with a copy of the machine learning model represented by the backup representation of the machine learning model.
18. The system of claim 17, wherein, the machine learning model comprises a neural network and the modified parameters relate to edges of the neural network.
19. The system of claim 17, wherein, the log comprises a plurality of checkpoints corresponding to different points in time, wherein a first checkpoint comprises one or more first modified parameters of the machine learning model and a second checkpoint comprises one or more second modified parameters of the machine learning model, wherein the query specifies a checkpoint, and wherein the selected modified parameters retrieved from the log are based on the checkpoint specified by the query. wherein the selected post-modification parameters retrieved from the log are based on the checkpoint specified by the query.
20. The system of claim 19, wherein, The instructions are executable on the processor to: retrieve a plurality of selected post-modification parameters from the log in response to the query, wherein the plurality of selected post-modification parameters include a post-modification parameter in the first checkpoint and a post-modification parameter in the second checkpoint prior to the first checkpoint; and merge the plurality of selected post-modification parameters with the copy of the machine learning model represented by the backup representation of the machine learning model to construct the version of the machine learning model. wherein the selected post-modification parameters retrieved from the log are based on the checkpoint specified by the query. The instructions are executable on the processor to: retrieve a plurality of selected post-modification parameters from the log in response to the query, wherein the plurality of selected post-modification parameters include a post-modification parameter in the first checkpoint and a post-modification parameter in the second checkpoint prior to the first checkpoint; and merge the plurality of selected post-modification parameters with the copy of the machine learning model represented by the backup representation of the machine learning model to construct the version of the machine learning model.