EP4524817A1 - System and method for determining incoming observation to be out-of-distribution (ood) sample during neural network (nn) inference - Google Patents
System and method for determining incoming observation to be out-of-distribution (ood) sample during neural network (nn) inference Download PDFInfo
- Publication number
- EP4524817A1 EP4524817A1 EP24196017.8A EP24196017A EP4524817A1 EP 4524817 A1 EP4524817 A1 EP 4524817A1 EP 24196017 A EP24196017 A EP 24196017A EP 4524817 A1 EP4524817 A1 EP 4524817A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- given
- feature information
- trained
- average
- layer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/72—Data preparation, e.g. statistical preprocessing of image or video features
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
Definitions
- inventions of the inventive concepts disclosed herein are directed to a method.
- the method may include: obtaining, by at least one processor, a trained neural network (NN) having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer; obtaining or calculating, by the at least one processor, at least one average feature information associated with the trained NN, each of the at least one average feature information including a given average feature information summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class; receiving, by the at least one processor, an incoming observation influencing the given layer; calculating, by the at least one processor, a corresponding feature information of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer; based at least on the trained NN, classifying, by the at least one processor, the incoming observation as being in the given class; for the incoming observation classified to be in the given class, calculating, by the at least one processor
- inventive concepts are not limited in their application to the details of construction and the arrangement of the components or steps or methodologies set forth in the following description or illustrated in the drawings.
- inventive concepts disclosed herein may be practiced without these specific details.
- well-known features may not be described in detail to avoid unnecessarily complicating the instant disclosure.
- inventive concepts disclosed herein are capable of other embodiments or of being practiced or carried out in various ways. Also, it is to be understood that the phraseology and terminology employed herein is for the purpose of description and should not be regarded as limiting.
- any reference to "one embodiment,” or “some embodiments” means that a particular element, feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the inventive concepts disclosed herein.
- the appearances of the phrase “in some embodiments” in various places in the specification are not necessarily all referring to the same embodiment, and embodiments of the inventive concepts disclosed may include one or more of the features expressly described or inherently present herein, or any combination of sub-combination of two or more such features, along with any other features which may not necessarily be expressly described or inherently present in the instant disclosure.
- embodiments of the inventive concepts disclosed herein may be directed to a system and a method configured to determine an incoming observation to be an OOD sample during NN (e.g., DNN and/or CNN) inference.
- NN e.g., DNN and/or CNN
- Embodiments may improve the functioning of a computing device, itself, such as by improving an efficiency, improving a speed, and/or reducing power consumed to detect an OOD sample.
- Some embodiments may be used for determine an incoming observation to be an OOD sample during NN (e.g., DNN and/or CNN) inference used for ATR, self-driving cars, safety critical artificial intelligence (Al), ethical Al, behavioral analysis (e.g., for cyber activities), automated landing systems, collision avoidance, edge-based neural networks, or any other suitable application.
- NN e.g., DNN and/or CNN
- Al safety critical artificial intelligence
- ethical Al e.g., for cyber activities
- automated landing systems e.g., for cyber activities
- collision avoidance e.g., edge-based neural networks, or any other suitable application.
- an activation graph of a particular layer may be computed, which relates how the trained NN reacts to incoming data (e.g., test data, such as an incoming observation).
- Persistence diagrams may be calculated for that activation graph and may be used for tracking how the activation graph changes under shifts in data distributions. Persistence diagrams have stability guarantees as out-of-distribution (OOD) detectors. However, the OOD detection computation does not currently scale well to larger activation graphs, as currently used by state of the art (SoA) automatic target recognition (ATR) frameworks based on convolutional neural network (CNN) architectures.
- SoA state of the art
- ATR automatic target recognition
- Some embodiments make the topological approaches fast and scalable by downsampling the activation graphs, which makes it feasible to use such approaches for real-time monitoring of deep neural network (DNN)-based ATR frameworks, such as CNN-based ATR frameworks.
- DNN deep neural network
- Some embodiments make it possible to deploy topological approaches in practice for monitoring how large computer-vision networks generalize in practice. Compared to current baseline topological approaches, some embodiments may provide around 30x (30 times) or more speed-up in training time, and/or 10x (ten times) or more speed-up in testing time for moderately sized activation graphs, with comparable OOD detection performance. Even higher speed-ups are expected for applications involving larger activation graphs as used by larger neural network models.
- the system 100 may include a vehicle 107 (e.g., an aircraft (e.g., a piloted, remote piloted, and/or uncrewed aerial vehicle (UAV)), an automobile, a train, a submersible craft, a spacecraft, and/or a watercraft).
- vehicle 107 e.g., an aircraft (e.g., a piloted, remote piloted, and/or uncrewed aerial vehicle (UAV)), an automobile, a train, a submersible craft, a spacecraft, and/or a watercraft).
- the system 100 may include at least one computing device 102, at least one computing device 108, at least one display computing device 114, at least one sensor system 122, and/or the aircraft 107, some or all of which may be communicatively coupled at any given time.
- a system configured to determine an incoming observation to be an OOD sample during NN inference may be implemented in any suitable environment, and such system may be installed at a mobile or fixed location other than the vehicle 107; for example, some or all of the at least one computing device 102, the at least one computing device 108, the at least one display computing device 114, and/or the at least one sensor system 122 may be installed in and/or on a wearable device (e.g., a head wearable display device or a smart watch), a manpack, a server computing device (e.g., an edge computing server), a mobile computing device (e.g., a mobile phone, a tablet computing device, or a laptop computing device), a personal computing device, and/or a computer-vision system.
- a wearable device e.g., a head wearable display device or a smart watch
- server computing device e.g., an edge computing server
- a mobile computing device e.g., a mobile phone, a tablet
- any or all of the computing device 102, the computing device 108, the display computing device 114, and/or the sensor system 122 may be installed onboard the vehicle 107. In other embodiments, some or all of the computing device 102, the computing device 108, the display computing device 114, and/or the sensor system 122 may be installed onboard the vehicle 107 may be installed off-board of the vehicle. In other embodiments, some or all of the computing device 102, the computing device 108, the display computing device 114, and/or the sensor system 122 may be installed onboard the vehicle 107 may be redundantly installed onboard and off-board of the vehicle 107.
- the at least one computing device 102 may be implemented as any suitable computing device, such as a personal computer(s) and/or server(s).
- the at least one computing device 102 may include any or all of the elements, as shown in FIG. 1 .
- the computing device 102 may include at least one processor 104, at least one memory 106, and/or at least one storage, some or all of which may be communicatively coupled at any given time.
- the at least one processor 104 may include at least one central processing unit (CPU), at least one graphics processing unit (GPU), at least one field-programmable gate array (FPGA), at least one application specific integrated circuit (ASIC), at least one digital signal processor, at least one data processing unit (DPU), at least one virtual machine (VM) running on at least one processor, and/or the like configured to perform (e.g., collectively perform) any of the operations disclosed throughout.
- the at least one processor 104 may include a CPU and a GPU configured to perform (e.g., collectively perform) any of the operations disclosed throughout.
- the processor 104 may be configured to run various software applications or computer code stored (e.g., maintained) in a non-transitory computer-readable medium (e.g., memory 106 and/or storage) and configured to execute various instructions or operations.
- the processor 104 of the computing device 102 may be configured to: obtain training data; based at least on the training data, train a NN having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer; calculate at least one average feature information (e.g., at least one average feature vector, at least one average topological persistence diagram, and/or at least one average histogram) associated with the trained NN, each of the at least one average feature information including a given average feature information (e.g., a given average feature vector, a given average topological persistence diagram, and/or a given average histogram) summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class; and/or output, such as to
- the at least one computing device 108 may be implemented as any suitable computing device.
- the at least one computing device 108 may include any or all of the elements, as shown in FIG. 1 .
- the computing device 108 may include at least one processor 110, at least one memory 112, and/or at least one storage, some or all of which may be communicatively coupled at any given time.
- the at least one processor 110 may include at least one central processing unit (CPU), at least one graphics processing unit (GPU), at least one field-programmable gate array (FPGA), at least one application specific integrated circuit (ASIC), at least one digital signal processor, at least one data processing unit (DPU), at least one virtual machine (VM) running on at least one processor, and/or the like configured to perform (e.g., collectively perform) any of the operations disclosed throughout.
- the at least one processor 110 may include a CPU and a GPU configured to perform (e.g., collectively perform) any of the operations disclosed throughout.
- the processor 110 may be configured to run various software applications or computer code stored (e.g., maintained) in a non-transitory computer-readable medium (e.g., memory 112 and/or storage) and configured to execute various instructions or operations.
- the at least one processor 110 of the computing device 108 may be configured to: obtain test data (e.g., as sensor data from the at least one sensor system 122); recognize an incoming observation within the test data; obtain a trained neural network (NN) having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer; obtain or calculate at least one average feature information associated with the trained NN, each of the at least one average feature information (e.g., at least one average feature vector, at least one average topological persistence diagram, and/or at least one average histogram) including a given average feature information (e.g., a given average feature vector, a given average topological persistence diagram, and/or a given average histogram) summarizing in-class
- the at least one processor may be further configured to: use the trained NN to perform automatic target recognition (ATR), use the trained NN to perform a computer-vision-based autonomous landing, use the trained NN to perform computer-vision-based collision avoidance, use the trained NN to perform detection of activity of a person onboard a vehicle, and/or use the trained NN to perform computer-vision-based vehicle path planning.
- ATR automatic target recognition
- the at least one display computing device 114 may be implemented as any suitable display computing device, such as a head-up display computing device, a head-down display computing device, a multi-function window (MFW) display computing device, or a head wearable display device.
- the at least one display computing device 114 may include any or all of the elements, as shown in FIG. 1 .
- the display computing device 114 may include at least one display 116, at least one processor 118, at least one memory 120, and/or at least one storage, some or all of which may be communicatively coupled at any given time.
- the at least one processor 118 may include at least one central processing unit (CPU), at least one graphics processing unit (GPU), at least one field-programmable gate array (FPGA), at least one application specific integrated circuit (ASIC), at least one digital signal processor, at least one data processing unit (DPU), at least one virtual machine (VM) running on at least one processor, and/or the like configured to perform (e.g., collectively perform) any of the operations disclosed throughout.
- the at least one processor 118 may include a CPU and a GPU configured to perform (e.g., collectively perform) any of the operations disclosed throughout.
- the at least one processor 118 may be configured to run various software applications or computer code stored (e.g., maintained) in a non-transitory computer-readable medium (e.g., memory 120 and/or storage) and configured to execute various instructions or operations.
- the at least one processor 118 of the display computing device 114 may be configured to: an alert indicating that the incoming observation is OOD.
- the display 116 may be configured to display the alert indicating that the incoming observation is OOD to a user.
- the at least one sensor system 122 may be any suitable sensor system(s), such as at least one radar system, at least one light detection and ranging (LIDAR) system, and/or at least one camera system configured to, for example, capture images as sensor data of an environment.
- the at least one sensor system 122 may include any or all of the elements, as shown in FIG. 1 .
- the sensor system 122 may include at least one processor radar 124, at least one LIDAR 126, and/or at least one camera 128, some or all of which may be communicatively coupled at any given time.
- the at least one sensor system 122 may be configured to: output test data as sensor data to the computing device 108.
- the distance is a one-dimensional Wasserstein distance between two probability mass functions associated with the given average feature information (e.g., a given average feature vector, a given average topological persistence diagram, or a given average histogram) and the corresponding feature information (e.g., a corresponding feature vector, a corresponding topological persistence diagram, or a corresponding histogram).
- the given average feature information e.g., a given average feature vector, a given average topological persistence diagram, or a given average histogram
- corresponding feature information e.g., a corresponding feature vector, a corresponding topological persistence diagram, or a corresponding histogram
- the at least one processor 110 may be further configured to: based at least on the calculated distance score and a predetermined distance threshold, determine that the incoming observation is an out-of-distribution (OOD) sample.
- OOD out-of-distribution
- the at least one average feature information is at least one average feature vector, wherein the given average feature information is a given average feature vector, wherein the corresponding feature information is a corresponding feature vector.
- the at least one average feature information is at least one average topological persistence diagram, wherein the given average feature information is a given average topological persistence diagram, wherein the corresponding feature information is a corresponding topological persistence diagram.
- the trained NN may be a trained convolutional neural network (CNN), wherein the layers are convolutional layers, wherein the given layer is a given convolutional layer, and the at least one processor may be further configured to: downsample rasterized inputs and rasterized outputs along at least one of (a) spatial coordinates of an image obtained from the given convolutional layer or (b) channels of the given convolutional layer to generate a bipartite graph.
- the bipartite graph may have the activation weights connecting the downsampled rasterized inputs to the downsampled rasterized outputs of the given layer, and the bipartite graph used for topological persistence diagram calculations.
- the at least one average feature information is at least one average histogram, wherein the given average feature information is a given average histogram, wherein the corresponding feature information is a corresponding histogram.
- the given average histogram may be a histogram of the activation weights of the given layer and of the given class for training examples associated with the trained NN, and the given average histogram may approximate a probability distribution of the activation weights for the given class and the given layer.
- the corresponding histogram may be a histogram of the statistics of the incoming observation for the given layer.
- the distance is a one-dimensional Wasserstein distance between two probability mass functions associated with the given average histogram and the corresponding histogram.
- FIGS. 2A and 2B diagrams associated with exemplary embodiments of training a NN (as shown in FIG. 2A ) and using the trained NN to determine an incoming observation to be an OOD sample during inference (as shown in FIG. 2B ) according to the inventive concepts disclosed herein are depicted.
- the computing device 102 may be configured to use training data 202 to output (e.g., to the computing device 108) a trained NN 204 (e.g., a trained DNN and/or a trained CNN) and/or average feature information 206-1, 206-2, 206-3, ..., 206-N (e.g., including a given average feature information (e.g., one of 206-1, 206-2, 206-3, ..., or 206-N)).
- the trained NN 204 may have classes, layers, and activation weights for the classes and layers, wherein the classes including a given class, wherein the layers including a given layer.
- the given average feature information may summarize in-class statistics that each layer of the layers of the trained NN 204 uses for the given class.
- the computing device 108 may be configured: obtain test data 210, which may include and/or be associated with an incoming observation influencing the given layer; calculate a corresponding feature information 212 of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer; perform a step 220 of, based at least on the trained NN, classify the incoming observation as being in the given class; perform a step 214 of, for the incoming observation classified to be in the given class, calculate a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information; perform a step 216 of, based at least on a comparison of the calculated distance score and a threshold, determine whether the incoming observation is an OOD sample; perform a step 218 of, if the incoming observation is an OOD sample, at least one of output an alert indicating that the incoming observation is OOD or discard the classification of the incoming observation as being in the given class; perform a step
- the at least one average feature information is at least one average feature vector
- the given average feature information is a given average feature vector
- the corresponding feature information is a corresponding feature vector.
- the computing device 108 may have functionality of a data drift detection system by using a trained NN to alert a user when an incoming observation classification has drifted such that the incoming observation classification is identified as being OOD.
- an average feature vector is calculated for each of the training classes in the training dataset of the trained NN, which summarizes the average in-class statistics that a layer l of the trained NN uses in making decisions.
- a class-wise feature vector may be denoted as ⁇ k , l where k denotes the index of the training classes. ⁇ k , l is an average of the features ⁇ l for the training examples belonging to class k .
- the corresponding feature vector ⁇ l ( x 0 ) may be computed for a layer l.
- the NN may classify incoming observation x 0 into a class with label k 0 .
- a score based on a distance metric d may be computed between (i) the calculated feature vector of the incoming observation and (ii) the average feature vector of class k 0 .
- the score may be defined as d ( ⁇ l ( x 0 ) , ⁇ k 0 , l ) .
- the computing device 108 may alert the user that the incoming observation is an OOD sample and that the NN prediction of the class label k 0 cannot be trusted with high confidence. If the score is lower than the threshold, there is no alert of data drift and the NN predictions may be trusted for the incoming observation.
- FIGS. 3A and 3B diagrams associated with exemplary embodiments of training a NN (as shown in FIG. 3A ) and using the trained NN to determine an incoming observation to be an OOD sample during inference (as shown in FIG. 3B ) according to the inventive concepts disclosed herein are depicted.
- the computing device 102 may be configured to use training data 302 (e.g., an ImageNet-O data set, which is a public benchmark data set for evaluation) to output (e.g., to the computing device 108) a trained NN (e.g., a trained DNN and/or a trained CNN (e.g., a trained VGG-16 CNN)) and/or average topological persistence diagram 306-1, 306-2, 306-3, ..., 306-N (e.g., including a given average topological persistence diagram (e.g., one of 306-1, 306-2, 306-3, ..., or 306-N)).
- training data 302 e.g., an ImageNet-O data set, which is a public benchmark data set for evaluation
- a trained NN e.g., a trained DNN and/or a trained CNN (e.g., a trained VGG-16 CNN)
- average topological persistence diagram 306-1, 306-2, 306-3, ..., 306-N e
- the trained NN may have classes, layers, and activation weights for the classes and layers, wherein the classes including a given class, wherein the layers including a given layer.
- the given average topological persistence diagram may summarize in-class statistics that each layer of the layers of the trained NN uses for the given class.
- the computing device 108 may be configured: obtain test data 310, which may include and/or be associated with an incoming observation influencing the given layer; calculate a corresponding topological persistence diagram 312 of the incoming observation, the corresponding topological persistence diagram summarizing statistics of the incoming observation for the given layer; perform a step 320 of, based at least on the trained NN, classify the incoming observation as being in the given class; perform a step 314 of, for the incoming observation classified to be in the given class, calculate a distance score associated with a distance between the corresponding topological persistence diagram of the incoming observation and the given topological persistence diagram; perform a step 316 of, based at least on a comparison of the calculated distance score and a threshold, determine whether the incoming observation is an OOD sample; perform a step 318 of, if the incoming observation is an OOD sample, at least one of output an alert indicating that the incoming observation is OOD or discard the classification of the incoming observation as being in the
- Topological descriptors such as persistence diagrams
- persistence diagrams have been found to be effective in improving OOD detection accuracy.
- traditional approaches such as latent and/or Bayesian uncertainties
- topological uncertainty can improve OOD detection accuracy greater than what can be achieved by separate measures.
- the computation of persistence diagram is expensive (e.g., computationally, time, and/or power expensive), which currently serves as a computational bottleneck for extending such approaches to CNNs, which may be suited for modern computer-vision tasks, such as ATR.
- SoA state of the art
- topological uncertainty (TU) calculations are based on fully-connected layers, and have not been extended to convolutional layers.
- Some embodiments include methodologies to accelerate TU calculations on convolutional layers; some embodiments may make TU usable for monitoring performance when under the influence of OOD data for deep CNNs, in practice.
- FIG. 4 an exemplary flow diagram associated with exemplary embodiments using persistence diagrams according to the inventive concepts disclosed herein is depicted.
- TU may be extended to convolutional layers by defining the graph that connects rasterized input/output representations.
- FIG. 4 shows exemplary channels 402, exemplary rasterized inputs and rasterized outputs 404, an exemplary activation graph 405 connecting the inputs to the outputs, and exemplary bipartite graphs (e.g., 406, 406A, 406B).
- exemplary bipartite graphs e.g., 406, 406A, 406B.
- the input-output connectivity matrix of the layer may be represented as a bipartite graph 406.
- one or both of two different downsampling strategies may be employed to (a) produce a bipartite graph 406A with rasterized inputs and rasterized outputs downsampled along spatial coordinates and/or (b) produce a bipartite graph 406B with rasterized inputs and rasterized outputs downsampled along channels.
- This novel approach with respect to downsampling convolutional layers to reduce the dimensions of the bipartite graph 406 of activation weights connecting the inputs to the outputs of a layer may lead to faster computations of topological features due to reduced graph size.
- a convolutional layer can be denoted as the triplet (h, w, c), where (h,w) (e.g., spatial coordinates) indicates the height and the width of the image obtained from the layer, and where c denotes the number of channels in the layer.
- the approach (a) can include downsampling along the spatial coordinates of the rasterized input-output representation of the convolutional layers.
- the OOD detection performance can be analyzed on a test case by varying the downsampling rate. For example, downsampling can lead to a trade-off in the computational cost and the OOD detection accuracy (e.g., as quantified by the area under ROC curve (AUC)). Any suitable downsampling rate can be selected that suits a desired speed-vs-performance tradeoff.
- the approach (b) can include downsampling along the channel dimension of the rasterized input-output representation of the convolutional layers.
- the OOD detection performance can be analyzed on a test case by varying the downsampling rate.
- the downsampling can leads to a trade-off in the computational cost and the OOD detection accuracy (e.g., as quantified by the area under ROC curve (AUC)). Any suitable downsampling rate can be selected that suits a desired speed-vs-performance tradeoff.
- an exemplary CNN model architecture with an activation graph associated with a layer for TU computation is depicted.
- the exemplary CNN model architecture was selected to be a shallow CNN trained with ADAM (e.g., a type of optimization algorithm) on a Modified National Institute of Standards and Technology (MNIST) database (e.g., which is a database of handwritten digits from 0 -9).
- MNIST Modified National Institute of Standards and Technology
- the exemplary CNN model architecture was tested on in-distribution MNIST and out-of-distribution (OOD) Fashion MNIST dataset (FMINIST).
- the activation graph for the layer for TU computation has dimensions of 3240 ⁇ 1280.
- FIGS. 5B , 5C , and 5D graphs showing advantages of downsampling along spatial coordinates for TU computations of the last convolutional layer of the exemplary CNN model architecture of FIG. 5A according to the inventive concepts disclosed herein are depicted.
- Test results associated with TU were compared on the last convolutional layer for downsampling rates of 1 (i.e., a baseline TU computation with no downsampling), 2, 4, and 6.
- the baseline TU approach involves a TU computation over the complete activation graph.
- downsampling along spatial coordinates provides a significant tradeoff in computational cost.
- a downsampling rate of 2 results in a 16x speed-up in training time and a 10x speedup in test-time implementation with a closely comparable classification performance (e.g., Area under ROC curve (AUC) of 0.95 vs 0.97).
- AUC Area under ROC curve
- an exemplary CNN model architecture with an activation graph associated with a layer for TU computation is depicted.
- the exemplary CNN model architecture was selected to be a shallow CNN trained with ADAM on MNIST.
- the exemplary CNN model architecture was tested on in-distribution MNIST and out-of-distribution (OOD) Fashion MNIST dataset (FMINIST).
- OOD out-of-distribution
- FMINIST out-of-distribution
- the activation graph for the layer for TU computation has dimensions of 2400 ⁇ 1536.
- FIGS. 6B , 6C , and 6D graphs showing advantages of downsampling along channels for TU computations of the last convolutional layer of the exemplary CNN model architecture of FIG. 6A according to the inventive concepts disclosed herein are depicted.
- Test results associated with TU were compared on the last convolutional layer for downsampling rates of 1 (i.e., a baseline TU computation with no downsampling), 2, 4, and 6.
- the baseline TU approach involves a TU computation over the complete activation graph.
- downsampling along channels leads to significantly faster computations with little degradation in OOD detection.
- a downsampling rate of rate of 6 results in 35x speed-up in training time and 15x speedup in test-time implementation with a closely comparable classification performance (Area under ROC curve (AUC) of 1 vs 0.99).
- FIGS. 7A , 7B , 7C , 7D , 7E , 8A , and 8B exemplary embodiments using a system 100 configured to determine an incoming observation to be an OOD sample during NN inference by using histograms according to the inventive concepts disclosed herein are described and depicted.
- Some embodiments may include calculating a feature vector of interest, which summarizes what a pre-trained NN has learned from the training data.
- a probability distribution of the activation weights for class k and the NN layer l may be considered as a feature of interest.
- a histogram of the weights of a NN layer under the influence of an incoming observation x may be denoted as h k , l , which may be calculated in the training phase.
- h k , l denotes the average of the features h l for the training examples belonging to class k.
- h k,l approximates the probability distribution of the activation weights for class k and the NN layer l .
- a test phase (also referred to as inference), for an incoming observation x 0 , predicted (e.g., classified by the trained NN) class label k 0 may be found, and a distance score d ( h l ( x 0 ) , h k 0 , l ) may be calculated, where the distance metric d may be chosen as the 1-D Wasserstein distance between two probability mass functions.
- the computing device 108 may alert the user that the incoming observation is an OOD sample such that the NN prediction (e.g., classification) of the class label k 0 may not be trusted with high confidence. If the score is lower than the threshold, there may be no alert of data drift and the NN predictions may be trusted.
- This histogram approach is different from calculating the topological features. In some embodiments, the histogram approach may be significantly faster than calculating the topological features and can potentially perform better than the topological approach.
- an exemplary CNN model architecture with an activation graph associated with a layer for histogram computation is depicted.
- the exemplary CNN model architecture was selected to be a CNN trained with ADAM on MNIST.
- the exemplary CNN model architecture was tested on in-distribution MNIST and out-of-distribution (OOD) Fashion MNIST dataset (FMINIST).
- OOD out-of-distribution
- an exemplary trained CNN 704 associated with a layer for histogram computations as compared to a topological computation according to the inventive concepts disclosed herein is depicted.
- An example of a given average histogram (e.g., 706-N) (e.g., calculated using the histogram approach) of activation weights as compared to an example of a given average persistence diagram (e.g., calculated using the topological approach) are also shown.
- Calculating the persistence diagrams can be computationally expensive.
- Persistence diagrams result in a probability distribution over a subset of the activation weights.
- the histogram approach considers the probability distribution of all of the activation weights of the NN layer, approximated by histograms, which may be significantly faster than the persistence diagram-based computations.
- FIGS. 7C , 7D , and 7E graphs showing advantages of using the histogram approach as compared to TU computations for the last convolutional layer of the exemplary CNN model architecture of FIG. 7A according to the inventive concepts disclosed herein are depicted.
- the baseline TU approach involves a TU computation over the complete activation graph.
- activation matrix size indicates the size of the input-output connectivity matrix for edge weights of the neural network layer.
- An ablation study with activation matrix size up to (10 4 ) indicates that the proposed histogram approach can accelerate the training and inference time required by at least 10x.
- the activation matrix size can be ⁇ (10 6 ) to (10 10 ). In such situations, the expected speed up may be at least 40-50x.
- FIGS. 8A and 8B diagrams associated with exemplary embodiments of training a NN (as shown in FIG. 8A ) and using the trained NN to determine an incoming observation to be an OOD sample during inference (as shown in FIG. 8B ) according to the inventive concepts disclosed herein are depicted.
- the computing device 102 may be configured to use training data 702 (e.g., a training set) to output (e.g., to the computing device 108) a trained NN 704 (e.g., a trained DNN and/or a trained CNN) and/or average histograms 706-1, 706-2, 706-3, ..., 706-N (e.g., including a given average histogram (e.g., one of 706-1, 706-2, 706-3, ..., or 706-N)).
- the trained NN 704 may have classes, layers, and activation weights for the classes and layers, wherein the classes including a given class, wherein the layers including a given layer.
- the given average histogram may approximate a probability distribution of the activation weights for the given class and the given layer.
- the computing device 108 may be configured: obtain test data 810, which may include and/or be associated with an incoming observation influencing the given layer; calculate a corresponding histogram 812 of the incoming observation, the corresponding histogram summarizing statistics of the incoming observation for the given layer; perform a step 820 of, based at least on the trained NN, classify the incoming observation as being in the given class; perform a step 814 of, for the incoming observation classified to be in the given class, calculate a distance score associated with a distance between the corresponding histogram of the incoming observation and the given average histogram; perform a step 816 of, based at least on a comparison of the calculated distance score and a threshold, determine whether the incoming observation is an OOD sample; perform a step 818 of, if the incoming observation is an OOD sample, at least one of output an alert indicating that the incoming observation is OOD or discard the classification of the incoming observation as being in the given class;
- an exemplary embodiment of a method 900 may include one or more of the following steps. Additionally, for example, some embodiments may include performing one or more instances of the method 900 iteratively, concurrently, and/or sequentially. Additionally, for example, at least some of the steps of the method 900 may be performed in parallel, iteratively, and/or concurrently. Additionally, in some embodiments, at least some of the steps of the method 900 may be performed non-sequentially.
- a step 902 may include obtaining, by at least one processor, a trained neural network (NN) having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer.
- NN trained neural network
- a step 904 may include obtaining or calculating, by the at least one processor, at least one average feature information associated with the trained NN, each of the at least one average feature information including a given average feature information summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class.
- a step 906 may include receiving, by the at least one processor, an incoming observation influencing the given layer.
- a step 908 may include calculating, by the at least one processor, a corresponding feature information of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer.
- a step 910 may include based at least on the trained NN, classifying, by the at least one processor, the incoming observation as being in the given class.
- a step 912 may include for the incoming observation classified to be in the given class, calculating, by the at least one processor, a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information.
- a step 914 may include based at least on the calculated distance score, determining, by the at least one processor, that the incoming observation is an out-of-distribution (OOD) sample.
- OOD out-of-distribution
- a step 916 may include upon a determination that the incoming observation is the OOD sample, at least one of: outputting, by the at least one processor, an alert indicating that the incoming observation is OOD; or discarding, by the at least one processor, the classification of the incoming observation as being in the given class.
- the method 900 may include any of the operations disclosed throughout.
- embodiments of the inventive concepts disclosed herein may be directed to a system and a method configured to determine an incoming observation to be an OOD sample during NN (e.g., DNN and/or CNN) inference.
- NN e.g., DNN and/or CNN
- At least one non-transitory computer-readable medium may refer to as at least one non-transitory computer-readable medium (e.g., at least one computer-readable medium implemented as hardware; e.g., at least one non-transitory processor-readable medium, at least one memory (e.g., at least one nonvolatile memory, at least one volatile memory, or a combination thereof; e.g., at least one random-access memory, at least one flash memory, at least one read-only memory (ROM) (e.g., at least one electrically erasable programmable read-only memory (EEPROM)), at least one on-processor memory (e.g., at least one on-processor cache, at least one on-processor buffer, at least one on-processor flash memory, at least one on-processor EEPROM, or a combination thereof), or a combination thereof), at least one storage device (e.g., at least one hard-disk drive, at
- At least one means one or a plurality of; for example, “at least one” may comprise one, two, three, ..., one hundred, or more.
- one or more means one or a plurality of; for example, “one or more” may comprise one, two, three, ..., one hundred, or more.
- zero or more means zero, one, or a plurality of; for example, “zero or more” may comprise zero, one, two, three, ..., one hundred, or more.
- the methods, operations, and/or functionality disclosed may be implemented as sets of instructions or software readable by a device. Further, it is understood that the specific order or hierarchy of steps in the methods, operations, and/or functionality disclosed are examples of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the methods, operations, and/or functionality can be rearranged while remaining within the scope of the inventive concepts disclosed herein.
- the accompanying claims may present elements of the various steps in a sample order, and are not necessarily meant to be limited to the specific order or hierarchy presented.
- embodiments of the methods according to the inventive concepts disclosed herein may include one or more of the steps described herein. Further, such steps may be carried out in any desired order and two or more of the steps may be carried out simultaneously with one another. Two or more of the steps disclosed herein may be combined in a single step, and in some embodiments, one or more of the steps may be carried out as two or more sub-steps. Further, other steps or sub-steps may be carried in addition to, or as substitutes to one or more of the steps disclosed herein.
- inventive concepts disclosed herein are well adapted to carry out the objects and to attain the advantages mentioned herein as well as those inherent in the inventive concepts disclosed herein. While presently preferred embodiments of the inventive concepts disclosed herein have been described for purposes of this disclosure, it will be understood that numerous changes may be made which will readily suggest themselves to those skilled in the art and which are accomplished within the broad scope and coverage of the inventive concepts disclosed and claimed herein.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Molecular Biology (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
Abstract
A system may include at least one processor (110) configured to: obtain a trained neural network (NN); obtain or calculate at least one average feature information associated with the trained NN, each of the at least one average feature information including a given average feature information summarizing in-class statistics that each layer of the trained NN uses for a given class; receive an incoming observation influencing a given layer; calculate a corresponding feature information of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer; classify the incoming observation as being in the given class; calculate a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information; determine the incoming observation is an out-of-distribution (OOD) sample; and output an alert indicating the incoming observation is OOD and/or discard the incoming observation's classification.
Description
- Currently, data drift is a practical problem which affects the performance of deep neural networks (DNNs) in practice for automatic target recognition (ATR) tasks. Topology-augmented metrics have been found to be a promising way of quantifying if a trained neural network (NN) can be trusted in application. Currently, topological descriptors can robustly monitor the performance of a trained neural network (NN) in the face of out-of-distribution (OOD) data. However, such current approaches scale poorly to large neural networks (CNNs) commonly used in ATR applications.
- Some fielded systems are required to have accurate neural network (NN) uncertainty estimation prior to integration into the fielded systems. Many real-world applications, such as ATR, of DNNs, such as CNNs, use millions of parameters.
- One exemplary application area is for synthetic aperture radar (SAR)-based ATR used on military vehicles with DNNs. Deploying such an application in practice requires out-of-distribution (OOD) detection capabilities to determine when the ATR output is unreliable. Further, other exemplary target recognition applications may involve detection of maritime objects (e.g., ships), missile detection, biometric detection of people from unmanned aerial vehicles (UAVs) under different environmental conditions. Currently, a vast majority of these applications involve computer vision tasks which use DNNs, such as CNNs. It is important to understand how these networks will behave in practice in the face of shifts in real world data distributions to detect when a classification of an incoming observation is OOD.
- DNNs are trained on training data (also referred to as a training set) with certain statistical properties. Statistics for real-world data often drifts away from the training set. Deep learning models can thus fail in the real-world, such as due to a lack of generalization. There is a need for a system performing inference operations on test data using a trained NN to be able to recognize when a learning model has failed and use another system. Currently, there are problems associated with determining whether data has drifted in a way that a DNN prediction is unreliable and associated with how to adapt a learning model once data drift has been determined.
- In one aspect, embodiments of the inventive concepts disclosed herein are directed to a system. The system may include at least one processor configured to: obtain a trained neural network (NN) having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer; obtain or calculate at least one average feature information associated with the trained NN, each of the at least one average feature information including a given average feature information summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class; receive an incoming observation influencing the given layer; calculate a corresponding feature information of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer; based at least on the trained NN, classify the incoming observation as being in the given class; for the incoming observation classified to be in the given class, calculate a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information; based at least on the calculated distance score, determine that the incoming observation is an out-of-distribution (OOD) sample; and upon a determination that the incoming observation is the OOD sample, at least one of output an alert indicating that the incoming observation is OOD or discard the classification of the incoming observation as being in the given class.
- In a further aspect, embodiments of the inventive concepts disclosed herein are directed to a method. The method may include: obtaining, by at least one processor, a trained neural network (NN) having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer; obtaining or calculating, by the at least one processor, at least one average feature information associated with the trained NN, each of the at least one average feature information including a given average feature information summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class; receiving, by the at least one processor, an incoming observation influencing the given layer; calculating, by the at least one processor, a corresponding feature information of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer; based at least on the trained NN, classifying, by the at least one processor, the incoming observation as being in the given class; for the incoming observation classified to be in the given class, calculating, by the at least one processor, a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information; based at least on the calculated distance score, determining, by the at least one processor, that the incoming observation is an out-of-distribution (OOD) sample; and upon a determination that the incoming observation is the OOD sample, at least one of: outputting, by the at least one processor, an alert indicating that the incoming observation is OOD; or discarding, by the at least one processor, the classification of the incoming observation as being in the given class.
- Implementations of the inventive concepts disclosed herein may be better understood when consideration is given to the following detailed description thereof. Such description makes reference to the included drawings, which are not necessarily to scale, and in which some features may be exaggerated and some features may be omitted or may be represented schematically in the interest of clarity. Like reference numerals in the drawings may represent and refer to the same or similar element, feature, or function. In the drawings:
-
FIG. 1 is a view of an exemplary embodiment of a system according to the inventive concepts disclosed herein. -
FIGS. 2A and2B are diagrams associated with exemplary embodiments of training a NN and using the trained NN to determine an incoming observation to be an OOD sample during inference according to the inventive concepts disclosed herein. -
FIGS. 3A and3B are diagrams associated with exemplary embodiments of training a NN and using the trained NN to determine an incoming observation to be an OOD sample during inference according to the inventive concepts disclosed herein. -
FIG. 4 is an exemplary flow diagram associated with exemplary embodiments using persistence diagrams according to the inventive concepts disclosed herein. -
FIG. 5A shows an exemplary CNN model architecture with an activation graph associated with a layer for TU computation according to the inventive concepts disclosed herein. -
FIGS. 5B ,5C , and5D are graphs showing advantages of downsampling along spatial coordinates for TU computations of the last convolutional layer of the exemplary CNN model architecture ofFIG. 5A according to the inventive concepts disclosed herein. -
FIG. 6A shows an exemplary CNN model architecture with an activation graph associated with a layer for TU computation according to the inventive concepts disclosed herein. -
FIGS. 6B ,6C , and6D are graphs showing advantages of downsampling along channels for TU computations of the last convolutional layer of the exemplary CNN model architecture ofFIG. 6A according to the inventive concepts disclosed herein. -
FIG. 7A shows an exemplary CNN model architecture with an activation graph associated with a layer for histogram computation according to the inventive concepts disclosed herein. -
FIG. 7B shows an exemplary trained CNN associated with a layer for histogram computations as compared to a topological computation according to the inventive concepts disclosed herein. -
FIGS. 7C ,7D , and7E are graphs showing advantages of using the histogram approach as compared to TU computations for the last convolutional layer of the exemplary CNN model architecture ofFIG. 7A according to the inventive concepts disclosed herein. -
FIGS. 8A and8B are diagrams associated with exemplary embodiments of training a NN and using the trained NN to determine an incoming observation to be an OOD sample during inference according to the inventive concepts disclosed herein. -
FIG. 9 is a diagram of an exemplary embodiment of a method according to the inventive concepts disclosed herein. - Before explaining at least one embodiment of the inventive concepts disclosed herein in detail, it is to be understood that the inventive concepts are not limited in their application to the details of construction and the arrangement of the components or steps or methodologies set forth in the following description or illustrated in the drawings. In the following detailed description of embodiments of the instant inventive concepts, numerous specific details are set forth in order to provide a more thorough understanding of the inventive concepts. However, it will be apparent to one of ordinary skill in the art having the benefit of the instant disclosure that the inventive concepts disclosed herein may be practiced without these specific details. In other instances, well-known features may not be described in detail to avoid unnecessarily complicating the instant disclosure. The inventive concepts disclosed herein are capable of other embodiments or of being practiced or carried out in various ways. Also, it is to be understood that the phraseology and terminology employed herein is for the purpose of description and should not be regarded as limiting.
- As used herein a letter following a reference numeral is intended to reference an embodiment of the feature or element that may be similar, but not necessarily identical, to a previously described element or feature bearing the same reference numeral (e.g., 1, 1a, 1b). Such shorthand notations are used for purposes of convenience only, and should not be construed to limit the inventive concepts disclosed herein in any way unless expressly stated to the contrary.
- Further, unless expressly stated to the contrary, "or" refers to an inclusive or and not to an exclusive or. For example, a condition A or B is satisfied by anyone of the following: A is true (or present) and B is false (or not present), A is false (or not present) and B is true (or present), and both A and B are true (or present).
- In addition, use of the "a" or "an" are employed to describe elements and components of embodiments of the instant inventive concepts. This is done merely for convenience and to give a general sense of the inventive concepts, and "a" and "an" are intended to include one or at least one and the singular also includes the plural unless it is obvious that it is meant otherwise.
- Finally, as used herein any reference to "one embodiment," or "some embodiments" means that a particular element, feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the inventive concepts disclosed herein. The appearances of the phrase "in some embodiments" in various places in the specification are not necessarily all referring to the same embodiment, and embodiments of the inventive concepts disclosed may include one or more of the features expressly described or inherently present herein, or any combination of sub-combination of two or more such features, along with any other features which may not necessarily be expressly described or inherently present in the instant disclosure.
- Broadly, embodiments of the inventive concepts disclosed herein may be directed to a system and a method configured to determine an incoming observation to be an OOD sample during NN (e.g., DNN and/or CNN) inference.
- Embodiments may improve the functioning of a computing device, itself, such as by improving an efficiency, improving a speed, and/or reducing power consumed to detect an OOD sample.
- Some embodiments may be used for determine an incoming observation to be an OOD sample during NN (e.g., DNN and/or CNN) inference used for ATR, self-driving cars, safety critical artificial intelligence (Al), ethical Al, behavioral analysis (e.g., for cyber activities), automated landing systems, collision avoidance, edge-based neural networks, or any other suitable application.
- In some embodiments, by using a trained neural network (NN), an activation graph of a particular layer may be computed, which relates how the trained NN reacts to incoming data (e.g., test data, such as an incoming observation). Persistence diagrams may be calculated for that activation graph and may be used for tracking how the activation graph changes under shifts in data distributions. Persistence diagrams have stability guarantees as out-of-distribution (OOD) detectors. However, the OOD detection computation does not currently scale well to larger activation graphs, as currently used by state of the art (SoA) automatic target recognition (ATR) frameworks based on convolutional neural network (CNN) architectures. Some embodiments make the topological approaches fast and scalable by downsampling the activation graphs, which makes it feasible to use such approaches for real-time monitoring of deep neural network (DNN)-based ATR frameworks, such as CNN-based ATR frameworks. Some embodiments make it possible to deploy topological approaches in practice for monitoring how large computer-vision networks generalize in practice. Compared to current baseline topological approaches, some embodiments may provide around 30x (30 times) or more speed-up in training time, and/or 10x (ten times) or more speed-up in testing time for moderately sized activation graphs, with comparable OOD detection performance. Even higher speed-ups are expected for applications involving larger activation graphs as used by larger neural network models.
- Referring now to
FIG. 1 , an exemplary embodiment of asystem 100 according to the inventive concepts disclosed herein is depicted. In some embodiments, thesystem 100 may include a vehicle 107 (e.g., an aircraft (e.g., a piloted, remote piloted, and/or uncrewed aerial vehicle (UAV)), an automobile, a train, a submersible craft, a spacecraft, and/or a watercraft). Thesystem 100 may include at least onecomputing device 102, at least onecomputing device 108, at least onedisplay computing device 114, at least onesensor system 122, and/or theaircraft 107, some or all of which may be communicatively coupled at any given time. In some embodiments, some or all of the at least onecomputing device 102, the at least onecomputing device 108, the at least onedisplay computing device 114, and/or the at least onesensor system 122 may be installed onboard and/or offboard of thevehicle 107. While thesystem 100 exemplarily includes thevehicle 107, in some embodiments, a system configured to determine an incoming observation to be an OOD sample during NN inference may be implemented in any suitable environment, and such system may be installed at a mobile or fixed location other than thevehicle 107; for example, some or all of the at least onecomputing device 102, the at least onecomputing device 108, the at least onedisplay computing device 114, and/or the at least onesensor system 122 may be installed in and/or on a wearable device (e.g., a head wearable display device or a smart watch), a manpack, a server computing device (e.g., an edge computing server), a mobile computing device (e.g., a mobile phone, a tablet computing device, or a laptop computing device), a personal computing device, and/or a computer-vision system. - In some embodiments, any or all of the
computing device 102, thecomputing device 108, thedisplay computing device 114, and/or thesensor system 122 may be installed onboard thevehicle 107. In other embodiments, some or all of thecomputing device 102, thecomputing device 108, thedisplay computing device 114, and/or thesensor system 122 may be installed onboard thevehicle 107 may be installed off-board of the vehicle. In other embodiments, some or all of thecomputing device 102, thecomputing device 108, thedisplay computing device 114, and/or thesensor system 122 may be installed onboard thevehicle 107 may be redundantly installed onboard and off-board of thevehicle 107. - The at least one
computing device 102 may be implemented as any suitable computing device, such as a personal computer(s) and/or server(s). The at least onecomputing device 102 may include any or all of the elements, as shown inFIG. 1 . For example, thecomputing device 102 may include at least oneprocessor 104, at least onememory 106, and/or at least one storage, some or all of which may be communicatively coupled at any given time. For example, the at least oneprocessor 104 may include at least one central processing unit (CPU), at least one graphics processing unit (GPU), at least one field-programmable gate array (FPGA), at least one application specific integrated circuit (ASIC), at least one digital signal processor, at least one data processing unit (DPU), at least one virtual machine (VM) running on at least one processor, and/or the like configured to perform (e.g., collectively perform) any of the operations disclosed throughout. For example, the at least oneprocessor 104 may include a CPU and a GPU configured to perform (e.g., collectively perform) any of the operations disclosed throughout. Theprocessor 104 may be configured to run various software applications or computer code stored (e.g., maintained) in a non-transitory computer-readable medium (e.g.,memory 106 and/or storage) and configured to execute various instructions or operations. For example, theprocessor 104 of thecomputing device 102 may be configured to: obtain training data; based at least on the training data, train a NN having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer; calculate at least one average feature information (e.g., at least one average feature vector, at least one average topological persistence diagram, and/or at least one average histogram) associated with the trained NN, each of the at least one average feature information including a given average feature information (e.g., a given average feature vector, a given average topological persistence diagram, and/or a given average histogram) summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class; and/or output, such as to thecomputing device 108, at least one of the trained NN and/or the at least one average feature information associated with the trained NN. - The at least one
computing device 108 may be implemented as any suitable computing device. The at least onecomputing device 108 may include any or all of the elements, as shown inFIG. 1 . For example, thecomputing device 108 may include at least oneprocessor 110, at least onememory 112, and/or at least one storage, some or all of which may be communicatively coupled at any given time. For example, the at least oneprocessor 110 may include at least one central processing unit (CPU), at least one graphics processing unit (GPU), at least one field-programmable gate array (FPGA), at least one application specific integrated circuit (ASIC), at least one digital signal processor, at least one data processing unit (DPU), at least one virtual machine (VM) running on at least one processor, and/or the like configured to perform (e.g., collectively perform) any of the operations disclosed throughout. For example, the at least oneprocessor 110 may include a CPU and a GPU configured to perform (e.g., collectively perform) any of the operations disclosed throughout. Theprocessor 110 may be configured to run various software applications or computer code stored (e.g., maintained) in a non-transitory computer-readable medium (e.g.,memory 112 and/or storage) and configured to execute various instructions or operations. For example, the at least one processor 110 of the computing device 108 may be configured to: obtain test data (e.g., as sensor data from the at least one sensor system 122); recognize an incoming observation within the test data; obtain a trained neural network (NN) having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer; obtain or calculate at least one average feature information associated with the trained NN, each of the at least one average feature information (e.g., at least one average feature vector, at least one average topological persistence diagram, and/or at least one average histogram) including a given average feature information (e.g., a given average feature vector, a given average topological persistence diagram, and/or a given average histogram) summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class; receive an incoming observation (e.g., an incoming observation of test data) influencing the given layer; calculate a corresponding feature information (e.g., a corresponding feature vector, a corresponding topological persistence diagram, and/or a corresponding histogram) of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer; based at least on the trained NN, classify the incoming observation as being in the given class; for the incoming observation classified to be in the given class, calculate a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information; based at least on the calculated distance score, determine that the incoming observation is an out-of-distribution (OOD) sample; and/or upon a determination that the incoming observation is the OOD sample, at least one of output an alert indicating that the incoming observation is OOD or discard the classification of the incoming observation as being in the given class. In some embodiments, the at least one processor may be further configured to: use the trained NN to perform automatic target recognition (ATR), use the trained NN to perform a computer-vision-based autonomous landing, use the trained NN to perform computer-vision-based collision avoidance, use the trained NN to perform detection of activity of a person onboard a vehicle, and/or use the trained NN to perform computer-vision-based vehicle path planning. - The at least one
display computing device 114 may be implemented as any suitable display computing device, such as a head-up display computing device, a head-down display computing device, a multi-function window (MFW) display computing device, or a head wearable display device. The at least onedisplay computing device 114 may include any or all of the elements, as shown inFIG. 1 . For example, thedisplay computing device 114 may include at least onedisplay 116, at least oneprocessor 118, at least onememory 120, and/or at least one storage, some or all of which may be communicatively coupled at any given time. For example, the at least oneprocessor 118 may include at least one central processing unit (CPU), at least one graphics processing unit (GPU), at least one field-programmable gate array (FPGA), at least one application specific integrated circuit (ASIC), at least one digital signal processor, at least one data processing unit (DPU), at least one virtual machine (VM) running on at least one processor, and/or the like configured to perform (e.g., collectively perform) any of the operations disclosed throughout. For example, the at least oneprocessor 118 may include a CPU and a GPU configured to perform (e.g., collectively perform) any of the operations disclosed throughout. The at least oneprocessor 118 may be configured to run various software applications or computer code stored (e.g., maintained) in a non-transitory computer-readable medium (e.g.,memory 120 and/or storage) and configured to execute various instructions or operations. For example, the at least oneprocessor 118 of thedisplay computing device 114 may be configured to: an alert indicating that the incoming observation is OOD. For example, thedisplay 116 may be configured to display the alert indicating that the incoming observation is OOD to a user. - The at least one
sensor system 122 may be any suitable sensor system(s), such as at least one radar system, at least one light detection and ranging (LIDAR) system, and/or at least one camera system configured to, for example, capture images as sensor data of an environment. The at least onesensor system 122 may include any or all of the elements, as shown inFIG. 1 . For example, thesensor system 122 may include at least oneprocessor radar 124, at least oneLIDAR 126, and/or at least onecamera 128, some or all of which may be communicatively coupled at any given time. For example, the at least onesensor system 122 may be configured to: output test data as sensor data to thecomputing device 108. - In some embodiments, the distance is a one-dimensional Wasserstein distance between two probability mass functions associated with the given average feature information (e.g., a given average feature vector, a given average topological persistence diagram, or a given average histogram) and the corresponding feature information (e.g., a corresponding feature vector, a corresponding topological persistence diagram, or a corresponding histogram).
- In some embodiments, the at least one
processor 110 may be further configured to: based at least on the calculated distance score and a predetermined distance threshold, determine that the incoming observation is an out-of-distribution (OOD) sample. - In some embodiments, the at least one average feature information is at least one average feature vector, wherein the given average feature information is a given average feature vector, wherein the corresponding feature information is a corresponding feature vector.
- In some embodiments, the at least one average feature information is at least one average topological persistence diagram, wherein the given average feature information is a given average topological persistence diagram, wherein the corresponding feature information is a corresponding topological persistence diagram. For example, the trained NN may be a trained convolutional neural network (CNN), wherein the layers are convolutional layers, wherein the given layer is a given convolutional layer, and the at least one processor may be further configured to: downsample rasterized inputs and rasterized outputs along at least one of (a) spatial coordinates of an image obtained from the given convolutional layer or (b) channels of the given convolutional layer to generate a bipartite graph. The bipartite graph may have the activation weights connecting the downsampled rasterized inputs to the downsampled rasterized outputs of the given layer, and the bipartite graph used for topological persistence diagram calculations.
- In some embodiments, the at least one average feature information is at least one average histogram, wherein the given average feature information is a given average histogram, wherein the corresponding feature information is a corresponding histogram. For example, the given average histogram may be a histogram of the activation weights of the given layer and of the given class for training examples associated with the trained NN, and the given average histogram may approximate a probability distribution of the activation weights for the given class and the given layer. For example, the corresponding histogram may be a histogram of the statistics of the incoming observation for the given layer. For example, the distance is a one-dimensional Wasserstein distance between two probability mass functions associated with the given average histogram and the corresponding histogram.
- Referring now to
FIGS. 2A and2B , diagrams associated with exemplary embodiments of training a NN (as shown inFIG. 2A ) and using the trained NN to determine an incoming observation to be an OOD sample during inference (as shown inFIG. 2B ) according to the inventive concepts disclosed herein are depicted. - As exemplarily shown in
FIG. 2A , thecomputing device 102 may be configured to usetraining data 202 to output (e.g., to the computing device 108) a trained NN 204 (e.g., a trained DNN and/or a trained CNN) and/or average feature information 206-1, 206-2, 206-3, ..., 206-N (e.g., including a given average feature information (e.g., one of 206-1, 206-2, 206-3, ..., or 206-N)). The trainedNN 204 may have classes, layers, and activation weights for the classes and layers, wherein the classes including a given class, wherein the layers including a given layer. For example, the given average feature information may summarize in-class statistics that each layer of the layers of the trainedNN 204 uses for the given class. - As exemplarily shown in
FIG. 2B , the computing device 108 may be configured: obtain test data 210, which may include and/or be associated with an incoming observation influencing the given layer; calculate a corresponding feature information 212 of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer; perform a step 220 of, based at least on the trained NN, classify the incoming observation as being in the given class; perform a step 214 of, for the incoming observation classified to be in the given class, calculate a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information; perform a step 216 of, based at least on a comparison of the calculated distance score and a threshold, determine whether the incoming observation is an OOD sample; perform a step 218 of, if the incoming observation is an OOD sample, at least one of output an alert indicating that the incoming observation is OOD or discard the classification of the incoming observation as being in the given class; perform a step 222 of, if the incoming observation is not an OOD sample, trust the classification of the incoming observation as being in the given class; and/or perform a step 224 of outputting the classification of the incoming observation as being in the given class. - In some embodiments, the at least one average feature information is at least one average feature vector, the given average feature information is a given average feature vector, and the corresponding feature information is a corresponding feature vector. For example, the
computing device 108 may have functionality of a data drift detection system by using a trained NN to alert a user when an incoming observation classification has drifted such that the incoming observation classification is identified as being OOD. In some embodiments, during the training phase (similar to as shown inFIG. 2A ), an average feature vector is calculated for each of the training classes in the training dataset of the trained NN, which summarizes the average in-class statistics that a layer l of the trained NN uses in making decisions. A class-wise feature vector may be denoted asα k,l where k denotes the index of the training classes.α k,l is an average of the features αl for the training examples belonging to class k. During the test phase (also referred to as inference) (similar as shown toFIG. 2B ), for an incoming observation x 0, the corresponding feature vector αl (x 0) may be computed for a layer l. For the given x 0, the NN may classify incoming observation x 0 into a class with label k 0. A score based on a distance metric d may be computed between (i) the calculated feature vector of the incoming observation and (ii) the average feature vector of class k 0. The score may be defined as d(αl (x 0),α k0, l ). Based on the value of the calculated score d(αl (x 0),α k0 , l ), if it is greater than a pre-defined threshold, thecomputing device 108 may alert the user that the incoming observation is an OOD sample and that the NN prediction of the class label k 0 cannot be trusted with high confidence. If the score is lower than the threshold, there is no alert of data drift and the NN predictions may be trusted for the incoming observation. - Referring now to
FIGS. 3A and3B , diagrams associated with exemplary embodiments of training a NN (as shown inFIG. 3A ) and using the trained NN to determine an incoming observation to be an OOD sample during inference (as shown inFIG. 3B ) according to the inventive concepts disclosed herein are depicted. - As exemplarily shown in
FIG. 3A , thecomputing device 102 may be configured to use training data 302 (e.g., an ImageNet-O data set, which is a public benchmark data set for evaluation) to output (e.g., to the computing device 108) a trained NN (e.g., a trained DNN and/or a trained CNN (e.g., a trained VGG-16 CNN)) and/or average topological persistence diagram 306-1, 306-2, 306-3, ..., 306-N (e.g., including a given average topological persistence diagram (e.g., one of 306-1, 306-2, 306-3, ..., or 306-N)). The trained NN may have classes, layers, and activation weights for the classes and layers, wherein the classes including a given class, wherein the layers including a given layer. For example, the given average topological persistence diagram may summarize in-class statistics that each layer of the layers of the trained NN uses for the given class. - As exemplarily shown in
FIG. 3B , the computing device 108 may be configured: obtain test data 310, which may include and/or be associated with an incoming observation influencing the given layer; calculate a corresponding topological persistence diagram 312 of the incoming observation, the corresponding topological persistence diagram summarizing statistics of the incoming observation for the given layer; perform a step 320 of, based at least on the trained NN, classify the incoming observation as being in the given class; perform a step 314 of, for the incoming observation classified to be in the given class, calculate a distance score associated with a distance between the corresponding topological persistence diagram of the incoming observation and the given topological persistence diagram; perform a step 316 of, based at least on a comparison of the calculated distance score and a threshold, determine whether the incoming observation is an OOD sample; perform a step 318 of, if the incoming observation is an OOD sample, at least one of output an alert indicating that the incoming observation is OOD or discard the classification of the incoming observation as being in the given class; perform a step 322 of, if the incoming observation is not an OOD sample, trust the classification of the incoming observation as being in the given class; and/or perform a step 324 of outputting the classification of the incoming observation as being in the given class. - Topological descriptors, such as persistence diagrams, have been found to be effective in improving OOD detection accuracy. When combined with traditional approaches such as latent and/or Bayesian uncertainties, topological uncertainty can improve OOD detection accuracy greater than what can be achieved by separate measures. However, the computation of persistence diagram is expensive (e.g., computationally, time, and/or power expensive), which currently serves as a computational bottleneck for extending such approaches to CNNs, which may be suited for modern computer-vision tasks, such as ATR. Hence, most state of the art (SoA) topological uncertainty (TU) calculations are based on fully-connected layers, and have not been extended to convolutional layers. Some embodiments include methodologies to accelerate TU calculations on convolutional layers; some embodiments may make TU usable for monitoring performance when under the influence of OOD data for deep CNNs, in practice.
- Referring now to
FIG. 4 , an exemplary flow diagram associated with exemplary embodiments using persistence diagrams according to the inventive concepts disclosed herein is depicted. - TU may be extended to convolutional layers by defining the graph that connects rasterized input/output representations.
-
FIG. 4 showsexemplary channels 402, exemplary rasterized inputs and rasterizedoutputs 404, anexemplary activation graph 405 connecting the inputs to the outputs, and exemplary bipartite graphs (e.g., 406, 406A, 406B). For example, to reduce the size of the bipartite graph 406 for persistence diagram calculations: (a) produce abipartite graph 406A with rasterized inputs and rasterized outputs downsampled along spatial coordinates and/or (b) produce abipartite graph 406B with rasterized inputs and rasterized outputs downsampled along channels. Downsampling may greatly reduce the number of edges of the activation graph for persistence diagram calculations. SoA TU calculations are currently based on fully connected layers, and some embodiments may extend use of TU to convolutional layers by making the calculations tractable to handle large activation graphs. - To computed topological uncertainty (TU) on convolutional layers of a neural network (NN), the input-output connectivity matrix of the layer may be represented as a bipartite graph 406. Then, to scale up the topological calculations, one or both of two different downsampling strategies may be employed to (a) produce a
bipartite graph 406A with rasterized inputs and rasterized outputs downsampled along spatial coordinates and/or (b) produce abipartite graph 406B with rasterized inputs and rasterized outputs downsampled along channels. This novel approach with respect to downsampling convolutional layers to reduce the dimensions of the bipartite graph 406 of activation weights connecting the inputs to the outputs of a layer may lead to faster computations of topological features due to reduced graph size. - For example, a convolutional layer can be denoted as the triplet (h, w, c), where (h,w) (e.g., spatial coordinates) indicates the height and the width of the image obtained from the layer, and where c denotes the number of channels in the layer.
- The approach (a) can include downsampling along the spatial coordinates of the rasterized input-output representation of the convolutional layers. The OOD detection performance can be analyzed on a test case by varying the downsampling rate. For example, downsampling can lead to a trade-off in the computational cost and the OOD detection accuracy (e.g., as quantified by the area under ROC curve (AUC)). Any suitable downsampling rate can be selected that suits a desired speed-vs-performance tradeoff.
- The approach (b) can include downsampling along the channel dimension of the rasterized input-output representation of the convolutional layers. The OOD detection performance can be analyzed on a test case by varying the downsampling rate. The downsampling can leads to a trade-off in the computational cost and the OOD detection accuracy (e.g., as quantified by the area under ROC curve (AUC)). Any suitable downsampling rate can be selected that suits a desired speed-vs-performance tradeoff.
- Referring now to
FIG. 5A , to illustrate advantages of downsampling along spatial coordinates, an exemplary CNN model architecture with an activation graph associated with a layer for TU computation according to the inventive concepts disclosed herein is depicted. For example, the exemplary CNN model architecture was selected to be a shallow CNN trained with ADAM (e.g., a type of optimization algorithm) on a Modified National Institute of Standards and Technology (MNIST) database (e.g., which is a database of handwritten digits from 0 -9). The exemplary CNN model architecture was tested on in-distribution MNIST and out-of-distribution (OOD) Fashion MNIST dataset (FMINIST). As shown, the activation graph for the layer for TU computation has dimensions of 3240 × 1280. - Referring now to
FIGS. 5B ,5C , and5D , graphs showing advantages of downsampling along spatial coordinates for TU computations of the last convolutional layer of the exemplary CNN model architecture ofFIG. 5A according to the inventive concepts disclosed herein are depicted. Test results associated with TU were compared on the last convolutional layer for downsampling rates of 1 (i.e., a baseline TU computation with no downsampling), 2, 4, and 6. The baseline TU approach involves a TU computation over the complete activation graph. As shown inFIGS. 5B ,5C , and5D , downsampling along spatial coordinates provides a significant tradeoff in computational cost. For example, a downsampling rate of 2 results in a 16x speed-up in training time and a 10x speedup in test-time implementation with a closely comparable classification performance (e.g., Area under ROC curve (AUC) of 0.95 vs 0.97). As tested, higher downsampling rates resulted in diminishing returns with respect to AUC vs computational cost tradeoff. - Referring now to
FIGS. 6A , to illustrate advantages of downsampling along channels, an exemplary CNN model architecture with an activation graph associated with a layer for TU computation according to the inventive concepts disclosed herein is depicted. For example, the exemplary CNN model architecture was selected to be a shallow CNN trained with ADAM on MNIST. The exemplary CNN model architecture was tested on in-distribution MNIST and out-of-distribution (OOD) Fashion MNIST dataset (FMINIST). As shown, the activation graph for the layer for TU computation has dimensions of 2400 × 1536. - Referring now to
FIGS. 6B ,6C , and6D , graphs showing advantages of downsampling along channels for TU computations of the last convolutional layer of the exemplary CNN model architecture ofFIG. 6A according to the inventive concepts disclosed herein are depicted. Test results associated with TU were compared on the last convolutional layer for downsampling rates of 1 (i.e., a baseline TU computation with no downsampling), 2, 4, and 6. The baseline TU approach involves a TU computation over the complete activation graph. As shown inFIGS. 6B ,6C , and6D , downsampling along channels leads to significantly faster computations with little degradation in OOD detection. For example, a downsampling rate of rate of 6 results in 35x speed-up in training time and 15x speedup in test-time implementation with a closely comparable classification performance (Area under ROC curve (AUC) of 1 vs 0.99). - Referring generally now to
FIGS. 7A ,7B ,7C ,7D ,7E ,8A , and8B , exemplary embodiments using asystem 100 configured to determine an incoming observation to be an OOD sample during NN inference by using histograms according to the inventive concepts disclosed herein are described and depicted. - Some embodiments may include calculating a feature vector of interest, which summarizes what a pre-trained NN has learned from the training data. A probability distribution of the activation weights for class k and the NN layer l may be considered as a feature of interest. A histogram of the weights of a NN layer under the influence of an incoming observation x may be denoted as
h k,l , which may be calculated in the training phase.h k,l denotes the average of the features hl for the training examples belonging to class k.h k,l approximates the probability distribution of the activation weights for class k and the NN layer l. During a test phase (also referred to as inference), for an incoming observation x 0, predicted (e.g., classified by the trained NN) class label k 0 may be found, and a distance score d(hl (x 0),h k0 , l ) may be calculated, where the distance metric d may be chosen as the 1-D Wasserstein distance between two probability mass functions. Based on the value of the calculated distance score d(hl(x 0),h k0 , l ), if the distance score is greater than a pre-defined threshold, thecomputing device 108 may alert the user that the incoming observation is an OOD sample such that the NN prediction (e.g., classification) of the class label k 0 may not be trusted with high confidence. If the score is lower than the threshold, there may be no alert of data drift and the NN predictions may be trusted. This histogram approach is different from calculating the topological features. In some embodiments, the histogram approach may be significantly faster than calculating the topological features and can potentially perform better than the topological approach. - Referring now to
FIG. 7A , to illustrate advantages of using histograms, an exemplary CNN model architecture with an activation graph associated with a layer for histogram computation according to the inventive concepts disclosed herein is depicted. For example, the exemplary CNN model architecture was selected to be a CNN trained with ADAM on MNIST. The exemplary CNN model architecture was tested on in-distribution MNIST and out-of-distribution (OOD) Fashion MNIST dataset (FMINIST). - Referring now to
FIG. 7B , an exemplary trainedCNN 704 associated with a layer for histogram computations as compared to a topological computation according to the inventive concepts disclosed herein is depicted. An example of a given average histogram (e.g., 706-N) (e.g., calculated using the histogram approach) of activation weights as compared to an example of a given average persistence diagram (e.g., calculated using the topological approach) are also shown. Calculating the persistence diagrams can be computationally expensive. Persistence diagrams result in a probability distribution over a subset of the activation weights. Whereas, the histogram approach considers the probability distribution of all of the activation weights of the NN layer, approximated by histograms, which may be significantly faster than the persistence diagram-based computations. - Referring now to
FIGS. 7C ,7D , and7E , graphs showing advantages of using the histogram approach as compared to TU computations for the last convolutional layer of the exemplary CNN model architecture ofFIG. 7A according to the inventive concepts disclosed herein are depicted. The baseline TU approach involves a TU computation over the complete activation graph. - As shown in
FIGS. 7C ,7D , and7E , activation matrix size indicates the size of the input-output connectivity matrix for edge weights of the neural network layer. An ablation study with activation matrix size up to (104) indicates that the proposed histogram approach can accelerate the training and inference time required by at least 10x. For real world CNNs used in ATR, when considering convolutional layers, the activation matrix size can be ~ (106) to (1010). In such situations, the expected speed up may be at least 40-50x. For example, a 50x speed-up was found in the test-phase by using this approach on the last dense layer of MobineNetV2 having an activation matrix size of 1.28 × 106, trained on Imagenet-1k (in-distribution). For example, with an appropriate choice of binning in approximating the probability distribution in histograms, it is possible to have better performance than the topological approach (as shown in the top curve inFIG. 7C ). - Referring now to
FIGS. 8A and8B , diagrams associated with exemplary embodiments of training a NN (as shown inFIG. 8A ) and using the trained NN to determine an incoming observation to be an OOD sample during inference (as shown inFIG. 8B ) according to the inventive concepts disclosed herein are depicted. - As exemplarily shown in
FIG. 8A , thecomputing device 102 may be configured to use training data 702 (e.g., a training set) to output (e.g., to the computing device 108) a trained NN 704 (e.g., a trained DNN and/or a trained CNN) and/or average histograms 706-1, 706-2, 706-3, ..., 706-N (e.g., including a given average histogram (e.g., one of 706-1, 706-2, 706-3, ..., or 706-N)). The trainedNN 704 may have classes, layers, and activation weights for the classes and layers, wherein the classes including a given class, wherein the layers including a given layer. For example, the given average histogram may approximate a probability distribution of the activation weights for the given class and the given layer. - As exemplarily shown in
FIG. 8B , thecomputing device 108 may be configured: obtaintest data 810, which may include and/or be associated with an incoming observation influencing the given layer; calculate acorresponding histogram 812 of the incoming observation, the corresponding histogram summarizing statistics of the incoming observation for the given layer; perform astep 820 of, based at least on the trained NN, classify the incoming observation as being in the given class; perform astep 814 of, for the incoming observation classified to be in the given class, calculate a distance score associated with a distance between the corresponding histogram of the incoming observation and the given average histogram; perform astep 816 of, based at least on a comparison of the calculated distance score and a threshold, determine whether the incoming observation is an OOD sample; perform astep 818 of, if the incoming observation is an OOD sample, at least one of output an alert indicating that the incoming observation is OOD or discard the classification of the incoming observation as being in the given class; perform astep 822 of, if the incoming observation is not an OOD sample, trust the classification of the incoming observation as being in the given class; and/or perform astep 824 of outputting the classification of the incoming observation as being in the given class. - Referring now to
FIG. 9 , an exemplary embodiment of amethod 900 according to the inventive concepts disclosed herein may include one or more of the following steps. Additionally, for example, some embodiments may include performing one or more instances of themethod 900 iteratively, concurrently, and/or sequentially. Additionally, for example, at least some of the steps of themethod 900 may be performed in parallel, iteratively, and/or concurrently. Additionally, in some embodiments, at least some of the steps of themethod 900 may be performed non-sequentially. - A
step 902 may include obtaining, by at least one processor, a trained neural network (NN) having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer. - A
step 904 may include obtaining or calculating, by the at least one processor, at least one average feature information associated with the trained NN, each of the at least one average feature information including a given average feature information summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class. - A
step 906 may include receiving, by the at least one processor, an incoming observation influencing the given layer. - A
step 908 may include calculating, by the at least one processor, a corresponding feature information of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer. - A
step 910 may include based at least on the trained NN, classifying, by the at least one processor, the incoming observation as being in the given class. - A
step 912 may include for the incoming observation classified to be in the given class, calculating, by the at least one processor, a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information. - A
step 914 may include based at least on the calculated distance score, determining, by the at least one processor, that the incoming observation is an out-of-distribution (OOD) sample. - A
step 916 may include upon a determination that the incoming observation is the OOD sample, at least one of: outputting, by the at least one processor, an alert indicating that the incoming observation is OOD; or discarding, by the at least one processor, the classification of the incoming observation as being in the given class. - Further, the
method 900 may include any of the operations disclosed throughout. - Referring generally again to
FIGS. 1-9 , as will be appreciated from the above, embodiments of the inventive concepts disclosed herein may be directed to a system and a method configured to determine an incoming observation to be an OOD sample during NN (e.g., DNN and/or CNN) inference. - As used throughout and as would be appreciated by those skilled in the art, "at least one non-transitory computer-readable medium" may refer to as at least one non-transitory computer-readable medium (e.g., at least one computer-readable medium implemented as hardware; e.g., at least one non-transitory processor-readable medium, at least one memory (e.g., at least one nonvolatile memory, at least one volatile memory, or a combination thereof; e.g., at least one random-access memory, at least one flash memory, at least one read-only memory (ROM) (e.g., at least one electrically erasable programmable read-only memory (EEPROM)), at least one on-processor memory (e.g., at least one on-processor cache, at least one on-processor buffer, at least one on-processor flash memory, at least one on-processor EEPROM, or a combination thereof), or a combination thereof), at least one storage device (e.g., at least one hard-disk drive, at least one tape drive, at least one solid-state drive, at least one flash drive, at least one readable and/or writable disk of at least one optical drive configured to read from and/or write to the at least one readable and/or writable disk, or a combination thereof), or a combination thereof).
- As used throughout, "at least one" means one or a plurality of; for example, "at least one" may comprise one, two, three, ..., one hundred, or more. Similarly, as used throughout, "one or more" means one or a plurality of; for example, "one or more" may comprise one, two, three, ..., one hundred, or more. Further, as used throughout, "zero or more" means zero, one, or a plurality of; for example, "zero or more" may comprise zero, one, two, three, ..., one hundred, or more.
- In the present disclosure, the methods, operations, and/or functionality disclosed may be implemented as sets of instructions or software readable by a device. Further, it is understood that the specific order or hierarchy of steps in the methods, operations, and/or functionality disclosed are examples of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the methods, operations, and/or functionality can be rearranged while remaining within the scope of the inventive concepts disclosed herein. The accompanying claims may present elements of the various steps in a sample order, and are not necessarily meant to be limited to the specific order or hierarchy presented.
- It is to be understood that embodiments of the methods according to the inventive concepts disclosed herein may include one or more of the steps described herein. Further, such steps may be carried out in any desired order and two or more of the steps may be carried out simultaneously with one another. Two or more of the steps disclosed herein may be combined in a single step, and in some embodiments, one or more of the steps may be carried out as two or more sub-steps. Further, other steps or sub-steps may be carried in addition to, or as substitutes to one or more of the steps disclosed herein.
- From the above description, it is clear that the inventive concepts disclosed herein are well adapted to carry out the objects and to attain the advantages mentioned herein as well as those inherent in the inventive concepts disclosed herein. While presently preferred embodiments of the inventive concepts disclosed herein have been described for purposes of this disclosure, it will be understood that numerous changes may be made which will readily suggest themselves to those skilled in the art and which are accomplished within the broad scope and coverage of the inventive concepts disclosed and claimed herein.
Claims (15)
- A system, comprising:
at least one processor (110) configured to:obtain a trained neural network, NN, having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer;obtain or calculate at least one average feature information associated with the trained NN, each of the at least one average feature information including a given average feature information summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class;receive an incoming observation influencing the given layer;calculate a corresponding feature information of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer;based at least on the trained NN, classify the incoming observation as being in the given class;for the incoming observation classified to be in the given class, calculate a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information;based at least on the calculated distance score, determine that the incoming observation is an out-of-distribution, OOD, sample; andupon a determination that the incoming observation is the OOD sample, at least one of output an alert indicating that the incoming observation is OOD or discard the classification of the incoming observation as being in the given class. - The system of claim 1, wherein the at least one average feature information is at least one average feature vector, wherein the given average feature information is a given average feature vector, wherein the corresponding feature information is a corresponding feature vector.
- The system of claim 1, wherein the at least one average feature information is at least one average topological persistence diagram, wherein the given average feature information is a given average topological persistence diagram, wherein the corresponding feature information is a corresponding topological persistence diagram.
- The system of claim 3, wherein the trained NN is a trained convolutional neural network, CNN, wherein the layers are convolutional layers, the given layer is a given convolutional layer, wherein the at least one processor is further configured to: downsample rasterized inputs and rasterized outputs along at least one of (a) spatial coordinates of an image obtained from the given convolutional layer or (b) channels of the given convolutional layer to generate a bipartite graph, the bipartite graph having the activation weights connecting the downsampled rasterized inputs to the downsampled rasterized outputs of the given layer, the bipartite graph used for topological persistence diagram calculations.
- The system of claim 4, wherein the at least one processor (110) is further configured to: downsample the rasterized inputs and the rasterized outputs along the spatial coordinates of the image obtained from the given convolutional layer; orwherein the at least one processor is further configured to: downsample the rasterized inputs and the rasterized outputs along the channels of the given convolutional layer; orwherein the at least one processor is further configured to: downsample the rasterized inputs and the rasterized outputs along the spatial coordinates of the image obtained from the given convolutional layer and along the channels of the given convolutional layer.
- The system of claim 1, wherein the at least one average feature information is at least one average histogram, wherein the given average feature information is a given average histogram, wherein the corresponding feature information is a corresponding histogram.
- The system of claim 6, wherein the given average histogram is a histogram of the activation weights of the given layer and of the given class for training examples associated with the trained NN, wherein the given average histogram approximates a probability distribution of the activation weights for the given class and the given layer, wherein the corresponding histogram is a histogram of the statistics of the incoming observation for the given layer; and optionally wherein the distance is a one-dimensional Wasserstein distance between two probability mass functions.
- The system of any preceding claim, wherein the trained NN is at least one of a trained deep neural network, DNN, or a trained convolutional neural network, CNN.
- The system of any preceding claim, wherein the at least one processor (110) is further configured to: based at least on the calculated distance score and a predetermined distance threshold, determine that the incoming observation is an out-of-distribution, OOD, sample.
- The system of any preceding claim, wherein the at least one processor is further configured to: upon the determination that the incoming observation is the OOD sample, output the alert indicating that the incoming observation is OOD; and/or wherein the at least one processor is further configured to: upon the determination that the incoming observation is the OOD sample, discard the classification of the incoming observation as being in the given class; and/or wherein the at least one processor (110) is further configured to: use the trained NN to perform automatic target recognition, ATR.
- The system of any preceding claim, wherein the at least one processor (110) is further configured to at least one of: use the trained NN to perform a computer-vision-based autonomous landing; use the trained NN to perform computer-vision-based collision avoidance; use the trained NN to perform detection of activity of a person onboard a vehicle; or use the trained NN to perform computer-vision-based vehicle path planning.
- The system of any preceding claim, wherein the system is a vehicle.
- A method, comprising:obtaining, by at least one processor, a trained neural network, NN, having classes, layers, and activation weights for the classes and layers, the classes including a given class, the layers including a given layer;obtaining or calculating, by the at least one processor, at least one average feature information associated with the trained NN, each of the at least one average feature information including a given average feature information summarizing in-class statistics that each layer of the layers of the trained NN uses for the given class;receiving, by the at least one processor, an incoming observation influencing the given layer;calculating, by the at least one processor, a corresponding feature information of the incoming observation, the corresponding feature information summarizing statistics of the incoming observation for the given layer;based at least on the trained NN, classifying, by the at least one processor, the incoming observation as being in the given class;for the incoming observation classified to be in the given class, calculating, by the at least one processor, a distance score associated with a distance between the corresponding feature information of the incoming observation and the given average feature information;based at least on the calculated distance score, determining, by the at least one processor, that the incoming observation is an out-of-distribution, OOD, sample; andupon a determination that the incoming observation is the OOD sample, at least one of: outputting, by the at least one processor, an alert indicating that the incoming observation is OOD; or discarding, by the at least one processor, the classification of the incoming observation as being in the given class.
- The method of claim 13, wherein the at least one average feature information is at least one average topological persistence diagram, wherein the given average feature information is a given average topological persistence diagram, wherein the corresponding feature information is a corresponding topological persistence diagram, wherein the trained NN is a trained convolutional neural network, CNN, wherein the layers are convolutional layers, the given layer is a given convolutional layer, wherein the method further comprises: downsampling, by the at least one processor, rasterized inputs and rasterized outputs along at least one of (a) spatial coordinates of an image obtained from the given convolutional layer or (b) channels of the given convolutional layer to generate a bipartite graph, the bipartite graph having the activation weights connecting the downsampled rasterized inputs to the downsampled rasterized outputs of the given layer, the bipartite graph used for topological persistence diagram calculations.
- The method of claim 13, wherein the at least one average feature information is at least one average histogram, wherein the given average feature information is a given average histogram, wherein the corresponding feature information is a corresponding histogram, wherein the given average histogram is a histogram of the activation weights of the given layer and of the given class for training examples associated with the trained NN, wherein the given average histogram approximates a probability distribution of the activation weights for the given class and the given layer, wherein the corresponding histogram is a histogram of the statistics of the incoming observation for the given layer.
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/238,180 US12494052B2 (en) | 2023-08-25 | 2023-08-25 | System and method for determining incoming observation to be out-of-distribution (OOD) sample during neural network (NN) inference |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| EP4524817A1 true EP4524817A1 (en) | 2025-03-19 |
Family
ID=92538767
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP24196017.8A Pending EP4524817A1 (en) | 2023-08-25 | 2024-08-22 | System and method for determining incoming observation to be out-of-distribution (ood) sample during neural network (nn) inference |
Country Status (2)
| Country | Link |
|---|---|
| US (1) | US12494052B2 (en) |
| EP (1) | EP4524817A1 (en) |
Family Cites Families (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7405694B1 (en) | 2006-03-06 | 2008-07-29 | Rockwell Collins, Inc. | Communication link time transfer to improve navigation system accuracy |
| EP3507773A1 (en) * | 2016-09-02 | 2019-07-10 | Artomatix Ltd. | Systems and methods for providing convolutional neural network based image synthesis using stable and controllable parametric models, a multiscale synthesis framework and novel network architectures |
| US11501152B2 (en) | 2017-05-05 | 2022-11-15 | Intel Corporation | Efficient learning and using of topologies of neural networks in machine learning |
| US20190122073A1 (en) | 2017-10-23 | 2019-04-25 | The Charles Stark Draper Laboratory, Inc. | System and method for quantifying uncertainty in reasoning about 2d and 3d spatial features with a computer machine learning architecture |
| US10699194B2 (en) | 2018-06-01 | 2020-06-30 | DeepCube LTD. | System and method for mimicking a neural network without access to the original training dataset or the target model |
| US11537846B2 (en) | 2018-08-21 | 2022-12-27 | Wisconsin Alumni Research Foundation | Neural network architecture with concurrent uncertainty output |
| US12602573B2 (en) | 2018-09-28 | 2026-04-14 | National Technology & Engineering Solutions Of Sandia, Llc | Neural network robustness via binary activation |
| US11983618B2 (en) | 2019-04-12 | 2024-05-14 | Ohio State Innovation Foundation | Computing system and method for determining mimicked generalization through topologic analysis for advanced machine learning |
| US11893495B2 (en) | 2019-09-05 | 2024-02-06 | Schlumberger Technology Corporation | Dual neural network architecture for determining epistemic and aleatoric uncertainties |
| US20210142160A1 (en) | 2019-11-08 | 2021-05-13 | Nvidia Corporation | Processor and system to identify out-of-distribution input data in neural networks |
| US20210365771A1 (en) | 2020-05-21 | 2021-11-25 | International Business Machines Corporation | Out-of-distribution (ood) detection by perturbation |
| US12602581B2 (en) | 2020-05-31 | 2026-04-14 | Salesforce, Inc. | Systems and methods for out-of-distribution detection |
| US11603119B2 (en) * | 2020-10-12 | 2023-03-14 | Great Wall Motor Company Limited | Method and apparatus for out-of-distribution detection |
| US12026468B2 (en) | 2020-11-30 | 2024-07-02 | Oracle International Corporation | Out-of-domain data augmentation for natural language processing |
| US11978258B2 (en) | 2021-04-06 | 2024-05-07 | Nvidia Corporation | Techniques for identification of out-of-distribution input data in neural networks |
| US20230072878A1 (en) | 2021-09-08 | 2023-03-09 | Dell Products L.P. | Automated topology-aware deep learning inference tuning |
| US12198337B2 (en) * | 2022-01-17 | 2025-01-14 | Siemens Healthineers Ag | Out-of-distribution detection for artificial intelligence systems for prostate cancer detection |
| CN114897134A (en) | 2022-04-26 | 2022-08-12 | 清华大学 | Method and system for estimating neural network uncertainty through data enhancement |
| US20240232586A9 (en) * | 2022-10-24 | 2024-07-11 | Raytheon Company | Topology-augmented system for ai-model mismatch |
-
2023
- 2023-08-25 US US18/238,180 patent/US12494052B2/en active Active
-
2024
- 2024-08-22 EP EP24196017.8A patent/EP4524817A1/en active Pending
Non-Patent Citations (4)
| Title |
|---|
| OLBER BARTLOMIEJ ET AL: "Detection of Out-of-Distribution Samples Using Binary Neuron Activation Patterns", 2023 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), IEEE, 17 June 2023 (2023-06-17), pages 3378 - 3387, XP034403143, DOI: 10.1109/CVPR52729.2023.00329 * |
| TH\'EO LACOMBE ET AL: "Topological Uncertainty: Monitoring trained neural networks through persistence of activation graphs", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 7 May 2021 (2021-05-07), XP081960631 * |
| XIN DONG ET AL: "Lightweight Detection of Out-of-Distribution and Adversarial Samples via Channel Mean Discrepancy", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 23 April 2021 (2021-04-23), XP081942615 * |
| YIYOU SUN ET AL: "ReAct: Out-of-distribution Detection With Rectified Activations", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 24 November 2021 (2021-11-24), XP091102846 * |
Also Published As
| Publication number | Publication date |
|---|---|
| US20250069381A1 (en) | 2025-02-27 |
| US12494052B2 (en) | 2025-12-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11461915B2 (en) | Object size estimation using camera map and/or radar information | |
| US11361187B1 (en) | Neural networks for coarse- and fine-object classifications | |
| US11393121B2 (en) | Dense depth estimation of image data | |
| US11373064B2 (en) | Cross-modality automatic target recognition | |
| US11468266B2 (en) | Target identification in large image data | |
| KR102358472B1 (en) | Method for scheduling of shooting satellite images based on deep learning | |
| CN117242455B (en) | A method and apparatus for fault monitoring of neural network models in an autonomous driving system | |
| Cruz et al. | Learning temporal features for detection on maritime airborne video sequences using convolutional LSTM | |
| US20240419974A1 (en) | Methods and systems for training and validating a perception system | |
| US20250061591A1 (en) | Stacking color and motion signal to detect tiny objects | |
| Alshaer et al. | Vision‐based UAV detection and tracking using deep learning and Kalman filter | |
| CN113610762A (en) | Early warning method and early warning system for solar flare | |
| Ihekoronye et al. | Aerial supervision of drones and other flying objects using convolutional neural networks | |
| KR20230097925A (en) | Method And Apparatus for End-to-End Real-Time Classification of Weather And Road Condition Using LiDAR | |
| Omidshafiei et al. | Hierarchical bayesian noise inference for robust real-time probabilistic object classification | |
| Sachenko et al. | Real-time military vehicle classification via convolutional neural networks | |
| Aswini et al. | Custom based obstacle detection using yolo v3 for low flying drones | |
| EP4524817A1 (en) | System and method for determining incoming observation to be out-of-distribution (ood) sample during neural network (nn) inference | |
| Lu et al. | Target localization with drones using mobile CNNs | |
| Kazmi et al. | Real-Time Vehicle Detection with Advanced Machine Learning Algorithms | |
| Rahmania et al. | Exploration of the impact of kernel size for YOLOv5-based object detection on quadcopter | |
| Zhang et al. | Rocket image classification based on deep convolutional neural network | |
| Dos Santos et al. | Performance comparison of convolutional neural network models for object detection in tethered balloon imagery | |
| Raj et al. | Aerial Vehicle Classification Using a Custom Lightweight CNN: A Deep Learning Approach | |
| Poojitha et al. | Aircraft recognition system using deep learning based efficientnet |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE APPLICATION HAS BEEN PUBLISHED |
|
| AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC ME MK MT NL NO PL PT RO RS SE SI SK SM TR |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE |
|
| 17P | Request for examination filed |
Effective date: 20250903 |