Apparatus and method for anomaly detection - Patents.com

The unsupervised anomaly detection method using a neural network-based autoencoder addresses the lack of labeled data by decomposing and analyzing heterogeneous features with tailored loss functions and user feedback, enhancing detection accuracy and explainability.

JP7551011B2Active Publication Date: 2024-09-13MITSUBISHI ELECTRIC CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2023574887
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-03-16
Filing Date
2021-11-30
Publication Date
2024-09-13
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

Existing anomaly detection systems using autoencoders struggle with the lack of labeled anomaly data for training, especially in real-world applications with heterogeneous data features, leading to inefficiencies in detecting and explaining anomalies.

Method used

An unsupervised anomaly detection method using a neural network-based autoencoder that decomposes input data into multiple features, applies different loss functions based on feature types, and adjusts thresholds and weights based on user feedback to improve detection accuracy and explainability.

Benefits of technology

Enhances anomaly detection accuracy by individually analyzing each feature, providing explainability on anomaly causes, and adapting to user feedback, thus improving the system's performance in handling heterogeneous data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007551011000008
    Figure 0007551011000008
  • Figure 0007551011000007
    Figure 0007551011000007
  • Figure 0007551011000004
    Figure 0007551011000004
Patent Text Reader

Abstract

The anomaly detector for detecting anomalies in input data includes an autoencoder trained to encode the input data and decode the encoded input data to reconstruct the input data. The anomaly detector further includes a classifier trained to determine a reconstruction loss indicative of a difference between the accepted input data and the reconstructed input data, the reconstruction loss including multiple loss functions that evaluate the reconstruction loss of multiple portions of the reconstructed input data, different types of loss functions, or a weighted combination of both. The classifier is further configured to detect anomalies in the reconstructed input data if the reconstruction loss is above a threshold.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates generally to anomaly detection, and more particularly to an apparatus and method for detecting anomalies using an autoencoder. [Background technology]

[0002] Anomaly detection generally involves the task of detecting abnormal situations. This task is widely applicable to a variety of applications, such as security, safety, quality control, fault monitoring, and process control. Across a variety of applications, the goal of anomaly detection is typically to raise an alert about unusual situations that require further investigation and potentially responsive action to mitigate adverse issues. Because manual investigation and response can be costly with vast information flows, it would be useful for the anomaly detection system to also provide information that helps explain the reason for the detection to guide investigation and appropriate response.

[0003] Traditional anomaly detectors use autoencoders that reconstruct input data, and the reconstruction loss between the input data and the reconstructed data is used to detect anomalies in the input data. One of the main problems in training anomaly detectors is the lack of training data with anomalies. Therefore, autoencoders that are configured to detect anomalies are currently trained on normal, non-anomalous data. The concept of training an autoencoder on only non-anomalous data is called one-class learning, which models the data distribution of "normal" (non-anomalous) data samples. In this approach, the reconstruction loss of the autoencoder acts as an indicator of whether the input data examples (given at test time) are anomalous or not, with higher reconstruction errors indicating anomalies, since it is a general principle that an autoencoder should learn to effectively reconstruct normal data, but have higher errors for anomalous data. Thus, thresholding the error acts as an anomaly detector.

[0004] However, one-class classifiers for anomaly detection may not be able to adequately handle the rich context of real-world practical applications, and the input data used for anomaly detection contains multiple possible heterogeneous features. Thus, there is a need for an anomaly detector that individually analyzes each feature of the input data to detect anomalies and / or provides information explaining the reason for the detected anomalies. Summary of the Invention

[0005] Some embodiments are based on the recognition that it is difficult to obtain labeled anomalous data to train an anomaly detector to detect anomalies. Therefore, an unsupervised anomaly detection method is used that includes training an anomaly detector with normal data. When anomalous data is input to an anomaly detector that has been trained with normal or benign data, the anomaly detector may detect the anomalous data. Such training is referred to herein as a one-class classifier.

[0006] However, the input data includes multiple features. Training a one-class classifier for anomaly detection cannot analyze each feature of the input data individually. Therefore, current anomaly detectors, even if they detect an anomaly, cannot provide information about which feature of the input data is determined to be anomalous. Such information can be very useful in guiding the investigation of the detected anomaly. For example, some embodiments are based on the recognition that different features of the input data may contribute differently to an anomaly. By analyzing the different features separately, but jointly, the accuracy of anomaly detection can be improved.

[0007] Additionally or alternatively, some embodiments are based on the recognition that sometimes abnormal training data is available but in a sufficient amount to train a multi-class classifier. Some embodiments are based on the recognition that a one-class classifier is still preferable to a multi-class classifier when some classes are undertrained. Thus, unfortunately, for the training of a one-class classifier, an insufficient amount of abnormal training data is ignored.

[0008] To address this issue, some embodiments use the available anomaly training data to tune the anomaly detection threshold of a one-class classifier, instead of using the available anomaly training data to train a multi-class classifier. These embodiments, alone or in combination with a composite loss function, may improve the accuracy of anomaly detection without increasing the complexity of its training.

[0009] For example, some embodiments perform anomaly detection on structured sequential data, where the data samples contain a mixture of different types of features: some features are categorical, some are words from a large vocabulary, and some are numeric. Processing the sequential data requires combining different types of values ​​corresponding to different types of features in order to detect anomalies. These various data types occur in sequential data such as Internet proxy logs, where some fields are categorical (commands, protocols, error codes, etc.), some are words (domain names, URL paths, file names, etc.), and others are numeric (data sizes, character statistics, timings, etc.).

[0010] Some embodiments use an anomaly detector trained with a one-class label model to perform anomaly detection in Internet proxy log data to detect cyber attacks and other malicious activities against cyber-physical systems in computer networks. The goal of the anomaly detector is to help automate the detection and response of cyber attacks, and also to provide an explanation of why the data is deemed anomalous to guide investigation and appropriate response. Raw Internet traffic log data contains log entries of Internet traffic requests from many different users, and these different data streams are essentially interleaved in the log data records. Therefore, the proposed anomaly detector first de-interleaves the sequences of log entries generated by different users, and then treats each user's sequence independently. The alternative of simply processing all of the sequences while interleaved may overly burden the training of the autoencoder with additional unnecessary complexity.

[0011] Some embodiments are based on the recognition that Internet proxy log data contains data samples with a heterogeneous mix of different features. Some of the features appear naturally in the data (proxy log entries contain numeric, categorical, and text fields). Internet proxy log data is a type of sequential data. In sequential data, within each sequence, the data is structured as a mix of different types of features. Some features are categorical, some are words from a large vocabulary, and some are numeric. In particular, for sequential data corresponding to Internet traffic logs, the important raw features are the HTTP command and the URL accessed. The HTTP command is an example of a categorical feature that comes from a limited set of possibilities (e.g., GET, POST, HEAD, etc.). However, a URL is composed of many different parts, including a protocol (e.g., most commonly "http", "https", or "ftp"), a domain name, and a top-level domain, and potentially also subdomains, paths, file names, file extensions, and parameters. While the protocol and top-level domain are categorical variables, the remainder of the URL are general words and symbols that may come from a very large vocabulary. Thus, to handle the features of a URL, in some embodiments, the URL is decomposed by treating the protocol and top-level domain as categorical features, treating the domain name and subdomain as words from a large vocabulary, and computing numerical statistics on the paths and parameters.

[0012] To handle domain and subdomain words, forming a vocabulary of the most commonly found words from the training data is used. Words outside the most common set may be labeled as an "other" group. However, the required vocabulary is still very large, making the size of the vocabulary difficult to handle. Therefore, to handle the size of the vocabulary during training, a word embedding module may be used, which may be pre-trained on each feature of the multiple features present in the URL, thereby converting each word into a feature vector of smaller dimensions rather than using a very large one-hot categorical encoding. These embedding vectors (i.e., feature vectors) are then used instead of the original domain / subdomain words as processed features for the autoencoder to operate with.

