A method for training a student neural network to mimic a teacher neural network using inputs that maximize the student-teacher discrepancy

By training a new neural network to imitate a target network using a divergent probe dataset that emphasizes output differences, the method addresses the inefficiencies of traditional NN training, achieving faster and more secure replication and modification without accessing the original dataset.

JP7535979B2Active Publication Date: 2024-08-19NANO DIMENSIONS TECH LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021104302
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-07-08
Filing Date
2021-06-23
Publication Date
2024-08-19
Estimated Expiration
2041-06-23

AI Technical Summary

Technical Problem

Existing neural networks (NNs) require access to the original training dataset for modification or replication, which is often not feasible due to data privacy or security concerns, and traditional training methods are time-consuming and inefficient for adding or removing data without retraining from scratch.

Method used

A method to train a new 'student' neural network to imitate a 'teacher' network by generating a divergent probe training dataset that maximizes the difference in output between the two networks, allowing training without access to the original dataset, using input data that highlights discrepancies to accelerate convergence.

Benefits of technology

This approach enables faster and more efficient training of neural networks by focusing on divergent behaviors, reducing training time by 10 to 1000 times compared to random probing, while maintaining data security and privacy, and allowing modifications without accessing the original dataset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007535979000003
    Figure 0007535979000003
  • Figure 0007535979000001
    Figure 0007535979000001
  • Figure 0007535979000002
    Figure 0007535979000002
Patent Text Reader

Abstract

To provide a device, system, and method for training a new neural network to mimic a target neural network without accessing the target neural network or its original training data set.SOLUTION: A method comprises the steps of: probing a target neural network and a new neural network with input data to generate target output data and new output data; detecting the input data that produces the maximum difference or a difference above a threshold between the target output data and the new output data; generating a divergence probe training dataset; training the new neural network to generate the target output data; and iteratively training the new neural network with the updated divergence probe training dataset that is dynamically tuned as the new neural network changes during training.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] FIELD OF THE DISCLOSURE Embodiments of the invention relate to the field of artificial intelligence (AI) through machine learning, in particular to training predictive or deep learning models such as neural networks (NNs), logistic regression or Bayesian models. [Background technology]

[0002] An artificial neural network, or simply "neural network", is a computer model that resembles a biological network of neurons. Neural networks are a group of techniques in machine learning under artificial intelligence. A neural network typically has multiple artificial "neurons" connected by artificial "synapses". There are many types of NNs with different neuronal arrangements, such as partially or fully connected NNs, recurrent NNs (RNNs), and convolutional NNs (CNNs). For example, a connected NN typically has an input layer, multiple intermediate or hidden layers, and an output layer, with each layer having multiple (e.g., 100-1000) artificial neurons. In a fully connected NN, each neuron in a layer (N) may be connected by artificial "synapses" to all neurons in the previous (N-1) and subsequent (N+1) layers, while in a partially connected NN, only a subset of neurons in adjacent layers are connected.

[0003] The NN is trained based on a training data set to solve or learn the weights of each synapse, which indicate the strength of the connection of each synapse. The synaptic weights are typically initialized, for example randomly. Training is performed by repeatedly inputting a sample or set of samples from the training data set into the NN, outputting the results of the NN applied to the data set, calculating the error between the expected (e.g., target) output and the actual output, and adjusting the weights of the NN to minimize the error. Training may be repeated until the error is minimized or converges. Typically, multiple (e.g., tens or hundreds) passes through the training set are performed (e.g., each sample is input into the NN multiple times). Each complete pass through the entire training data set of the same data is called one "epoch".

[0004] Training an accurate NN is typically a complex and time-consuming task. A typical training process consists of billions (or trillions) of calculations and can take hours, days, or even weeks to complete. Therefore, once generated, other devices or parties may want to replicate an accurately trained NN rather than developing one from scratch. However, the NN and its training data are often kept secret for reasons such as data privacy, security, or ownership. Lacking access to the private training dataset, other devices or parties are currently unable to replicate a pre-trained NN.

[0005] Another limitation of traditional NNs is that new information cannot be added to or old information removed from the NN without retraining it on the entire training dataset. Training only on modified data overwrites old neuronal connections and knowledge. Therefore, to incorporate new data, no matter how small, into the NN, the training process is rerun from scratch with the original training dataset and the new samples added, which is a time-consuming process. Similarly, undesirable training data cannot be removed from the NN without completely retraining the NN on the entire modified training dataset. In fact, any modification that retrains the NN requires retraining on the entire training dataset. Thus, the NN cannot be modified or improved by devices or parties that do not have access to the original training dataset. Summary of the Invention [Problem to be solved by the invention]

[0006] Thus, there is a need in the art to provide a mechanism for mimicking and / or modifying a NN without access to the secret original training dataset. [Means for solving the problem]

[0007] Embodiments of the invention provide devices, systems, and methods for training a new ("student") neural network to mimic a pre-trained target ("teacher") neural network without access to the target neural network itself (the "black box" network) or the original training dataset (private training data) used to generate the target neural network. The training data may be generated by probing the target "black box" network with input data, recording its corresponding outputs, and learning the behavior of the target network. To facilitate training, embodiments of the invention may generate a divergent probe training dataset with inputs that maximize the divergent behavior between the outputs of the student network and the teacher network. The divergent behavior may be measured based on the difference between the outputs of the output layer and / or one or more other hidden layers of the student network and the teacher network that result from the same inputs. The probe input data that generates the maximum or above threshold divergent output behavior between the student network and the teacher network isolates the differences between the networks that are in high need of training, rather than the commonalities that are in low or no need of training. Training a student network using such a divergent probe training dataset focuses the training on the differences (fewer than commonalities) between the student and teacher networks, which produces larger errors and corrections, thereby accelerating training and improving accuracy for the same number of training iterations compared to training using a randomly or evenly distributed training dataset.

[0008] According to some embodiments of the present invention, devices, systems and methods are provided for training a new neural network to mimic a target neural network without accessing the target neural network or its original training dataset. The target neural network and the new mimicking neural network may be probed with input data to generate corresponding data output by one or more layers of the respective target neural network and new neural network. Input data that generates a maximum or threshold difference between the corresponding data output by the target neural network and the new neural network may be detected. A divergent probe training dataset may be generated that includes the input data and the corresponding data output by the target neural network that generates a maximum or threshold difference. The new neural network may be trained to generate substantially the same corresponding output data as the target neural network using the divergent probe training dataset that is detected to generate a maximum or threshold difference in the corresponding output data between the new neural network and the target neural network. The new neural network may be iteratively trained using an updated divergent probe training dataset that is dynamically adjusted as the new neural network changes during training. [Brief description of the drawings]

[0009] The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. However, the invention, both as to its organization and method of operation, together with its objects, features, and advantages, may best be understood by reference to the following detailed description when read in conjunction with the accompanying drawings.

[0010] [Figure 1]FIG. 1 is a schematic diagram of an exemplary target "black box" neural network and a new student neural network trained to mimic the target neural network, according to some embodiments of the present invention. [Diagram 2] FIG. 2 is a schematic diagram of a system for training a new student neural network to mimic a target neural network according to some embodiments of the present invention. [Diagram 3] FIG. 3 is a flowchart of a method for training a new student neural network to mimic a target neural network according to some embodiments of the present invention.

[0011] It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, dimensions of some elements may be exaggerated relative to other elements for clarity. Further, where considered appropriate, reference numerals may be repeated among the figures to indicate corresponding or analogous elements. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] According to an embodiment of the present invention, devices, systems and methods are now provided for training a new ("student") neural network to mimic, replicate, emulate or reverse engineer a pre-trained target ("teacher") model without access to the model itself (the "black box" model) and / or without access to the original training data (the private training data) used to generate that model. This may be accomplished by probing the target "black box" model with input data and recording the corresponding outputs to generate a probe training data set that defines how the target model behaves. The closer the input probe data is to the original training data set, the more accurately the student network will mimic the teacher network and the shorter the training time until the student and teacher models converge. However, without access to the original private training data, the system is relegated to guessing and probing the teacher network with random inputs, which will generally produce a less accurate mimicking student network and / or a longer training time until the model converges compared to training with the original private training data set.

