# US 2022/0036194 A1 · Deep neural network optimization system for machine learning model scaling

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0036194 A1
- Document ID: US20220036194A1
- Status: Published application
- Kind: A1
- Application number: 17/504,282
- Filed: 2021-10-18
- Published: 2022-02-03
- Earliest claimed: 2021-10-18
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Sairam Sundaresan; Souvik Kundu
- Web page: https://patentgrep.com/patent/US20220036194A1

## CPC

- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/063: using electronic means
- G06N 3/09: Supervised learning
- G06N 3/096: Transfer learning
- G06N 3/098: Distributed learning, e.g. federated learning
- G06N 3/0985: Hyperparameter optimisation; Meta-learning; Learning-to-learn
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The present disclosure is related to techniques for optimizing artificial intelligence (AI) and/or machine learning (ML) models to reduce resource consumption while maintaining or improving AI/ML model performance. A sparse distillation framework (SDF) is provided for producing a class of parameter and compute efficient AI/ML models suitable for resource constrained applications. The SDF simultaneously distills knowledge from a compute heavy teacher model while also pruning a student model in a single pass of training, thereby reducing training and tuning times considerably. A self-attention mechanism may also replace CNNs or convolutional layers of a CNN to have better translational equivariance. Other embodiments may be described and/or claimed.

## Claims

### Claim 1

An apparatus for sparse distillation of machine learning (ML) models, the apparatus comprising:
a knowledge distillation (KD) mechanism configured to distill knowledge of a supernet into a subnet during a single ML training epoch; and
a pruning mechanism configured to prune one or more parameters from the subnet during the single ML training epoch to produce a sparse distilled subnet.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the distillation of the knowledge and the pruning of the one or more parameters takes place simultaneously.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the single ML training epoch includes a single pass over a training dataset.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the KD mechanism is configured to:
train the supernet using a training dataset; and
operate the supernet to extract the knowledge to be distilled into the subnet, and
train the subnet using the training dataset and using the extracted knowledge to guide the training of the subnet.

### Claim 5 (depends on 4)

The apparatus of claim 4, wherein the knowledge includes both logits and feature maps extracted from the supernet.

### Claim 6 (depends on 5)

The apparatus of claim 5, wherein the KD mechanism is configured to use an attention transfer distillation algorithm to transfer the knowledge from the supernet to the subnet.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein the first ML model is neural network (NN) including one or more of a deep NN (DNN), feed forward NN (FFN), deep FNN (DFFN), convolutional NN (CNN), deep CNN (DCN), deconvolutional NN (DNN), deep belief NN, perception NN, graph NN, recurrent NN (RNN), Long Short Term Memory (LSTM) algorithm, gated recurrent unit (GRU), echo state network (ESN), spiking NN (SNN), deep stacking network (DSN), Markov chain, perception NN, generative adversarial network (GAN), transformer, self-attention (SA) mechanism, stochastic NN, Bayesian Network (BN), Bayesian belief network (BBN), Bayesian NN (BNN), Deep BNN (DBNN), Dynamic BN (DBN), probabilistic graphical model (PGM), Boltzmann machine, restricted Boltzmann machine (RBM), Hopfield network, convolutional deep belief network (CDBN), Linear Dynamical System (LDS), Switching LDS (SLDS), Optical NN (ONN), and/or an NN for reinforcement learning (RL) and/or deep RL (DRL).

### Claim 8 (depends on 1)

The apparatus of claim 1, further comprising a self-attention (SA) mechanism configured to:
generate, based on input data, a queries matrix, a values matrix, and a keys matrix, wherein the queries matrix, the values matrix, and the keys matrix include the parameters to be pruned by the pruning mechanism; and
provide the queries matrix, the values matrix, and the keys matrix to the pruning mechanism.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein the SA mechanism is further configured to:
apply the input data to a parameterized learnable transformation (PLT) to generate the queries matrix, the values matrix, and the keys matrix.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the SA mechanism includes the PLT.

### Claim 11 (depends on 8)