[0013] In some embodiments, for other categorical features that have a manageable number of categories, the set of categories may be reduced to only those most commonly seen during training, and the remainder may be labeled as "other" categories.

[0014] In some embodiments, the anomaly detector breaks each sequence of input sequential data into multiple fields based on multiple features of the sequential data. Furthermore, data corresponding to each feature contained in each field is vectorized, concatenated, and provided to the autoencoder. The autoencoder is trained to compress and reconstruct the concatenated data. The overall reconstruction loss for the autoencoder training is calculated by combining the individual losses for each individual feature. For embedded word features, the loss is measured in the form of mean squared error or mean absolute error of the word embedding feature vector. For categorical features, the loss is measured by cross-entropy loss. For numerical features, the loss is measured by the mean squared error or mean absolute error of the numeric values. All these individual loss terms are combined as a weighted average to form the overall reconstruction loss.

[0015] In some embodiments, to cover different types of structured sequential data, the anomaly detector includes a flexible structure that provides feature selection among categorical features that require embedding, categorical features that require one-hot encoding, or numerical features. Thus, the flexible structure provides a loss function selection mechanism that adaptively selects the best set of loss functions for the selected features.

[0016] Some embodiments are based on the recognition that detecting anomalies from a heterogeneous mixture of data features is a challenging task. The general approach of the anomaly detector for detecting anomalies can also be applied to other forms of data with a heterogeneous mixture of features. For example, in computer vision tasks, different color channels of an image may provide different levels of information. Furthermore, images may be pre-processed with various tools such as object detection, skeleton tracking, etc., that may yield different features in addition to the raw pixel values. In audiovisual data, sound is another heterogeneous feature that is part of the mixture. Video data may further have pre-processed motion vectors in addition to the raw images. Physiological data may also include heterogeneous features, for example when collected from different sensor modalities.

[0017] A heterogeneous mixture of features can be handled by an autoencoder that jointly encodes and decodes all features, and the overall reconstruction loss is produced as a weighted sum of individual loss terms for each feature, where each loss term is specific and appropriate for that feature (e.g., for Internet proxy data, mean squared error for numerical features, cross entropy for categorical features, etc.). Since the loss terms can be of different scales, weights are applied to the loss terms, which are further useful for emphasizing more important features and de-emphasizing less important features. However, given a training where the data contains only normal samples, it is difficult to know which features are most important for distinguishing unknown types of anomalies. Thus, the difficulty arises of determining and best utilizing the most important features.

[0018] After training, the autoencoder can be applied to detect anomalies in new data examples by determining the overall reconstruction loss and comparing it to a tunable threshold. Additionally, to gain some degree of explainability in detecting anomalies, individual loss terms can be examined to discover which features in particular contribute most to the loss. This will highlight the features that were most difficult to compress and reconstruct, suggesting that they may be the root of what makes a particular data example anomalous. Thus, this type of information can potentially flag the most anomalous features of interest to follow-up investigators.

[0019] Thus, the autoencoder is first trained offline using unsupervised learning, and then the autoencoder is further tuned online with a limited amount of labeled data generated by a user providing feedback at test time (supervised learning). Instead of keeping static loss term weights in the computation of the overall reconstruction loss and fixed thresholds for declaring anomalies, these weights and thresholds can be tuned in a supervised manner based on feedback from the user.

[0020] Furthermore, while providing the anomaly detection results to the user, feedback may be provided by the user, indicating false alarms and missed detections to the anomaly detector, thereby providing labels for a small set of useful data examples. With this small set of labeled data flagged by the user, the anomaly detector may retune the weights of the loss terms to improve detection performance.

[0021] For that purpose, the reconstruction loss is treated as a score calculated as a function of individual loss terms and weights corresponding to each feature of the multiple features of the input data. With the ground-truth labels indicated by the user for a small set of examples, the weights are adjusted to improve the detection performance based on the labeled small set of examples. This can be achieved in an online manner with only minor adjustments made incrementally for each labeled example, since limited feedback from the user is available during operation. In an exemplary embodiment, the adjustment can be realized specifically by a gradient descent step on the weights for the binary classification cross-entropy loss between the ground-truth labels (provided by the user feedback) and the classification score calculated from the reconstruction loss and a threshold.

[0022] Additionally, in the feedback, the user may also indicate roughly whether they wish to operate on a false alarm vs. missed detection trade-off curve if they wish (i.e., they may indicate whether they wish to have a better detection rate at the cost of more false alarms, or whether they wish to have fewer alarms at the cost of more missed detections). Thus, the threshold for comparing the overall reconstruction loss to detect anomalies is increased or decreased in response to the user's feedback. However, using a small set of labeled examples generated by the user feedback, the threshold may be tuned so that the anomaly detector operates at the desired false alarm vs. missed detection trade-off, in order to make a calibrated adjustment of the threshold to achieve the particular trade-off point indicated by the user.

[0023] Thus, one of the embodiments discloses an anomaly detector including an input interface configured to accept input data, at least one processor, and a memory in which instructions forming a module of the anomaly detector are stored, the at least one processor being configured to execute the instructions of the module of the anomaly detector. The module includes an autoencoder including an encoder trained to encode the input data and a decoder trained to decode the encoded input data to reconstruct the input data. The module further includes a classifier trained to determine a reconstruction loss indicative of a difference between the accepted input data and the reconstructed input data, the reconstruction loss including a weighted combination of multiple loss functions, different types of loss functions, or both, that evaluate the reconstruction loss of multiple portions of the reconstructed input data. The classifier module is further configured to detect an anomaly in the reconstructed input data if the reconstruction loss is above a threshold. The anomaly detector further includes an output interface configured to render a result of the detection of the anomaly.

[0024] Accordingly, one embodiment discloses a method for detecting anomalies, the method including receiving input data, encoding the input data, and decoding the encoded input data to reconstruct the input data, the method further including determining a reconstruction loss indicative of a difference between the accepted input data and the reconstructed input data, the reconstruction loss including a weighted combination of multiple loss functions, different types of loss functions, or both, that evaluate the reconstruction loss of multiple portions of the reconstructed input data, the method further including detecting an anomaly in the reconstructed input data if the reconstruction loss is above a threshold, and rendering a result of the detection of the anomaly. [Brief description of the drawings]

[0025] [Figure 1] FIG. 1 illustrates an anomaly detector for detecting anomalies from input data in accordance with an example embodiment. [Diagram 2] FIG. 2 illustrates a functional diagram of a tuning process in an anomaly detector in accordance with an illustrative embodiment. [Diagram 3] FIG. 1 is a schematic diagram illustrating an architecture of an anomaly detector in accordance with an example embodiment; [Figure 4] FIG. 4 illustrates method steps for detecting anomalies in accordance with an exemplary embodiment. [Figure 5A] FIG. 2 is a schematic diagram illustrating a workflow of an anomaly detector for detecting anomalies in Internet proxy data, according to an example embodiment. [Figure 5B] FIG. 1 illustrates the decomposition of data from Internet proxy logs into categorical and numerical features according to an exemplary embodiment. [Figure 5C] FIG. 2 illustrates a concatenation module configured to concatenate data corresponding to multiple features of a URL, according to an example embodiment. [Figure 6] 1 is a block diagram illustrating anomaly detection in video data in accordance with an example embodiment. [Figure 7] FIG. 2 illustrates a block diagram of a computer-based anomaly detector for detecting anomalies from input data in accordance with an illustrative embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0026] In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, it will be apparent to those skilled in the art that the present disclosure may be practiced without these specific details. In other instances, the devices and methods are shown only in block diagram form in order to avoid obscuring the present disclosure.

[0027] As used herein and in the claims, when used in conjunction with a list of one or more components or other items, the terms "for example," "for instance," and "such as," as well as the verbs "comprising," "having," "including," and other verb forms thereof, should each be construed as open-ended, meaning that the list should not be considered to exclude other additional components or items. The term "based on" means based at least in part on. Furthermore, it should be understood that the language and terminology used herein are for purposes of description and should not be considered limiting. Any headings used within this description are for convenience only and have no legal or limiting effect.