[0013] According to an embodiment of the present invention, devices, systems and methods are now provided that accelerate the training of a new student network to mimic a target teacher network by using a divergent probe training data set that includes input data that maximizes the difference, divergence or discrepancy between the output of the new student network and the target teacher network. Because the student network is initially untrained, probe input data that produces relatively small output differences between the student network and the teacher network will activate commonalities in the predicted behavior between the teacher network and the untrained student network (e.g., activate corresponding neuronal patterns). Such probe input data that produces the smallest differences resemble "easy" questions that the untrained model already knows how to answer and have little corrective effect. Training based on such easy questions with few corrections is relatively slow. In contrast, probe input data that produces the largest or above threshold difference in the predicted output between the student network and the teacher network will encourage divergence in the predicted behavior between the teacher and the untrained student (e.g., activate non-corresponding neuronal patterns). Such probe input data that produces the largest output differences resemble "hard" questions that the teacher knows but the untrained student does not, and therefore produces the most corrective effect and change during training. Training based on such difficult questions results in relatively large errors and corrections, accelerating the training process.

[0014] As training progresses, two opposing forces emerge: a training force that trains the student network's behavior to converge to that of the teacher network (a "convergence" force), and an opposing force that generates probe data to maximize the output difference between the student network's behavior and the teacher network's behavior (a "divergence" force). By selecting training data inputs that maximize the gap between the student network's output and the teacher network's output with this divergence force, embodiments of the present invention generate probe input data that isolates and corrects divergent neuronal patterns between them (rather than common neuronal patterns or already trained (learned) neuronal patterns). By focusing on output patterns that are dissimilar and therefore in high need of correction (and less on output patterns that are similar and in low need of training), embodiments of the present invention reduce training time compared to training students and teachers with randomly distributed input probe data. For example, depending on the complexity of the teacher model, training with divergent probe training data sets according to embodiments of the present invention can be, for example, 10 to 1000 times faster (e.g., for training to converge to an error below a threshold) than training with random probe data. The more complex the teacher network, the greater the improvement between embodiments of the present invention and a naive random probe approach to achieving the same results.

[0015] Once the student network learns the behavior of the teacher network on the training dataset of the current iteration, the training dataset no longer results in a maximum or above-threshold output difference between the student network and the teacher network, but only a minimum or below-threshold output difference. Thus, once the student network is trained, the output difference between the student network and the teacher network may be continuously or iteratively monitored (tracked) and updated (e.g., in real-time, periodically, or upon detection of an event). The training dataset may be iteratively updated during the training period based on these updated difference measurements, dynamically adapting the training dataset to reflect the maximum or above-threshold differential training data of each successive iteration. This divergence probe training dataset may be updated according to a schedule, for example, periodically (e.g., every predefined number of N iterations (a set of forward prediction and backward error correction passes), every epoch, etc.), or upon detection of an event, such as meeting a training goal (e.g., when the output difference between the student network and the teacher network converges to a below-threshold error for the current training dataset). The training dataset may be updated in its entirety (e.g., based on its average, mean, or its standard deviation error) or for individual input-output pairs (e.g., individual input-output pairs with reduced or below-threshold difference measures may be removed and replaced with new individual input-output pairs with relatively larger, maximum, or above-threshold difference measures). An exemplary process may iteratively include: (1) generating a current Nth iteration training dataset such that the prediction difference between the two models is maximized or exceeds a threshold; (2) training the student neural network with the Nth current iteration training dataset until the prediction difference between the two models is minimized or is below a threshold (e.g., within a convergence threshold); (3) returning to step (1) and incrementing N to generate a new N+1th iteration training dataset and repeating until the student neural network and the target neural network converge.By iteratively updating the training dataset to the latest divergent probe training data, the difficulty and corrective effect of the training data increases continuously or stepwise as the network converges. Thus, as the student and teacher networks become closer and closer to each other's behavior, embodiments of the present invention continuously isolate their differences to maintain fast and efficient network convergence.

[0016] In some embodiments, divergence of network behavior may be measured not only by differences in a single output layer, but additionally or alternatively by differences in any combination of one or more other intermediate or hidden layers, neurons, and / or synapses of the network. Some embodiments may measure differences in the outputs (activations) of the student model and the teacher model corresponding to one or more of any individual or combination of the first hidden layer 1, the second hidden layer 2, ..., the final hidden layer N-1, and / or the output layer N. For example, when different patterns of neurons, weights, layers, etc. have trained connections in the student layer and the teacher layer (e.g., trained to be co-activated for the same input), embodiments of the invention may detect divergent or unrelated patterns of activation. Additionally or alternatively, when the teacher and the student have the same structure (e.g., when the teacher network is known, but not the original training dataset), the connected patterns may refer to the same structure (e.g., neurons, synapses, layers, etc.) in both networks.

[0017] The divergent probe training dataset may be generated in a variety of ways. In some embodiments, the training data may be generated by testing using random seed probes and extrapolating the divergent probe training data based on the resulting network behavior. Random sample probes may be used to learn the inputs, types and / or distributions that maximize the student / teacher output difference, and then these best samples may be used as seeds for classification, clustering, extrapolation, etc. to grow training datasets of similar type and / or distribution from the seeds. For example, random seed probes evenly distributed in the input space may be tested as inputs, and those corresponding to one or more maximum or above-threshold divergent outputs may be selected as seeds for extrapolating more inputs of similar type or input space distribution (e.g., having similar categorical classification or clustering as the selected seed inputs). For example, input types or distributions may be selected where the same (or small and / or below-threshold variance) input data causes large and / or above-threshold variance in the corresponding outputs between the student and master networks. Additionally or alternatively, the training data may be generated using statistics or heuristics-based methods. For example, some embodiments may use various distributions of input data (e.g., Gaussian distributions) and measure which distribution causes the greatest divergence. Additionally or alternatively, training data may be generated using machine learning or training-based methods, such as using additional neural networks, evolutionary models, etc. In some embodiments, an additional (e.g., third) neural network may be trained to generate outputs that are fed as inputs to both the student and teacher models and measure the difference between those outputs. This additional neural network is trained to output values ​​that, when input to the student and teacher networks, cause a maximum or above threshold difference between the outputs of the corresponding student and teacher networks.The input to the additional training data generator neural network may be random, the same or different input type (image, audio, text, etc.), the output of a random seed probe or other method, etc. The second student network and the third training data generator network may be trained in parallel, simultaneously, or alternately in time. For example, the third training data generator network may be trained to generate an output that maximizes the difference between the student model and the teacher model (divergent power), and the student model is trained by continuously or iteratively inputting the output of the third training data generator network to minimize the difference between the student model and the teacher model (convergent power). Additionally or alternatively, the divergent probe training data set may be generated using an evolutionary model. For example, the training data generator may be an evolutionary model (e.g., genetic algorithm, genetic programming, etc.) that learns to create an output that maximizes the output difference between the student model and the teacher model. Exemplary genetic algorithms include model recombination, model mutation, etc., as disclosed, for example, in U.S. Pat. No. 10,339,450, the entirety of which is incorporated herein by reference.

[0018] By learning how a target black-box model behaves on divergent probe training data sets that maximize the variance of the new model's behavior, the new model may be trained to behave substantially identically to the target model faster than using random probe data, without ever having access to the original training data set that drove that behavior. Thus, the new model may effectively replicate the target model without sacrificing the secrecy of the target model's original training data set.

[0019] For example, a target model or "teacher" model may be pre-trained for autonomous vehicle driving, drone navigation, face recognition, text recognition, or any other deep learning application. An embodiment of the present invention may probe the teacher model with sensor, image, and / or other input data to detect input data that produces a maximum or threshold difference between the outputs of the student network and the teacher network. An embodiment of the present invention may generate a divergence probe training dataset to include those maximum or threshold difference input data and corresponding outputs from the teacher model. This probing process may be repeated over many (e.g., thousands or millions) of iterations, where at each iteration, an embodiment of the present invention may generate a new divergence probe training dataset and / or train the student model using that latest divergence probe training dataset. Training the student model to how the teacher model behaves when probed with divergence probe training data effectively brings the student model closer to the teacher model by focusing the training on the divergence behavior between the student model and the teacher model. Training may be completed when the student model and target model have converged (e.g., when the output of the student model substantially matches the output of the teacher model, e.g., when they obtain the same predictions for a threshold-higher percentage of inputs (e.g., greater than 98%)) or when the divergence probe training dataset for successive iterations has converged (e.g., when successive updates of the divergence probe training dataset produce similar and / or sub-threshold maximum differences between the outputs of the student network and the teacher network for the same inputs).

