# US 2016/0260011 A1 · Cardinality estimation using artificial neural networks

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

- Number: US 2016/0260011 A1
- Document ID: US20160260011A1
- Status: Published application
- Kind: A1
- Application number: 14/639,157
- Filed: 2015-03-05
- Published: 2016-09-08
- Earliest claimed: 2015-03-05
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Vincent Corvinelli; Huaxin Liu; Mingbin Xu; Ziting Yu; Calisto P. Zuzarte
- Web page: https://patentgrep.com/patent/US20160260011A1

## CPC

- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06F 16/2455: Query execution
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/0499: Feedforward networks
- G06N 3/06: Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N 3/09: Supervised learning
- G06N 20/00: Machine learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In an approach for generating a selectivity estimation, one or more processors generate an artificial neural network and receive a DBMS query comprising one or more predicates. One or more processors replace one or more predicates in the one or more predicates that have strict operators with one or more predicates that have non-strict operators. One or more processors generate a selectivity function from the one or more predicates that has one or more arguments that are each comprised of an upper bound and a lower bound for a value in a predicate. One or more processors generate a training data set from a data distribution in the database and train the artificial neural network on the training data set to compute the selectivity function. One or more processors generate a selectivity estimation with the artificial neural network for one or more predicates in the DBMS query.

## Claims

### Claim at position 1

1-8. (canceled)

### Claim 9

A computer program product for generating a selectivity estimation, computer program product comprising:
one or more computer readable storage media and program instructions stored on the one or more computer readable storage media, the program instructions comprising:
program instructions to generate an artificial neural network with a hidden layer comprising one or more neurons, wherein the one or more neurons are grouped into one or more groups of neurons, wherein each neuron in a group of neurons in the one or more groups of neurons compute with a common jump activation function;
program instructions to receive a DBMS query comprising one or more predicates, wherein a predicate in the one or more predicates operates on one or more database columns;
program instructions to convert one or more strict operators in the one or more predicates to one or more non-strict operators in the one or more predicates;
program instructions to generate a selectivity function from the one or more predicates, wherein the selectivity function has one or more arguments, wherein an argument in the one or more arguments is an upper bound and a lower bound for a value in a predicate in the one or more predicates;
program instructions to generate a training data set for the artificial neural network from a data distribution in the one or more database columns;
program instructions to train the artificial neural network on the training data set to compute the selectivity function; and
program instructions to generate a selectivity estimation with the artificial neural network for one or more predicates in the DBMS query.

### Claim 10 (depends on 9)

The computer program product of claim 9, wherein the program instructions to convert one or more strict operators in the one or more predicates to one or more non-strict operators in the one or more predicates are comprised of:
program instructions to replace a first predicate, in the one or more predicates, that operates on a first value with an equal to operator, with a second predicate that operates on the first value with a greater than or is equal to operator and a third predicate that operates on the first value with an is less than or is equal to operator;
program instructions to replace a fourth predicate, in the one or more predicates, that operates on a second value in a first database column with a is less than or is greater than operator, with a fifth predicate that operates on the second value with a is greater than operator and a sixth predicate that operates on the second value with a is less than operator;
program instructions to replace a strict range greater than operator in a seventh predicate, in the one or more predicates, that operates on a third value in a second database column, with a non-strict range greater than or equal to operator that operates on a fourth value in the second database column, wherein the fourth value is a smallest value in the second database column that is greater than the third value; and
program instructions to replace a strict range less than operator in an eighth predicate, in the one or more predicates, that operates on a fifth value in a third database column, with a non-strict range less than or equal to operator that operates on a sixth value in the third database column, wherein the sixth value is a largest value in the third database column that is less than the fifth value.

### Claim 11 (depends on 9)

The computer program product of claim 9, further comprising program instructions, stored on the one or more computer readable storage media, to:
compute the jump activation function in a neuron in the one or more neurons as:
ϕ
k