[0028] This disclosure proposes an anomaly detector to detect anomalies in sequential data, such as image data, video data, and internet proxy data, which contain a mixture of heterogeneous features. However, one of the difficulties in detecting anomalies is the lack of labeled anomaly data that can be used to train the anomaly detector. To overcome this difficulty, the proposed anomaly detector uses a neural network-based autoencoder. An autoencoder at a high level maps input data to itself (i.e., input data) through a latent space representation of the input data. For that purpose, the autoencoder encodes the input data into a latent space. Furthermore, the autoencoder decodes the encoded input data from the same latent space. A reconstruction loss between the input data to the autoencoder (or encoder) and the reconstructed data is estimated. The anomaly detector may be trained based on the reconstruction loss to detect anomalies in the input data. Thus, the proposed anomaly detector may be trained without labeled data (i.e., the anomaly detector is trained using the reconstruction loss). A detailed description of the proposed anomaly detector is provided below with respect to FIG. 1.

[0029] 1 illustrates an anomaly detector 101 for detection of anomalies from input data 103, according to an example embodiment. The anomaly detector 101 may include an input interface (not shown) to obtain the input data 103. The input data 103 may correspond to sequential data including a mixture of heterogeneous features. The sequential data may include text data (such as internet proxy log data), image data, video data, audio data, or protein sequences, etc. In some embodiments, the input data 103 may include multiple features, such as categorical or numerical features.

[0030] The anomaly detector 101 may include an autoencoder 105, which is a pair of neural networks: an encoder neural network and a decoder neural network. Input data 103 is provided to the autoencoder 105. The autoencoder 105 converts samples of the input data 103 into reduced-dimensional (compressed) representations, and the decoder uses these representations to reconstruct original data samples of the input data 103. The reconstructed input data 107 includes some reconstruction losses 115, which correspond to the difference between the original input data 103 and the reconstructed input data 107. The anomaly detector 101 determines anomalies in the input data 103 based on the calculation of the reconstruction losses 115.

[0031] To that end, the autoencoder 105 is trained on normal data samples (or benign data samples) associated with a type of input data 103, the autoencoder 105 is trained to encode the input data 103, and the decoder is trained to decode the encoded input data to reconstruct the input data 103 (i.e., reconstructed input data 107).

[0032] The anomaly detector 101 may include a classifier module 109 (also referred to as "classifier 109"). The reconstructed input data 107 is provided to the classifier 109, which is configured to determine a reconstruction loss 115 associated with the reconstructed input data 107. To determine the reconstruction loss 115, the classifier module 109 first determines a plurality of portions 111 of the reconstructed input data 107. In particular, the plurality of portions 111 is determined based on a plurality of features of the reconstructed input data 107. Each portion of the plurality of portions 111 includes reconstructed data corresponding to each feature of the plurality of features. The plurality of features may be inherited from the original accepted input data (input data 103) to the reconstructed input data 107. For example, in text data, the plurality of features may include categorical features or numerical features, etc.

[0033] The classifier module 109 is further configured to determine a plurality of loss functions 113 for each portion of the plurality of portions 111 of the reconstructed input data 107. Each loss function of the plurality of loss functions 113 accurately measures an individual loss (or an individual reconstruction loss) associated with each portion of the plurality of portions 111 of the reconstructed input data 107. In some embodiments, each loss function of the plurality of loss functions is selected based on the type of features included in each portion of the plurality of portions 111. For example, the classifier module 109 may determine a cross-entropy loss function to determine a loss corresponding to a portion of the reconstructed input data associated with categorical features. Similarly, a mean squared error (MSE) loss function may be used to determine a loss corresponding to a portion of the reconstructed input data 107 associated with numerical features.

[0034] Further, the classifier 109 is configured to determine a reconstruction loss 115 as a weighted combination of the multiple loss functions 113. To that end, the classifier module 109 may determine multiple weights that are used to weight each loss term of the multiple loss terms / functions 113. The multiple weights may be used to emphasize important features of the reconstructed input data 107 and de-emphasize less important features, thereby determining anomalies from the reconstructed input data 107.

[0035] To detect anomalies, the classifier module 109 is further configured to compare the reconstruction loss 115 (or the overall reconstruction loss) to a threshold reconstruction loss 117 (also referred to as “threshold 117”). In some embodiments, the threshold 117 may be determined based on a reconstruction loss between a plurality of normal data samples (or benign data samples) of the original input data 103 and a plurality of reconstructed data samples corresponding to the normal samples of the input data 103.

[0036] If the determined reconstruction loss 115 is higher than the threshold 117, the classifier 109 determines that the particular input sample contains an anomaly that may be a threat to the user. The classifier 109 may further notify the user about the detected anomaly. On the other hand, if the determined reconstruction loss 115 is less than the threshold 117, the classifier 109 determines the particular input sample as a benign data sample. Thus, the proposed anomaly detector 101 uses the reconstruction loss 115, which is a weighted combination of multiple loss functions 113, to determine the detection result 119 of anomalies in the input data 103.

[0037] In some embodiments, the value of the threshold 117 is tunable. For that purpose, feedback is obtained from the user in real time or offline. Furthermore, the user feedback is used to adjust the weights associated with each loss function of the plurality of loss functions 113. A detailed description of tuning the threshold 117 and the weights of the loss functions based on the user feedback is further described with respect to FIG. 2.

[0038] 2 shows a functional diagram of a tuning process in anomaly detector 101 according to an example embodiment. FIG. 2 is described in relation to FIG.

[0039] In some embodiments, the anomaly detector 101 may include a tuner module 209. The tuner module 209 is used together with the classifier module 109. First, the classifier module 109 determines an individual loss component 201 corresponding to each part of the multiple parts 111, and the individual loss component 201 may include an MSE loss or a cross entropy loss, etc. Furthermore, weights 203 for the individual loss functions may be determined, and thus the reconstruction loss 115 may be determined as a weighted sum of the loss terms. The classifier 109 further uses a loss-based anomaly detection 205, and the reconstruction loss 115 calculated by the classifier 109 is compared to a threshold 117 to detect anomalies, thus rendering a result 119 of the anomaly detection.

[0040] Based on the results of the anomaly detection 119, the user may provide feedback (also referred to as "user feedback") to the anomaly detector 101 if there is a discrepancy. For example, it is possible that input data 103 classified as non-anomalous data by the classifier module 109 may be anomalous. Upon determining such a discrepancy, the user may provide feedback in which the user provides a label (in this case non-anomalous) for the misclassified input data 103.

[0041] Based on the feedback, the tuner module 209 may update at least one of the threshold 117 and the weights 203 of at least one (i.e., individual) of the multiple loss functions 113 in the weighted combination of loss functions to adjust the reconstruction loss 115 such that the results 119 of the anomaly detection are aligned with the labels provided by the user. The weights 203 may be adjusted automatically (i.e., based on user feedback received online) during training or during execution of the anomaly detector 101.

[0042] In another embodiment, based on the result of the anomaly detection 119, the user may determine the misclassification of the input data as anomalous (or non-anomalous). The user may update the anomaly detector 101 regarding the misclassification through feedback, where the feedback may include one or more labels indicating the misclassification of the input data 103. For example, if non-anomalous data is identified as anomalous by the anomaly detector 101, the user may provide the label "No" to indicate the misclassification of the input data 103. Thus, the feedback-based tuner module 209 may update at least one of the threshold 117 and the weights 203 of at least one (or individual) of the multiple loss functions 113 in the weighted combination of loss functions to correct the misclassification.

[0043] In some embodiments, the anomaly detector 101 may determine the amount of misclassified data based on feedback provided by a user. Additionally, if the amount of misclassified data is above a certain threshold, the threshold reconstruction loss 117 may be updated.

