# US 2022/0036133 A1 · Context aware anomaly detection

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

- Number: US 2022/0036133 A1
- Document ID: US20220036133A1
- Status: Published application
- Kind: A1
- Application number: 16/940,508
- Filed: 2020-07-28
- Published: 2022-02-03
- Earliest claimed: 2020-07-28
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Joseph Paul Wigglesworth; Arnamoy Bhattacharyya; Cristiana Amza
- Web page: https://patentgrep.com/patent/US20220036133A1

## CPC

- G06F 18/2148: {characterised by the process organisation or structure, e.g. boosting cascade}
- G06N 3/08: Learning methods
- G06F 11/076: {by exceeding a count or rate limit, e.g. word- or bit count limit}
- G06F 11/302: {where the computing system component is a software system}
- G06F 11/3024: {where the computing system component is a central processing unit [CPU]}
- G06F 11/3037: {where the computing system component is a memory, e.g. virtual memory, cache (accessing, addressing or allocating within memory systems or architectures G06F12/00; checking stores for correct operation G11C29/00)}
- G06F 11/3075: {the data filtering being achieved in order to maintain consistency among the monitored data, e.g. ensuring that the monitored data belong to the same timeframe, to the same system or component}
- G06F 11/323: {Visualisation of programs or trace data}
- G06F 18/22: Matching criteria, e.g. proximity measures
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/09: Supervised learning
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F 2218/06: by applying a scale-space analysis, e.g. using wavelet analysis
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A computer-implemented method for context aware anomaly detection includes receiving a signal including real-time data, dividing the received signal into a set of training wavelets bounded by a respective training context, generating a prediction model for the training context by processing the set of training wavelets through a recurrent neural network to identify patterns in a sequence of data of a respective training wavelet. The method includes, in response to execution of a current context that is different from the training context, extracting current wavelets from a signal of the current context, identifying a pairwise match between same dimensions of the current wavelets and a wavelet pattern of the prediction model by aligning sequences of the current wavelet and sequences of the wavelet pattern of the prediction model. Upon determining that a total cumulative distance between the two sequences exceeds a predetermined threshold, an anomaly is identified.

## Claims

### Claim 1

A computer-implemented method for context aware anomaly detection, the method comprising:
receiving a signal including real-time data;
dividing the received signal into a set of training wavelets bounded by a respective training context;
generating a prediction model for the training context by processing the set of training wavelets through a recurrent neural network to identify patterns in a sequence of data of a respective training wavelet;
in response to execution of a current context that is different from the training context, extracting current wavelets from a signal of the current context;
identifying a pairwise match between same dimensions of the current wavelets and a wavelet pattern of the prediction model by aligning sequences of the current wavelet and sequences of the wavelet pattern of the prediction model; and
in response to determining that a total cumulative distance between the two sequences exceeds a predetermined threshold, identifying an anomaly.

### Claim 2 (depends on 1)

The method of claim 1, wherein the real-time data is received from a plurality of data sources represented by a signal captured in real-time comprising n-dimensions, in which each dimension is representative of time series data collected.

### Claim 3 (depends on 2)

The method of claim 2, wherein the n-dimensions include:
a set of functions in a thread-dump;
utilization of a CPU; and
memory consumption.

### Claim 4 (depends on 1)

The method of claim 1, wherein the training context is identified by phase changes during an application run using periodically collected snapshots.

### Claim 5 (depends on 4)

The method of claim 4, wherein the phase changes are detected when there is a change between two consecutively collected snapshots of a program that exceeds a threshold change.

### Claim 6 (depends on 4)

The method of claim 4, wherein a sliding window approach is utilized to detect the phase changes.

### Claim 7 (depends on 1)

The method of claim 1, wherein identifying the pairwise match includes
constructing, using d data points from each of the current wavelets, a d-by-d matrix in which each element of the matrix corresponds to a squared distance, d(ti, pj)=(ti, pj)2, representing an alignment between points ti and pj, and
identifying a best match between these two sequences by retrieving an optimal path through the d-by-d matrix that minimizes the total cumulative distance between the two sequences.

