Implementing predictive models with soft example-by-example invariance by probabilistic modeling

By embedding probabilistic modeling and small perturbations into deep neural networks, soft example-by-example invariance is achieved, addressing the issues of insufficient model size and data augmentation, and improving classification accuracy and adaptability on edge devices.

CN120917451APending Publication Date: 2025-11-07QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380095737.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-24
Filing Date
2023-08-31
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In existing technologies, the deployment of deep neural network models on edge devices is limited by the model size and excessive memory consumption. At the same time, data augmentation methods may lead to insufficient invariance, affecting the accuracy of classification tasks.

Method used

A predictive model with soft, instance-by-example invariance is achieved through probabilistic modeling. Small perturbations are embedded into the data generation process, and the probability of future outcomes is estimated using the probabilistic model. Device-specific perturbations are learned to align data across different user devices.

Benefits of technology

It improves the robustness and performance of the model on edge devices, enhances its robustness to small transformations, and improves the accuracy and adaptability of classification tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120917451A_ABST
    Figure CN120917451A_ABST
Patent Text Reader

Abstract

A processor-implemented method for soft example-by-example invariance includes receiving, by an artificial neural network (ANN), an input. The ANN selectively performs transforms on the input to generate reconstructed inputs that are invariant to a subset of the set of transforms. The ANN generates an inference based on the reconstruction input.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross Reference to Related Applications

[0002] This application claims the benefit of Greek Application No. 20230100249, filed March 24, 2023, and titled “PREDICTIVE MODEL WITH SOFT PER-EXAMPLE INVARIANCES THROUGH PROBABILISTIC MODELING,” the disclosure of which is expressly incorporated by reference in its entirety. TECHNICAL FIELD

[0003] Aspects of the present disclosure generally relate to artificial neural networks, and more specifically to predictive models. BACKGROUND

[0004] An artificial neural network can include an interconnected group of artificial neurons (e.g., neuron models). Artificial neural networks can be a computing device or represent a method to be performed by a computing device. Convolutional neural networks (CNNs) are a type of feed-forward artificial neural network. Convolutional neural networks can include a collection of neurons, where each neuron has a receptive field and collectively tiles an input space. Convolutional neural networks, such as deep convolutional neural networks (DCNs), have numerous applications. In particular, these neural network architectures are used for various technologies, such as image recognition, speech recognition, acoustic scene classification, keyword spotting, autonomous driving, and other classification tasks.

[0005] Deep neural networks are increasingly popular due to their ability to solve complex problems. As a result, deep learning deployment on edge devices for real-time inference can be an area of interest. Unfortunately, model size, and thus memory consumption and complexity, can be prohibitive due to millions of parameters.

[0006] A neural network model can be trained using a set of labeled training data. Given a set of training data, a neural network model can learn to make inferences based on the training data. Generally, with more labeled training data, neural network model accuracy can be improved. Additionally, the more labeled training data, the more likely model generalization can be achieved. However, labeled data can be time consuming.

[0007] Combining data from multiple training domains can provide more labeled data. However, doing so can be expensive and in some cases prohibited due to privacy restrictions.

[0008] Data augmentation has become a popular technique for addressing this issue. However, data augmentation can embed a certain degree of invariance to such augmentations by the neural network, which can make downstream classification tasks more challenging. SUMMARY

[0009] The disclosure is set forth in independent claims. Some aspects of the disclosure are described in dependent claims.

[0010] In various aspects of the disclosure, a processor-implemented method performed by one or more processors includes receiving, by an artificial neural network (ANN), an input. The processor-implemented method further includes selectively performing, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations. The processor-implemented method further includes generating, by the ANN, an inference based on the reconstructed input.

[0011] Other aspects of the disclosure relate to an apparatus that includes means for receiving, by an artificial neural network (ANN), an input. The apparatus further includes means for selectively performing, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations. The apparatus further includes means for generating, by the ANN, an inference based on the reconstructed input.

[0012] In various other aspects of the disclosure, a non-transitory computer- readable medium having program code recorded thereon is disclosed. The program code is executed by a processor and includes program code to receive, by an artificial neural network (ANN), an input. The program code further includes program code to selectively perform, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations. The program code further includes program code to generate, by the ANN, an inference based on the reconstructed input.

[0013] Other aspects of the disclosure relate to an apparatus having a memory and one or more processors coupled to the memory. The processor is configured to receive, by an artificial neural network (ANN), an input. The processor is further configured to selectively perform, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations. The processor is further configured to generate, by the ANN, an inference based on the reconstructed input.

[0014] Additional features and advantages of the disclosure will be described hereinafter. It should be apparent that the disclosure can be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present disclosure. It should also be readily appreciated that such equivalent constructions do not depart from the teachings of the present disclosure as set forth in the appended claims. The novel features of the present disclosure believed to be of significant value are set forth with particularity in the claims that follow, with reference being made to the appended drawings. However, it is to be understood that each of the drawings can not be to scale, and that, unless otherwise indicated herein, the drawings are merely intended to conceptually illustrate one or more embodiments of the disclosure. It should be understood that the drawings are not limiting of the scope of the disclosure, but merely serve as an aid to understanding. BRIEF DESCRIPTION OF DRAWINGS

[0015] The features, nature, and advantages of the present disclosure will become more apparent from the detailed description set forth below when taken in conjunction with the drawings in which like reference characters identify correspondingly throughout and wherein:

[0016] Figure 1 Example implementations of neural networks using a system on a chip (SOC), including a general purpose processor, in accordance with certain aspects of the present disclosure are illustrated.

[0017] Figure 2A 、 Figure 2B and Figure 2C are diagrams illustrating neural networks in accordance with various aspects of the present disclosure.