[0044] In another embodiment, the threshold 117 may be adjusted by a user based on observing the results 119 of the anomaly detection. The user may confirm whether the results 119 of the anomaly detection are anomalies or false alarms. The anomaly detector 101 allows the user to provide feedback via a user interface (not shown). By adjusting the threshold 117, the user may determine a performance trade-off between improving the false alarm rate and improving the anomaly detection rate. The user feedback provides a limited amount of labeled data including labels of the anomalous data identified by the user. The labeled data is used by the classifier module 109 to evaluate 207 the performance of the anomaly detector 101. The limited amount of labeled data estimates the false alarm rate and the anomaly detection rate of the anomaly detector 101. To that end, the anomaly detector 101 may determine the amount of input data 103 that was misclassified by the anomaly detector 101 resulting in a false alarm based on the labeled data obtained from the user feedback. Additionally, anomaly detector 101 may compare the amount of misclassified data to a particular threshold (e.g., threshold 117), and based on the comparison, a false alarm rate and anomaly detection rate may be determined. Based on the estimated false alarm rate and anomaly detection rate, threshold 117 may be automatically adjusted to obtain the performance trade-off desired by the user (i.e., whether the user desires improved anomaly detection rate or improved false alarm detection rate).

[0045] In some embodiments, the user feedback may be obtained online (in real time). In other embodiments, the user feedback may be obtained offline.

[0046] In some embodiments, the performance evaluation with limited labeled data 207 may use the overall loss or reconstruction loss 115 as a soft decision score for anomaly detection. The soft decision score is used to calculate the cross-entropy loss on the labeled data. Since the reconstruction loss 115 is a function of the weights of multiple loss functions, the weights of the multiple loss functions may be adjusted to optimize the cross-entropy loss through methods such as gradient descent. Gradient descent is an optimization algorithm for finding the local minimum of a differentiable function. Gradient descent is used to find the values ​​of the parameters (coefficients) of the function that simply minimize the cost function as much as possible.

[0047] Gradient descent allows for tuning and fine-tuning the performance of the anomaly detector 101, which may include online tuning via user feedback, using only a very limited amount of labeled data. Gradient descent is particularly applicable when the labeled data may be limited in such a way that fully tuning all autoencoder parameters (trained separately on large amounts of unlabeled data) is prohibited.

[0048] FIG. 3 illustrates an architecture of an anomaly detector 101 according to an exemplary embodiment. The anomaly detector 101 includes an autoencoder module 105 that is trained to compress input data (e.g., input data 103) and decompress the input data to reconstruct the input data. Furthermore, a reconstruction loss between the reconstructed input data and the original input data is determined to detect anomalies in the input data. Some embodiments are based on the recognition that the input data includes multiple features. The autoencoder module 105 may marginalize across the multiple features during compression and decompression of the input data. Some embodiments are based on the further recognition that a reconstruction loss obtained by marginalizing across all features of the input data may not accurately detect anomalies in the input data because different input features present in the input data may be treated equally by the marginalization. Thus, it may not be possible to inform a user which features of the input data are detected as being associated with an anomaly.

[0049] Thus, some embodiments analyze each feature of the input data individually to precisely determine the anomaly and further determine which features of the plurality of features are associated with the anomaly.

[0050] To that end, the autoencoder module 105 is trained using a one-class classification model. A one-class classification model includes an unsupervised learning algorithm that attempts to model "normal" examples in order to classify new examples as either normal (non-anomalous) or non-normal (anomalous). A one-class classification model may be used for binary classification tasks with highly skewed class distributions. The model may be fitted to input examples from the majority class in the training dataset and then evaluated against a hold-out test dataset.

[0051] Thus, a training dataset that includes the majority class of the normal dataset can be used to train an autoencoder using a one-class classification model, since one-class classification models can be effective for imbalanced classification datasets with no or few examples of the abnormal class. Furthermore, one-class classification models can be effectively used for datasets where there is no coherent structure separating classes that can be learned by a supervised algorithm. Thus, one-class classification, or OCC for short, involves fitting a model to "normal" (or non-anomalous) data and predicting whether new data is normal (i.e., non-anomalous) or an outlier / anomalous (or anomalous).

[0052] After training, the autoencoder module 105 can be applied to detect anomalies in new data examples by determining an overall reconstruction loss 115 and comparing it to a tunable threshold (or thresholds 117). Additionally, in anomaly detection, individual loss terms of the multiple loss terms 113 can be examined to obtain a degree of explainability associated with the detected anomaly, thereby discovering which features of the multiple features of the input data contribute most to the reconstruction loss 115. This will highlight the features that were most difficult to compress and reconstruct, suggesting that they may be the root of what makes a particular data anomalous. Thus, this type of information can potentially flag the most anomalous features of interest to a follow-up investigator.

[0053] To that end, the data loader module 301 of the anomaly detector 101 accepts input data and partitions the input data into a number of parts based on a number of features present in the input data, with each part including input data corresponding to a respective feature of the number of features. The data loader module 301 is further configured to process the input data corresponding to each feature and generate a fixed dimensional numeric feature representation vector. Thus, the data loader module 301 vectorizes the data corresponding to each feature contained in each part and vectorizes each part to generate parts 303a, 303b, ..., 303n, also referred to as "Part A", "Part B", ..., Part "N", respectively.

[0054] Further, each vectorized data is provided to a concatenation module 305 of the anomaly detector 101. The concatenation module 305 is configured to concatenate the multiple vectorized portions to form concatenated data. The concatenated data is further provided to an autoencoder module 105, which encodes the concatenated data into a latent space representation using an encoder. The autoencoder module 105 further reconstructs the input data from the latent space representation of the concatenated data using a decoder.

[0055] Further, the reconstructed data generated by the autoencoder module 105 is provided to a split module 307 of the anomaly detector 101. The split module 307 is configured to split the reconstructed data into a number of parts 309a, 309b, ..., 309n, also referred to as "Part A'", "Part B'", ..., "Part N'", respectively, based on a number of features present in the reconstructed data. Thus, each part of the number of parts includes data corresponding to each feature of the number of features. Splitting the reconstructed data into a number of parts based on the number of features enables the anomaly detector 101 to analyze each feature of the input data inherited by the reconstructed data separately.

[0056] Further, the multiple portions 309a, 309b, ..., 309n of the reconstructed data are provided to the classifier module 109. The classifier module 109 includes a loss function determination module 311 configured to determine multiple loss functions 313a, 313b, ..., 313n, also referred to as "loss1", "loss2", ..., "lossn". Each loss function accurately calculates a reconstruction loss for a corresponding portion of the multiple portions 309a, 309b, ..., 309n. Further, an individual reconstruction loss corresponding to each portion of the reconstructed input data is calculated based on the reconstructed input data.

[0057] To determine the overall reconstruction loss 115, the classifier module 109 further includes a weight determination module 315. The weight determination module 315 is configured to determine a weight for each loss function of the plurality of loss functions 113. In some embodiments, a user may select one or more features of the plurality of features as being more important than the remaining features of the plurality of features. In this case, the weight determination module 315 gives higher weights to some of the loss functions 313a, 313b, ..., 313n corresponding to the selected important features and gives lower weights to the remaining loss functions of the loss functions 313a, 313b, ..., 313n. Furthermore, the reconstruction loss 115 is determined by calculating a weighted combination of the loss functions 313a, 313b, ..., 313n. The reconstruction loss 115 corresponds to the difference between the data input to the autoencoder module 105 and the data reconstructed by the autoencoder module 105. The reconstruction loss 115 is compared to a threshold value 117 to detect anomalies in the input data provided to the anomaly detector 101. If the reconstruction loss 115 is greater than a threshold 117, the input data is detected as containing an anomaly.

[0058] Once an anomaly is detected, the anomaly detector 101 using the trained autoencoder module 105 may provide information about which features of the input data were determined to be anomalous, allowing the user to further investigate the anomaly in the input data.