[0020] In some embodiments, the target model may be represented as a transformation or map of data from an X-dimensional input space to a Y-dimensional output space. In one example, to recognize numbers in an image, the input data may be an image of size 100x100 pixels in a 10000-dimensional input space, and the output data may be a 10-digit number in a 10-dimensional output space. Thus, the target model is a transformation from 10000-dimensional data points to data points in the 10-dimensional space (although the target transformation may map data from any X-dimensional space to any Y-dimensional space). The training dataset includes pairs of input data and corresponding output data (X-dimensional vectors or points, Y-dimensional vectors or points) used to train the transformation. In the absence of access to this original training dataset, embodiments of the present invention may generate a divergence probe training dataset to include input data points in the X-dimensional space that produce a maximum or threshold difference between the corresponding Y-dimensional output data predicted by the target network and the student network. The divergence probe training dataset also includes the Y-dimensional output of the target transformation that corresponds to the X-dimensional input data with those maximum or threshold differences. A set of X-dimensional input and corresponding Y-dimensional output pairs of the divergence probe training dataset may be used to train a new student transformation that maps the data in the same manner as the target transformation. Although the divergence probe training dataset has a different distribution of points in the X- and Y-dimensional spaces than the original training dataset, the points are transformed according to the same target transformation, resulting in training a new student model transformation to map the data in substantially the same manner as the target model transformation.

[0021] In some embodiments of the random seed probe approach, random initial seed input data may be used to probe the student neural network and the target neural network to measure their divergent behavior, and the seed input data that causes the most divergent behavior is propagated to extrapolate other input probe data of similar categories, clusters, etc. This random initial seed input data may be fully random or semi-random. Fully random seed input data may be selected completely randomly (e.g., random distribution of points in the input X-dimensional space) and may not be set to a specific type or specific data. Fully random seed data may traverse the input space wildly, providing both related and unrelated input data. The closer the random probe data set is to the original training data set, the better the student model will typically match the target model and the shorter the time for training to converge. Thus, to improve speed, efficiency and accuracy, instead of starting the generation of the divergent probe training data set with fully random seed data, some embodiments of the present invention may use semi-random seed input data that is as similar as possible to the original training data set (but different from the original training data set).

[0022] The partially random or semi-random seed input data may be selected randomly, but with a priority among samples based on some knowledge about the model or training dataset, such as the type or purpose of the target model. For example, if the purpose of the target model is to identify faces in images, the seed input data may be limited to images of faces. In another embodiment, the semi-random seed input data may include a portion of data from the original training dataset (e.g., a 10% "public" or "non-secret" subset of the original training dataset, rather than the remaining 90% designated as "confidential" or "secret"), which may be supplemented with divergent probe training data. In another embodiment, the semi-random seed input data may include unlabeled or untagged data (e.g., an image dataset with no knowledge via labels of what types of images are in the dataset).

[0023] Some embodiments may learn information about the original training dataset by performing statistical analysis to measure characteristics (e.g., color, contrast, standard deviation, local correlation, etc.) of the original training data (if available), or of a portion of data of the same type as the original training dataset (e.g., facial images). The statistical analysis may be performed on a relatively small sample of data (e.g., 0.1-10% of the size of the original training dataset). The result of the statistical analysis may be a non-uniform distribution of the input space similar to the non-uniform distribution of the input space of the original training dataset. This distribution may be used to select random seed input data according to the same non-uniform distribution to better match the original training set. In various embodiments, these statistics may be performed on random data of the same type as the original training data, or on a portion of the original training dataset (e.g., 1% of the original training dataset, if available), or on a hybrid combination of the actual portion of the original training dataset and a portion of samples synthesized from it (e.g., 50% original training samples and 50% randomly generated samples).

[0024] The seed input data may be adjusted to more closely match or converge with the original training data (e.g., have an input space distribution that more closely resembles the input space distribution of the original training data compared to a uniform input space distribution). In one embodiment, when the type or distribution of the training data is unknown (e.g., when it is unknown whether it is image data, text data, audio data, or when it is unknown whether the distribution of the data in the input space is Gaussian or constant), the target model may be probed to determine the type or distribution of the training data. Ideally, minor adjustments to samples of the correct type or distribution (e.g., the same or substantially similar to the training data set) typically result in only small changes in the model output (stable model), while minor adjustments to samples of the wrong type or distribution may result in relatively large changes in the model output (unstable model). Thus, some embodiments may probe the model with multiple slightly different samples that have been varied according to, for example, Gaussian, uniform, or other distributions, and / or for each of multiple different data types. The data type and / or distribution for which the model is most stable (e.g., relatively small changes in the input space cause relatively small changes in the output space) may be used as the data type and / or distribution of the seed input data. This mechanism may be performed in an initial test probe of the target model, for example, before a divergent behavioral probe that tests student and teacher output differences to ultimately extrapolate the divergent probe training data set. For example, probing with random seed input data may be the first iteration, after which the seed data is incrementally adjusted to maximize or increase the divergent student-teacher output in each subsequent iteration to generate dynamically adjusted divergent probe training data.

[0025] In one embodiment, the training error may be calculated on the fly (in situ) at the final output layer while training a new student model (e.g., based on a comparison of the expected value of the training dataset with the calculated value). The training error may be measured as a "first-order" error (i.e., based on the first derivative of the error) such as "steepest descent" optimization including "backpropagation", a "second-order" error (i.e., second derivative) such as "Hessian-free optimization", a higher order error, or another method such as "contrastive divergence methods" based on mathematical principles. In some embodiments, the divergence probe training dataset (e.g., in a subsequent epoch) may be automatically adjusted on the fly to maximize the difference in output between the student network and the teacher network based on the most recently trained student model (e.g., the one trained in the current or past epoch).

[0026] In some embodiments where the target neural network model itself is accessible or its parameters are known (e.g., the number of layers in the model, N, the number, type and / or characteristics of neurons in each layer, etc.), multiple layers may be trained layer-by-layer and / or the training error may be calculated layer-by-layer. For example, a neural network model with N layers, each of which has X i For a target model with neurons (index i from 1 to N), the new network may be trained in stages, with each stage training one layer in turn. In the first stage, the new network trains the X 1 Once the first layer is trained, its values ​​are fixed or frozen, and the process moves on to train the next subsequent layer. Then, in the second phase, while keeping the previous first layer fixed, the new network is trained to mimic the output of the second layer of the target network, X 2The model may be trained to mimic the output of a neuron. Typically, at each jth stage, the j-1 previously trained layers are fixed and used to train the subsequent jth layer of the new network. This process may continue layer-by-layer until the final successive Nth output layer is trained. Training a model layer-by-layer typically improves training accuracy and speed compared to training all layers in the model simultaneously. The accuracy of the new network is improved by the layer-by-layer approach because it incorporates additional intermediate transformations of the target network (e.g., mimicking one layer at a time) that are not generated by a full model training approach (which attempts to directly mimic the output given the input and has no insight into the N intermediate transformations that the data undergoes within the N layers of the teacher model).

[0027] In a layer-by-layer approach, training of new networks is sped up because the cumulative computations to train one layer at a time (e.g., N-1 adjacent layer transformations from layer i to layer i+1, i=1,...,N) are significantly simpler and less time consuming than the computations to train the entire model at once (e.g., transformations from input space X to output space Y over N layers). The layer-by-layer training method may proceed in either a "forward" direction, training from layer 1 to layer N (e.g., layers 1, 2,...,N), and / or a "reverse" direction, training from layer N to layer 1 (e.g., layers N, N-1, N-2,...,1).

[0028] The training process may be repeated for multiple epochs. Whereas traditional training is repeated over each epoch using the same training dataset, in accordance with embodiments of the present invention, a different divergent probe training dataset may be used during each of multiple (e.g., two or more, up to all) training iterations and / or epochs, as the training dataset is dynamically adjusted over time to maintain a maximum or above-threshold difference for each iteration and / or epoch as the student model changes. Using different probe datasets may increase the diversity of the training data, which typically increases the accuracy with which a new model mimics the target model with the same amount of training time, or results in similar accuracy with less training time.

