# Research on Applying the \"Shift\" Concept to Deep Attention Matching
## 4 Experiments
### Comparison Methods
It is necessary to determine the optimal shifted distance, and the experiment shows that the results were optimal when the shifted distance was 1. The results are shown in Table 6 (the other shifted distances are not shown here), where \"_n_ to \(m\) \" denotes the distance from the _n_th layer granularity to the _n_th layer. Table 6 only shows the experimental result with 3 or more layers (the experiments with less than 3 layers did not give better results than when there were 3 layers). It can be known that the model obtains the best results starting from 1 st layer of granularity up to 3 rd layer of granularity, while at the 3 layers, the further back in the granularity layers bring less effective results and even reduced accuracy. Then, comparing the results of matching at 4 granularities, the results from the 1 st layer to the 4 th layer are better than the results from the layer 2 nd to the 5 th layer, and comparing the results for \"1 to 4\" and \"1 to 5\", the former are better than the latter. In summary, it can be seen that the effect of an extra 4 th layer or 5 th layer is reversed when all other layers are the same, and we conjecture that the shifted granularity matching between the 4 th layer and the 5 th layer has a negative effect. The reason is that the deeper the granularity, the greater the spatial independence and the less dependence on the common space, i.e., it represents the unique semantics of the corresponding utterance, with its own properties, rather than the linguistic commonality, and the matching similarity to such granularity will bring distorted information to the model. The validity of this conjecture remains to be verified by subsequent experiments. Table 7 shows the results of comparing several models under the Ubuntu and Douban datasets, where Ours-1 indicates the improved model using the shifted granularity matching with 1 shifted distance. It shows that our model outperforms DAM. The improvement to DAM on \(R_{10}\)@1 is over 1.17%, and on \(R_{10}\)@2 is over 0.80%. As for Douban corpus, the improvement to DAM on _MAP_ is over 1.45%, on _MRR_ is over 1.50%, on _P@1_ is over \begin{table}
\begin{tabular}{l c c c c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Ubuntu Dialogue Corpus**} & \multicolumn{6}{c}{**Douban Conversation Corpus**} \\ \cline{2-11}  & \(R_{2}\)@1 & \(R_{10}\)@1 & \(R_{10}\)@2 & \(R_{10}\)@5 & **MAP** & **MRR** & \(P\)@1 & \(R_{10}\)@1 & \(R_{10}\)@2 & \(R_{10}\)@5 \\ \hline
1 to 3 & 0.945 & 0.780 & 0.884 & 0.972 & 0.560 & 0.604 & 0.436 & 0.260 & 0.420 & 0.770 \\ \hline
2 to 4 & 0.940 & 0.770 & 0.880 & 0.968 & 0.556 & 0.602 & 0.430 & 0.254 & 0.413 & 0.766 \\ \hline
3 to 5 & 0.932 & 0.760 & 0.871 & 0.959 & 0.539 & 0.594 & 0.411 & 0.240 & 0.405 & 0.752 \\ \hline
1 to 4 & 0.937 & 0.771 & 0.879 & 0.968 & 0.553 & 0.601 & 0.428 & 0.250 & 0.412 & 0.762 \\ \hline
2 to 5 & 0.921 & 0.743 & 0.844 & 0.942 & 0.528 & 0.579 & 0.401 & 0.237 & 0.398 & 0.730 \\ \hline
1 to 5 & 0.930 & 0.757 & 0.869 & 0.955 & 0.535 & 0.592 & 0.407 & 0.240 & 0.401 & 0.750 \\ \hline DAM & 0.938 & 0.767 & 0.874 & 0.969 & 0.550 & 0.601 & 0.427 & 0.254 & 0.410 & 0.757 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Compare the results of the different matching methods under the multi-level shifted cross-attention granularity matching method. \begin{table}
\begin{tabular}{l c c c c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Ubuntu Dialogue Corpus**} & \multicolumn{6}{c}{**Douban Conversation Corpus**} \\ \cline{2-11}  & \(R_{2}\)@1 & \(R_{10}\)@1 & \(R_{10}\)@2 & \(R_{10}\)@5 & **MAP** & **MRR** & \(P\)@1 & \(R_{10}\)@1 & \(R_{10}\)@2 & \(R_{10}\)@5 \\ \hline Dis-1 & 0.941 & 0.776 & 0.881 & 0.970 & 0.558 & 0.604 & 0.431 & 0.257 & 0.425 & 0.769 \\ \hline Dis  
0.94%, on \(R_{10}\)@2 is over 3.67%, on \(R_{10}\)@5 is over 1.59%. In terms of the magnitude of the improvement in each metric, it can be concluded that the shifted matching provides better information extraction.