[0059] In particular, based on the result of the detection of the anomaly, the anomaly detector 101 is configured to obtain user feedback, either online (i.e., real-time) or offline. The user feedback provides at least one label indicative of a misclassification of the input data. Based on the user feedback, the anomaly detector 101 employs a tuner module 209 that is configured to adjust or tune at least one of the threshold 117 and the weights 203 assigned to each of the multiple loss functions in the weighted combination of loss functions (315a-315n) 115 such that the result of the detection of the anomaly matches the feedback provided by the user.

[0060] 4 illustrates steps of a method 400 for detecting anomalies, according to an exemplary embodiment. The method 400 begins at step 401, where input data (e.g., input data 103) for which anomalies are to be detected may be received by an anomaly detector (e.g., anomaly detector 101). The input data may correspond to sequential data including a mixture of heterogeneous features. The sequential data may include text data (e.g., internet proxy log data), image data, video data, audio data, or protein sequences, etc. In some embodiments, the input data may include multiple features, such as categorical or numerical features.

[0061] Further, in step 403, the input data may be provided to an autoencoder module (e.g., autoencoder 105) of the anomaly detector, and the input data may be encoded by an encoder neural network included in the autoencoder module. The input data may be compressed by the encoder and further encoded into a latent space representation.

[0062] In step 405, the encoded input data may be reconstructed using a decoder neural network of the autoencoder module. The decoder may reconstruct the input data using a latent space representation of the input data. The reconstructed input data includes some reconstruction loss, which corresponds to the difference between the original input data and the reconstructed input data.

[0063] In step 407, a reconstruction loss between the input data provided to the encoder and the reconstructed input data provided by the decoder may be determined using a classifier module (e.g., classifier module 109). To determine the reconstruction loss, first, a plurality of portions of the reconstructed input data may be determined based on a plurality of features included in the reconstructed input data. Each portion of the plurality of portions includes reconstructed data corresponding to each feature of the plurality of features. The plurality of features may be inherited by the reconstructed input data from the original accepted input data.

[0064] Further, a plurality of loss functions are determined that precisely determine an individual reconstruction loss for each of the plurality of portions of the reconstructed input data. Each loss function of the plurality of loss functions measures an individual loss (or an individual reconstruction loss) associated with each of the plurality of portions of the reconstructed input data. Finally, the reconstruction loss is determined as a weighted combination of the plurality of loss functions, and the plurality of weights may be used to weight each of the plurality of loss functions.

[0065] In step 409, an anomaly may be detected based on the reconstruction loss. For that purpose, the reconstruction loss may be compared to a threshold value. The threshold value may be determined based on the reconstruction loss between a plurality of vectorized normal data samples (or benign data samples) associated with the input data to be analyzed and a plurality of reconstructed data samples corresponding to the vectorized normal samples of the input data. If the determined reconstruction loss is higher than the threshold value for a particular input sample, the input sample is determined to include an anomaly that may be a threat to the user. The method 400 may further include notifying the user about the detected anomaly. On the other hand, if the determined reconstruction loss is lower than the threshold value for a particular input sample, the input sample is determined as a benign input data sample.

[0066] FIG. 5A is a schematic diagram illustrating a workflow of an anomaly detector 500a for detecting anomalies in Internet proxy data 501 according to an exemplary embodiment. Anomalies in Internet proxy data 501 can be detected to detect cyber attacks. Internet proxy data 501 is sequential data including multiple features, such as categorical features, embedded features, and numeric features. Categorical features are features that have values ​​from a discrete set of possibilities, where the size of the set is manageable. For example, in Internet proxy log data, examples of categorical features include HTTP response / error codes (which belong to a relatively small set), some top-level domain categories, protocol categories, file extensions, etc. Embedded features are categorical in nature, where the size of the set of possible values ​​is too large to be manageable. The set of possible words that can occur in a domain name is an example of a categorical feature that requires embedding to represent only a subset of the most common words. Numeric features are features that are numerical in nature, such as the size of a response, or character occurrence statistics extracted from a text.

[0067] It is important to analyze the input data corresponding to each feature of the multiple features in order to detect anomalies in the Internet proxy data 501. To accomplish this, the Internet proxy data 501 may be partitioned into multiple portions based on the multiple features present in the Internet proxy data 501.

[0068] To that end, the anomaly detector 500a uses a data loader module 503 that accepts internet proxy data 501 as input and further partitions the internet proxy data 501 into multiple portions based on embedded, categorical and numerical features. Each portion of the input data is vectorized by the data loader module 503 for the anomaly detector to analyze each portion to determine anomalies in the input data 501.

[0069] Thus, the portions of the input data 501 that correspond to the embedded features are provided to a word embedding module 505. The word embedding module 505 is configured to perform word embedding to generate a fixed dimensional numeric vector representation. A word embedding is a learned representation for a text in which words with the same meaning have similar representations. In word embedding techniques, individual words are represented as real-valued vectors in a predefined vector space. Each word is represented by a real-valued vector, often of tens to hundreds of dimensions. The vectorized embedded feature data is provided to a concatenation module 509.

[0070] Similarly, the portions of the input data corresponding to the categorical features are converted to numeric vectors via a one-hot encoding module 507. The one-hot encoding module 507 is configured to perform one-hot encoding on the data corresponding to the categorical features to convert the categorical features into a numeric vector representation. The one-hot encoding module 507 binarizes the categorical feature data and includes the binarized features in a numeric vector. Thus, the numeric vector created using one-hot encoding includes multiple 0's and multiple 1's. The vectorized categorical data is provided to a concatenation module 509.

[0071] Furthermore, the numeric features are inherently numeric and do not require any special handling. In some embodiments, the numeric features may be normalized before being fed to the concatenation module 509.

[0072] The concatenation module 509 combines numeric vectors corresponding to all the features to form concatenated data. The concatenated data is provided to an autoencoder module 511, which encodes and decodes the concatenated data to reconstruct the input data. The reconstructed input data includes a reconstruction loss, which is a difference between the original input data and the reconstructed input data. The reconstructed input data includes a plurality of features, namely, an embedding feature, a categorical feature, and a numeric feature. To analyze data corresponding to each feature, the reconstructed input data is provided to a split module 515, which splits the reconstructed input data into a plurality of parts based on the plurality of features. Further, the plurality of parts are provided to a classifier module 529, which determines whether the input data 501 includes an anomaly based on an analysis of the plurality of parts of the concatenated data. The concatenated data includes vectorized data corresponding to each feature of the input data 501. A reconstruction loss for each part of the plurality of parts to be reconstructed is determined using a corresponding loss function.

[0073] To achieve that, data corresponding to the embedded features are first unembedded using a word unembedding module 513. The word unembedding module 513 is used in conjunction with the word embedding module 505. The word unembedding module 513 is used to convert a dense representation vector space of the individual words corresponding to the embedded features into a direct representation of the categorical variables, such as with a score vector indicating the unnormalized log-likelihood of each possible categorical value. The word unembedding module 513 may include a neural network including one or more fully connected layers.

[0074] Further, cross-entropy losses corresponding to the embedded features and the categorical features are determined, where a first cross-entropy loss 517 corresponds to the cross-entropy loss of the embedded features and a second cross-entropy loss 519 corresponds to the categorical features. CE ) is a loss function used to train a classifier to recover discrete (categorical) labels.

[0075]

number

[0076] A first cross-entropy loss 517 is determined based on the output of the word de-embedding module 513 and the original embedded features. Similarly, a second cross-entropy loss 519 corresponding to the categorical features is calculated on the original categorical features.

[0077] Further, for components corresponding to the numeric features, a mean squared error (MSE) loss is calculated for the numeric features, and the MSE loss corresponding to the numeric features is denoted as a first MSE loss 521. Further, an MSE loss is calculated for the input and output of the autoencoder module 511, and the MSE loss 521 calculated for the input and output of the autoencoder module 511 is denoted as a second MSE loss 523. MSE ) is given by the following formula:

[0078]

number