[0018] Figure 2D is a diagram illustrating an exemplary deep convolutional network (DCN) in accordance with various aspects of the present disclosure.

[0019] Figure 3 is a block diagram illustrating an exemplary deep convolutional network (DCN) in accordance with various aspects of the present disclosure.

[0020] Figure 4 is a block diagram illustrating an exemplary software architecture that can modularize artificial intelligence (AI) functionality in accordance with various aspects of the present disclosure.

[0021] Figure 5 is a diagram illustrating an example graph model for embedding soft per-example invariance in accordance with various aspects of the present disclosure.

[0022] Figure 6A and Figure 6B are radial plots illustrating a comparison of classification using a normal model and classification using an example soft per-example invariance model in accordance with various aspects of the present disclosure.

[0023] Figure 7 is a flow diagram illustrating a processor-implemented method for soft per-example invariance in accordance with various aspects of the present disclosure. DETAILED DESCRIPTION

[0024] The detailed description set forth below, in connection with the appended drawings, is intended as a description of various configurations and is not intended to represent the only configurations in which the concepts described herein can be practiced. The detailed description includes specific details for the purpose of providing a thorough understanding of various concepts. However, it will be apparent to those skilled in the art that these concepts can be practiced without these specific details. In some instances, well-known structures and components are shown in block diagram form in order to avoid obscuring such concepts.

[0025] Based on the teachings herein those skilled in the art will appreciate that the scope of the disclosure is intended to cover any aspect of the disclosure alone or in any combination with other aspects. For example, an apparatus can be implemented or a method can be practiced using any number of the aspects set forth. In addition, the scope of the disclosure is intended to cover such an apparatus or method which is practiced using, as substitute for, or in addition to, some of the features set forth. It is understood that any aspect of the disclosure disclosed can be embodied by one or more elements of a claim.

[0026] The word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any aspect described as "exemplary" is not necessarily to be construed as preferred or advantageous over other aspects.

[0027] While specific aspects are described, numerous variations and permutations of these aspects are possible. Although some benefits and advantages of the preferred aspects are described, it is to be understood that a minimal number of benefits and advantages can be achieved from one or more of the aspects. Although the preferred aspects have been described with regard to particular embodiments, it is to be understood that features and concepts from different embodiments can be combined together and can be used to configure a wide variety of architectures beyond the particular ones described. The scope of the disclosure is to be interpreted in the broadest light consistent with the specifications presented herein and equivalents thereof. The detailed description and drawings are to be regarded as illustrative only and not as restrictive.

[0028] As described, deep neural networks are increasingly popular due to their ability to solve complex problems. As such, deep learning deployment for real-time inference on edge devices can be an area of interest. Unfortunately, model size, and thus memory consumption and complexity, can be prohibitive due to millions of parameters.

[0029] Making artificial neural networks (ANNs) invariant to certain transformations can improve robustness and performance. For example, convolutional architectures, such as convolutional neural networks (CNNs), can embed translational invariance for ANNs and are the state-of-the-art (SOTA) for many computer vision tasks. Additionally, data augmentation embeds a certain degree of invariance to these augmentations for neural networks. However, in many tasks, full invariance can not be required. Full invariance is a property where the result remains invariant regardless of a transformation or change in the measured condition relative to an object. For example, full invariance to rotation would make it difficult to distinguish between an image of the digit "6" and an image of the digit "9."

[0030] Soft invariance from data augmentation can be one approach to address such challenges. However, conventional approaches fail to provide accurate results. In soft invariance, small transformations (e.g., rotations) of an input image can produce the same class label as the input image without the small transformation. For example, in one conventional approach, images can be augmented with random rotations up to some maximum angle. However, conventional approaches can have the effect of smoothing predictions across rotations for all examples.

[0031] To address these and other challenges, aspects of the present disclosure are directed to implementing a prediction model with soft example-wise invariance through probabilistic modeling. The prediction model analyzes patterns in data and observes trends within certain conditions to estimate outcomes. The probabilistic model utilizes the effects of stochastically occurring actions to determine the likelihood of future outcomes.

[0032] According to various aspects of the present disclosure, small perturbations can be embedded into a probabilistic model of a data generation process. For example, a small perturbation can represent a slight image change (e.g., a 1-10 degree rotation of an image). For example, images of a person’s handwritten specification of the number “9” can look different due to natural variations such as hand movement, paper orientation, distortions in scanning hardware, or other reasons. The actual number can be viewed as a perturbed version of the specification “9.”

[0033] Further, aspects of the present disclosure can enable learning of device-specific perturbations to align data at different user devices. Accordingly, aspects of the present disclosure can be beneficially applied in fields such as computer vision and federated learning.

[0034] Figure 1 An example implementation of a system on a chip (SOC) 100, which can include a central processing unit (CPU) 102 or multi-core CPU configured for implementing a prediction model with soft example-wise invariance through probabilistic modeling, is illustrated. Variables (e.g., neural signals and synaptic weights), system parameters associated with the computing device (e.g., neural networks with weights), delays, frequency bin information, and task information can be stored in a memory block associated with a neural processing unit (NPU) 108, a memory block associated with the CPU 102, a memory block associated with a graphics processing unit (GPU) 104, a memory block associated with a digital signal processor (DSP) 106, a memory block 118, or can be distributed across multiple blocks. Instructions executed at the CPU 102 can be loaded from a program memory associated with the CPU 102 or can be loaded from the memory block 118.

