Energy saving anomaly detection and inference on embedded systems

The potential representation is extracted through artificial neural network and the reconstruction error is calculated, which solves the classification bias and low performance problems caused by imbalanced data in unlabeled data, realizes effective detection of out-of-distributed data, and improves fields such as autonomous driving and medical diagnosis. decision accuracy.

CN118891633APending Publication Date: 2024-11-01QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280093601.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

In the process of unlabeled data, especially in areas such as autonomous driving and medical diagnosis, there are classification bias and low machine learning performance problems caused by imbalanced data, and it is difficult to detect out-of-distributed data, resulting in potential wrong decision-making and health risks. .

Method used

Artificial neural network (ANN) is used to extract potential representations of input data and generate reconstructions, calculate the comparison of reconstruction errors with predefined thresholds, and determine whether the data is out of distribution data, thereby detecting abnormalities.

Benefits of technology

Effectively detect and identify out-of-distributed data, reduce wrong decisions, improve machine learning performance, especially in an unbalanced data environment, and enhance sensitivity and accuracy to abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118891633A_ABST
    Figure CN118891633A_ABST
Patent Text Reader

Abstract

A method of anomaly detection and power saving inference determination includes receiving an input. An artificial neural network (ANN) is used to extract a set of features of the input to generate a potential representation of the input. A reconstruction of the input is generated using the ANN based on the potential representation. A reconstruction error is calculated based on the generated reconstruction and the input. The reconstruction error is compared to a predefined threshold to determine whether the data is in-distribution data or out-of-distribution data. An anomaly is detected in response to the out-of-distribution determination. The potential representation is provided to a decision model in response to the input being determined as in-distribution data. The decision model then computes an inference based on the potential representation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Aspects of the present disclosure generally relate to neural networks. Background Art

[0002] An artificial neural network may include an interconnected group of artificial neurons (e.g., a neuron model). An artificial neural network may be a computing device or represented as a method performed by a computing device. A convolutional neural network is a feedforward artificial neural network. A convolutional neural network may include a collection of neurons, each of which has a receptive field and collectively spells out an input space. Convolutional neural networks (CNNs), such as deep convolutional neural networks (DCNs), have numerous applications. Specifically, these neural network architectures are used in various technologies, such as image recognition, pattern recognition, speech recognition, autonomous driving, and other classification tasks. Summary of the invention

[0003] The present disclosure is set out in the independent claims respectively. Some aspects of the present disclosure are described in the dependent claims.

[0004] In one aspect of the present disclosure, a method for anomaly detection and inference is provided. The method includes: receiving an input. The method also includes: using an artificial neural network (ANN) to extract a set of features of the input to generate a potential representation of the input. In addition, the method includes: using the ANN to generate a reconstruction of the input based on the potential representation. In addition, the method includes: determining a reconstruction error based on the generated reconstruction and the input. The method also includes: determining whether the input includes in-distribution data or out-of-distribution data based on a comparison of the reconstruction error with a predefined threshold. In addition, the method includes: detecting an anomaly in response to the input being determined to include out-of-distribution data.

[0005] In one aspect of the present disclosure, a device for anomaly detection and inference is provided. The device includes a memory and one or more processors coupled to the memory. The processor is configured to: receive an input. The processor is also configured to: use an artificial neural network (ANN) to extract a set of features of the input to generate a potential representation of the input. In addition, the processor is configured to: use the ANN to generate a reconstruction of the input based on the potential representation. In addition, the processor is configured to: determine a reconstruction error based on the generated reconstruction and the input. The processor is also configured to: determine whether the input includes an anomaly or in-distribution data based on a comparison of the reconstruction error with a predefined threshold. In addition, the processor is configured to: detect an anomaly in response to the input being determined to include out-of-distribution data.

[0006] In one aspect of the present disclosure, a device for anomaly detection and inference is provided. The device includes: a component for receiving an input. The device also includes: a component for using an artificial neural network (ANN) to extract a set of features of the input to generate a potential representation of the input. In addition, the device includes: a component for using the ANN to generate a reconstruction of the input based on the potential representation. In addition, the device includes: a component for determining a reconstruction error based on the generated reconstruction and the input. The device also includes: a component for determining whether the input includes an anomaly or in-distribution data based on a comparison of the reconstruction error with a predefined threshold. In addition, the device includes: a component for detecting an anomaly in response to the input being determined to include out-of-distribution data.

[0007] In one aspect of the present disclosure, a non-transitory computer-readable medium is provided. The computer-readable medium is encoded with program code for anomaly detection and inference. The program code is executed by a processor and includes code for receiving an input. The program code also includes: code for using an artificial neural network (ANN) to extract a set of features of the input to generate a potential representation of the input. In addition, the program code includes: code for using the ANN to generate a reconstruction of the input based on the potential representation. In addition, the program code includes: code for determining a reconstruction error based on the generated reconstruction and the input. The program code also includes: code for determining whether the input includes an anomaly or in-distribution data based on a comparison of the reconstruction error with a predefined threshold. In addition, the program code includes: code for detecting an anomaly in response to the input being determined to include out-of-distribution data.

[0008] The features and technical advantages of examples according to the present disclosure have been outlined quite broadly above so that the following specific embodiments may be better understood. Additional features and advantages will be described. The disclosed concepts and specific examples may be easily used as a basis for modifying or designing other structures for achieving the same purpose of the present disclosure. Such equivalent constructions do not depart from the scope of protection of the appended claims. The characteristics of the disclosed concepts, both in terms of their organization and method of operation, and the associated advantages will be better understood by considering the following description in conjunction with the accompanying drawings. Each of the drawings is provided for the purpose of illustration and description and not as a definition of the limitations of the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The features, nature and advantages of the present disclosure will become more apparent when the detailed description set forth below is read in conjunction with the accompanying drawings, in which like reference numerals are correspondingly identified throughout.

[0010] Figure 1 An example implementation of designing a neural network using a system on a chip (SOC) including a general-purpose processor in accordance with certain aspects of the present disclosure is illustrated.

[0011] Figure 2A , Figure 2B and Figure 2C is a diagram illustrating a neural network according to aspects of the present disclosure.

[0012] Figure 2D is a diagram illustrating an exemplary deep convolutional network (DCN) according to aspects of the present disclosure.

[0013] Figure 3 is a block diagram illustrating an exemplary deep convolutional network (DCN) according to aspects of the present disclosure.

[0014] Figure 4 is a block diagram illustrating an exemplary software architecture that can modularize artificial intelligence (AI) functionality according to aspects of the present disclosure.

[0015] Figure 5 is a diagram illustrating an example architecture for anomaly detection and decision models in accordance with aspects of the present disclosure.

[0016] Figure 6 is a diagram illustrating another example architecture for anomaly detection and decision models in accordance with aspects of the present disclosure.