[0029] An embodiment of the invention may test the convergence of a new student model to the target model by probing both models with a recent divergent probe training dataset or a random probe dataset to determine the similarity between corresponding outputs generated by the student and target models. Training may terminate after such a measure of similarity exceeds a threshold, after a measure of difference between corresponding outputs of the student and target falls below a threshold, and / or after a predetermined number of iterations and / or epochs. In some embodiments, a predetermined number of input / output training pairs, distribution of training pairs, number or diversity of epochs may result in sufficient or above threshold agreement (or below threshold error or distance) between the new model and the target model (e.g., when probed with input test data).

[0030] Although the new model behaves substantially the same as the target model, it may have a different structure. For example, if the models are NNs, the models may have different architectures (e.g., fully connected, partially connected, RNN, CNN, etc.), different numbers of neurons, different numbers of layers, different connection types, etc. (e.g., as shown in FIG. 1). In some embodiments, this may be an unintended consequence of not knowing the structure of the target model, while in other embodiments, this may be an intentional way to reorganize the target model into a simpler student structure. For example, if the target neural network has a relatively complex structure (e.g., a number of neurons, layers or connections above a threshold, or relatively complex neuronal connection types such as fully connected), embodiments of the present invention may generate a new model with a relatively simple structure that behaves in the same way (e.g., configured to have a number of neurons, layers or connections below a threshold, or relatively simple neuronal connection types such as partially connected) to replace the complex target model. Simplifying the structure of the model (e.g., reducing the number of neurons, layers and / or connections) may reduce the size and memory space used to store the model and improve processing speed (reducing the time required for prediction).

[0031] In some embodiments, it may be desirable to add new knowledge to or remove existing knowledge from an already trained target neural network. For example, it may be desirable to add new data to the training dataset as new training data becomes available or as the model is extended to accommodate new classes of predictions. Conversely, if old data is determined to be sensitive or outdated, it should be removed from the training dataset to prevent that knowledge from being learned by the network. However, traditional models cannot be simply retrained by training only on new data or removing old data, as such training would invalidate accurate connections from the initial training, thereby removing desirable prior knowledge. Incorporating new data or removing old data in a traditional model traditionally requires obtaining the original training dataset, adding or removing data from the original training dataset, and starting the entire training process over again with the modified training dataset. However, when a third party wants to modify another person's model, the third party may not have access to the original training dataset.

[0032] According to some embodiments of the present invention, devices, systems and methods are now provided for incorporating new training data or excluding partial subsets of the original training dataset in a pre-trained target model without accessing the original training dataset. This may be achieved by modifying the divergent probe training dataset instead of modifying the inaccessible original training dataset. Thus, the new training dataset may include the divergent probe training data (e.g., acting as a stabilizer to maintain prior knowledge) plus or minus data to be added or removed (e.g., acting as a modifier to add new knowledge or forget old knowledge), respectively. Since the divergent probe training dataset mimics the original training dataset, adding or removing data from it will result in substantially the same change to the model as adding or removing data to / from the original training dataset itself. Thus, the target model may be modified or improved without ever having access to the original training dataset.

[0033] According to some embodiments of the present invention, devices, systems and methods are now provided for removing or eliminating existing knowledge of inputs, outputs and / or correlations therebetween from the original training dataset without access to that knowledge and thus without being able to directly remove those existing inputs, outputs and / or correlations. This may be accomplished by diluting or obfuscating the existing unknown input / output correlations with random correlations in the divergence probe training dataset and intentionally confusing the new neural network being trained such that the correlations of the old target network are no longer valid. Such embodiments of the present invention do not directly remove the training data (which cannot be directly removed since it is unknown), but rather obfuscate the training by adding random input / output correlations to the divergence probe training dataset until the original training of that data is diluted to the point of being indecipherable in the new neural network, and weaken its true predicted correlations with false random correlations (misleading or confusing the new neural network). The base training dataset may be the divergence probe training dataset described above or a covert training dataset that is not. In one example, if a company wants to delete secret records of people's faces, they cannot simply delete the photos because they do not have access to the secret data. Instead, embodiments of the present invention create false input / output correlations that link people's identities to random photos of their faces. For example, training a facial recognition neural network to link people's identities to 1,000 random photos of their faces would dilute the link between a person's identity and the photo of their true face, without ever knowing or gaining any correlation between the true photo or identity and the photo, making it ineffective. Thus, embodiments of the present invention train the neural network to eliminate input / output correlations, even without ever having access to the data itself.

[0034] Additionally or alternatively, existing knowledge of inputs, outputs and / or correlations therebetween may be eliminated in the new model by eliminating categories or classes from the target model without access to that knowledge. Traditional models eliminate training pairs of inputs and outputs. For example, traditional face recognition models eliminate images of faces that are correlated with the identity of, say, "Brian." In contrast, according to some embodiments of the invention, there is no access to input images of faces. Thus, embodiments of the invention may eliminate categories or classifications in predictions (e.g., eliminating "Brian" or "Name" in general).

[0035] The same principle can be used for any retraining or post-processing of an already trained target model without ever having access to the original training dataset. Instead of retraining the target model (which would require the secret original target dataset), embodiments of the present invention may retrain a new model that mimics the target model using the divergent probe training dataset (without revealing the secret original training dataset). Such retraining may include, for example, sparsifying the new model by removing or pruning weak neuronal connections to reduce the size of the new model (e.g., as described in U.S. Pat. No. 10,366,322, which is incorporated herein by reference in its entirety), or evolving the new model using a genetic algorithm to increase the search space of the new model and improve its accuracy (e.g., as described in U.S. Pat. No. 10,339,450, which is incorporated herein by reference in its entirety), or any other retraining method that, for example, reduces memory usage and size (e.g., creating a smaller neural network), improves processing speed, or improves the accuracy of the new neural network.

[0036] The models described herein may have any structure, including, but not limited to, any type of neural network (e.g., including fully connected, partially connected, RNN, CNN, etc. as shown in FIG. 1), logistic regression, Bayesian models, decision trees, random forest models, evolutionary algorithms (e.g., genetic algorithms, genetic programming, or evolution strategies), support vector machines (SVMs), or any other type of machine learning model that can learn to predict an output Y given an input X.

[0037] Embodiments of the present invention offer several important improvements.

[0038] An advantage of embodiments of the present invention is that it focuses training on the differences (rather than commonalities) in the predicted behavior of the new and target networks by generating a divergent probe training dataset that includes input data corresponding to the largest or above-threshold output difference between the new and target networks. Thus, a divergent probe training dataset results in larger errors and corrections for the new network at each training iteration compared to, for example, a randomly or evenly distributed training dataset, and therefore faster training times until the new and target networks converge.

[0039] Another advantage is that since embodiments of the present invention can mimic and modify the target model without accessing the original training dataset, only the target model itself needs to be stored, not the original training dataset. Thus, after the target model is generated, the original training dataset may be deleted, resulting in a significant reduction in memory space (e.g., a reduction of gigabytes, terabytes, or even petabytes in applications such as video analysis, used to store the training dataset). Since embodiments of the present invention can generate a probe training dataset on the fly to replace the original training dataset, nothing significant is lost when deleting the original training dataset, thereby maintaining the ability to recreate or modify the target model. Additionally or alternatively, some embodiments may delete (and not store) the probe training dataset from memory. In some embodiments, when training a new model, it is not necessary to store the probe training dataset, since it is continually or iteratively updated by probing the target model and the new model, and therefore can be generated or regenerated as needed. In fact, the divergent probe training data is continually updated over time as new networks are trained, so that old divergent probe training data becomes stale and does not need to be stored. By not storing the probe training data set, the new model may be trained using minimal memory space. For example, the memory may temporarily store only a single maximum divergence training sample or sample set for a single iteration or epoch, or may store less than a predetermined number of divergence training sample(s) or sample sets for less than a predetermined number of iterations or epochs at a time (e.g., to fill a buffer or temporary memory). The system may delete sample(s) on the fly, for example, after the sample(s) have been used for training, or when new updated divergence training sample(s) are added to the memory to replace the minimum difference or least recently used sample(s) in the buffer memory.Because embodiments of the present invention can train new models by storing only currently used probe training data (and not the entire training dataset), training can be performed by devices that have relatively small memory space (e.g., storing data as little as megabytes), such as mobile devices, drones, etc. (e.g., device 214 of FIG. 2).