[0035] The SOC 100 can also include additional processing blocks customized for particular functions, such as a GPU 104, a DSP 106, a connectivity block 110 (which can include fifth generation (5G) connectivity, fourth generation long term evolution (4G LTE) connectivity, Wi-Fi connectivity, USB connectivity, Bluetooth connectivity, etc.), and a multimedia processor 112 that can, for example, detect and recognize gestures. In one implementation, the NPU 108 is implemented in the CPU 102, the DSP 106, and / or the GPU 104. The SOC 100 can also include a sensor processor 114, an image signal processor (ISP) 116, and / or a navigation module 120, which can include a global positioning system.

[0036] The SOC 100 can be based on an ARM instruction set. In an aspect of the disclosure, instructions loaded into the general purpose processor 102 can include code for receiving, by an artificial neural network (ANN), an input. The general purpose processor 102 can also include program code for selectively performing, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations. The general purpose processor 102 can also include code for generating, by the ANN, an inference based on the reconstructed input.

[0037] A deep learning architecture can perform an object recognition task by learning to represent inputs at successively higher levels of abstraction in each layer, building a useful feature representation of the input data. In this way, deep learning addresses a major bottleneck of traditional machine learning. Prior to the advent of deep learning, machine learning approaches to object recognition problems can have relied heavily on human-designed feature objects, possibly in conjunction with a shallow classifier. A shallow classifier can be a two-class linear classifier, for example, in which a weighted sum of the components of a feature vector can be compared to a threshold to predict which class the input belongs to. Human-designed feature objects can be templates or kernels customized for a particular problem domain by engineers with domain expertise. In contrast, while a deep learning architecture can learn to represent features similar to those that a human engineer might design, it does so through training. Moreover, a deep network can learn to represent and recognize new types of features that a human might not have considered.

[0038] A deep learning architecture can learn a hierarchy of features. For example, if presented with visual data, a first layer can learn to recognize relatively simple features in the input stream, such as edges. In another example, if presented with auditory data, a first layer can learn to recognize spectral power in particular frequencies. A second layer, taking the output of the first layer as input, can learn to recognize combinations of features, such as simple shapes in visual data or sound combinations in auditory data. Higher layers can learn to represent complex shapes in visual data or words in auditory data, for example. Still higher layers can learn to recognize common visual objects or spoken phrases.

[0039] Deep learning architectures can perform particularly well when applied to problems with a natural hierarchical structure. For example, classification of motorized vehicles can benefit from first learning to recognize wheels, windshields, and other features. These features can be combined in different ways at higher layers to recognize cars, trucks, and airplanes.

[0040] Neural networks can be designed with a variety of connectivity patterns. In feedforward networks, information passes from lower to higher layers, with each neuron in a given layer communicating with neurons in higher layers. As described above, a hierarchical representation can be built in successive layers of a feedforward network. Neural networks can also have recurrent or feedback (also known as top-down) connections. In recurrent connections, the output from a neuron in a given layer can be communicated to another neuron in the same layer. Recurrent architectures can be helpful in recognizing patterns that span more than one block of input data delivered to a neural network in sequence. Connections from a neuron in a given layer to a neuron in a lower layer can be referred to as feedback (or top-down) connections. Networks with many feedback connections can be helpful when recognition of high-level concepts can aid in discriminating particular low-level features of an input.

[0041] Connections between layers of a neural network can be fully connected, or locally connected. Figure 2A An example of a fully connected neural network 202 is illustrated. In a fully connected neural network 202, a neuron in a first layer can communicate its output to every neuron in a second layer, so that every neuron in the second layer will receive input from every neuron in the first layer. Figure 2B An example of a locally connected neural network 204 is illustrated. In a locally connected neural network 204, a neuron in a first layer can be connected to a limited number of neurons in a second layer. More generally, locally connected layers of a locally connected neural network 204 can be configured so that each neuron in a layer will have the same or similar connectivity pattern, but the connection strengths can have different values (e.g., 210, 212, 214, and 216). The locally connected connectivity pattern can result in spatially distinct receptive fields in higher layers, as a given region of higher layer neurons can receive input that is tuned by training to characteristics of a restricted portion of the total input to the network.

[0042] One example of a locally connected neural network is a convolutional neural network. Figure 2C An example of a convolutional neural network 206 is illustrated. A convolutional neural network 206 can be configured so that the connection strengths associated with input to each neuron in a second layer are shared (e.g., 208). Convolutional neural networks can be well suited to problems in which the spatial location of input is meaningful.

[0043] One type of convolutional neural network is the deep convolutional network (DCN). Figure 2D A detailed example of a DCN 200 designed to recognize visual features from an image 226 input by an image capture device 230 (such as an in-vehicle camera) is provided. The DCN 200 in this example can be trained to identify traffic signs and the numbers provided on them. Of course, the DCN 200 can be trained for other tasks, such as identifying lane markings or traffic lights.

[0044] Supervised learning can be used to train the DCN 200. During training, an image (such as image 226 of a speed limit sign) can be presented to the DCN 200, and then forward passes can be computed to produce output 222. The DCN 200 may include a feature extraction part and a classification part. Upon receiving image 226, convolutional layer 232 may apply a convolutional kernel (not shown) to image 226 to generate a first set of feature maps 218. As an example, the convolutional kernel used for convolutional layer 232 may be a 5x5 kernel that generates a 28x28 feature map. In this example, because four different feature maps are generated in the first set of feature maps 218, four different convolutional kernels are applied to image 226 at convolutional layer 232. Convolutional kernels may also be referred to as filters or convolutional filters.

[0045] The first set of feature maps 218 can be subsampled by a max-pooling layer (not shown) to generate a second set of feature maps 220. The max-pooling layer reduces the size of the first set of feature maps 218. That is, the size of the second set of feature maps 220 (e.g., 14x14) is smaller than the size of the first set of feature maps 218 (e.g., 28x28). The reduced size provides similar information to subsequent layers while reducing memory consumption. The second set of feature maps 220 can be further convolved via one or more subsequent convolutional layers (not shown) to generate one or more subsequent sets of feature maps (not shown).