[0017] Figure 7 is a flow chart illustrating a method of abnormality detection and energy saving inference determination according to aspects of the present disclosure. DETAILED DESCRIPTION

[0018] The specific embodiments described below in conjunction with the accompanying drawings are intended as descriptions of various configurations and are not intended to represent the only configurations in which the described concepts can be practiced. In order to provide a comprehensive understanding of the various concepts, the specific embodiments include specific details. However, it is obvious to those skilled in the art that these concepts can be practiced without these specific details. In some cases, in order to avoid blurring such concepts, known structures and components are shown in block diagram form.

[0019] Based on the teachings, those skilled in the art will recognize that the scope of the present disclosure is intended to cover any aspect of the present disclosure, whether the aspect is implemented independently of any other aspect of the present disclosure or implemented in combination with any other aspect. For example, a device or a method can be implemented using any number of aspects described. In addition, the scope of the present disclosure is intended to cover such devices or methods that are practiced using other structures, functionality, or structures and functionality that are supplementary to or different from the various aspects of the present disclosure described. It should be understood that any aspect of the present disclosure disclosed can be embodied by one or more elements of the claims.

[0020] The word “exemplary” is used 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.

[0021] Although specific aspects are described, numerous variations and permutations of these aspects fall within the scope of the present disclosure. Although some benefits and advantages of preferred aspects are mentioned, the scope of the present disclosure is not intended to be limited to specific benefits, uses or purposes. On the contrary, various aspects of the present disclosure are intended to be widely applicable to different technologies, system configurations, networks and protocols, some of which are illustrated by way of example in the accompanying drawings and the following description of preferred aspects. The specific embodiments and drawings are merely illustrative of the present disclosure and are not limiting. The scope of protection of the present disclosure is defined by the appended claims and their equivalent constructions.

[0022] Artificial neural networks are becoming increasingly popular due to their ability to solve complex problems. Artificial neural network architectures are used in a variety of technologies, such as image recognition, pattern recognition, speech recognition, autonomous driving, and other classification tasks. However, for many of these applications, much of the data may be unlabeled. Furthermore, such as in video surveillance systems, unlabeled data may be available in large quantities.

[0023] Large amounts of unlabeled data can pose significant challenges for supervised learning. This is in part because there are a large number of positive examples to learn from, but relatively few anomalous or negative examples. For example, in an autonomous driving system, most of the training data may consist of standard vehicles. However, a neural network model may also be expected to recognize some rarely observed vehicle classes, such as emergency vehicles or objects that are not vehicles (e.g., animals). Therefore, such systems may have unbalanced data.

[0024] Imbalanced data may refer to an unequal distribution of classes in a training data set (e.g., substantially more standard vehicles than emergency vehicles). A classification system with imbalanced data may generate incorrect decisions because the classification may be biased toward standard vehicles. Furthermore, such incorrect decisions may have significant costs. For example, in a fraud detection system, the misidentification of fraudulent transactions may result in significant financial losses and disruption of financial services. In another example, in a medical diagnostic system, classifying an abnormal sinus rhythm as normal may result in undetected heart attacks and significant health consequences.

[0025] Furthermore, machine learning performance can be significantly lower than reported research results. This may be due to the assumption that the test data comes from the same distribution as the training data. However, in practice, such systems may encounter out-of-distribution data. In such cases, the softmax function of the classifier may not provide confidence information for identifying whether the data is in-distribution or out-of-distribution.

[0026] Aspects of the present disclosure relate to anomaly detection. An anomaly refers to an item or event that does not conform to an expected pattern or other items that may not be detected in a data set. According to aspects of the present disclosure, a model can detect test samples outside the distribution. For example, the model can detect whether the test sample is drawn far enough from the training distribution through unlabeled data. The model may also include an autoencoder. The model may determine an anomaly score based on the reconstruction error of the autoencoder. For example, the reconstruction error can be compared to a threshold, and if the reconstruction error exceeds the threshold, an anomaly can be determined. In some aspects, the threshold can be selected from a plurality of thresholds.

[0027] In other aspects, the autoencoder can be implemented with tied weights. That is, the weights of the encoder of the autoencoder can be matched with the weight parameters of the decoder. Since the weights are the same, the memory usage of the autoencoder can be reduced (e.g., halved).

[0028] Furthermore, in some aspects, the encoder can be used as a feature extractor for next-stage decisions among in-distribution data.

[0029] Figure 1 An example implementation of a system on a chip (SOC) 100 according to certain aspects of the present disclosure is illustrated, which may include a central processing unit (CPU) 102 or a multi-core CPU configured to detect anomalies and efficiently determine inferences. Variables (e.g., neural signals and synaptic weights), system parameters associated with a computing device (e.g., a neural network with weights), delays, frequency bin information, and task information may be stored in a memory block associated with a neural processing unit (NPU) 108, a memory block associated with 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 may be distributed across multiple blocks. Instructions executed at CPU 102 may be loaded from a program memory associated with CPU 102, or may be loaded from memory block 118.

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

[0031] SoC 100 may be based on the ARM instruction set. In one aspect of the present disclosure, the instructions loaded into CPU 102 may include code for receiving input. The instructions loaded into CPU 102 may also include code for extracting a set of features of the input using an artificial neural network (ANN) to generate a potential representation of the input. The instructions loaded into CPU 102 may additionally include code for using ANN to generate a reconstruction of the input based on the potential representation. The instructions loaded into CPU 102 may also include code for determining a reconstruction error based on the generated reconstruction and the input. The instructions loaded into CPU 102 may also include code for determining whether the input includes data within the distribution or data outside the distribution based on a comparison of the reconstruction error with a predefined threshold. In addition, the instructions loaded into CPU 102 may include code for detecting an abnormality in response to the input being determined to include data outside the distribution.

[0032] Deep learning architectures can perform object recognition tasks by learning to represent inputs at successively higher levels of abstraction in each layer, thereby building useful feature representations of the input data. In this way, deep learning solves the main bottleneck of traditional machine learning. Before the advent of deep learning, machine learning methods for object recognition problems may rely heavily on human-designed features, possibly in conjunction with shallow classifiers. A shallow classifier can be a two-class linear classifier, for example, in which the weighted sum of feature vector components can be compared to a threshold to predict which class the input belongs to. Human-designed features can be templates or kernels customized for a specific problem domain by engineers with domain expertise. In contrast, while deep learning architectures can learn to represent features similar to those that human engineers might design, they require training. In addition, deep networks can learn to represent and recognize new types of features that humans may not have considered.