[0040] Another advantage of not having to share or store the original training dataset is data security. For example, a first device (e.g., 202 in FIG. 2) may allow a second device (e.g., 214 in FIG. 2) to replicate its target model without ever transmitting, sharing, or publishing its original training dataset to the second device. In some embodiments, the first device permanently deletes the only copy of the original training dataset after training the target model. This permanent deletion is possible because embodiments of the present invention provide a means to efficiently mimic, modify, and retrain models without the original training dataset by using divergent probe training datasets. Permanently deleting the original training dataset ensures absolute security since the data cannot be restored or published.

[0041] Another advantage of embodiments of the present invention is that, whereas conventional training uses the same training data for every epoch, the divergence probe training data is continually or iteratively updated for every iteration and / or epoch to isolate the latest divergent student-teacher model behaviors that change as the student model changes during training. This diversity of training data, and the ability to isolate and correct the largest discrepancies in model behaviors as they change over time, can lead to faster training compared to conventional training that uses the same data set for every epoch, thereby increasing the speed at which new student models can be trained.

[0042] Another advantage of embodiments of the present invention is that the new model may be constructed to have any desired structure (e.g., neural network architecture, number of neural network layers, number of neurons, neural network connection type, etc.) that differs from the structure of the target model. The structure of the new model may be selected to be simpler than the structure of the target model (if known), as shown in FIG. 1, and / or to have a file size smaller than a predetermined value or the file size of the target model (if known). For example, the new model may be designed to have fewer layers, fewer neurons, or simpler connection types (e.g., partially connected vs. fully connected) than the target model. In this way, the new model behaves exactly like the target model, but the new model may have a smaller file size, occupy less memory space to store the new model, and may have a faster processing speed to run the new model due to the simpler model structure, as compared to the target model. Furthermore, embodiments of the present invention support retraining of the new model, so that the new model may use sparsification techniques during the training process to mimic the target model to eliminate or prune weak or negligible neuronal connections and reduce the model size. Sparsification allows for linear speedup on any hardware: for example, a 90% sparse neural network will result in a 10x speedup compared to a non-sparse network. Additionally or alternatively, new models may use evolutionary methods to optimize the training process to better mimic the target model.

[0043] Another advantage of embodiments of the present invention is that existing knowledge may be removed without access to it by diluting old connections with random data. In conventional systems, if a neural network has prohibited data, the entire neural network cannot be used and training data cannot be shared because of the risk that both will reveal the prohibited data. According to embodiments of the present invention, prohibited data may be eliminated from the divergent probe training dataset by diluting it with random data to make it ineffective or by eliminating the category or class associated with the prohibited data in the divergent probe training dataset. Such embodiments allow a user to train a new neural network, just without the prohibited data, mimicking the otherwise prohibited neural network and training dataset.

[0044] Reference is now made to Figure 1, which illustrates a schematic diagram of an exemplary unknown or "black box" target neural network 100 and a new student neural network 110 that mimics or substantially replicates the predictive behavior of the target neural network 100, in accordance with some embodiments of the present invention. Although the target neural network 100 of Figure 1 is shown as a fully connected NN, this is merely an exemplary NN and any other NN structure or type may be equivalently used in accordance with embodiments of the present invention, including but not limited to partially connected NNs, RNNs, CNNs, etc.

[0045] The target neural network 100 includes a plurality of artificial neurons 102. The artificial neurons 102 may be arranged in a hierarchy of layers. The neural network 100 may include an input layer (neurons 1-4), one or more intermediate or hidden layers (neurons 5-12), and an output layer (neurons 13-16). Each neuron 102 in each layer is connected by artificial synaptic connections 104 to some (partially connected) or all (fully connected) neurons in the adjacent layer. The neurons (1-4) in the input layer are connected to neurons in the subsequent higher layer, the neurons (5-12) in the intermediate layer are connected to neurons in both the previous and next layers, and the neurons (13-16) in the output layer are connected to neurons in the previous lower layer. The target neural network 100 may be represented by a plurality of weights representing the strength of each of the plurality of synaptic connections 104. The structure of the target neural network 100 is only an example, and any other arrangement of neurons, synapses, layers, or connection types may be used.

[0046] A local device (e.g., 214 in FIG. 2 ) cannot directly copy or retrain the target neural network 100 using conventional methods because the target neural network 100 itself and the original training data set used to train the target neural network 100 are not accessible to the local device. For example, the target neural network 100 may be stored in a remote location that is private and inaccessible to the local device (e.g., stored exclusively in one or more remote databases or servers 202 in FIG. 2 ). Similarly, the original training data set may be stored in the same or a different remote location that is private and inaccessible to the local device (e.g., stored exclusively in one or more remote databases or servers 202 in FIG. 2 ), or the original training data set may be permanently deleted after training is complete. In some embodiments, the only way the local device can access the target neural network 100 is by sending inputs to the remote device and receiving corresponding outputs from the remote device. The local device may request the remote device to probe the target neural network 100 and the new neural network 110 with the same set of inputs. The remote device may run those inputs through the two models 100 and 110 and return the corresponding respective outputs to the local device. The local device may measure (or receive measurements from the remote device) the difference between the corresponding outputs of the target model 100 and the new model 110 for each of the same inputs. The local device may detect the input data that produces a maximum or threshold-high difference between the corresponding data output by the target model 100 and the new model 110. The local device may generate a divergent probe training data set that includes pairs of inputs and corresponding outputs of the target neural network 100 associated with the maximum or threshold-high difference.The local device may then train the new neural network 110 to mimic the target neural network 100 using the divergent probe training data set to maximize the error between the target neural network 100 and the new neural network 110, and thus maximize the magnitude of correction at each iteration, to accelerate the training process.

[0047] After training, the new neural network 110 may ideally have the same exact set of output layer output neurons (13-16) as the target neural network 100 (although in practice, one or a few output neurons of the target neural network 100 may be missing from the new neural network 110). On the other hand, the input layer and intermediate layer(s) may be the same or different between the new neural network 110 and the target neural network 100. In some embodiments, the purpose of generating the new neural network 110 is to create a neural network that has the same or similar predictive behavior as the target neural network 100, but with a simpler model structure (e.g., smaller file size, fewer neurons or layers, simpler connection types, etc.). In those cases, the new neural network 110 may be designed to have fewer neurons, synapses, and / or hidden or intermediate layers, and / or simpler connection types than the target neural network 100.

[0048] By training a new, untrained neural network 110 to mimic the pre-trained target neural network 100 without access to its original training data, embodiments of the present invention may enable multiple parties or devices to share and reuse neural networks without sacrificing the security or privacy of the original training data. Such embodiments may also enable other parties or devices to improve the neural network of one party or device (e.g., sparsify or evolve the neural network) by mimicking the retraining or second pass training of the target neural network without access to the original training data, thereby enhancing security and data privacy. Such data privacy benefits are particularly important in environments where data sensitivity is required, such as medical applications. In addition, such embodiments support adding new training data to the neural network or removing old training data from the neural network without accessing the original training data, by adding or removing data to / from the divergent probe training dataset. Furthermore, some embodiments allow the model to be modified by adding new categories or classifications of predictions or removing old categories or classifications without accessing the original training data. This allows new knowledge to be added or old knowledge to be removed without overwriting the remaining data (preserving the synaptic connections and weights that belong to the old stored data).By using the divergent probe training dataset as a placeholder for the inaccessible original training data, embodiments of the present invention allow for the neural network to be replicated or retrained after the original training data has been deleted, thereby enhancing security by not storing private data and reducing memory storage.

[0049] Reference is made to Fig. 2, which illustrates a schematic of an exemplary system for training a new model to mimic a target model, according to some embodiments of the present invention. The system 200 may store and / or generate data structures and implement the model training and prediction described with reference to Figs. 1 and 3.

[0050] The system 200 may include one or more local endpoint devices 214 and one or more remote servers 202 accessible to the local devices via a network 212 or a computing cloud. The remote server 202 may provide a cloud-based, network-side or server-side model prediction service to the local endpoint device(s) 214. The remote server 202 may train, store and / or run a target neural network (e.g., the target neural network 100 of FIG. 1). The local endpoint device(s) 214 may send a request to the remote server 202 to make a model prediction for a set of one or more probe inputs. The remote server 202 may run those probe inputs through a target model to generate corresponding outputs and send those outputs to the local endpoint device(s) 214. While the remote server 202 provides the results of the target model, the remote server 202 does not expose or share the target model data itself or the original training dataset used to train the target model to the local endpoint device(s) 214.