[0046] exist Figure 2D In the example, the second set of feature maps 220 can be convolved to generate a first feature vector 224. Furthermore, the first feature vector 224 can be further convolved to generate a second feature vector 228. Each feature of the second feature vector 228 can include a number corresponding to a possible feature of the image 226, such as "sign", "60", and "100". A softmax function (not shown) can convert the numbers in the second feature vector 228 into probabilities. Thus, the output 222 of the DCN 200 can be the probability that the image 226 includes one or more features.

[0047] In this example, the probabilities in output 222 for "sign" and "60" are higher than the probabilities of other numbers in output 222, such as "30," "40," "50," "70," "80," "90," and "100." Prior to training, the output 222 produced by DCN 200 can be incorrect. Thus, an error between output 222 and a target output can be computed. The target output can be the true values of image 226 (e.g., "sign" and "60"). The weights of DCN 200 can then be adjusted so that the output 222 of DCN 200 can be more closely aligned with the target output.

[0048] To adjust the weights, a learning algorithm can compute a gradient vector for the weights. The gradient can indicate the amount by which the error will increase or decrease if the weights are adjusted. At the top level, the gradient can directly correspond to the value of the weight connecting the activation neuron in the second-to-last layer and the neuron in the output layer. In lower levels, the gradient can depend on the value of the weight and the computed error gradient of the higher level. The weight can then be adjusted to reduce the error. This way of adjusting the weights can be referred to as "backpropagation" because it involves a "backward pass" through the neural network.

[0049] In practice, the error gradient for the weights can be computed over a small number of examples so that the computed gradient approximates the true error gradient. This approximation method can be referred to as "stochastic gradient descent." Stochastic gradient descent can be repeated until the achievable error rate for the entire system stops decreasing or until the error rate reaches a target level. After learning, DCN 200 can be presented with new images and a forward pass through DCN 200 can produce an output 222 that can be considered an inference or prediction of DCN 200.

[0050] A deep belief network (DBN) is a probabilistic model that includes multiple layers of hidden nodes. A DBN can be used to extract a hierarchical representation of a training dataset. A DBN can be obtained by stacking layers of restricted Boltzmann machines (RBMs). An RBM is a type of artificial neural network that can learn a probability distribution over a set of inputs. Because an RBM can learn a probability distribution without information about the class to which each input should be classified, RBMs are often used for unsupervised learning. Using a mixed paradigm of supervised and unsupervised learning, the bottom RBMs of a DBN can be trained in an unsupervised manner and can be used as feature extractors, while the top RBMs can be trained in a supervised manner (on the joint distribution of inputs from the previous layer and target classes) and can be used as classifiers.

[0051] DCNs are networks of convolutional networks configured with additional pooling and normalization layers. DCNs have achieved state-of-the-art performance on many tasks. DCNs can be trained using supervised learning, where both input and output targets are known for many examples and used to modify the weights of the network by using a gradient descent method.

[0052] DCNs can be feedforward networks. In addition, as described above, connections from neurons in a first layer of a DCN to a group of neurons in a next higher layer are shared across the neurons in the first layer. The feedforward and shared connections of a DCN can be used for fast processing. For example, the computational burden of a DCN can be much less than that of a similar sized neural network that includes recurrent or feedback connections.

[0053] The processing of each layer of a convolutional network can be thought of as a spatially invariant template or basis projection. If the input is first decomposed into multiple channels, such as the red, green, and blue channels of a color image, then a convolutional network trained on that input can be thought of as three-dimensional, with two spatial dimensions along the axes of the image and a third dimension capturing color information. The output of a convolutional connection can be viewed as forming a feature map in the next layer, where each element in the feature map (e.g., 220) receives input from a range of neurons in the previous layer (e.g., feature map 218) and from each of the multiple channels. The values in the feature map can be further processed with a nonlinearity, such as a rectification, max(0,x). Values from neighboring neurons can be further pooled, which corresponds to downsampling, and can provide additional local invariance and dimensionality reduction. Normalization, corresponding to whitening, can also be applied through lateral inhibition between neurons in the feature map.

[0054] Figure 3 is a block diagram illustrating a DCN 350. The DCN 350 can include multiple different types of layers based on connectivity and weight sharing. As shown, the DCN 350 includes convolutional blocks 354A, 354B. Each of the convolutional blocks 354A, 354B can be configured with a convolutional layer (CONV) 356, a normalization layer (LNorm) 358, and a max pooling layer (MAX POOL) 360. Figure 3

[0055] Although only two of the convolutional blocks 354A, 354B are shown, the present disclosure is not limited thereto, but rather any number of convolutional blocks 354A, 354B can be included in the DCN 350 according to design preference.

[0056] ​The convolutional layer 356 can include one or more convolutional filters that can be applied to the input data to generate a feature map. The normalization layer 358 can normalize the output of the convolutional filters. For example, the normalization layer 358 can provide whitening or lateral inhibition. The max pooling layer 360 can provide spatially down-sampling aggregation to achieve local invariance and dimensionality reduction.

[0057] The example parallel filter bank of the DCN can be loaded on the CPU 102 or GPU 104 of the SOC 100 (e.g., Figure 1 ) to achieve high performance and low power consumption. In alternative embodiments, the parallel filter bank can be loaded onto the DSP 106 or ISP 116 of the SOC 100. Additionally, the DCN 350 can access other processing blocks that can be present on the SOC 100, such as the sensor processor 114 and navigation module 120 that are dedicated to sensors and navigation, respectively.

