# US 2025/0094433 A1 · System and method for combinatorial data outlier detection via database query statement generation

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

- Number: US 2025/0094433 A1
- Document ID: US20250094433A1
- Status: Published application
- Kind: A1
- Application number: 18/368,102
- Filed: 2023-09-14
- Published: 2025-03-20
- Earliest claimed: 2023-09-14
- Assignees: Bank of America Corporation
- Applicants: Bank of America Corporation
- Inventors: Matthew Grant Baber; Dipesh Bhattarai; Andreas Alexander Boeker; Abir Mustafa Chowdhury; Thomas Gorham; Meghan Elise Johansson; Kathryn Wyke Ruse; Mary Ivette Reyes; Kenneth Anthony Smith, II; Bryan Mitchell Wood
- Web page: https://patentgrep.com/patent/US20250094433A1

## CPC

- G06F 16/2462: {Approximate or statistical queries}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/242: Query formulation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems, computer program products, and methods are described herein for combinatorial data outlier detection via database query statement generation. A table comprising rows and columns is received, wherein each column comprises records and a corresponding data element. A datatype to be assigned to each data element is determined, based on each column and using a first machine learning model. Conditions are generated for columns corresponding to each data element. The conditions are combined into a predetermined number of condition combinations, wherein the condition combinations comprise combinatorial sequencing of the conditions. A query statement is generated for each of the condition combinations. The table in queried with each query statement to determine query results. A data element quantity and a record quantity in the query results are determined for each query statement.

## Claims

### Claim 1

A system for combinatorial data outlier detection via database query statement generation, the system comprising:
a processing device; and
a non-transitory storage device comprising instructions configured to control the processing device to:
receive a table comprising rows and columns, wherein each column comprises records and a corresponding data element;
determine, based on each column and using a first machine learning model, a datatype to be assigned to each data element, wherein the datatype is selected from a list consisting of numeric, date, and text;
generate conditions for columns corresponding to each data element, wherein conditions are selected based on the datatype, and wherein conditions are selected from a group consisting of null conditions, operator conditions, and value conditions;
combine the conditions into a predetermined number of condition combinations, each condition combination unique from other condition combinations and comprising a combinatorial sequencing of the conditions having logical operators (AND, OR) between each condition such that the predetermined number of condition combinations comprises all possible logical arrangements of the conditions;
generate a query statement for each of the condition combinations;
query, in parallel with combining the conditions into the predetermined number of condition combinations, the table with each query statement to determine query results, wherein the query results match at least one of the condition combinations;
determine, for each query statement, a data element quantity in the query results and a record quantity corresponding to each data element in the query results;
tag the query statement as a rule in response to the data element quantity in the query results being within a first predetermined upper and lower limit, and the record quantity corresponding to each data element in the query results being within a second predetermined upper and lower limit, wherein the second predetermined upper and lower limit comprises thresholds expressed as percentages of total number of records within a column;
extract records corresponding to the rule by using metadata associated with the rule to retrieve the records corresponding to the rule from the table;
apply an outlier detection model to the records corresponding to the rule; and
identify, using the outlier detection model, outliers in the records, wherein the outliers are detected based on proximity to clusters generated by the outlier detection model.

### Claim 2

(canceled)

### Claim 3 (depends on 1)

The system of claim 1, wherein the instructions are further configured to control the processing device to:
generate a plot comprising a graph network of the records corresponding to the rule; and
transmit the plot to an endpoint device for displaying on an interface of the endpoint device.

### Claim 4 (depends on 1)

The system of claim 1, wherein the instructions are further configured to control the processing device to:
generate a plot comprising a graph network of the records corresponding to the outliers in the records; and
transmit the plot to an endpoint device for displaying on an interface of the endpoint device.

### Claim 5 (depends on 1)

The system of claim 1, wherein the instructions are further configured to control the processing device to:
apply a grid search technique comprising hyperparameter tuning to the outlier detection model.

### Claim 6 (depends on 1)

The system of claim 1, wherein the outlier detection model comprises at least one selected from the group consisting of: a local outlier factor method and an isolation forest method.

### Claim 7 (depends on 1)

The system of claim 1, wherein the outlier detection model comprises a local outlier factor method and an isolation forest method.

### Claim 8

