# Adaptive Noise-Powered Diffusion Model for Efficient and Accurate Object Detection
## 3 Method
### Adaptive Interaction  
The introduction of the AAFI module enhances the extraction of semantic features and improves the efficiency of adaptive noise generation. With the implementation of adaptive noise and adaptive denoising, the decoder was simplified. To achieve higher precision while maintaining efficiency, we propose adaptive interaction, a mechanism designed to improve both the efficiency and accuracy of the decoder. As illustrated in Figure 3, adaptive interaction consists of two submodules: adaptive attention-based proposal interaction (AAPI) and adaptive convolutional proposal interaction (ACPI). We simplify the representation of the adaptive denoising process as \(\text{Ada}(y_{t})\to O_{f}(P_{f}^{i})\to\text{Predy}_{0}\). Here, proposal feature \(P_{f}\) serves as a key intermediate variable, receiving positional information and noise from \(\text{Ada}(y_{t})\) while also transmitting bounding box offsets through \(O_{f}\). This dual role highlights \(P_{f}\)'s critical importance in both capturing and transmitting target information. Therefore, we improved two proposal interaction modules (corresponding to self-attention and dynamic convolution) for manipulating pf by introducing AAPI and ACPI. These two submodules together form what we call adaptive interaction, which directly corresponds to the adaptive stage in Figure 1b and a single decoder layer in the adaptive denoising process. We represent the adaptive interaction (the pipeline of a single iteration in the adaptive denoising process) using Equations (7)-(9). \[P_{f}=P_{f}+dropout(\text{AAPI}(P_{f},P_{n})) \tag{7}\]  
\[O_{f}=P_{f}+dropout(\text{ACPI}(P_{f},ROI)) \tag{8}\]  
\[\text{Pred}\,y_{0}=Offset(O_{f},P_{n}) \tag{9}\]The implementation of AAPI aligns with that of AAFI, as both employ a single transformer encoder layer. However, because AAPI is designed to fully extract information from different stages, it requires interaction between \(P_{b}\) and \(P_{f}\). Despite the structural similarities between AAPI and AAFI, their functionalities differ significantly. For instance, in AAFI, \(Q=K=V\), whereas in AAPI, \(Q\), \(K\), and \(V\) are three independent variables, generated through multiple interactions between \(P_{b}\) and \(P_{f}\). Before feeding \(P_{b}\) and \(P_{f}\) into the transformer layer, we apply multiple linear transformations to them, typically consisting of a combination of multilayer perceptrons (MLPs) and linear layers, and this can be formulated as \(Q=\text{Linear}_{1}(p_{f})+\text{MLP}_{1}(p_{b})\), \(K=\text{Linear}_{2}(P_{f})+\text{MLP}_{2}(p_{b})\), and \(V=\text{Linear}_{3}(p_{f})\). In the first stage, \(P_{f}\) is equivalent to the mean of the ROI features, while \(P_{b}\) corresponds to \(\text{Ada}(y_{t})\); in subsequent recursive stages, both \(P_{b}\) and \(P_{f}\) are derived from the previous layer's input, iteratively moving closer to the ground truth. Given that the parameters of \(P_{f}\) and \(P_{b}\) are much smaller than those of the P5 feature layer, we enhanced their expressive power using multiple linear layers to mitigate discrepancies in input values at different stages. In our setup, \(\text{MLP}_{1}\) and \(\text{MLP}_{2}\) share most parameters, with only one linear layer having independent parameters. This configuration increases the ability to handle different stages of \(P_{f}\) and \(P_{b}\) without significantly increasing the parameter count. Similar to AAPI, the ACPI module also facilitates feature interaction, but its implementation differs significantly. We designed the ACPI module based on the dynamic convolution module in Sparse R-CNN. This module applies a linear transformation to the feature vectors \(P_{f}\), which have undergone specific enhancements, using a predefined hidden dimension (the default is 64). Two sets of matrix parameters are then generated for subsequent computations. These parameters are multiplied with each region of interest (ROI) to enable effective feature interaction, ultimately producing the enhanced output feature \(O_{f}\).