[0033] Deep learning architectures can learn hierarchies of features. For example, if presented with visual data, the first layer can learn to recognize relatively simple features in the input stream, such as edges. In another example, if presented with auditory data, the first layer can learn to recognize spectral power in specific frequencies. The second layer, taking the output of the first layer as input, can learn to recognize combinations of features, such as simple shapes for visual data or combinations of sounds for auditory data. For example, higher layers can learn to represent complex shapes in visual data or words in auditory data. Even higher layers can learn to recognize common visual objects or spoken phrases.

[0034] Deep learning architectures can perform particularly well when applied to problems that have a natural hierarchical structure. For example, the 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 levels to recognize cars, trucks, and airplanes.

[0035] Neural networks can be designed to have a variety of connectivity patterns. In a feedforward network, information is passed from a lower layer to a higher layer, where each neuron in a given layer communicates with a neuron in a higher layer. As described above, hierarchical representations can be constructed in successive layers of a feedforward network. Neural networks can also have loops or feedback (also known as top-down) connections. In a loop connection, the output from a neuron in a given layer can be communicated to another neuron in the same layer. The loop architecture can help identify patterns that span more than one input data block in the input data blocks that are sequentially passed to the neural network. The connection from a neuron in a given layer to a neuron in a lower layer is called a feedback (or top-down) connection. When the recognition of a high-level concept can assist in discerning specific low-level features of the input, a network with many feedback connections may be helpful.

[0036] The connections between neural network layers can be fully connected or partially 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 may communicate its output to each neuron in a second layer, such that each neuron in the second layer will receive input from each neuron in the first layer. Figure 2B An example of a locally connected neural network 204 is illustrated. In the locally connected neural network 204, neurons in a first layer may be connected to a limited number of neurons in a second layer. More generally, the locally connected layers of the locally connected neural network 204 may be configured such that each neuron in the layer will have the same or similar connectivity pattern, but the connection strengths may have different values ​​(e.g., 210, 212, 214, and 216). The locally connected connectivity patterns may produce spatially different receptive fields in higher layers because higher layer neurons in a given area may receive input that is tuned through training to properties of a limited portion of the total input to the network.

[0037] An example of a locally connected neural network is a convolutional neural network. Figure 2C An example of a convolutional neural network 206 is illustrated. The convolutional neural network 206 may be configured such that the connection strengths associated with the inputs of each neuron in the second layer are shared (e.g., 208). Convolutional neural networks may be well suited for problems where the spatial location of the inputs is meaningful.

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

[0039] The DCN 200 may be trained by supervised learning. During training, an image (such as an image 226 of a speed limit sign) may be presented to the DCN 200, and a forward pass may then be calculated to produce an output 222. The DCN 200 may include a feature extraction portion and a classification portion. Upon receiving the image 226, a convolutional layer 232 may apply a convolutional kernel (not shown) to the image 226 to generate a first set of feature maps 218. As an example, the convolutional kernel of the 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 the image 226 at the convolutional layer 232. A convolutional kernel may also be referred to as a filter or a convolution filter.

[0040] The first set of feature maps 218 may 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 (such as 14x14) is smaller than the size of the first set of feature maps 218 (such as 28x28). The reduced size provides similar information to subsequent layers while reducing memory consumption. The second set of feature maps 220 may be further convolved via one or more subsequent convolutional layers (not shown) to generate one or more sets of subsequent feature maps (not shown).

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

[0042] In this example, the probability of "logo" and "60" in output 222 is higher than the probability of other numbers (such as "30", "40", "50", "70", "80", "90", and "100") in output 222. Before training, the output 222 generated by DCN 200 may be incorrect. Therefore, the error between the output 222 and the target output can be calculated. The target output is the ground truth of image 226 (e.g., "logo" and "60"). The weights of DCN 200 can then be adjusted so that the output 222 of DCN 200 is closer to the target output.

[0043] To adjust the weights, the learning algorithm may calculate a gradient vector for the weights. The gradient may indicate the amount by which the error will increase or decrease when the weights are adjusted. At the top layer, the gradient may correspond directly to the value of the weights connecting the activated neurons in the penultimate layer and the neurons in the output layer. In lower layers, the gradient may depend on the value of the weights and the calculated error gradients of the higher layers. The weights may then be adjusted to reduce the error. This manner of adjusting weights may be referred to as "backward propagation" because it involves a "backward pass" through the neural network.

[0044] In practice, the error gradient of the weights can be calculated over a small number of examples so that the calculated gradient is close to the true error gradient. This approximation method may be referred to as stochastic gradient descent. Stochastic gradient descent may be repeated until the achievable error rate of the entire system stops decreasing or until the error rate reaches a target level. After learning, a new image (e.g., a speed limit sign of image 226) may be presented to the DCN, and a forward pass through the network may produce output 222, which may be considered an inference or prediction of the DCN.

[0045] 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). RBMs are a type of artificial neural network that can learn a probability distribution over a set of inputs. Because RBMs can learn probability distributions without information about the category to which each input should be classified, RBMs are often used for unsupervised learning. Using a hybrid unsupervised and supervised paradigm, the bottom RBM of a DBN can be trained in an unsupervised manner and can be used as a feature extractor, while the top RBM can be trained in a supervised manner (on the joint distribution of inputs from the previous layer and the target category) and can be used as a classifier.

[0046] A deep convolutional network (DCN) is a network that is a convolutional network 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 the input and output targets are known for many examples and are used to modify the weights of the network by using a gradient descent method.

[0047] The DCN may be a feed-forward network. In addition, as described above, the connections from a neuron in the first layer of the DCN to a set of neurons in the next higher layer are shared across the neurons in the first layer. The feed-forward and shared connections of the DCN may be used for fast processing. For example, the computational burden of the DCN may be much smaller than that of a similarly sized neural network that includes loops or feedback connections.

[0048] The processing of each layer of the 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 the convolutional network trained on this input can be thought of as three-dimensional, where two spatial dimensions are along the axes of the image and the third dimension captures color information. The output of the convolutional connection can be thought of as forming a feature map in a subsequent layer, each element in which 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 nonlinearities (such as rectification, max(0,x)). The 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 by lateral inhibition between neurons in the feature map.

[0049] The performance of deep learning architectures can increase as more labeled data points become available or as computing power increases. Modern deep neural networks are often trained with computing resources that are thousands of times greater than what was available to a typical researcher just fifteen years ago. New architectures and training paradigms can further improve the performance of deep learning. Rectified linear units can reduce the training problem known as vanishing gradients. New training techniques can reduce overfitting, allowing larger models to achieve better generalization. Encapsulation techniques can extract data within a given receptive field and further improve overall performance.

[0050] Figure 3 is a block diagram illustrating a deep convolutional network 350. Based on connectivity and weight sharing, the deep convolutional network 350 may include multiple different types of layers. Figure 3As shown, the deep convolution network 350 includes convolution blocks 354A and 354B. Each of the convolution blocks 354A and 354B may be configured with a convolution layer (CONV) 356, a normalization layer (LNorm) 358, and a maximum pooling layer (MAX POOL) 360.