[0079] In some embodiments, each portion of the multiple portions may be provided to a loss function determination module (such as loss function determination module 145) (not shown in FIG. 2A ) to calculate a separate loss function, such as a first cross-entropy loss function 517, a second cross-entropy loss function 519, a first MSE loss function 521, and a second MSE loss function 523.

[0080] Furthermore, an overall reconstruction loss is determined as a weighted sum 525 of all loss functions (i.e., a weighted sum of the first cross-entropy loss function 517, the second cross-entropy loss function 519, the first MSE loss function 521, and the second MSE loss function 523). To that end, a weight corresponding to each loss function may be determined using a weight determination module (such as the weight determination module 315) (shown in FIG. 3). Furthermore, anomalies are detected in the proxy data 501 using loss-based anomaly detection 527, and the reconstruction loss is compared to a threshold reconstruction loss. If the reconstruction loss corresponding to the proxy data 501 is greater than the threshold, the proxy data 501 is determined to include anomalies.

[0081] In an example embodiment, the anomaly detector 500a may be used in conjunction with a user interface. Through the user interface, a user may select one or more features from a plurality of features of the proxy data 501 to detect anomalies in the proxy data 501. Additionally, the user may select a plurality of loss functions to be used to determine a loss corresponding to each feature, and further select a weight to be used for each loss function in determining an overall reconstruction loss.

[0082] In an exemplary embodiment, the anomaly detector 500a may be trained using a one-class classification model to perform anomaly detection on the internet proxy log data 501 to detect cyber attacks on cyber-physical systems and other malicious activity in computer networks. The anomaly detector 500a automates the detection of the cyber attack based on the detection of anomalies in the internet proxy data 501. Additionally, the anomaly detector 500a may automate a response to the cyber attack, such as notifying a user, which may include sounding an alarm or notification sound, or displaying a notification, etc. The anomaly detector 500a may further provide an explanation as to why the data appears anomalous to guide investigation and appropriate response.

[0083] Figure 5B illustrates the decomposition of data from an Internet proxy log into categorical and numerical features according to an exemplary embodiment. Figure 5C illustrates a concatenation module 509 configured to concatenate data corresponding to multiple features of a URL 531 according to an exemplary embodiment. Figure 5B is described in conjunction with Figure 5A. Additionally, Figure 5C is described in conjunction with Figures 5B and 5A.

[0084] The Internet Proxy Log (also referred to as Internet Proxy Data 501) includes information associated with requests made to the network by users. For example, Internet Proxy Data 501 includes the host ID, client ID, and user ID of the user who requested access to a particular website or web content from the network. Internet Proxy Data 501 further includes the date time, time zone, and command used by the user to access a particular website or web content along with information about the status of the command and the number of bytes used by the command.

[0085] The Internet proxy data 501 is raw data that includes sequences of log entries of Internet traffic requests from many different users, and these sequences of log entries are essentially interleaved in the Internet proxy data 501. Thus, to detect anomalies in the Internet proxy data 501, the anomaly detector 500a first de-interleaves the sequences of log entries generated by different users, and then treats each user's sequence independently. Furthermore, the alternative of simply processing all of the sequences while interleaved may overly burden the training of the autoencoder 511 with additional unnecessary complexity.

[0086] A URL 531 corresponding to one of the deinterleaved sequences may be obtained by an anomaly detector 500a, which decomposes the URL 531 into multiple parts based on multiple features included in the URL 531. The URL 531 includes different information associated with a request made by a user to access a website or web content. The information included in the URL 531 is decomposed into a category feature 533 and a numeric feature 535. The information decomposed into the category feature 533 includes a method name used by a user to access a website, in this case the method name corresponds to "GET", which is a default HTTP method used to extract resources from a particular URL. The information included in the category feature 533 further includes a sub-domain word, in this case "download", a domain word, in this case "windowsupdate", a generic top-level domain (TLD) "co.", a country code TLD ".jp", and a file extension ".exe". Sub-domain words and domain words can be further categorized into embedding features due to their very large word vocabulary size.