[0051] The remote server 202 may have a memory 206 for storing the target model data 208 and optionally its original training dataset 210, and a processor 204 for training and / or predicting based on the target model. In various embodiments, the original training dataset may be stored in the memory 210 of the remote server, stored in an external database or memory, or permanently deleted (not stored). The memory 206 may also store data including code (e.g., software code) or logic, for example, to enable storage and retrieval of the data 208 or 210 according to embodiments of the present invention. The data 208 and / or 210 may be inaccessible to the local endpoint device(s) 214 and / or any external device. In some embodiments, the remote server 202 may include or be operatively connected to specialized hardware including a large memory 206 for storing the target model and / or training dataset, and a specialized processor 204 (e.g., GPU) for training the target model.

[0052] The local endpoint device(s) 214 may train, store and / or execute the new neural network (e.g., the new neural network 110 of FIG. 1). The local endpoint device(s) 214 may each include one or more memories 220 for storing the new neural network and a divergent probe training data set for training the new neural network to mimic the target neural network. The divergent probe training data set may include pairs of probe input data and their corresponding target model outputs received from the remote server 202. A subset of the probe input data may be selected for inclusion in the divergent probe training data set that produces a maximum or threshold difference between the corresponding data output by the target model and the corresponding data output by the new model. As the new model changes during the training process, the probe input data that produces a maximum or threshold difference between the models also changes. Thus, the divergent probe training data set is dynamically updated in the memory 220 to reflect the latest divergent behavior. In various embodiments, memory 220 may store the entire divergence probe training dataset used to train a new model at once, or may incrementally store on the fly each set of single or multiple training samples used in the current computation, iteration, epoch, current layer, etc., after which subsets are pruned (e.g., by active pruning or replacing most recently used samples with new samples).

[0053] The local endpoint device(s) 214 may include smart devices, virtual reality devices, drones, personal computers, desktop computers, mobile computers, laptop computers, and / or notebook computers, or other suitable devices, such as mobile phones, personal digital assistants (PDAs), video game consoles, and may include wired or wireless connections or modems. The local endpoint device(s) 214 may include one or more input devices 222 for receiving input from a user (e.g., number, size, dimension and configuration of neurons, synapses and layers, accuracy or training thresholds, etc.). The local endpoint device(s) 214 may include one or more output devices 216 (e.g., monitors or screens) for displaying data generated by the device(s) 214 or 202 to a user. In various applications, the local endpoint device(s) 214 are part of a system for image recognition, computer vision, virtual or augmented reality, speech recognition, text understanding, wireless network beamforming patterns, or other applications of artificial intelligence and deep learning. In facial recognition applications, a device may mimic the target model to efficiently perform facial recognition in order to trigger the device to unlock itself or a physical door when a match is detected. In security applications, a security camera system may mimic the target model to efficiently detect security breaches and sound an alarm or other security measures. In autonomous driving applications, a vehicle computer may mimic the target model to control driving maneuvers, such as steering to avoid detected objects.

[0054] The network 212 connecting the local endpoint device(s) 214 and the remote server 202 may be any public or private network, such as the Internet. Access to the network 212 may be via wireline, terrestrial wireless, satellite, or other systems known in the art.

[0055] The local endpoint device(s) 214 and the remote server 202 may include one or more controller(s) or processor(s) 204 and 218, respectively, for performing operations according to embodiments of the present invention, and one or more memory unit(s) 206 and 220, respectively, for storing data and / or instructions executable by the processor(s) (e.g., software for applying methods according to embodiments of the present invention). The processor(s) 204 and 218 may include, for example, a central processing unit (CPU), a graphics processing unit (GPU), a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a digital signal processor (DSP), a microprocessor, a controller, a chip, a microchip, an integrated circuit (IC), or any other suitable general-purpose or application specific processor or controller. The memory unit(s) 206 and 220 may include, for example, random access memory (RAM), dynamic RAM (DRAM), flash memory, volatile memory, non-volatile memory, cache memory, a buffer, a short-term memory unit, a long-term memory unit, or other suitable memory or storage unit.

[0056] Other devices and configurations may be used. For example, while the above description discloses that remote server 202 manages the target neural network and local endpoint device(s) 214 manage the new neural networks, either or both of devices 202 and / or 214 may train, store, probe, and / or otherwise manage the target neural network and / or the new neural network, depending on, for example, system architecture and security requirements.

[0057] Reference is now made to Figure 3, which is a flow chart of an exemplary method for training a new neural network (e.g., 110, Figure 1) to mimic a target neural network (e.g., 100, Figure 1), according to some embodiments of the present invention. The operations of Figure 3 may be performed by a processor (e.g., one or more processors 218 and / or 204, Figure 2) using data stored in a memory (e.g., one or more memory units 220 and / or 206, Figure 2). The processor may not have access to the target neural network and / or its original training data set.

[0058] In operation 300, a processor (e.g., 218 of local device 214 in FIG. 2) may probe the pre-trained target neural network and the untrained new neural network with the same set of input data to generate corresponding data output by each target neural network and new neural network. Probing may include locally probing (e.g., inputting data into a model locally and outputting corresponding results) or remotely probing (e.g., sending probe input data to a remote device to be remotely probed and receiving the results). In one embodiment, the target neural network (e.g., one that is proprietary or confidential) may be remotely probed while the new neural network may be locally probed. To remotely probe the target neural network, the processor may send the set of input data to a remote device (e.g., 202 of FIG. 2), where the set of input data is input into a remotely stored target model, and the processor may receive corresponding output results from the remote device. In general, either or both of the target neural network and the new neural network may be stored remotely or locally and probed. Probing may pass data through one or more (a subset or all) layers of the neural network such that differences are detected for the output layer and / or one or more hidden layers of the target neural network and the new neural network, individually or in combination. In some embodiments, training may be performed layer-by-layer, or for a subset or set of all layers simultaneously, where multiple successive stages are each used to train a respective successive layer (or group of layers) of the new neural network.

[0059] In operation 302, the processor may detect input data that produces a maximum or threshold difference between corresponding data output by the target model and the new model. This difference may be calculated locally (e.g., at 214 in FIG. 2) or remotely (e.g., at 202 in FIG. 2).

[0060] In operation 304, the processor may generate a divergent probe training data set including the input data that produces the maximum or threshold difference and the corresponding data output by the target neural network. In some embodiments, the divergent probe training data set may be generated using an additional (third) neural network trained to output training data that, when input to the new neural network and the target neural network, results in respective outputs having the maximum or threshold difference between them. Additionally or alternatively, the divergent probe training data set may be generated using an evolutionary model that evolves a data set to produce outputs that increase or maximize the output difference between the new mimic model and the target model. Additionally or alternatively, the divergent probe training data set may be generated using a statistical or heuristic-based method. Additionally or alternatively, the divergent probe training data set may be generated by testing random seed input probes and extrapolating the divergent probe training data set based on the resulting behavior of the target neural network and the new neural network. The seed data may be generated randomly or semi-randomly, for example, by measuring statistical characteristics of one or more sample inputs of the same type as the original training data set or an accessible subset thereof, and the set of input data may be selected semi-randomly according to their statistical characteristics. Additionally or alternatively, the multiple random seed probes may include multiple respective data types or distributions that differ from each other in the input space. The processor may select the data type or distribution for the divergent probe training data set that is associated with a maximum or threshold-high difference between corresponding data output by the target neural network and the new neural network in the output space. The initial test seed probe may be executed as an initial probe prior to or as part of the first iteration of operation 302.

[0061] In operation 306, the processor may train a new neural network to generate substantially the same corresponding output data as the target neural network using the divergent probe training data set that was found to generate a maximum or threshold-high difference in corresponding output data between the new model and the target model.

[0062] In operation 308, if training of the new model is complete, the process may end. Training may be complete when the processor determines that the new model and the target model have converged (e.g., the output difference(s) between the models are small enough or below a convergence threshold) or that multiple versions of the divergence probe training dataset updated for successive training iterations have converged (e.g., the difference between their associated maximum difference measures is small enough or below a convergence threshold). In some embodiments, the processor may test a measure of similarity between the new model and the target model by probing both models with samples from the divergence probe training dataset or a new random or semi-random input set to measure the similarity or error between corresponding outputs of the models. A measure of error below a threshold or asymptotically leveled may trigger the training process to terminate.