[0051] The convolution layer 356 may include one or more convolution filters that may be applied to the input data to generate a feature map. Although only two convolution blocks 354A, 354B are shown, the present disclosure is not limited thereto, but instead, any number of convolution blocks 354A, 354B may be included in the deep convolution network 350 according to design preferences. The normalization layer 358 may normalize the output of the convolution filter. For example, the normalization layer 358 may provide whitening or lateral suppression. The maximum pooling layer 360 may provide spatial downsampling aggregation to achieve local invariance and dimensionality reduction.

[0052] For example, the parallel filter bank of the deep convolutional network may be loaded onto the CPU 102 or GPU 104 of the SOC 100 to achieve high performance and low power consumption. In an alternative embodiment, the parallel filter bank may be loaded onto the DSP 106 or ISP 116 of the SOC 100. In addition, the deep convolutional network 350 may access other processing blocks that may be present on the SOC 100, such as the sensor processor 114 and the navigation module 120 dedicated to sensors and navigation, respectively.

[0053] The deep convolutional network 350 may also include one or more fully connected layers 362 (FC1 and FC2). The deep convolutional network 350 may also include a logistic regression (LR) layer 364. There are weights (not shown) to be updated between each layer 356, 358, 360, 362, 364 of the deep convolutional network 350. The output of each of these layers (e.g., 356, 358, 360, 362, 364) can be used as an input to a subsequent layer of these layers (e.g., 356, 358, 360, 362, 364) in the deep convolutional network 350 to learn a hierarchical feature representation from the input data 352 (e.g., image, audio, video, sensor data, and / or other input data) supplied at the first convolutional block 354A. The output of the deep convolutional network 350 is a classification score 366 for 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 from a set of features.

[0054] Figure 4400 is a block diagram illustrating an exemplary software architecture that can modularize artificial intelligence (AI) functions. According to aspects of the present disclosure, by using the architecture, an application can be designed that can enable various processing blocks (e.g., CPU 422, DSP 424, GPU 426, and / or NPU 428) of SoC 420 to support adaptive rounding for post-training quantization for AI application 402 as disclosed.

[0055] The AI ​​application 402 may be configured to call functions defined in the user space 404, which may, for example, provide detection and recognition of scenes indicating the current operating location of the device. For example, the AI ​​application 402 may configure the microphone and camera differently depending on whether the recognized scene is an office, a lecture hall, a restaurant, or an outdoor environment such as a lake. The AI ​​application 402 may make a request for compiled program code associated with a library defined in the AI ​​function application programming interface (API) 406. The request may ultimately rely on the output of a deep neural network configured to provide an inferred response based on, for example, video and positioning data.

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

[0057] Application 402 (e.g., an AI application) can be configured to call functions defined in user space 404, which can, for example, provide detection and recognition of scenes indicating the current operating location of the device. For example, 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. Application 402 can make a request to compiled program code associated with a library defined in a scene detection application programming interface (API) 406 to provide an estimate of the current scene. The request can ultimately rely on the output of a differential neural network configured to provide scene estimates based on, for example, video and positioning data.

[0058] The runtime engine 408, which may be compiled code of a runtime framework, may further be accessible by the application 402. For example, the application 402 may cause the runtime engine to request scene estimation at a specific time interval or triggered by an event detected by the user interface of the application. Upon causing the runtime engine to estimate the scene, the runtime engine may in turn send a signal to an operating system 410 (such as a Linux kernel 412) running on the SOC 420. The operating system 410 may in turn cause the calculation to be performed on the CPU 422, DSP 424, GPU 426, NPU 428, or some combination thereof. The CPU 422 may be directly accessible by the operating system, while other processing blocks may be accessed through drivers (such as drivers 414-418 for the DSP 424, GPU 426, or NPU 428, respectively). In an illustrative example, the differential neural network may be configured to run on a combination of processing blocks (such as the CPU 422 and GPU 426), or may run on the NPU 428 (if present).

[0059] According to certain aspects of the present disclosure, each fully connected layer 362 may be configured to determine parameters of the model based on one or more desired functional characteristics of the model, and to develop the one or more functional characteristics toward the desired functional characteristics as the determined parameters are further adapted, tuned, and updated.

[0060] Figure 5 is a diagram illustrating an example architecture 500 for anomaly detection and decision models according to aspects of the present disclosure. Figure 5 , the example architecture 500 includes an encoder 502, a decoder 504, and a decision model 506. The encoder 502 and the decoder 504 can each be implemented as a neural network (e.g., a deep convolutional network 350). For example, the encoder 502 and the decoder 504 can each include multiple convolutional layers or fully connected layers (e.g., Figure 3 FC1 362 shown).

[0061] Encoder 502 may receive input 508. Figure 5As shown, input 508 can be, for example, an image. However, the present disclosure is not limited thereto, and other types of inputs may also be received. For example, input 508 may also include medical diagnosis data, sensor data, financial transaction data, network monitoring data, and other data types. Encoder 502 may process input 508 to extract a set of features of input 508. Encoder 502 may output a potential representation of input 508. The potential representation may be supplied to decoder 504. Decoder 504 may be configured to process the potential representation to generate a reconstruction 510 of input 508.

[0062] According to aspects of the present disclosure, reconstruction 510 can be compared to input 508 to calculate a reconstruction error. The reconstruction error can be used as an anomaly score. For example, the reconstruction error can be compared to a threshold. If the reconstruction error is above the threshold, input 508 can be determined to be an outlier and out of distribution.

[0063] On the other hand, if the reconstruction error is below the threshold, the input 508 can be determined to be within the distribution. In some aspects, in response to determining that the input 508 is within the distribution, the extracted features 512 of the input 508 can be supplied to the decision model 506 for further processing. For example, the processing can include classification, object detection, segmentation, or other processing. Figure 5 In the example of , decision model 506 may process extracted features 512 to generate an inference that may indicate that the object in input 508 is the number five (5).

[0064] In some aspects, the weights of the layers of the encoder 502 can be tied or the same as the weights of the layers of the decoder 504. That is, the weights can be symmetric so that the encoder 502 can share the same weights as the decoder 504. In doing so, the memory footprint of the encoder 502 and the decoder 504 can be reduced (e.g., the number of weights in the model is halved). In addition, because the model weights are tied, training time can be reduced and the risk of overfitting can be limited.