[0058] The DCN 350 can also include one or more fully connected layers 362 (FC1 and FC2). The DCN 350 can also include a logistic regression (LR) layer 364. Between each layer 356, 358, 360, 362, 364 of the DCN 350 are weights (not shown) to be updated. The output of each of the layers (e.g., 356, 358, 360, 362, 364) can be used as input to a subsequent one of the layers (e.g., 356, 358, 360, 362, 364) in the DCN 350 to learn hierarchical feature representations from the input data 352 (e.g., images, audio, video, sensor data, and / or other input data) supplied at the first convolutional block in the convolutional block 354A. The output of the DCN 350 is a classification score 366 of the input data 352. The classification score 366 can be a set of probabilities, where each probability is a probability that the input data includes a feature in a set of features.

[0059] Figure 4 is a block diagram of an example software architecture 400 that can modularize artificial intelligence (AI) functionality. Using the architecture 400, according to aspects of the present disclosure, various processing blocks (e.g., CPU 422, DSP 424, GPU 426, and / or NPU 428) of a SOC 420 (which can be similar to the SOC 100 of Figure 1 ) can be designed to support applications that implement prediction modeling with soft per-example invariance through probabilistic modeling for AI applications 402. The architecture 400 can be included, for example, in a computing device such as a smartphone.

[0060] The AI application 402 can be configured to invoke functionality defined in the user space 404, which can for example provide detection and recognition of a scene indicative of a location at which the computing device (including the architecture 400) is currently operating. For example, the AI application 402 can configure microphones and cameras differently depending on whether the identified scene is an office, a lecture hall, a restaurant, or an outdoor environment such as a lake. The AI application 402 can make a request for compiled program code associated with a library defined in an AI function application programming interface (API) 406. The request can ultimately rely on an output of a deep neural network configured to provide an inference response based on, for example, video and positioning data.

[0061] The runtime engine 408 (which can be compiled code of a runtime framework) can further be accessible by the AI application 402. The AI application 402 can cause the runtime engine 408 to request an inference, for example at a particular time interval or by an event trigger detected by a user interface of the application 402. In causing the runtime engine 408 to provide an inference response, the runtime engine can in turn communicate a signal to an operating system (such as a kernel 412) in an operating system (OS) space 410 running on a SOC 420. In some examples, the kernel 412 can be a LINUX kernel. The operating system can in turn cause continuous quantization relaxation to be performed on a CPU 422, a DSP 424, a GPU 426, an NPU 428, or some combination thereof. The CPU 422 can be directly accessible by the operating system, while the other processing blocks can be accessed through drivers (such as drivers 414, 416, or 418 for the DSP 424, GPU 426, or NPU 428, respectively). In an example example, a deep neural network can be configured to run on a combination of processing blocks such as the CPU 422, DSP 424, and GPU 426, or can run on the NPU 428.

[0062] As described, aspects of the present disclosure relate to implementing a predictive model with soft per-example invariance through probabilistic modeling.

[0063] Figure 5 is a diagram illustrating an example graph model 500 for embedding soft per-example invariance in accordance with various aspects of the present disclosure. Referring to Figure 5 , the graph model 500 takes a label y 502. The graph model 500 can generate an object 504 in canonical position. The graph model 500 can sample a perturbation 506 to generate an observation x 508. For example, the observation x 508 can be an image. The perturbation can for example be a rotation, a change in pixel values (e.g., intensities), a shear (e.g., a transformation that tilts the shape of an object in the image), an affine augmentation, or other transformation of the observation x 508 (e.g., image).

[0064] According to aspects of the present disclosure, a probabilistic model for prediction can be given by:

[0065]

[0066] where is the expectation (expected value), and det is the determinant of the Jacobian of the transformation. In Equation 1, the model can estimate a label y from an unperturbed image, which can be weighted by how well the unperturbed image matches the canonical prototype, e.g., using an ANN. That is, for a given input x, the model can determine an inverse transformation to a set of possible transformations. By adding a generative model of canonical images, and taking a weighted average of the estimated labels, the model can embed example-dependent soft invariance. In doing so, the model can bring back the canonical form, from which inferences can be generated.

[0067] Using Equation 1, small perturbations can be embedded into a model of the data generation process, e.g., a probabilistic model, and this structure can thus be imposed on an ANN model, such that a level of invariance can be achieved. That is, the formulation of Equation 1 can embed per-example invariance into the model, because for a given input x, only augmentations (e.g., perturbations 506) can be considered that have higher probability under the density model for the canonical space. For example, if the input x is the digit "9," the image is rotated for that digit and thus resembles the digit "6," the weighted prediction term may indicate a lower probability for the class y, such that the probability of selecting this orientation can likewise be small.

[0068] A soft per-example invariance model can be trained by optimizing the conditional probability, e.g., the probability of a label y given an input x, p Y|X (y | x). The soft per-example invariance model can also be trained by maximizing the joint probability, specifically as follows:

[0069]

[0070] In various aspects, the soft per-example invariance model can be implemented, e.g., using a variational autoencoder or using an energy model. For example, by using an energy-based joint model, a single neural network can be employed to model and .

[0071] An approximate encoder may also be employed, where q corresponds to a parameterized distribution. In this example, the approximate encoder q can take an input x, and can generate parameters Accordingly, the soft per-example invariance model can be trained jointly using the evidence lower bound (ELBO). The ELBO is a lower bound on the log-likelihood of the observed data that enables the soft per-example invariance model to be trained using gradient-based techniques.