### Claim 8 (depends on 7)

The method of claim 7, wherein the optimal path is retrieved through the matrix that minimizes a warping cost represented by
DTW
⁡
(
T
,
P
)
=
min
⁢
{
∑
k
=
1
K
⁢
w
k
}
where, wk is a matrix element (i,j)k that also belongs to the k-th element of a warping path W, a contiguous set of matrix elements that represent a mapping between T and P.

### Claim 9 (depends on 8)

The method of claim 8, wherein the warping path is determined using dynamic programming to evaluate a recurrence represented by
γ(i,j)=d(ti,pj)+min{γ(i−1,j−1),γ(i−1,j),γ(i,j−1)
where d(i,j) is the distance found in a current cell, and γ(i, j) is a cumulative distance of d(i, j) and minimum cumulative distances from three adjacent cells.

### Claim 10 (depends on 1)

The method of claim 1, wherein the predetermined threshold is modifiable based on user input.

### Claim 11

A computer program product for context aware anomaly detection, the computer program product comprising:
one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions comprising:
program instructions to receive a signal including real-time data;
program instructions to divide the received signal into a set of training wavelets bounded by a respective training context;
program instructions to generate a prediction model for the training context by processing the set of training wavelets through a recurrent neural network to identify patterns in a sequence of data of a respective training wavelet;
program instructions to, in response to execution of a current context that is different from the training context, extract current wavelets from a signal of the current context;
program instructions to identify a pairwise match between same dimensions of the current wavelets and a wavelet pattern of the prediction model by aligning sequences of the current wavelet and sequences of the wavelet pattern of the prediction model; and
program instructions to identify an anomaly in response to determining that a total cumulative distance between the two sequences exceeds a predetermined threshold.

### Claim 12 (depends on 11)

The computer program product of claim 11, wherein the real-time data is received from a plurality of data sources represented by a signal captured at real-time comprising n-dimensions, in which each dimension is representative of time series data collected.

### Claim 13 (depends on 12)

The computer program product of claim 12, wherein the n-dimensions include:
a set of functions in a thread-dump;
utilization of a CPU; and
memory consumption.

### Claim 14 (depends on 11)

The computer program product of claim 11, wherein the training context is identified by phase changes during an application run using periodically collected snapshots.

### Claim 15 (depends on 14)

The computer program product of claim 14, wherein the phase changes are detected when there is a change between two consecutively collected snapshots of a program that exceeds a threshold change.

### Claim 16 (depends on 14)

The computer program product of claim 14, wherein a sliding window approach is utilized to detect the phase changes.

### Claim 17 (depends on 11)

The computer program product of claim 11, wherein identifying the pairwise match includes
constructing, using d data points from each of the current wavelets, a d-by-d matrix in which each element of the matrix corresponds to a squared distance, d(ti, pj)=(ti, pj)2, representing an alignment between points ti and pj, and
identifying a best match between these two sequences by retrieving an optimal path through the d-by-d matrix that minimizes the total cumulative distance between the two sequences.

### Claim 18 (depends on 11)

The computer program product of claim 11, wherein the predetermined threshold is modifiable based on user input.

### Claim 19

A computer-implemented method of identifying a context, the method comprising:
receiving real-time data of the context over a time period;
setting the context to a first level of granularity;
dividing the real-time data into wavelets based on the first level of granularity; and
attempting to identify a pattern in the wavelets based on dynamic time warping.

### Claim 20 (depends on 19)

The computer-implemented method of claim 19, wherein upon determining that a pattern has not been identified in the wavelets:
setting the context to a second level of granularity that is finer that the first level of granularity;
dividing the real-time data into wavelets based on the second level of granularity; and
attempting to identify the pattern in the wavelets based on the dynamic time warping.