[0065] Figure 6 is a block diagram illustrating another example architecture 600 for anomaly detection and decision models according to aspects of the present disclosure. Figure 6As shown, the example architecture 600 includes an encoder 602, a decoder 604, and a decision model 620. The encoder 602 and the decoder 604 each include a plurality of dense or fully connected layers (e.g., 610a, 610b and 614a, 614b, respectively), so that the layers of the encoder 602 and the decoder 604 are connected in a full-to-full arrangement, respectively. A regularization layer (e.g., 612, 616) may also be provided between the fully connected layers (e.g., 610a, 610b and 614a, 614b). For example, the regularization layer 612 of the encoder 602 may implement a discard function to reduce overfitting. For example, the discard function may reduce overfitting by randomly closing or discarding some nodes in the layer. The regularization layer 612 may modify the dimension of the data. Since data movement is computationally expensive, lower dimensional data (e.g., having 16 dimensions) may be used instead of using the original data (e.g., having 120 dimensions). In doing so, the bottleneck of the data output of the transmission encoder 602 may be reduced.

[0066] The encoder 602 and the decoder 604 may be configured as an autoencoder. The encoder 602 may be trained according to a training data set to receive an input 606 and process the input 606 via fully connected layers 610a and 610b to continuously extract features of the input 606 to generate a latent representation 618 of the input 606. The latent representation 618 may be supplied to the decoder 604.

[0067] The decoder 604 may receive the latent representation 618. The decoder 604 may be trained to process the latent representation 618 in a reciprocal manner relative to the encoder 602. Thus, the decoder 604 may process the latent representation 618 through successive dense layers 614a and 614b to generate a reconstruction 608 of the input 606.

[0068] The reconstruction error can be calculated based on the comparison of the reconstruction 608 with the input 606. It is worth noting that Figure 6 In the example of , by configuring the encoder 602 and the decoder 604 with fully connected layers (e.g., 610a, 610b, 614a, and 614b) with full-to-full connectivity, a reconstruction can be generated with higher accuracy as a tradeoff for computational speed. This may also affect the reconstruction error because the reconstruction error increases for out-of-distribution data. Therefore, the confidence of anomaly detection can be improved.

[0069] The reconstruction error can be compared to a threshold. In some aspects, for example, the threshold can be one standard deviation of the mean average error (MAE) or one standard deviation of the mean square error (MSE). In some aspects, the threshold can be changed to adjust the precision and recall of the model. For example, in a first time period, the threshold can be the mean average error from the training set. Then, in a second time period, the threshold can be the sum of the mean average error and one standard deviation from the training set.

[0070] If the reconstruction error is greater than the threshold, the input 606 may be determined to be out-of-distribution data. Then, if the input 606 is determined to be out-of-distribution, an anomaly may be detected. Therefore, the input 606 may be saved as a training example.

[0071] Conversely, if the reconstruction error is less than the threshold, the input may be determined to be in-distribution data. Therefore, the latent representation 618 generated by the encoder 602 may be supplied as input to the decision model 620. The decision model 620 may then process the received latent representation 618 via successive layers 622a and 622b to perform an inference task such as, for example, classification, object detection, or segmentation. Figure 6 As shown, layers 622a and 662b are dense or fully connected layers. However, the present disclosure is not limited thereto, and convolutional layers (e.g., Figure 3 356 ) etc. shown may process the latent representation to perform the inference task indicated via output 624 .

[0072] In some aspects, the encoder 602 can share weights with the decoder 604 to reduce the memory footprint of the autoencoder (e.g., encoder 602, decoder 604). In addition, using this tied weight arrangement can reduce the training time of the autoencoder, which can be trained via a greedy layer-wise process.

[0073] In some aspects, for example, the example architecture 600 may be implemented in a system on a chip (SoC) such as Figure 1 The automatic encoder (e.g., encoder 602, decoder 604) can be implemented using near data computing on SoC 100 (e.g., SoC 100). For example, in some examples, the automatic encoder (e.g., encoder 602, decoder 604) can be deployed using lower computing closer to the original data, such as DSP (e.g., DSP 106) or NPU (e.g., NPU 108). On the other hand, the decision model 620 can be deployed using a higher computing device such as a CPU (e.g., CPU 102) or GPU (e.g., GPU 104).

[0074] Additionally, for example, on-device training such as transfer learning, fine-tuning, federated learning, or personalization can also be deployed on higher computing devices (CPU, GPU).

[0075] Figure 7 is a flow chart 700 illustrating a method of anomaly detection and energy-saving inference determination according to aspects of the present disclosure. In block 702, the method 700 receives an input.

[0076] At block 704, method 700 uses an artificial neural network (ANN) to extract a set of features of the input to generate a latent representation of the input. As described, for example, with reference to Figure 6 , the encoder 602 can be trained according to the training data set to receive the input 606 and process the input 606 via fully connected layers 610a and 610b to continuously extract features of the input 606 to generate a latent representation 618 of the input 606.

[0077] At block 706, method 700 generates a reconstruction of the input using an ANN based on the latent representation. Figure 6 As depicted, decoder 604 can receive latent representation 618. Decoder 604 can process latent representation 618 through successive dense layers 614a and 614b to generate reconstruction 608 of input 606.

[0078] At block 708, the method 700 determines a reconstruction error based on the generated reconstruction and the input. Figure 6 As described, the reconstruction error may be calculated as the loss between the reconstruction 608 and the input 606 .

[0079] At block 710, method 700 determines whether the input includes anomalies or in-distribution data based on a comparison of the reconstruction error with a predefined threshold. Figure 6 As described, the reconstruction error can be compared to a threshold. In some aspects, for example, the threshold can be one standard deviation of the mean average error (MAE) or one standard deviation of the mean square error (MSE). In addition, in some aspects, the threshold can be changed to adjust the precision and recall of the model. For example, in a first time period, the threshold can be the mean average error from the training set. Then, in a second time period, the threshold can be the sum of the mean average error and one standard deviation from the training set.

[0080] At block 712, method 700 detects an anomaly in response to the input being determined to include out-of-distribution data. Figure 6 As described, if the reconstruction error is greater than a threshold, the input 606 may be determined to be out-of-distribution data. Subsequently, if the input 606 is determined to be out-of-distribution, an anomaly may be detected. Therefore, the input 606 may be saved as a training example, which may be used to further train the autoencoder (e.g., 602, 604).

[0081] In some aspects, at block 714, method 700 may optionally supply the latent representation to the decision model in response to a determination that the input is data within the distribution. The decision model computes inferences based on the latent representation. As described, for example, with reference to Figure 6, if the reconstruction error is less than a threshold, the input may be determined to be in-distribution data. Therefore, the latent representation 618 generated by the encoder 602 may be supplied as input to the decision model 620. The decision model 620 may then process the received latent representation 618 to perform an inference task, such as, for example, classification, object detection, or segmentation.

[0082] Specific implementation examples are provided in the following numbered clauses.

[0083] 1. A processor-implemented method, comprising:

[0084] Receive input;

[0085] extracting a set of features of the input using an artificial neural network (ANN) to generate a latent representation of the input;

