model uses a specialized vector representation for representing the input queries and the output containment rates. As depicted in Figure \[CRN Model Archeticture\], the CRN model runs in three main stages. Consider an input queries pair $(Q1,Q2)$. In the first stage, we convert $Q1$ (resp., $Q2$) into a set of vectors $V1$ (resp., $V2$). Thus $(Q1,Q2)$ is represented by $(V1,V2)$. In the second stage, we convert set $V1$ (resp., $V2$) into a unique single representative vector $Qvec1$ (resp., $Qvec2$), using a specialized neural network, $MLP_i$, for each set separately. In the third stage, we estimate the containment rate $Q1 \subset_{\%} Q2$, using the representative vectors $Qvec1$ and $Qvec2$, and another specialized neural network, $MLP_{out}$.

![CRN Model Archeticture.[]{data-label="CRN Model Archeticture"}](CRN.PNG){width="\linewidth"}

![image](Vectors.PNG){width="\linewidth"}

### First Stage, from $(Q1,Q2)$ to $(V1,V2)$

In the same way as MSCN model [@LearnedCrd], we represent each query $Q$ as a collection of three sets $(T,J,P)$. $T$ is the set of all the tables in $Q$’s FROM clause. $J$ is the set of all the joins (i.e., join clauses) in $Q$’s WHERE clause. $P$ is the set of all the (column) predicates in $Q$’s WHERE clause. Using sets $T$, $J$, and $P$, we obtain a set of vectors $V$ 