From the analysis in Section , we can see that local feature sampling is critical to data efficiency. Fortunately, in detection transformers, the object locations are predicted after each decoder layer. Therefore, we can sample local features under the guidance of the bounding box prediction made by the previous decoder layer without introducing new parameters, as shown in Fig. REF . Although more sophisticated local feature sampling methods can be used, we simply adopt the commonly used RoIAlign [1]}. Formally, the sampling operation can be written as:
\(\mathbf {z}_{\ell }^{L}=\text{RoIAlign}\left(z_{e}^{L}, \mathbf {b}_{\ell -1}\right), \quad \ell =2 \ldots L_{\mathrm {d}}\) 