[0086] generating a reconstruction of the input using the ANN based on the latent representation;

[0087] determining a reconstruction error based on the generated reconstruction and the input;

[0088] determining whether the input includes in-distribution data or out-of-distribution data based on a comparison of the reconstruction error with a predefined threshold; and

[0089] An anomaly is detected in response to the input being determined to include out-of-distribution data.

[0090] 2. The processor-implemented method of clause 1, wherein the predefined threshold comprises one of a mean average error, a mean square error, a standard deviation, or a combination thereof of a training data set.

[0091] 3. A processor-implemented method according to clause 1 or 2, wherein the predefined threshold is dynamically programmable.

[0092] 4. A processor-implemented method according to any one of clauses 1 to 3, wherein an encoder produces the latent representation of the input, a decoder generates the reconstruction of the input, and weight parameters of the encoder are shared with the decoder.

[0093] 5. The processor-implemented method of any one of clauses 1 to 4, further comprising: saving the out-of-distribution data to a training dataset in response to detecting the anomaly.

[0094] 6. A processor-implemented method according to any one of clauses 1 to 5, further comprising: supplying the latent representation to a decision model in response to a determination that the input is in-distribution data, the decision model computing an inference based on the latent representation.

[0095] 7. A method implemented by a processor according to any one of clauses 1 to 6, wherein the extraction is performed via an encoder and the generation is performed via a decoder; and the encoder and the decoder are deployed via a digital signal processor or a neural processing unit and the decision model is deployed via a central processing unit or a graphics processing unit.

[0096] 8. An apparatus comprising:

[0097] Memory; and

[0098] at least one processor, the at least one processor coupled to the memory, the at least one processor configured to:

[0099] Receive input;

[0100] extracting a set of features of the input using an artificial neural network (ANN) to generate a latent representation of the input;

[0101] generating a reconstruction of the input using the ANN based on the latent representation;

[0102] determining a reconstruction error based on the generated reconstruction and the input;

[0103] determining whether the input includes in-distribution data or out-of-distribution data based on a comparison of the reconstruction error with a predefined threshold; and

[0104] An anomaly is detected in response to the input being determined to include out-of-distribution data.

[0105] 9. The apparatus of clause 8, wherein the predefined threshold comprises one of a mean average error, a mean square error, a standard deviation, or a combination thereof of a training data set.

[0106] 10. An apparatus according to clause 8 or 9, wherein the predefined threshold is dynamically programmable.

[0107] 11. An apparatus according to any of clauses 8 to 10, wherein an encoder produces the latent representation of the input, a decoder generates the reconstruction of the input, and weight parameters of the encoder are shared with the decoder.

[0108] 12. An apparatus according to any of clauses 8 to 11, wherein the at least one processor is further configured to: save the out-of-distribution data to a training dataset in response to detecting the anomaly.

[0109] 13. An apparatus according to any one of clauses 8 to 12, wherein the at least one processor is further configured to: supply the latent representation to a decision model in response to a determination that the input is data within a distribution, and the decision model calculates an inference based on the latent representation.

[0110] 14. An apparatus according to any one of clauses 8 to 13, wherein the extracted set of features is generated via an encoder and the reconstruction is generated via a decoder, the encoder and the decoder are deployed via a digital signal processor or a neural processing unit and the decision model is deployed via a central processing unit or a graphics processing unit.

[0111] 15. An apparatus comprising:

[0112] A component for receiving input;

[0113] means for extracting a set of features of the input using an artificial neural network (ANN) to generate a latent representation of the input;

[0114] means for generating a reconstruction of the input using the ANN based on the latent representation;

[0115] means for determining a reconstruction error based on the generated reconstruction and the input;

[0116] means for determining whether the input comprises in-distribution data or out-of-distribution data based on a comparison of the reconstruction error with a predefined threshold; and

[0117] An anomaly is detected in response to the input being determined to include out-of-distribution data.

[0118] 16. The apparatus of clause 15, wherein the predefined threshold comprises one of a mean average error, a mean square error, a standard deviation, or a combination thereof of a training data set.

[0119] 17. An apparatus according to clause 15 or 16, wherein the predefined threshold is dynamically programmable.

[0120] 18. An apparatus according to any of clauses 15 to 17, wherein an encoder is used to generate the latent representation of the input, a decoder is used to generate the reconstruction of the input, and weight parameters of the encoder are shared with the decoder.

[0121] 19. An apparatus according to any one of clauses 15 to 18, wherein the encoder and the decoder are deployed via a digital signal processor or a neural processing unit.

[0122] 20. An apparatus according to any of clauses 15 to 19, further comprising: supplying the latent representation to a decision model in response to a determination that the input is in-distribution data, the decision model computing an inference based on the latent representation.

[0123] 21. An apparatus according to any one of clauses 15 to 20, wherein an encoder is used to extract the set of features and a decoder is used to generate the reconstruction, the encoder and the decoder are deployed via a digital signal processor or a neural processing unit and the decision model is deployed via a central processing unit or a graphics processing unit.

[0124] 22. A non-transitory computer readable medium having program code encoded thereon, the program code being executed by a processor and comprising:

[0125] Program code for receiving input;

[0126] program code for extracting a set of features of the input using an artificial neural network (ANN) to generate a latent representation of the input;

[0127] program code for generating a reconstruction of the input using the ANN based on the latent representation;

[0128] program code for determining a reconstruction error based on the generated reconstruction and the input; and

[0129] program code for determining whether the input comprises in-distribution data or out-of-distribution data based on a comparison of the reconstruction error to a predefined threshold; and

[0130] Program code for detecting an anomaly in response to the input being determined to include out-of-distribution data.

[0131] 23. The non-transitory computer-readable medium of clause 22, wherein the predefined threshold comprises one of a mean average error, a mean square error, a standard deviation, or a combination thereof of a training data set.

[0132] 24. The non-transitory computer-readable medium of clause 22 or 23, wherein the predefined threshold is dynamically programmable.

[0133] 25. A non-transitory computer-readable medium according to any one of clauses 22 to 24, wherein an encoder produces the latent representation of the input, a decoder generates the reconstruction of the input, and weight parameters of the encoder are shared with the decoder.

[0134] 26. The non-transitory computer-readable medium of any one of clauses 22 to 25, further comprising: program code for saving the out-of-distribution data to a training dataset in response to detecting the anomaly.

[0135] 27. The non-transitory computer-readable medium of any one of clauses 22 to 26, further comprising: program code for supplying the latent representation to a decision model in response to a determination that the input is in-distribution data, the decision model computing an inference based on the latent representation.

[0136] 28. The non-transitory computer-readable medium of any one of clauses 22 to 27, further comprising: program code for generating the extracted set of features via an encoder and program code for generating the reconstruction via a decoder, wherein the encoder and the decoder are deployed via a digital signal processor or a neural processing unit and the decision model is deployed via a central processing unit or a graphics processing unit.