[0063] If the training of the new model is incomplete, the process may return to operation 300 and perform a new training iteration of the new neural network using an updated divergent probe training dataset that has been dynamically adjusted to accommodate the changing structure of the new neural network as it is trained over time. The process may return to operation 300 after every predetermined number of training iterations and / or epochs and / or when it detects that the difference between the new imitation and target outputs for the previous iteration's divergent probe training dataset has converged, thereby indicating that the new network has properly learned the data of the previous iteration's divergent probe training dataset. Overall, the process may be repeated iteratively for a number of total iterations and / or epochs, with a different updated divergent probe training dataset being used to train the new network in each iteration, until its training is completed at operation 308.

[0064] After the training of the new model is completed in operation 308, the new model may be further retrained by repeating the process of FIG. 3 for one or more additional iterations to mimic the retraining of the target model. Retraining may include sparsifying the new model to mimic the target model, evolving the new model by applying an evolutionary algorithm to mimic the target model, setting the structure of the new model to be simpler than the structure of the target model, setting the number of neurons, synapses, or layers of the new model, which is a neural network, to be less than the number of neurons, synapses, or layers of the pre-trained target model, setting the neuronal connection type of the new model, which is a neural network, to be simpler than the neuronal connection type of the target model, or any other type of retraining. In some embodiments, the new neural network may be generated, initially trained, and / or retrained after all copies of the original training dataset are deleted on the local and / or remote training device.

[0065] In some embodiments, initial training or retraining may include adding new data to the divergence probe training dataset to incorporate new knowledge not present in the target model. In some embodiments, initial training or retraining may include defining data to omit from the divergence probe training dataset to eliminate knowledge present in the target model. In some embodiments, initial training or retraining may include removing correlations from the new neural network that connects inputs to outputs without access to at least one of the inputs or outputs by adding multiple random correlations to the divergence probe training dataset for the outputs or inputs, respectively, to weaken or eliminate correlations between the inputs and outputs.

[0066] In some embodiments, because the original training dataset is not required for initial training or retraining, the processor of the local device may generate a new model or retrain a new model after all (or some) copies of the original training dataset have been deleted at the remote device (or from all locations throughout the system), e.g., significantly reducing the storage occupied at the remote device. In some embodiments, the local device may store in a temporary memory only a subset of samples of the divergence probe training dataset that are currently or recently used in operation 306 for on-the-fly training, and delete the samples from the temporary memory on-the-fly during operation 306 after the samples have been used to train the new model. This may significantly minimize the storage space used by the divergence probe training dataset.

[0067] After training or retraining the new model in operation 310, the processor may execute the new model in a runtime phase by inputting new data into the new model and generating corresponding data to be output by the new model. Models may be trained and executed for a variety of applications, including, for example, navigating a drone based on the output of the new model.

[0068] Other operations or sequences of operations may be used.

[0069] Such embodiments provide devices, systems, and methods for replicating and adding or removing knowledge from a pre-trained target model without access to the original training dataset, which is currently not possible using conventional mechanisms. Some practical advantages of embodiments of the present invention are that if one device or party hosts a target model (e.g., trained using billions of unique training samples), another device or party can now "mimic" the behavior of that model without accessing or exposing the training data. Instead of randomly probing, embodiments of the present invention train divergent neuronal pathways between models by generating a divergent probe training dataset that isolates the input data that causes the most divergent behavior between the models. This heterogeneous behavior results in the largest error and is therefore the training target to expedite the process compared to randomly probing the target model. Furthermore, if the target model is trained to detect objects of different categories (e.g., thousands), adding a new category requires conventional mechanisms to retrain the entire model from scratch. According to embodiments of the present invention, the divergent probe training dataset allows the incorporation of new knowledge by simply defining the added data while maintaining the stability of the existing knowledge. Such embodiments are also applicable to fine-tuning existing knowledge. For example, last year, Google's deep learning model recognized black people as "gorillas." Despite the outrage, the only solution was to train the entire object recognition module from scratch with more photos of black people, which could have taken months. According to embodiments of the present invention, the model can be post-trained with photos of people from less-representative classes, thus solving the problem immediately. The training dataset no longer requires the original billions of images, but can use divergent probe training datasets (to imitate and stabilize old inputs) and new data (to post-train a single class that needs improvement).Post-training according to embodiments of the present invention can take less time than traditional re-training because the divergence probe training dataset is dynamically updated every epoch to adapt to changes as the new network is trained, and the divergence probe training dataset targets model differences and provides greater data diversity during training, and typically converges faster than reusing the same training samples every epoch.

[0070] The terms "teacher," "target," and "pre-trained" neural network or model may refer to a first neural network that is being imitated or mimicked, and the terms "student," "new," and "imitation" neural network or model may refer to a second neural network that is imitating or mimicking the first neural network.

[0071] As used herein, a new model may mimic the behavior of a target model, or the new model and the target model converge if, in response to inputting the same inputs, both models produce the same or nearly / substantially the same outputs for greater than a threshold percentage of input / output pairs (e.g., a majority or 50%, 75%, 90%, 99%, or any percentage in between).

[0072] "Substantially," "about," or "similar," as used herein, may refer to a deviation from the exact measurement of any threshold of 10% or less.

[0073] In the preceding description, various aspects of the present invention have been described. For purposes of explanation, specific configurations and details have been set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that the present invention may be practiced without the specific details presented herein. Furthermore, well-known features may be omitted or simplified so as not to obscure the present invention.

[0074] Unless otherwise indicated, and as will be apparent from the discussion below, in the discussion throughout this specification, use of the terms "processing," "calculating," "computing," "determining," and the like will be understood to refer to the actions and / or processes of a computer or computing system, or similar electronic computing device, that manipulates and / or transforms data represented as physical quantities, e.g., electronic quantities, in the registers and / or memory of the computing system into other data similarly represented as physical quantities in the memory, registers of the computing system, or other device that stores, transmits, or displays such information.

[0075] The above flow charts and block diagrams illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present invention. In this regard, each block in the flow charts or block diagrams may represent a module, segment, or portion of code, which may include one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions described in the blocks may not be performed in the order described in the figures, or may be performed by different modules. Unless explicitly stated, the method embodiments described herein are not constrained to a particular order or sequence. In addition, some of the described method embodiments or elements thereof may occur or be performed at the same time. Each block of the block diagrams and / or flow chart illustrations, and combinations of blocks in the block diagrams and / or flow chart illustrations, may be implemented by special purpose hardware-based systems that perform the specified functions or acts, or by a combination of special purpose hardware and computer instructions.

[0076] An embodiment of the invention may include an article, such as, for example, a computer or processor non-transitory readable medium, such as a memory (e.g., memory unit(s) 206 and / or 220 of FIG. 2), a disk drive, or a USB flash memory, or a computer or processor non-transitory storage medium, that encodes, contains, or stores instructions, e.g., computer-executable instructions, that, when executed by a processor or controller (e.g., processor(s) 204 and / or 218 of FIG. 2), perform the methods disclosed herein.

[0077] In the above description, an embodiment is an example or implementation of the invention. The various appearances of "one embodiment," "an embodiment," or "some embodiments" do not necessarily all refer to the same embodiment. Although various features of the invention may be described in the context of a single embodiment, the features of the embodiments may be provided separately or in any suitable combination. Conversely, although the invention may be described herein in the context of separate embodiments for clarity, the invention may be implemented in a single embodiment. Reference herein to "some embodiments," "one embodiment," "one embodiment," or "other embodiments" means that a particular feature, structure, or characteristic described in connection with that embodiment is included in at least some, but not necessarily all, embodiments of the invention. Furthermore, it will be recognized that aspects of the invention described herein may be combined or otherwise coexist in embodiments of the invention.

[0078] The descriptions, examples, methods, and materials presented in the claims and the specification are not to be construed as limiting, but rather as illustrative only. While certain features of the invention have been illustrated and described herein, many modifications, substitutions, changes, and equivalents may occur to those skilled in the art. It is therefore to be understood that the appended claims are intended to cover all such modifications and changes as fall within the true spirit of the invention.

[0079] Although the present invention has been described with respect to a limited number of embodiments, these should not be construed as limitations on the scope of the present invention, but rather as illustrations of some of the preferred embodiments. Other possible variations, modifications, and applications are also within the scope of the present invention. Different embodiments are disclosed herein. Features of a particular embodiment may be combined with features of other embodiments, and therefore a particular embodiment may be a combination of features of more than one embodiment.

Claims

1. A computer-implemented method comprising:

