Abstract: This paper investigates a phenomenon where query-based object detectors mispredict at the last decoding stage while predicting correctly at an intermediate stage. We review the training process and attribute the overlooked phenomenon to two limitations: lack of training emphasis and cascading errors from decoding sequence. We design and present Selective Query Recollection (SQR), a simple and effective training strategy for query-based object detectors. It cumulatively collects intermediate queries as decoding stages go deeper and selectively forwards the queries to the downstream stages aside from the sequential structure. Such-wise, SQR places training emphasis on later stages and allows later stages to work with intermediate queries from earlier stages directly. SQR can be easily plugged into various query-based object detectors and significantly enhances their performance while leaving the inference pipeline unchanged. As a result, we apply SQR on Adamixer, DAB-DETR, and Deformable-DETR across various settings (backbone, number of queries, schedule) and consistently brings 1.4-2.8 AP improvement.
Introduction: The Problem of "Forgetting" in Decoders
Modern query-based object detectors, such as DETR, DAB-DETR, and AdaMixer, rely on a stack of decoder stages (typically six) to iteratively refine object queries. Ideally, each subsequent stage should improve upon the previous one. However, empirical analysis reveals a counter-intuitive phenomenon: the final stage is not always the most accurate.
The authors identify two primary issues that hinder performance:
- True Positive (TP) Fading: A correct detection made in an intermediate stage (e.g., stage 3) may be degraded or lost by the time it reaches the final stage due to over-refinement or noise.
- False Positive (FP) Exacerbation: A low-confidence incorrect prediction in early stages can have its error amplified, resulting in a high-confidence mistake at the output.
These issues stem from a lack of training emphasis on later stages and the rigid sequential nature of the decoder, where errors cascade without a mechanism to "recollect" better intermediate states.
Selective Query Recollection (SQR)
To address these limitations, the paper introduces Selective Query Recollection (SQR). SQR is a training-time strategy that breaks the strict sequential bottleneck by allowing downstream stages to directly access and refine queries from multiple previous stages.
How SQR Works
Instead of a stage $D_s$ receiving only the output of $D_{s-1}$, SQR enables it to "recollect" queries from a set of previous stages.
- Dense vs. Selective: While a "Dense" approach (connecting all previous stages to all future ones) is possible, it introduces significant computational overhead and noise.
- The SQR Strategy: The authors found that selecting queries from the two most recent stages ($D_{s-1}$ and $D_{s-2}$) provides the optimal balance of stability and performance.
- Fibonacci Supervision: This selective forwarding leads to a cumulative increase in supervision signals as the network goes deeper, following a Fibonacci sequence (1, 2, 3, 5, 8, 13). This naturally places much more training weight on the later, more critical stages of the network.
Crucially, SQR is a training-only modification. During inference, the extra paths are discarded, and the model reverts to its standard sequential pipeline. This means the performance gains come with zero additional inference cost.
Key Results and Insights
The researchers evaluated SQR on the MS-COCO 2017 benchmark across several state-of-the-art baselines, consistently seeing improvements of +1.4 to +2.8 AP:
- DAB-DETR: Improved by +2.3 AP (ResNet-50) and +2.6 AP (Swin-B).
- Deformable-DETR: Improved by +2.7 AP on a standard 12-epoch schedule.
- Adamixer: Improved by +1.9 AP in the basic setting, reaching up to +2.8 AP with an extra decoder stage.
An "Oracle" potential analysis showed that if the best intermediate stage could be perfectly selected for every query, AP would jump by 7–10 points. SQR successfully captures a significant portion of this latent performance by making the final stages more robust to cascading errors.
Conclusion and Future Directions
SQR is a simple yet powerful "plug-and-play" strategy that significantly enhances query-based detectors. While it increases training time (approx. 1.3x–1.6x due to additional matching and loss calculations), the lack of inference overhead makes it highly practical for production environments.
Beyond accuracy, SQR enables aggressive model compression. By using SQR to train a recurrent decoder where all stages share parameters, the authors reduced model size by 70% (from 1.6GB to 513MB) while still outperforming larger, non-recurrent baselines. This suggests that SQR helps the model learn more generalized and robust query refinement features.
Summary updated