[0072] Figure 6A and Figure 6B are radial plots illustrating a comparison of classification using the conventional model 600 and classification using the example soft per-example invariance model 650 according to various aspects of the present disclosure, respectively. As shown in Figure 6A when presented with various rotational variability of the image 602 of the canonical "9", the conventional model 600 generates several different classifications (e.g., 606a-606g) with the highest probability. For example, if the image 602 of the canonical "9" is rotated 50 degrees, the model generates the classification of the input (e.g., 606f) as "7". If the image 602 of the canonical "9" is rotated 110 degrees, the conventional model generates the classification of the input (e.g., 606e) as "1". Further, if the image 602 of the canonical "9" is rotated between 270 and 315 degrees, the conventional model generates the classification of the input (e.g., 606b) as "2". Likewise, when presented with various rotational variability of the image 604 of the canonical "1", the conventional model 600 generates several different classifications (e.g., 608a-608g) with the highest probability.

[0073] On the other hand, referring to Figure 6B when presented with various rotational variability of the image 602 of the canonical "9", the example soft per-example invariance model 650 primarily indicates two different classifications (652a and 652b) with the highest probability. For example, if the image 602 of the canonical "9" is rotated between 45 and -110 degrees, the model generates the classification of the input (e.g., 652a) as "9". Otherwise, the soft per-example invariance model 650 generates the classification of the input (e.g., 652b) as "6". Similarly, when presented with the image 604 of the canonical "1", the example soft per-example invariance model 650 generates the classification of the input (e.g., 654) as "1" for all rotational variability.

[0074] Figure 7 is a flowchart illustrating a processor-implemented method 700 for soft per-example invariance according to various aspects of the present disclosure. For example, the processor-implemented method 700 can be performed by one or more processors, such as a CPU (e.g., 102, 422), a GPU (e.g., 104, 426), and / or other processing units (e.g., DSP 106, 424 or NPU 108, 428). In some aspects, the processor-implemented method 700 can be implemented using an artificial neural network (ANN).

[0075] As Figure 7 shown, at block 702, an ANN receives an input. The ANN can include, for example, a variational autoencoder or an energy model. The input can include, for example, an image.

[0076] At block 704, the ANN selectively performs a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations. For example, as described with respect to the model of Equation 1, for a given input x, the model can determine an inverse transformation to a set of possible transformations. The transformations can include, for example, a rotation of the input x (e.g., an image), a change in pixel values (e.g., intensities) of the input x, a shearing of an appearance of the input x, an affine augmentation, or other transformations.

[0077] At block 706, the ANN generates an inference based on the reconstructed input. For example, as described in Equation 1, the model can predict (e.g., with an ANN) a label y from the unperturbed image that is weighted by how well the unperturbed image matches a canonical prototype.

[0078] Implementation examples are described in the following numbered clauses:

[0079] 1. A processor-implemented method performed by one or more processors, the processor-implemented method comprising:

[0080] receiving, by an artificial neural network (ANN), an input;

[0081] selectively performing, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations; and

[0082] generating, by the ANN, an inference based on the reconstructed input.

[0083] 2. The processor-implemented method of clause 1, wherein the transformation is selectively performed based on a weighted average of estimated labels for the input.

[0084] 3. The processor-implemented method of clause 1 or 2, wherein the input is an image.

[0085] 4. The processor-implemented method of any of clauses 1-3, wherein the transformation on the input is selectively performed based on a weighted estimate of how well the image matches a canonical example.

[0086] 5. The processor-implemented method of any of clauses 1-4, wherein the ANN includes one of an energy model or a variational autoencoder.

[0087] 6. The processor-implemented method according to any one of clauses 1 to 5, the processor-implemented method further comprising training the ANN according to an optimization process based on conditional probabilities.

[0088] 7. A method implemented by a processor according to any one of Clauses 1 to 6, wherein the ANN learns device-specific transformations to align data at different user devices.

[0089] 8. An apparatus comprising:

[0090] At least one memory; and

[0091] At least one processor, said at least one processor being coupled to said at least one memory, said at least one

[0092] The processor is configured as follows:

[0093] Input is received by an artificial neural network (ANN);

[0094] The ANN selectively performs transformations on the input to generate reconstructed inputs that are invariant to a subset of the transformation set; and

[0095] The ANN generates inferences based on the reconstructed input.

[0096] 9. The apparatus according to Clause 8, wherein the transformation is selectively performed based on a weighted average of estimated labels of the input.

[0097] 10. The apparatus according to clause 8 or 9, wherein the input is an image.

[0098] 11. The apparatus according to any one of clauses 8 to 10, wherein the transformation of the input is selectively performed based on a weighted estimate of the degree to which the image matches a canonical example.

[0099] 12. The apparatus according to any one of clauses 8 to 11, wherein the ANN comprises either an energy model or a variational autoencoder.

[0100] 13. The apparatus according to any one of clauses 8 to 12, wherein the at least one processor is further configured to train the ANN according to an optimization process based on conditional probability.

[0101] 14. The apparatus according to any one of clauses 8 to 13, wherein the ANN learns device-specific transformations to align data at different user devices.

[0102] 15. A non-transitory computer-readable medium having program code recorded thereon, the program code being executed by one or more processors and comprising:

[0103] program code for receiving, by an artificial neural network (ANN), an input;

[0104] program code for selectively performing, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations; and

[0105] program code for generating, by the ANN, an inference based on the reconstructed input.

[0106] 16. The non-transitory computer-readable medium of clause 15, wherein the transformation is selectively performed based on a weighted average of estimated labels for the input.

[0107] 17. The non-transitory computer-readable medium of clause 15 or 16, wherein the input is an image.

[0108] 18. The non-transitory computer-readable medium of any of clauses 15-17, wherein the transformation on the input is selectively performed based on a weighted estimate of how well the image matches canonical examples.

[0109] 19. The non-transitory computer-readable medium of any of clauses 15-18, wherein the ANN comprises one of an energy model or a variational autoencoder.