1. A process for computer training a new neural network to mimic a target neural network without access to the target neural network or its original training data set, the target neural network being a single neural network, the training comprising: probing the target neural network and the new neural network with input data to generate corresponding data output by one or more layers of each of the target neural network and the new neural network; detecting input data that produces a maximum or threshold difference between corresponding data output by the target neural network and the new neural network; generating a divergence probe training data set including input / output pairs including the input data that produces the maximum or threshold difference and the corresponding data output by the target neural network; training the new neural network to minimize differences between corresponding data output by the new neural network and the target neural network using the divergent probe training data set found to produce the maximum or above threshold difference in the corresponding output data between the new neural network and the target neural network; iteratively training the new neural network with an updated divergence probe training data set that has been updated to replace input / output pairs associated with output differences between the new neural network and a target neural network having a difference measure less than a threshold with new input / output pairs associated with output differences between the new neural network and a target neural network having a relatively larger difference measure; wherein the trained new neural network has fewer layers and a smaller file size than the target neural network.

2. 2. The method of claim 1, further comprising computer generating the divergent probe training data set using additional neural networks trained to output training data that when input to the new neural network and the target neural network produces respective outputs having a maximum or greater than threshold difference therebetween.

3. 2. The method of claim 1, further comprising computer generating the divergent probe training data set using an evolutionary model that evolves to generate outputs that increase or maximize an output difference between the new neural network and a target neural network.

4. 2. The method of claim 1, further comprising: a computer generating the divergent probe training data set by testing random seed probes and extrapolating the divergent probe training data set based on the resulting behavior of the target neural network and new neural networks.

5. 5. The method of claim 4, wherein the random seed probes include a plurality of respective data types or distributions that differ from one another in an input space, the method including a step of computer selecting a data type or distribution for the divergent probe training data set that is associated with a maximum or threshold-over-threshold difference between corresponding data output by the target neural network and the new neural network in an output space.

6. 10. The method of claim 1, comprising computer generating the divergent probe training data set using a statistical or heuristics based method.

7. 2. The method of claim 1, further comprising computer updating the divergent probe training data set every predetermined number of training iterations.

8. 2. The method of claim 1, further comprising: updating the divergent probe training data set by a computer upon detecting that the output difference between the new network and the target network has converged for a previous version of the divergent probe training data set.

9. 2. The method of claim 1, wherein the differences between corresponding data output by the target neural network and the new neural network are detected by a computer for an output layer or one or more hidden layers of the target neural network and the new neural network, individually or in combination.

10. 2. The method of claim 1, further comprising the step of: a computer adding new data to the divergent probe training data set to incorporate new knowledge into the new neural network that is not present in the target neural network.

11. 2. The method of claim 1, further comprising the step of: computer defining data to be omitted from the divergent probe training data set to exclude categories or classes present in the target neural network from the new neural network.

12. 2. The method of claim 1, further comprising: removing correlations from the new neural network linking inputs to outputs without accessing at least one of the inputs or outputs by adding a number of random correlations to the divergent probe training data set for the outputs or inputs, respectively, to weaken or eliminate correlations between the inputs and outputs.

13. 2. The method of claim 1, further comprising the step of computer retraining the new neural network with the divergent probe training data set after training the divergent probe training data set to mimic retraining of the target neural network.

14. 14. The method of claim 13, further comprising the step of computer generating a sparse new neural network to mimic the target neural network.

15. 14. The method of claim 13, comprising computer evolving the new neural network by applying an evolutionary algorithm to mimic the target neural network.

16. 2. The method of claim 1, further comprising computer generating or computer retraining the new neural network after all copies of the original training data set have been deleted on a training device.

17. 2. The method of claim 1, comprising computer training the new neural network over multiple epochs with a different divergent probe training data set in each of the multiple epochs.

18. 2. The method of claim 1, further comprising configuring the structure of the new neural network by a computer to have a number of neurons, synapses, or layers that is less than the number of neurons, synapses, or layers of the target neural network.

19. 2. The method of claim 1, comprising training the new neural network layer-by-layer in multiple successive stages, each stage comprising computer training a respective successive layer of the new neural network.

20. 2. The method of claim 1, further comprising, after training the new neural network, executing the new neural network in a run-time phase by inputting new data into the new neural network and generating corresponding data that is output by the new neural network.

21. One or more processors configured to train a new neural network to mimic a target neural network without access to the target neural network or its original training data set, the target neural network being a single neural network, the training comprising: probing the target neural network and the new neural network with input data to generate corresponding data output by one or more layers of each of the target neural network and the new neural network; detecting input data that produces a maximum or threshold difference between corresponding data output by the target neural network and the new neural network; generating a divergence probe training data set including input / output pairs including the input data that produces the maximum or threshold difference and the corresponding data output by the target neural network; training the new neural network to minimize differences between corresponding data output by the new neural network and the target neural network using the divergent probe training data set found to produce the maximum or above threshold difference in the corresponding output data between the new neural network and the target neural network; iteratively training the new neural network with an updated divergence probe training data set that has been updated to replace input / output pairs associated with output differences between the new neural network and a target neural network having a difference measure less than a threshold with new input / output pairs associated with output differences between the new neural network and a target neural network having a relatively larger difference measure; 1. A system comprising: one or more processors, and wherein a trained new neural network has fewer layers and a smaller file size than the target neural network.

22. 22. The system of claim 21, comprising one or more memories configured to store the divergent probe training data set.

23. 23. The system of claim 22, wherein the one or more memories are temporary memories configured to store samples of the divergence probe training data set on the fly and delete the samples on the fly after they have been used to train the new neural network.

24. 22. The system of claim 21, wherein the one or more processors are configured to generate the divergent probe training data set using an additional neural network trained to output training data that when input to the new neural network and the target neural network produces respective outputs that have a maximum or greater than threshold difference therebetween.

25. 22. The system of claim 21, wherein the one or more processors are configured to generate the divergent probe training data set using an evolutionary model that evolves to produce outputs that increase or maximize an output difference between the new neural network and a target neural network.

26. 22. The system of claim 21, wherein the one or more processors are configured to generate the divergent probe training data set by testing random seed probes and extrapolating the divergent probe training data set based on the resulting behavior of the target neural network and new neural networks.

27. 22. The system of claim 21, wherein the one or more processors are configured to add new data to the divergent probe training data sets or define data to be omitted from the divergent probe training data sets to incorporate new knowledge into the new neural network that is not present in the target neural network or to exclude existing knowledge from the new neural network that is present in the target neural network.

28. 22. The system of claim 21, wherein the one or more processors are configured to execute the new neural network in a runtime phase after training the new neural network by inputting new data into the new neural network and generating corresponding data to be output by the new neural network.

29. A non-transitory computer-readable medium comprising instructions that, when implemented in one or more processors within a computing device, cause the one or more processors to: probing the target neural network and the new neural network with input data to generate corresponding data output by one or more layers of each of the target neural network and the new neural network; detecting input data that produces a maximum or threshold difference between corresponding data output by the target neural network and the new neural network; generating a divergence probe training data set including input / output pairs including the input data that produces the maximum or threshold difference and the corresponding data output by the target neural network; training the new neural network to minimize differences between corresponding data output by the new neural network and the target neural network using the divergent probe training data set found to produce the maximum or above threshold difference in the corresponding output data between the new neural network and the target neural network; iteratively training the new neural network with an updated divergence probe training data set that has been updated to replace input / output pairs associated with output differences between the new neural network and a target neural network having a difference measure less than a threshold with new input / output pairs associated with output differences between the new neural network and a target neural network having a relatively larger difference measure; 1. A non-transitory computer-readable medium for training a new neural network to mimic a target neural network without access to the target neural network or its original training dataset, wherein the target neural network is a single neural network, and the trained new neural network has a fewer number of layers and a smaller file size than the target neural network.

30. 30. The non-transitory computer-readable medium of claim 29, comprising instructions that, when implemented in the one or more processors in the computing device, further cause the one or more processors to execute the trained new neural network in a runtime phase by inputting new data into the new neural network and generating corresponding data that is output by the new neural network.

Citation Information

Patent Citations

  • Domain adaptation in speech recognition via teacher-student learning

    CN110998716A

  • Knowledge transfer method, information processing apparatus, and storage medium

    JP2019215861A

  • Model training method, data recognition method and data recognition device

    JP2020071883A

  • System and method for mimicking a neural network without access to the original training dataset or the target model

    US20190370665A1