# US 2022/0044133 A1 · Detection of anomalous data using machine learning

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

- Number: US 2022/0044133 A1
- Document ID: US20220044133A1
- Status: Published application
- Kind: A1
- Application number: 16/988,528
- Filed: 2020-08-07
- Published: 2022-02-10
- Earliest claimed: 2020-08-07
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Michael Otto; Min-Ho Hong; Markus Umlauff; Lars Vogelgesang-Moll
- Web page: https://patentgrep.com/patent/US20220044133A1

## CPC

- G06N 5/04: Inference or reasoning models
- G06N 20/20: Ensemble learning
- G06F 18/213: Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F 18/2148: {characterised by the process organisation or structure, e.g. boosting cascade}
- G06F 18/24: Classification techniques
- G06F 18/2413: based on distances to training or reference patterns
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N 20/00: Machine learning
- G06V 10/758: {Involving statistics of pixels or of feature values, e.g. histogram matching}
- G06F 16/245: Query processing
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Techniques and solutions are described for analyzing data collections to determine if they may be anomalous as compared with other data collections. For example, one or more values for data elements of a data collection may be unusually high or low, or may represent infrequently occurring values. Or, values of data elements in a data collection may not be anomalous when considered individually, but may be anomalous in combination. A machine learning model is trained with training data collections, where the training data collections include a plurality of data elements. An inference data collection, also having the data elements of the training data collections, is analyzed using the trained machine learning model to provide an anomaly score. The anomaly score can be based at least in part on feature anomaly scores, which indicate anomality of individual data elements of the inference data collection.

## Claims

### Claim 1

A computing system comprising:
memory;
one or more processing units coupled to the memory; and
one or more computer readable storage media storing instructions that, when loaded into the memory and executed by the one or more processing units, cause the one or more processing units to perform operations for:
receiving a request for an anomaly score for an inference data collection;
receiving the inference data collection, the inference data collection comprising a plurality of features, each feature being associated with a data type;
calculating an anomaly score for the inference data collection using a machine learning model, wherein the anomaly score indicates a relative difference between the inference data collection and a plurality of training data collections used to train the machine learning model, the anomaly score representing a combination of feature anomaly scores for at least a portion of the features of the inference data collection, wherein the training data collections comprise the plurality of features; and
returning an inference result in response to the request, the inference result comprising at least a portion of the feature anomaly scores.

### Claim 2 (depends on 1)

The computing system of claim 1, wherein the plurality of features comprise at least one non-numeric feature and the operations further comprise:
encoding the at least one non-numeric feature as a plurality of encoded numeric features.

### Claim 3 (depends on 2)

The computing system of claim 2, wherein a number of the plurality of encoded numeric features is equal to a number of distinct values for the at least one non-numeric feature.

### Claim 4 (depends on 3)

The computing system of claim 3, wherein a value of an encoded numeric feature of the plurality of encoded numeric features is set to one for the inference data collection or a training data collection of the plurality of training data collections if a value of the inference data collection or the training data collection for the at least one non-numeric feature is equal to a distinct value of the number of distinct values for the at least one non-numeric attribute, and is set to zero otherwise.

### Claim 5 (depends on 2)

The computing system of claim 2, wherein the trained model comprises a mean and a standard deviation for the at least a portion of the plurality of features, the mean and the standard deviation being calculated from the plurality of training data collections and the feature anomaly score for the at least one non-numeric feature being calculated as an aggregation of Z-scores for the plurality of encoded numeric features.

### Claim 6 (depends on 1)

The computing system of claim 1, the operations further comprising:
applying a weighting factor to the feature anomaly score for the at least one non-numeric feature, the weighting factor based at least in part on a number of discrete values available for the at least one non-numeric feature.

### Claim 7 (depends on 1)

The computing system of claim 1, wherein the anomaly score is calculated as a norm of the feature anomaly scores.

### Claim 8 (depends on 7)

The computing system of claim 7, wherein the norm is calculated as the Euclidian norm.

### Claim 9 (depends on 1)

The computing system of claim 1, wherein the machine learning model comprises a classifier and the feature anomaly scores are determined from the anomaly score.

### Claim 10 (depends on 1)

The computing system of claim 1, the operations further comprising:
determining that the anomaly score exceeds a threshold;
determining at least one feature anomaly score that satisfies a threshold contribution to the anomaly score; and
determining an alternative value for the feature associated with the at least one feature anomaly score.

### Claim 11 (depends on 10)

The computing system of claim 10, wherein determining an alternative value for the feature associated with the at least one feature anomaly score is based at least in part on an association rule that comprises the feature associated with the at least one feature anomaly score.

### Claim 12 (depends on 10)

The computing system of claim 10, wherein the alternative value is based at least in part on parameters associated with the machine learning model.

### Claim 13 (depends on 1)

The computing system of claim 1, wherein the inference result comprises the anomaly score and an indication of whether the inference data collection satisfies anomaly criteria.

### Claim 14 (depends on 1)

The computing system of claim 1, wherein the at least a portion of the feature anomaly scores is selected as features of the plurality of feature anomaly scores satisfying selection criteria.

### Claim 15 (depends on 1)

The computing system of claim 1, wherein the inference result comprises relative contributions of features associated with the at least a portion of the feature anomaly scores to the anomaly score.

### Claim 16 (depends on 1)

The computing system of claim 1, wherein the inference result comprises information comparing the inference result with the training data collection.

### Claim 17 (depends on 16)

The computing system of claim 16, wherein the information comparing the inference result with the training data collection comprises a relative anomaly score comparing the anomaly score with a reference anomaly score or identifying how the anomaly score compares with a distribution of anomaly scores for the plurality of training data collections.

### Claim 18 (depends on 1)

The computing system of claim 1, wherein the inference result comprises identifiers for data types of features associated with the at least a portion of the feature anomaly scores.

### Claim 19

One or more computer-readable storage media comprising computer-executable instructions for causing a computing system programmed thereby to perform operations comprising:
receiving a request for an anomaly score for an inference data collection;
receiving the inference data collection, the inference data collection comprising a plurality of features, each feature being associated with a data type;
calculating an anomaly score for the inference data collection using a machine learning model, wherein the anomaly score indicates a relative difference between the inference data collection and a plurality of training data collections used to train the machine learning model, the anomaly score representing a combination of feature anomaly scores for at least a portion of the features of the inference data collection, wherein the training data collections comprise the plurality of features; and
returning an inference result in response to the request, the inference result comprising at least a portion of the feature anomaly scores.

### Claim 20

A method, implemented in a computing system comprising a memory and one or more processors, comprising:
receiving a request for an anomaly score for an inference data collection;
receiving the inference data collection, the inference data collection comprising a plurality of features, each feature being associated with a data type;
calculating an anomaly score for the inference data collection using a machine learning model, wherein the anomaly score indicates a relative difference between the inference data collection and a plurality of training data collections used to train the machine learning model, the anomaly score representing a combination of feature anomaly scores for at least a portion of the features of the inference data collection, wherein the training data collections comprise the plurality of features; and
returning an inference result in response to the request, the inference result comprising at least a portion of the feature anomaly scores.