[0137] In one aspect, the receiving means, the extracting means, the generating means, the means for determining reconstruction, and / or the means for determining whether the input is abnormal may be the CPU 102, a program memory associated with the CPU 102, the GPU 104, the DSP 106, the NPU 108, the dedicated memory block 118, the fully connected layer 362, and / or the routing connection processing unit 216 configured to perform the recited functions. In another configuration, the aforementioned means may be any module or any device configured to perform the functions recited by the aforementioned means.

[0138] The various operations of the above methods may be performed by any suitable components capable of performing the corresponding functions. These components may include various hardware and / or software components and / or modules, including but not limited to circuits, application specific integrated circuits (ASICs), or processors. In general, where operations are illustrated in the accompanying drawings, these operations may have corresponding paired components plus function components with similar numbers.

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

[0140] As used, a phrase referring to "at least one of" a list of items refers to any combination of those items, including single members. As an example, "at least one of a, b, or c" is intended to cover: a, b, c, ab, ac, bc, and abc.

[0141] The various illustrative logical blocks, modules, and circuits described in conjunction with the present disclosure may 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 signal (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. A general purpose processor may be a microprocessor, but in an alternative, the processor may be any commercially available processor, controller, microcontroller, or state machine. The processor may 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 combined with a DSP core, or any other such configuration.

[0142] The steps of the method or process described in conjunction with the present disclosure may be implemented directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may be located in any form of storage medium known in the art. Some examples of usable storage media 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, hard disks, removable disks, CD-ROMs, etc. The software module may include a single instruction, perhaps multiple instructions, and may be distributed over several different code segments, distributed between different programs, and distributed across multiple storage media. The storage medium may be coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. In an alternative, the storage medium may be integral with the processor.

[0143] The disclosed methods include one or more steps or actions for implementing the described methods. The steps and / or actions of the methods may be interchanged with each other 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 may be modified without departing from the scope of the claims.

[0144] The functions described herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in hardware, an example hardware configuration may include a processing system in a device. The processing system may be implemented using a bus architecture. Depending on the specific application and overall design constraints of the processing system, the bus may include any number of interconnecting buses and bridges. The bus may link various circuits together, including a processor, a machine-readable medium, and a bus interface. The bus interface may be used to connect a network adapter, etc., to the processing system via the bus. The network adapter may be used to implement signal processing functions. For some aspects, a user interface (e.g., a keypad, a display, a mouse, a joystick, etc.) may also be connected to the bus. The bus may also link various other circuits, such as timing sources, peripherals, voltage regulators, power management circuits, etc., which are well known in the art and will not be described further.

[0145] The processor may be responsible for managing the bus and general processing, including executing software stored on the machine-readable medium. The processor may be implemented using one or more general-purpose processors and / or special-purpose processors. Examples include microprocessors, microcontrollers, DSP processors, and other circuits that can execute software. Software should be broadly interpreted as meaning instructions, data, or any combination thereof, whether referred to as software, firmware, middleware, microcode, hardware description language, or other. By way of example, a machine-readable medium may include a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a disk, an optical disk, a hard disk drive, or any other suitable storage medium, or any combination thereof. The machine-readable medium may be embodied in a computer program product. The computer program product may include packaging material.

[0146] In hardware implementation, machine-readable media can be a part of a processing system separated from a processor. However, as will be readily appreciated by those skilled in the art, machine-readable media or any part thereof can be outside a processing system. By way of example, machine-readable media can include transmission lines, carrier waves modulated by data, and / or computer products separated from devices, all of which can be accessed by a processor through a bus interface. Alternatively or in addition thereto, machine-readable media or any part thereof can be integrated into a processor, such as with a cache and / or a general register stack. Although the various components discussed can be described as having specific locations, such as local components, they can also be configured in various ways, such as certain components being configured as a part of a distributed computing system.

[0147] The processing system can be configured as a general processing system having one or more microprocessors providing processor functionality and an external memory providing at least a portion of a machine-readable medium, all of which are linked together with other supporting circuit systems through an external bus architecture. Alternatively, the processing system may include one or more neuromorphic processors for implementing the described neuron model and neural system model. As another alternative, the processing system may be implemented with an application specific integrated circuit (ASIC) having at least a portion of a processor, a bus interface, a user interface, a support circuit, and a machine-readable medium integrated in a single chip, or with one or more field programmable gate arrays (FPGAs), programmable logic devices (PLDs), controllers, state machines, gated logic, discrete hardware components, or any other suitable circuits, or circuits capable of performing the various functionalities described throughout this disclosure. Those skilled in the art will recognize how to best implement the functionality of the processing system depending on the specific application and the overall design constraints imposed on the entire system.

[0148] The machine-readable medium may include multiple software modules. These software modules include instructions that cause the processing system to perform various functions when executed by the processor. The software modules may include a transmission module and a receiving module. Each software module may reside in a single storage device or be distributed across multiple storage devices. By way of example, when a triggering event occurs, the software module may be loaded from a hard drive into a RAM. During the execution of the software module, the processor may load some of the instructions into a cache to increase access speed. Then one or more cache lines may be loaded into a general register stack for execution by the processor. When the functionality of a software module is mentioned below, it will be understood that such functionality is implemented by the processor when executing instructions from the software module. In addition, it should be understood that various aspects of the present disclosure produce improvements in the functionality of a processor, a computer, a machine, or other systems that implement such aspects.

[0149] If implemented in software, each function can be stored on a computer-readable medium or transmitted as one or more instructions or codes.Computer-readable media includes both computer storage media and communication media, including any medium that facilitates a computer program to be transferred from one place to another.Storage media can be any available medium that can be accessed by a computer.By way of example and not limitation, such computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, disk storage devices or other magnetic storage devices, or may be used to carry or store desired program code in the form of an instruction or data structure and any other medium that can be accessed by a computer.In addition, any connection is also appropriately referred to as computer-readable media.For example, if software is transmitted from a website, server or other remote source using a coaxial cable, optical cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared (IR), radio and microwaves, then the coaxial cable, optical cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwaves are included in the definition of medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray Optical disks, where magnetic disks typically reproduce data magnetically, and optical disks reproduce data optically with lasers. Thus, in some aspects, computer-readable media may include non-transitory computer-readable media (e.g., tangible media). Additionally, for other aspects, computer-readable media may include transient computer-readable media (e.g., signals). Combinations of the above should also be included within the scope of computer-readable media.

[0150] Thus, some aspects may include a computer program product for performing the operations presented. For example, such a computer program product may include a computer-readable medium having stored (and / or encoded) thereon instructions that can be executed by one or more processors to perform the described operations. For some aspects, the computer program product may include packaging materials.

[0151] In addition, it should be understood that the modules and / or other appropriate components for performing the described methods and techniques can be downloaded and / or otherwise obtained by the user terminal and / or base station when applicable. For example, such a device can be coupled to a server to facilitate the transfer of components for performing the described methods. Alternatively, the various methods described can be provided via a storage component (e.g., RAM, ROM, a physical storage medium such as a compact disc (CD) or a floppy disk, etc.) so that once the storage device is coupled to or provided to the user terminal and / or base station, the device can obtain the various methods. In addition, any other suitable technology suitable for providing the described methods and techniques to the device can be used.

[0152] It is to be understood that the claims are not limited to the precise configuration and components illustrated above. Various modifications, changes and variations may 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, comprising: Receive input; extracting a set of features of the input using an artificial neural network (ANN) to generate a latent representation of the input; generating a reconstruction of the input using the ANN based on the latent representation; determining a reconstruction error based on the generated reconstruction and the input; determining whether the input includes in-distribution data or out-of-distribution data based on a comparison of the reconstruction error with a predefined threshold; as well as An anomaly is detected in response to the input being determined to include out-of-distribution data.

2. The processor-implemented method of claim 1, wherein the predefined threshold comprises one of a mean average error, a mean square error, a standard deviation, or a combination thereof of a training data set. 3 . The processor-implemented method of claim 1 , wherein the predefined threshold is dynamically programmable.

4. The processor-implemented method of claim 1 , wherein an encoder produces the latent representation of the input, a decoder generates the reconstruction of the input, and weight parameters of the encoder are shared with the decoder.

5. The processor-implemented method of claim 1 , further comprising: The out-of-distribution data is saved to a training dataset in response to detecting the anomaly.

6. The processor-implemented method of claim 1 , further comprising: Responsive to a determination that the input is in-distribution data, the latent representation is supplied to a decision model, the decision model computes an inference based on the latent representation.

7. A processor-implemented method according to claim 6, wherein the extraction is performed via an encoder and the generation is performed via a decoder; and the encoder and the decoder are deployed via a digital signal processor or a neural processing unit and the decision model is deployed via a central processing unit or a graphics processing unit.

8. An apparatus comprising: Memory; and at least one processor, the at least one processor coupled to the memory, the at least one processor configured to: Receive input; extracting a set of features of the input using an artificial neural network (ANN) to generate a latent representation of the input; generating a reconstruction of the input using the ANN based on the latent representation; determining a reconstruction error based on the generated reconstruction and the input; determining whether the input includes in-distribution data or out-of-distribution data based on a comparison of the reconstruction error with a predefined threshold; as well as An anomaly is detected in response to the input being determined to include out-of-distribution data.

9. The apparatus of claim 8, wherein the predefined threshold comprises one of a mean average error, a mean square error, a standard deviation, or a combination thereof of a training data set.

10. The apparatus of claim 8, wherein the predefined threshold is dynamically programmable.

11. The apparatus of claim 8, wherein an encoder produces the latent representation of the input, a decoder generates the reconstruction of the input, and weight parameters of the encoder are shared with the decoder.

12. The apparatus of claim 8, wherein the at least one processor is further configured to save the out-of-distribution data to a training dataset in response to detecting the anomaly.

13. The apparatus of claim 8, wherein the at least one processor is further configured to supply the latent representation to a decision model in response to a determination that the input is in-distribution data, the decision model computing an inference based on the latent representation.

14. An apparatus according to claim 13, wherein the extracted set of features is generated via an encoder and the reconstruction is generated via a decoder, the encoder and the decoder are deployed via a digital signal processor or a neural processing unit and the decision model is deployed via a central processing unit or a graphics processing unit.

15. An apparatus comprising: A component for receiving input; means for extracting a set of features of the input using an artificial neural network (ANN) to generate a latent representation of the input; means for generating a reconstruction of the input using the ANN based on the latent representation; means for determining a reconstruction error based on the generated reconstruction and the input; means for determining whether the input comprises in-distribution data or out-of-distribution data based on a comparison of the reconstruction error with a predefined threshold; and An anomaly is detected in response to the input being determined to include out-of-distribution data.

16. The apparatus of claim 15, wherein the predefined threshold comprises one of a mean average error, a mean square error, a standard deviation, or a combination thereof of a training data set. The apparatus of claim 15 , wherein the predefined threshold is dynamically programmable.

18. The apparatus of claim 15, wherein an encoder is used to generate the latent representation of the input, a decoder is used to generate the reconstruction of the input, and weight parameters of the encoder are shared with the decoder.

19. The apparatus of claim 18, wherein the encoder and the decoder are deployed via a digital signal processor or a neural processing unit.

20. The apparatus according to claim 15, further comprising: Responsive to a determination that the input is in-distribution data, the latent representation is supplied to a decision model, the decision model computes an inference based on the latent representation.

21. An apparatus according to claim 20, wherein an encoder is used to extract the set of features and a decoder is used to generate the reconstruction, the encoder and the decoder are deployed via a digital signal processor or a neural processing unit and the decision model is deployed via a central processing unit or a graphics processing unit.

22. A non-transitory computer readable medium having program code encoded thereon, the program code being executed by a processor and comprising: Program code for receiving input; program code for extracting a set of features of the input using an artificial neural network (ANN) to generate a latent representation of the input; program code for generating a reconstruction of the input using the ANN based on the latent representation; program code for determining a reconstruction error based on the generated reconstruction and the input; and program code for determining whether the input comprises in-distribution data or out-of-distribution data based on a comparison of the reconstruction error to a predefined threshold; and Program code for detecting an anomaly in response to the input being determined to include out-of-distribution data.

23. The non-transitory computer readable medium of claim 22, wherein the predefined threshold comprises one of a mean average error, a mean square error, a standard deviation, or a combination thereof of a training data set.

24. The non-transitory computer readable medium of claim 22, wherein the predefined threshold is dynamically programmable.

25. The non-transitory computer-readable medium of claim 22, wherein an encoder produces the latent representation of the input, a decoder generates the reconstruction of the input, and weight parameters of the encoder are shared with the decoder.

26. The non-transitory computer readable medium of claim 22, further comprising: Program code for saving the out-of-distribution data to a training data set in response to detecting the anomaly.

27. The non-transitory computer readable medium of claim 22, further comprising: Program code for supplying the latent representation to a decision model in response to a determination that the input is in-distribution data, the decision model computing an inference based on the latent representation.

28. The non-transitory computer readable medium of claim 27, further comprising: Program code for generating the extracted set of features via an encoder and program code for generating the reconstruction via a decoder, wherein the encoder and the decoder are deployed via a digital signal processor or a neural processing unit and the decision model is deployed via a central processing unit or a graphics processing unit.