(
x
)
=
{
0
for


x
<
0
(
1
-

-
x
)
k
for


x
≥
0
,
wherein x is a value computed from one or more inputs to the neuron and k is a positive integer.

### Claim 12 (depends on 9)

The computer program product of claim 9, further comprising program instructions, stored on the one or more computer readable storage media, to:
compute the output of the artificial neural network as a linear combination of an output from one or more neurons in the hidden layer.

### Claim 13 (depends on 10)

The computer program product of claim 10, further comprising program instructions, stored on the one or more computer readable storage media, to:
compute the fourth value with an upper bound artificial neural network that takes the third value as an input and compute the sixth value with a lower bound artificial neural network that takes the fifth value as an input.

### Claim 14 (depends on 9)

The computer program product of claim 9, further comprising program instructions, stored on the one or more computer readable storage media, to:
instantiate the artificial neural network as a recurrent artificial neural network.

### Claim 15 (depends on 11)

The computer program product of claim 11, further comprising program instructions, stored on the one or more computer readable storage media, to:
instantiate the hidden layer as comprised of a first group of neurons that uses the jump activation function with k=1 and a second group of neurons that uses the jump activation function with k=2.

### Claim 16 (depends on 9)

The computer program product of claim 9, further comprising program instructions, stored on the one or more computer readable storage media, to:
compute a jump activation function that is a non-constant, bounded, continuous, and monotonically increasing function.

### Claim 17

A computer system for generating a selectivity estimation, the computer system comprising:
one or more computer processors, one or more computer readable storage media, and program instructions stored on the computer readable storage media for execution by at least one of the one or more processors, the program instructions comprising:
program instructions to generate an artificial neural network with a hidden layer comprising one or more neurons, wherein the one or more neurons are grouped into one or more groups of neurons, wherein each neuron in a group of neurons in the one or more groups of neurons compute with a common jump activation function;
program instructions to receive a DBMS query comprising one or more predicates, wherein a predicate in the one or more predicates operates on one or more database columns;
program instructions to convert one or more strict operators in the one or more predicates to one or more non-strict operators in the one or more predicates;
program instructions to generate a selectivity function from the one or more predicates, wherein the selectivity function has one or more arguments, wherein an argument in the one or more arguments is an upper bound and a lower bound for a value in a predicate in the one or more predicates;
program instructions to generate a training data set for the artificial neural network from a data distribution in the one or more database columns;
program instructions to train the artificial neural network on the training data set to compute the selectivity function; and
program instructions to generate a selectivity estimation with the artificial neural network for one or more predicates in the DBMS query.

### Claim 18 (depends on 17)

The computer system of claim 17 wherein the program instructions to convert one or more strict operators in the one or more predicates to one or more non-strict operators in the one or more predicates are comprised of:
program instructions to replace a first predicate, in the one or more predicates, that operates on a first value with an equal to operator, with a second predicate that operates on the first value with a greater than or is equal to operator and a third predicate that operates on the first value with an is less than or is equal to operator;
program instructions to replace a fourth predicate, in the one or more predicates, that operates on a second value in a first database column with a is less than or is greater than operator, with a fifth predicate that operates on the second value with a is greater than operator and a sixth predicate that operates on the second value with a is less than operator;
program instructions to replace a strict range greater than operator in a seventh predicate, in the one or more predicates, that operates on a third value in a second database column, with a non-strict range greater than or equal to operator that operates on a fourth value in the second database column, wherein the fourth value is a smallest value in the second database column that is greater than the third value; and
program instructions to replace a strict range less than operator in an eighth predicate, in the one or more predicates, that operates on a fifth value in a third database column, with a non-strict range less than or equal to operator that operates on a sixth value in the third database column, wherein the sixth value is a largest value in the third database column that is less than the fifth value.

### Claim 19 (depends on 17)

The computer system of claim 17, further comprising program instructions, stored on the one or more computer readable storage media, to:
compute the jump activation function in a neuron in the one or more neurons as:
ϕ
k

(
x
)
=
{
0
for


x
<
0
(
1
-

-
x
)
k
for


x
≥
0
,
wherein x is a value computed from one or more inputs to the neuron and k is a positive integer.

### Claim 20 (depends on 18)

The computer system of claim 18, further comprising program instructions, stored on the one or more computer readable storage media, to:
compute the fourth value with an upper bound artificial neural network that takes the third value as an input and compute the sixth value with a lower bound artificial neural network that takes the fifth value as an input.