[0110] 20. The non-transitory computer-readable medium of any of clauses 15-19, wherein the program code further comprises program code for training the ANN according to an optimization procedure based on conditional probabilities.

[0111] 21. The non-transitory computer-readable medium of any of clauses 15-20, wherein the ANN learns device-specific transformations to align data at different user devices.

[0112] 22. An apparatus comprising:

[0113] means for receiving, by an artificial neural network (ANN), an input;

[0114] means for selectively performing, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations; and

[0115] means for generating, by the ANN, an inference based on the reconstructed input.

[0116] 23. The apparatus of clause 22, wherein the transformation is selectively performed based on a weighted average of estimated labels for the input.

[0117] 24. The apparatus of clause 22 or 23, wherein the input is an image.

[0118] 25. The apparatus of any one of clauses 22-24, wherein the transformation of the input is selectively performed based on a weighted estimate of how well the image matches a canonical example.

[0119] 26. The apparatus of any one of clauses 22-25, wherein the ANN comprises one of an energy model or a variational autoencoder.

[0120] 27. The apparatus of any one of clauses 22-26, further comprising means for training the ANN according to an optimization procedure based on conditional probabilities.

[0121] 28. The apparatus of any one of clauses 22-27, wherein the ANN learns device-specific transformations to align data at different user devices.

[0122] In one aspect, the receiving component, the performing component, and / or the generating component can be the CPU 102, the GPU 104, the NPU 108, a program memory associated with the CPU 102, the GPU 104, or the NPU 108, the fully connected layer 362, the NPU 428, and or the routing connection processing unit 216 configured to perform the recited functions. In another configuration, the aforementioned components can be any modules or any means for performing the functions recited by the aforementioned components.

[0123] The various operations of methods described above can be performed by any suitable component of any suitable device. The components can include various hardware and / or software components such as a circuit, an application specific integrated circuit (ASIC), or processor. Generally, where there are operations illustrated in figures, those operations can have corresponding counterpart means-plus-function components with similar numbering.

[0124] As used, the term “determining” encompasses a wide variety of actions. For example, “determining” can include calculating, computing, processing, deriving, investigating, looking up (e.g., looking up in a table, a database or another data structure), ascertaining and the like. Additionally, “determining” can include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory) and the like. Furthermore, “determining” can include resolving, selecting, choosing, establishing and the like.

[0125] As used, the phrase “at least one of” a list of items refers to any combination of one or more of those items. As an example, “at least one of a, b, or c” is intended to cover a, b, c, a-b, a-c, b-c, and a-b-c.

[0126] The various illustrative logical blocks, modules, and circuits described in connection with the disclosure can be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device (PLD), discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor can be a microprocessor, but in the alternative, the processor can be any commercially available processor, controller, microcontroller, or state machine. A processor can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.

[0127] The steps of a method or algorithm described in connection with the disclosure can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in any form of storage medium that is known in the art. Some examples of storage media that can be used include random access memory (RAM), read only memory (ROM), flash memory, erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), registers, a hard disk, a removable disk, a CD-ROM, and so forth. A software module can comprise a single instruction, or many instructions, and can be distributed over several different code segments, across several programs, and across several storage media. A storage medium can be coupled to a processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium can be integral to the processor.

[0128] The disclosed methods include one or more steps or actions for achieving the described method. The steps and / or actions of a method can be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of steps or actions is specified, the order and / or use of specific steps and / or actions can be modified without departing from the scope of the claims.

[0129] The described functions can be implemented in hardware, software, firmware, or any combination thereof. If implemented in hardware, an example hardware configuration can include a processing system in a device. The processing system can be implemented with a bus architecture. The bus can include any number of interconnecting buses and bridges depending on the specific application of the processing system and the overall design constraints. The bus can link together various circuits including processors, machine-readable media, and buses. Bus interfaces can be used to connect network adapters and the like to the processing system via the bus. Network adapters can be utilized to implement signal processing functionality. For certain aspects, a user interface (e.g., keypad, displays, mouse, joystick, etc.) can also be connected to the bus. The bus can also link various other circuits such as timing sources, peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be further described.

[0130] The processor can be responsible for managing the bus and general processing, including the execution of software stored on the machine-readable media. The processor can be implemented with one or more general-purpose processors and / or special-purpose processors. Examples include microprocessors, microcontrollers, DSP processors, and other circuitry that can execute software. Software shall be construed broadly to mean instructions, data, or any combination thereof, whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. Machine-readable media can include, by way of example, random access memory (RAM), flash memory, read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, magnetic disks, optical disks, hard drives, or any other suitable storage medium, or any combination thereof. The machine-readable media can be embodied in a computer- program product. The computer-program product can comprise packaging materials.

[0131] In a hardware implementation, the machine-readable media can be part of the processing system separate from the processor. However, as those skilled in the art will appreciate, the machine-readable media, or any portion thereof, can be external to the processing system. By way of example, the machine-readable media can include a transmission line, a carrier wave modulated by data, and / or a computer product separate from the processing system, all

[0132] The processing system can be configured as a general -purpose processing system with one or more microprocessors and external memory providing processor functionality and at least a portion of machine-readable media, all linked together with other supporting circuitry through an external bus architecture. Alternatively, the processing system can include one or more neuromorphic processors for implementing the described neuron models and nervous system models. As another alternative, the processing system can be implemented with application specific integrated circuits (ASICs) that include the processor, bus interface, user interface, supporting circuitry, and at least a portion of machine-readable media integrated into a single chip, or one or more field programmable gate arrays (FPGAs), programmable logic devices (PLDs), controllers, state machines, gated logic, discrete hardware components, or any other suitable circuitry, or any combination of circuitry that can perform the various functionality described throughout the present disclosure. Those skilled in the art will recognize how best to implement the described functionality for the processing system, depending on the particular application and general design constraints imposed on the overall system.

