and $col2$ are represented by a unique one-hot vectors placed in J1-seg and J2-seg segments, respectively. Each predicate of the form $(col,op,val) \in P$ is represented as follows. $col$ and $op$ are represented by a unique one-hot vectors placed in the C-seg and V-seg segments, respectively. $val$ is represented as a normalized value $\in [0, 1]$, normalized using the minimum and maximum values of the respective column, placed in the V-seg segment. For each vector, all the other unmentioned segments are zeroed. Given input queries pair, $(Q1,Q2)$, we convert query $Q1$ (resp., $Q2$) into sets $T$, $J$ and $P$, and *each* element of these sets is represented by a vector as described above, together generating set $V1$ (resp., $V2$).

### Second Stage, from $(V1,V2)$ to $(Qvec1,Qvec2)$

Given set of vectors $V_i$, we present each vector of the set into a fully-connected one-layer neural network, denoted as $MLP_i$, converting each vector into a vector of dimension $H$. The final representation $Qvec_i$ for this set is then given by the average over the individual transformed representations of its elements, i.e., $$Qvec_i = \frac{1}{|V_i|} \sum_{v \in V_i} MLP_i (v)$$ $$MLP_i(v) = Relu(vU_i + b_i)$$ Where $U_i \in R^{LxH}$, $b_i \in R^{H}$ are the 