The apparatus of claim 8, wherein the SA mechanism is further configured to:
perform an operation on the queries matrix and the keys matrix, wherein the operation is a matrix multiplication operation or a 1×1 convolution on the queries matrix and the keys matrix;
apply a softmax function to an output of the operation; and
generate an SA output based on a combination of the values matrix and an output of the softmax function.

### Claim 12 (depends on 8)

The apparatus of claim 8, wherein the SA mechanism replaces a convolutional neural network (CNN).

### Claim 13 (depends on 1)

The apparatus of claim 1, wherein the supernet is a convolutional neural network (CNN) comprising a set of convolutional layers and a set of layers that are not convolutional layers.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the set of convolutional layers in the CNN are replaced with a set of SA layers.

### Claim 15 (depends on 1)

The apparatus of claim 1, wherein the apparatus is a client device, an application server, an edge computing server of an edge computing framework, or a cloud compute node of a cloud computing service.

### Claim 16

One or more non-transitory computer-readable media (NTCRM) for operating a sparse distillation system, wherein execution of the instructions by one or more processors of a compute node is to cause the compute node to:
obtain a training dataset for a first machine learning (ML) model;
provide the training dataset to the first ML model and a second ML model, the second ML model having fewer parameters than the first ML model;
operate a knowledge distillation (KD) mechanism to, during training of the first and second ML models, distill knowledge of the first ML model into the second ML model during one pass over the training dataset; and
operate a pruning mechanism to prune one or more parameters from the second ML model during the one pass over the training dataset.

### Claim 17 (depends on 16)

The one or more NTCRM of claim 16, wherein the distillation of the knowledge and the pruning of the one or more parameters takes place simultaneously.

### Claim 18 (depends on 16)

The one or more NTCRM of claim 16, wherein, to operate the KD mechanism, execution of the instructions is to further cause the compute node to:
train the first ML model using a training dataset; and
operate the first ML model to extract the knowledge to be distilled into the second ML model, and
train the second ML model using the training dataset and using the extracted knowledge to guide the training of the second ML model.

### Claim 19 (depends on 18)

The one or more NTCRM of claim 18, wherein, to operate the KD mechanism, execution of the instructions is to further cause the compute node to:
extract logits and feature maps from the first ML model, wherein the knowledge includes both the extracted logits and the extracted feature maps.

### Claim 20 (depends on 16)

The one or more NTCRM of claim 16, wherein, to operate the KD mechanism, execution of the instructions is to further cause the compute node to:
operate an attention transfer distillation algorithm to transfer the knowledge from the first ML model to the second ML model such that the second ML model includes a spatial attention map that is similar to a spatial attention map of the first ML model.

### Claim 21 (depends on 16)

The one or more NTCRM of claim 16, wherein execution of the instructions is to further cause the compute node to operate a self-attention (SA) mechanism to:
generate, based on the training dataset, a queries matrix, a values matrix, and a keys matrix, wherein the queries matrix, the values matrix, and the keys matrix include the parameters to be pruned by the pruning mechanism; and
provide the queries matrix, the values matrix, and the keys matrix to the pruning mechanism.

### Claim 22 (depends on 21)

The one or more NTCRM of claim 21, wherein, to operate the SA mechanism, execution of the instructions is to further cause the compute node to:
apply parts of the training dataset to a parameterized learnable transformation (PLT) to generate the queries matrix, the values matrix, and the keys matrix;
perform an operation on the queries matrix and the keys matrix, wherein the operation is a matrix multiplication operation or a 1×1 convolution on the queries matrix and the keys matrix;
apply a softmax function to an output of the operation; and
generate an SA output based on a combination of the values matrix and an output of the softmax function.

### Claim 23 (depends on 21)

The one or more NTCRM of claim 21, wherein the SA mechanism replaces a convolutional neural network (CNN).

### Claim 24 (depends on 21)

The one or more NTCRM of claim 21, wherein the first ML model is a convolutional neural network (CNN) comprising a set of convolutional layers and a set of layers that are not convolutional layers, wherein the set of convolutional layers in the CNN are replaced with a set of SA layers, and the set of SA layers form the SA mechanism.

### Claim 25 (depends on 16)

The one or more NTCRM of claim 16, wherein the compute node is a client device, an application server, an edge computing server of an edge computing framework, or a cloud compute node of a cloud computing service.