[0133] The machine-readable media can include a number of software modules. The software modules include instructions that, when executed by the processor, cause the processing system to perform various functions. The software modules can include a transmission module and a receiving module. Each software module can reside in a single storage device or be distributed across multiple storage devices. By way of example, a software module can be loaded into RAM from the hard drive when a triggering event occurs. During execution of the software module, the processor can load some of the instructions into cache to increase access speed. One or more cache lines can then be loaded into a general register file for execution by the processor. When referring to the functionality of a software module below, it will be understood that such functionality is implemented by the processor when executing instructions from that software module. Furthermore, it should be appreciated that aspects of the present disclosure result in improvements to the functionality of the processor, computer, machine, or other system implementing such aspects.

[0134] If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media include both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media can be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray® disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Thus, in some aspects computer readable medium can comprise non-transitory computer readable medium (e.g., tangible media). In addition, for other aspects computer readable medium can comprise transitory computer readable medium (e.g., signals). Combinations of the above should also be included within the scope of computer readable media.

[0135] Thus, certain aspects can comprise a computer program product for presenting operations. For example, such a computer program product can comprise a computer-readable medium having instructions stored thereon (and / or encoded therein), the instructions being executable by one or more processors to

[0136] For example, such a device can be coupled to a server to facilitate the transfer of means for performing the described techniques. Alternatively, various methods can be provided via storage means (e.g., RAM, ROM, a physical storage medium such as a compact disc (CD) or floppy disk, etc.), such that a user terminal and / or base station can obtain the various methods upon coupling or providing the storage means to the device. Moreover, any other suitable technique for providing the

[0137] ​It should be understood that the claims are not limited to the precise arrangements and components exemplified above. Various modifications, changes and variations can be made in the arrangement, operation and details of the methods and apparatus described above without departing from the scope of the claims.

Claims

1. A processor-implemented method performed by one or more processors, the processor-implemented method comprising: receiving, by an artificial neural network (ANN), an input; selectively performing, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations; and generating, by the ANN, an inference based on the reconstructed input.

2. The processor-implemented method of claim 1, wherein the transformation is selectively performed based on a weighted average of estimated labels for the input.

3. The processor-implemented method of claim 1, wherein the input is an image.

4. The processor-implemented method of claim 3, wherein the transformation on the input is selectively performed based on a weighted estimate of how well the image matches canonical examples.

5. The processor-implemented method of claim 1, wherein the ANN comprises one of an energy model or a variational autoencoder.

6. The processor-implemented method of claim 1, further comprising training the ANN according to an optimization procedure based on conditional probabilities.

7. The processor-implemented method of claim 1, wherein the ANN learns device-specific transformations to align data at different user devices.

8. An apparatus, the apparatus comprising: at least one memory; and at least one processor coupled to the at least one memory, the at least one processor configured to: receive, by an artificial neural network (ANN), an input; selectively perform, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations; and generate, by the ANN, an inference based on the reconstructed input.

9. The apparatus of claim 8, wherein the transformation is selectively performed based on a weighted average of estimated labels for the input.

10. The apparatus of claim 8, wherein the input is an image.

11. The apparatus of claim 10, wherein the transformation on the input is selectively performed based on a weighted estimate of how well the image matches canonical examples.

12. The apparatus of claim 8, wherein the ANN comprises one of an energy model or a variational autoencoder.

13. The apparatus of claim 8, wherein the at least one processor is further configured to train the ANN according to an optimization procedure based on conditional probabilities.

14. The apparatus of claim 8, wherein the ANN learns device-specific transformations to align data at different user devices.

15. A non-transitory computer-readable medium having program code recorded thereon, the program code executed by one or more processors and comprising: program code to receive, by an artificial neural network (ANN), an input; program code to selectively perform, by the ANN, a transformation on the input to generate a reconstructed input that is invariant to a subset of a set of transformations; and program code to generate, by the ANN, an inference based on the reconstructed input.

16. The non-transitory computer readable medium of claim 15, wherein the transformation is selectively performed based on a weighted average of estimated labels for the input.

17. The non-transitory computer readable medium of claim 15, wherein the input is an image.

18. The non-transitory computer readable medium of claim 17, wherein the transformation of the input is selectively performed based on a weighted estimate of how well the image matches canonical examples.

19. The non-transitory computer readable medium of claim 15, wherein the ANN comprises one of an energy model or a variational autoencoder.

20. The non-transitory computer readable medium of claim 15, wherein the program code further comprises program code for training the ANN according to an optimization procedure based on conditional probabilities.

21. The non-transitory computer readable medium of claim 15, wherein the ANN learns device-specific transformations to align data at different user devices.

22. An apparatus, the apparatus comprising: means for receiving, by an artificial neural network (ANN), an input; means for selectively performing, by the ANN, a transformation of the input to generate a reconstructed input that is invariant to a subset of a set of transformations; and means for generating, by the ANN, an inference based on the reconstructed input.

23. The apparatus of claim 22, wherein the transformation is selectively performed based on a weighted average of estimated labels for the input.

24. The apparatus of claim 22, wherein the input is an image.

25. The apparatus of claim 24, wherein the transformation of the input is selectively performed based on a weighted estimate of how well the image matches canonical examples.

26. The apparatus of claim 22, wherein the ANN comprises one of an energy model or a variational autoencoder.

27. The apparatus of claim 22, the apparatus further comprising means for training the ANN according to an optimization procedure based on conditional probabilities.

28. The apparatus of claim 22, wherein the ANN learns device-specific transformations to align data at different user devices.