A computer program product for combinatorial data outlier detection via database query statement generation, the computer program product comprising a non-transitory computer-readable medium comprising code configured to control a processing device to:
receive a table comprising rows and columns, wherein each column comprises records and a corresponding data element;
determine, based on each column and using a first machine learning model, a datatype to be assigned to each data element, wherein the datatype is selected from a list consisting of numeric, date, and text;
generate conditions for columns corresponding to each data element, wherein conditions are selected based on the datatype, and wherein conditions are selected from a group consisting of null conditions, operator conditions, and value conditions;
combine the conditions into a predetermined number of condition combinations, each condition combination unique from other condition combinations and comprising a combinatorial sequencing of the conditions having logical operators (AND, OR) between each condition such that the predetermined number of condition combinations comprises all possible logical arrangements of the conditions;
generate a query statement for each of the condition combinations;
query, in parallel with combining the conditions into the predetermined number of condition combinations, the table with each query statement to determine query results, wherein the query results match at least one of the condition combinations;
determine, for each query statement, a data element quantity in the query results and a record quantity corresponding to each data element in the query results;
tag the query statement as a rule in response to the data element quantity in the query results being within a first predetermined upper and lower limit, and the record quantity corresponding to each data element in the query results being within a second predetermined upper and lower limit, wherein the second predetermined upper and lower limit comprises thresholds expressed as percentages of total number of records within a column;
extract records corresponding to the rule by using metadata associated with the rule to retrieve the records corresponding to the rule from the table;
apply an outlier detection model to the records corresponding to the rule; and
identify, using the outlier detection model, outliers in the records, wherein the outliers are detected based on proximity to clusters generated by the outlier detection model.

### Claim 9

(canceled)

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein the code is further configured to control the processing device to:
generate a plot comprising a graph network of the records corresponding to the rule; and
transmit the plot to an endpoint device for displaying on an interface of the endpoint device.

### Claim 11 (depends on 8)

The computer program product of claim 8, wherein the code is further configured to control the processing device to:
generate a plot comprising a graph network of the records corresponding to the outliers in the records; and
transmit the plot to an endpoint device for displaying on an interface of the endpoint device.

### Claim 12 (depends on 8)

The computer program product of claim 8, wherein the code is further configured to control the processing device to:
apply a grid search technique comprising hyperparameter tuning to the outlier detection model.

### Claim 13 (depends on 8)

The computer program product of claim 8, wherein the outlier detection model comprises at least one selected from the group consisting of: a local outlier factor method and an isolation forest method.

### Claim 14 (depends on 8)

The computer program product of claim 8, wherein the outlier detection model comprises a local outlier factor method and an isolation forest method.

### Claim 15

A computer-implemented method for combinatorial data outlier detection via database query statement generation, the method comprising:
receiving a table comprising rows and columns, wherein each column comprises records and a corresponding data element;
determining, based on each column and using a first machine learning model, a datatype to be assigned to each data element, wherein the datatype is selected from a list consisting of numeric, date, and text;
generating conditions for columns corresponding to each data element, wherein conditions are selected based on the datatype, and wherein conditions are selected from a group consisting of null conditions, operator conditions, and value conditions;
combining the conditions into a predetermined number of condition combinations, each condition combination unique from other condition combinations and comprising a combinatorial sequencing of the conditions having logical operators (AND, OR) between each condition such that the predetermined number of condition combinations comprises all possible logical arrangements of the conditions;
generating a query statement for each of the condition combinations;
querying, in parallel with combining the conditions into the predetermined number of condition combinations, the table with each query statement to determine query results, wherein the query results match at least one of the condition combinations;
determining, for each query statement, a data element quantity in the query results and a record quantity corresponding to each data element in the query results;
tag the query statement as a rule in response to the data element quantity in the query results being within a first predetermined upper and lower limit, and the record quantity corresponding to each data element in the query results being within a second predetermined upper and lower limit, wherein the second predetermined upper and lower limit comprises thresholds expressed as percentages of total number of records within a column;
extract records corresponding to the rule by using metadata associated with the rule to retrieve the records corresponding to the rule from the table;
apply an outlier detection model to the records corresponding to the rule; and
identify, using the outlier detection model, outliers in the records, wherein the outliers are detected based on proximity to clusters generated by the outlier detection model.

### Claim 16

(canceled)

### Claim 17 (depends on 15)

The computer-implemented method of claim 15, wherein the method further comprises:
generating a plot comprising a graph network of the records corresponding to the rule; and
transmitting the plot to an endpoint device for displaying on an interface of the endpoint device.

### Claim 18 (depends on 15)

The computer-implemented method of claim 15, wherein the method further comprises:
applying a grid search technique comprising hyperparameter tuning to the outlier detection model.

### Claim 19 (depends on 15)

The computer-implemented method of claim 15, wherein the outlier detection model comprises at least one selected from the group consisting of: a local outlier factor method and an isolation forest method.

### Claim 20 (depends on 15)

The computer-implemented method of claim 15, wherein the outlier detection model comprises a local outlier factor method and an isolation forest method.