[0087] Further, the information of URL 531 categorized into numeric features 535 includes number of levels (#), lowercase #, uppercase #, number #, special character #, and parameter #. The data loader module 503 partitions URL 531 based on the features of URL 531. Further, the data loader module 503 vectorizes the data contained in each feature 533 and 535. Vectorizing the data converts text data (e.g., data contained in domain words and subdomain words, etc.) into numeric vectors, which are used to detect anomalies.

[0088] 5C , vectorized data corresponding to categorical features 533 and numeric features 535 are provided to a concatenation module 509. The concatenation module 509 concatenates the vectorized data corresponding to all features 533 and 535 to generate concatenated data 537.

[0089] To vectorize the data (text) in the domain and subdomain words, the word embedding module 505 is trained using training data that includes words from the vocabulary of the most commonly found words. Words outside the most common set may be labeled as an "other" group in the training of the word embedding module 505. However, the required vocabulary is still very large, making the size of the vocabulary difficult to handle. Therefore, to handle the size of the vocabulary during training, the word embedding module may be pre-trained for each feature of the multiple features present in the URL 531 to convert each word in the domain words and subdomain words into a feature vector of smaller dimensions rather than using a very large one-hot categorical encoding. These embedding vectors (i.e., feature vectors) are then used instead of the original domain / subdomain words as processed features for the autoencoder module 511 to operate with.

[0090] The concatenated data 537 is provided to an autoencoder module 511, which uses an encoder to encode the concatenated data 537 into a latent space representation. The autoencoder module 511 further uses a decoder to reconstruct the concatenated data 537 (i.e., the vectorized URLs 531) from the latent space representation of the concatenated data 537. The reconstructed concatenated data 537 is further provided to a split module 515, where the reconstructed concatenated data 537 is split into a plurality of parts based on a plurality of features present in the reconstructed concatenated data 537. Thus, each part of the plurality of parts includes data corresponding to each feature of the plurality of features. The plurality of parts is further provided to a classifier module 529, which determines whether the URLs 531 include any anomalies as described with respect to FIG. 5A. In some embodiments, the proposed anomaly detector may be used to detect anomalies in video data. A detailed description of detecting anomalies in video data using the proposed anomaly detector is provided below with respect to FIG. 6.

[0091] FIG. 6 is a block diagram 600 illustrating detection of anomalies in video data 601 according to an exemplary embodiment. The video data 601 is in the form of sequential data and may be real-time video and / or recorded video. In FIG. 6, the video data 601 is video data of a patient 601a lying on a bed, whose heartbeat is monitored using an electrocardiogram (ECG) machine 601b. The video data 601 is provided to an anomaly detector 603. The anomaly detector 603 may correspond to the anomaly detector 101. Upon receiving the video data 601, the anomaly detector 603 may process the video data 601. Each image frame of the video data 601 includes different features, e.g., different color channels such as green, red, or blue. The features of the video data 601 may include pre-processed motion vectors in addition to raw images. Furthermore, each image frame is processed by an anomaly detector 603 using various tools such as object detection and skeleton tracking, which result in multiple features in the video data 601 in addition to the raw pixel values.

[0092] For example, by using object detection tools, the anomaly detector 603 may detect the ECG machine 601b in the image frame and zoom in or out on the ECG machine 601b in the image frame. Furthermore, the image of the ECG graph on the ECG machine 601b may be analyzed to detect anomalies in the heartbeat of the patient 601a. ​​For that purpose, the anomaly detector 603 may be trained using training data including ECGs of normal heartbeats. The anomaly detector 603 may determine a reconstruction loss corresponding to the image of the ECG graph on the ECG machine 601b included in one or more image frames of the video data 601. The anomaly detector 603 may use the overall reconstruction loss to determine anomalies in the heartbeat of the patient 601a. ​​Thus, the anomaly detector 603 may notify a physician about the detected anomaly.

[0093] In an exemplary embodiment, anomaly detector 603 may be used to detect anomalies in the heartbeat of patient 601a based on image frames of video data 601 corresponding to ECG machine 601b. To that end, anomaly detector 603 may be trained using training data including ECGs of normal heartbeats. Additionally or alternatively, anomaly detector 603 may be trained to determine different features from image frames corresponding to ECGs, for example, anomaly detector 603 may be trained to determine that the color green (corresponding to an ECG graph displayed on ECG machine 601b) contributes more information than other colors.

[0094] In another embodiment, the anomaly detector 603 may be used to detect anomalies in the pose (or posture) of the patient 601a. ​​For example, the patient 601a may be in an abnormal pose when the patient 601a is about to fall off the bed. Furthermore, the abnormal pose of the patient 601a may be due to an epileptic seizure. Thus, the anomaly detector 603 may be trained on the normal pose of the patient lying on the bed or performing normal activities on the bed, such as eating food. The anomaly detector 603 based on the video data 601 may determine multiple features associated with the movement of the patient 601a from various image frames of the video data 601. For that purpose, a skeleton tracking tool may be used by the anomaly detector 603 to detect anomalies in the position (or pose or posture) of the patient 601a. ​​Furthermore, the anomaly detector 603 may then determine an overall reconstruction loss corresponding to the images associated with the movement of the patient 601a and use the reconstruction loss to determine anomalies in the posture of the patient 601a. ​​Thereby, the anomaly detector 603 may notify the doctor about the anomaly.

[0095] Example Implementation 7 shows a block diagram of a computer-based anomaly detector 700 for detecting anomalies from input data 103, according to an example embodiment. The computer-based anomaly detector 700 includes a number of interfaces that connect the anomaly detector 700 to other systems and devices. The anomaly detector 700 includes an input interface 701 configured to accept input data 103, where the input data 103 includes sequential data, such as Internet proxy data, video data, audio data, or image data.

[0096] In some embodiments, the anomaly detector 700 includes a network interface controller (NIC) 705 configured to obtain the input data 103 over a network 707, which may be one or a combination of wired and wireless networks.

[0097] A network interface controller (NIC) 705 is adapted to connect anomaly detector 700 to a network 707 via bus 723 and to connect anomaly detector 700 to an input device 703. The input device 703 may correspond to a proxy log data recorder that records proxy log data to be provided to anomaly detector 700 for detecting anomalies in the recorded proxy log data. In another embodiment, the input device 703 may correspond to a video recorder that records video to be provided to anomaly detector 700 for detecting anomalies in the recorded video data.

[0098] Additionally or alternatively, anomaly detector 700 may include a human machine interface (HMI) 711. The human machine interface 711 in anomaly detector 700 connects the anomaly detector 700 to a keyboard 713 and a pointing device 715, which may include, for example, a mouse, a trackball, a touchpad, a joystick, a pointing stick, a stylus, or a touch screen.

[0099] The anomaly detector 700 includes a processor 721 configured to execute stored instructions 717 and a memory 719 storing instructions executable by the processor 721. The processor 721 may be a single-core processor, a multi-core processor, a computing cluster, or any number of other configurations. The memory 719 may include random access memory (RAM), read-only memory (ROM), flash memory, or any other suitable memory system. The processor 721 may be connected to one or more input and output devices via a bus 723.

[0100] The instructions 717 may implement a method for detecting anomalies according to some embodiments. To that end, the computer memory 719 stores the data loader module 301, the concatenation module 305, the autoencoder module 105, the split module 307, the classifier module 109, and the tuner module 209. To determine anomalies in the input data 103, the input data 103 is first partitioned into a plurality of portions by the data loader module 301 based on a plurality of features present in the input data. The data loader module 301 further vectorizes each portion of the plurality of portions of the input data 103, where the vectorized portion includes a numerical representation of the data in the corresponding portion.

[0101] Further, the vectorized data is provided to a concatenation module 305 to concatenate the vectorized portions and generate concatenated data. The concatenated data is provided to an autoencoder module 105, where the concatenated data is compressed and decompressed to reconstruct the concatenated data. The reconstructed data includes a reconstruction loss, which is the difference between the original input data to the autoencoder module 105 and the input data reconstructed by the autoencoder module 105.

[0102] The anomaly detector 700 may accurately detect anomalies from the input data 103 and further determine which features of the input data 103 are anomalous. To that end, the anomaly detector 700 is configured to analyze the input data 103 corresponding to each feature separately. This is accomplished using a split module 307 that splits the reconstructed data into multiple parts based on multiple features in the reconstructed data. Furthermore, the data corresponding to each feature is provided to a classifier module 109. The classifier module 109 is configured to determine a loss function corresponding to each part to accurately determine an individual reconstruction loss. The classifier module 109 is further configured to determine an overall reconstruction loss as a weighted combination of the individual reconstruction losses. The overall reconstruction loss is then compared to a threshold. If the overall reconstruction loss is greater than the threshold reconstruction, the classifier module 109 determines that the input data 103 includes an anomaly. A user may be notified regarding the anomaly and the features of the input data that include the anomaly to enable further investigation of the detected anomaly.

[0103] Based on the results of the anomaly detection provided by the classifier module 109, the user may provide feedback to the classifier module 109. The user feedback may include labeled information associated with the misclassification of the input data as anomalous or vice versa. The labeled data in the user feedback is used by the tuner module 209 to tune or adjust the thresholds and weights used for the individual reconstruction losses such that the corrected results of the anomaly detector 700 match the labels (anomalous or non-anomalous) corresponding to the input data 103 provided by the user feedback.

[0104] In some embodiments, the output interface 727 may be configured to render results of the detection of anomalies on a display device 709. Examples of display devices 709 include, for example, a computer monitor, a television, a projector, or a mobile device. The computer-based anomaly detector 700 may further be connected to an application interface 725 adapted to connect the computer-based anomaly detector 700 to external devices 723 to perform various tasks.

[0105] Embodiment The description provides exemplary embodiments only and is not intended to limit the scope, applicability, or configuration of the present disclosure. Rather, the following description of exemplary embodiments will provide those skilled in the art with an enabling description for implementing one or more exemplary embodiments. Various changes are contemplated that may be made in the function and arrangement of elements without departing from the spirit and scope of the disclosed subject matter as set forth in the appended claims.

[0106] In the following description, specific details are given to provide a thorough understanding of the embodiments. However, those skilled in the art will understand that the embodiments may be practiced without these specific details. For example, systems, processes and other elements in the disclosed subject matter may be shown as components in block diagram form so as not to obscure the embodiments in unnecessary detail. In other instances, well-known processes, structures and techniques may be shown without unnecessary detail so as to avoid obscuring the embodiments. Additionally, like reference numbers and names in the various drawings refer to like elements.

[0107] Furthermore, particular embodiments may be described as a process that is depicted as a flowchart, a flow diagram, a data flow diagram, a structure diagram, or a block diagram. Although a flowchart may describe operations as a sequential process, many of the operations may be performed in parallel or simultaneously. In addition, the order of operations may be rearranged. A process may terminate when its operations are completed, but may have additional steps not discussed or included in the diagram. Furthermore, not all operations in any process specifically described may occur in all embodiments. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc. When a process corresponds to a function, the end of the function may correspond to a return of the function to a calling function or to a main function.

[0108] Furthermore, embodiments of the disclosed subject matter may be implemented, at least in part, either manually or automatically. The manual or automated implementations may be performed or at least assisted through the use of machines, hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware, or microcode, the program code or code segments to perform the necessary tasks may be stored in a machine-readable medium. The necessary tasks may be executed by a processor.

[0109] Furthermore, the embodiments of the present disclosure and the functional operations described herein may be implemented in digital electronic circuitry, in tangibly embodied computer software or firmware, in computer hardware including the structures disclosed herein and their structural equivalents, or in one or more combinations thereof. Furthermore, some embodiments of the present disclosure may be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non-transitory program carrier for execution by or for controlling the operation of a data processing device. Furthermore, the program instructions may be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal generated to encode information for transmission to a receiver device suitable for execution by a data processing device. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or one or more combinations thereof.

[0110] A computer program (which may also be referred to or described as a program, software, software application, module, software module, script, or code) may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may correspond to a file in a file system, but need not. A program may be stored in part of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, a single file dedicated to the program, or in multiple cooperating files, e.g., a file that stores one or more modules, subprograms, or code portions. A computer program may be deployed to run on one computer, or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network. Computers suitable for running computer programs may be based, by way of example, on general-purpose or dedicated microprocessors or both, or any other type of central processing unit. Typically, a central processing unit receives instructions and data from a read-only memory, a random access memory, or both. The essential elements of a computer are a central processing unit for performing or executing instructions, and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices, e.g., magnetic, magneto-optical, or optical disks, for storing data, or be operatively coupled to receive data from them, transfer data to them, or both. However, a computer need not have such devices.Additionally, a computer may be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device such as a Universal Serial Bus (USB) flash drive, to name just a few.

[0111] To provide for interaction with a user, embodiments of the subject matter described herein may be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user, and a keyboard and pointing device, e.g., a mouse or trackball, by which the user may provide input to the computer. Other types of devices may be used to further provide interaction with the user, e.g., the feedback provided to the user may be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback, and further, input from the user may be received in any form, including acoustic, speech, or tactile input. In addition, the computer may interact with the user by sending documents to and receiving documents from a device used by the user, e.g., by sending a web page to a web browser on the user's client device in response to a request received from the web browser.

[0112] An embodiment of the subject matter described herein may be implemented in a computing system that includes a back-end component, e.g., as a data server, or may be implemented in a computing system that includes a middleware component, e.g., an application server, or may be implemented in a computing system that includes a front-end component, e.g., a client computer having a graphical user interface or a web browser through which a user may interact with an implementation of the subject matter described herein, or may be implemented in any combination of one or more such back-end, middleware, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication, e.g., a communications network. Examples of communications networks include local area networks ("LANs") and wide area networks ("WANs"), e.g., the Internet.

[0113] A computing system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of clients and servers arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

[0114] Although the present disclosure has been described with reference to certain preferred embodiments, it should be understood that various other adaptations and modifications can be made within the spirit and scope of the present disclosure. It is therefore intended within the scope of the appended claims to cover all such variations and modifications that fall within the true spirit and scope of the present disclosure.

Claims

1. 1. An anomaly detector comprising: an input interface configured to accept input data; At least one processor; a memory in which instructions for forming said anomaly detector module are stored; the at least one processor is configured to execute the instructions of the modules of the anomaly detector; The module comprises: a data loader module configured to partition the input data into a plurality of portions based on a plurality of characteristics of the input data, and vectorize each portion of the plurality of portions of the input data to determine a plurality of vectorized portions of the input data; a concatenation module configured to concatenate the vectorized portions of the input data to form concatenated data; an autoencoder including an encoder trained to encode the concatenated data and a decoder trained to decode the encoded concatenated data as the reconstructed input data, the autoencoder being trained on non-anomalous sample data; The module further comprises: Includes a classifier, The classifier may be determining a reconstruction loss indicative of a difference between the received input data and the reconstructed input data, the reconstruction loss comprising a plurality of loss functions, different types of loss functions, or a weighted combination of both, that evaluate the reconstruction loss of a plurality of portions of the reconstructed input data; The classifier further comprises: if the reconstruction loss exceeds a threshold, detecting anomalies in the reconstructed input data; and an output interface for rendering a result of the detection of said anomaly.

2. 2. The anomaly detector of claim 1, wherein the input interface is further configured to accept user input based on the result of the detection of the anomaly, the user input including a label indicating whether the accepted input data is anomalous or not.

3. 3. The anomaly detector of claim 2, wherein the module further comprises a tuner configured to update, in response to the received user input, at least one of the threshold and a weight of at least one of the plurality of loss functions in the weighted combination to adjust the reconstruction loss such that the result of an anomaly detection is aligned with the label.

4. 2. The anomaly detector of claim 1, wherein the input interface is further configured to accept user input based on the result of the detection of the anomaly, the user input including a label indicating a misclassification of the accepted input data.

5. 5. The anomaly detector of claim 4, wherein the module further comprises a tuner configured to update, in response to the received user input, at least one of the threshold and a weight of at least one loss function of the plurality of loss functions in the weighted combination to correct for the misclassification of the received input data.

6. The modules further include a split module; The split module comprises: receiving the reconstructed input data from the autoencoder; and splitting the reconstructed input data into the plurality of portions based on the plurality of features present in the reconstructed input data.

7. The modules further include a loss function determination module; The loss function determination module: receiving each portion of the plurality of portions corresponding to the reconstructed input data; determining an appropriate loss function for computing a loss for each portion of the reconstructed input data; and calculating a respective reconstruction loss corresponding to each portion of the reconstructed input data based on the determined loss function.

8. The modules further include a weight determination module; The weight determination module: Assigning weights to each loss function; and determining the weighted combination of the plurality of loss functions associated with the plurality of portions of the reconstructed input data.

9. The anomaly detector of any preceding claim, wherein the input data corresponds to internet proxy log data.

10. The modules further include a data loader module configured to partition the Internet proxy log data into a plurality of portions based on a plurality of characteristics of the Internet proxy log data; the plurality of features of the internet proxy log data includes embedded features, categorical features, and numerical features; The anomaly detector of claim 9 , wherein the data loader module is further configured to vectorize each portion of the plurality of portions of the Internet proxy log data.

11. The modules further include a word embedding module and a one-hot encoding module; the word embedding module is configured to vectorize the portions corresponding to the embedding features; The anomaly detector of claim 10 , wherein the one-hot encoding module is used to vectorize the portions corresponding to the categorical features.

12. 1. A method for anomaly detection, the method using a processor coupled with stored instructions for carrying out the method, the instructions, when executed by the processor, performing steps of the method, the method comprising: Receiving input data; Partitioning the input data into a plurality of portions based on a plurality of features of the input data; vectorizing each portion of the plurality of portions of the input data to determine a plurality of vectorized portions of the input data; concatenating the vectorized portions of the input data to form concatenated data; and encoding the concatenated data and decoding the encoded concatenated data as the reconstructed input data using a neural network having an autoencoder architecture, the autoencoder being trained using non-anomalous sample data, the method further comprising: determining a reconstruction loss indicative of a difference between the accepted input data and the reconstructed input data, the reconstruction loss comprising a weighted combination of multiple loss functions, different types of loss functions, or both, that evaluate the reconstruction loss of multiple portions of the reconstructed input data, the method further comprising: detecting anomalies in the reconstructed input data if the reconstruction loss exceeds a threshold; and rendering a result of the anomaly detection.

13. A non-transitory computer-readable storage medium having embodied thereon a program executable by a processor for performing a method, the method comprising: Receiving input data; Partitioning the input data into a plurality of portions based on a plurality of features of the input data; vectorizing each portion of the plurality of portions of the input data to determine a plurality of vectorized portions of the input data; concatenating the vectorized portions of the input data to form concatenated data; and encoding the concatenated data and decoding the encoded concatenated data as the reconstructed input data using a neural network having an autoencoder architecture, the autoencoder being trained using non-anomalous sample data, the method further comprising: determining a reconstruction loss indicative of a difference between the accepted input data and the reconstructed input data, the reconstruction loss comprising a weighted combination of multiple loss functions, different types of loss functions, or both, that evaluate the reconstruction loss of multiple portions of the reconstructed input data, the method further comprising: detecting anomalies in the reconstructed input data if the reconstruction loss exceeds a threshold; and rendering a result of the anomaly detection.

Citation Information

Patent Citations

  • Network traffic data analysis method and system

    CN112398779A

  • Network rating prediction engine

    JP2018190396A

  • Learning program, leaning method, learning device, and conversion parameter creating method

    JP2018195012A

  • Abnormality degree calculation method and computer program for calculating abnormality degree

    JP2021012633A

  • Topology-inspired neural network autoencoding for electronic system fault detection

    US20190286506A1