LoopDVR:用于高效密集视觉识别的循环 Transformer

媒体报道 Hugging Face Papers 原文语言:中文

研究团队提出 LoopDVR 框架,通过复用 ViT 骨干与解码器模块减少约 28% 参数。LoopDet-S 仅用 700 万参数即达 50.9 框 AP,有助于模型在边缘设备部署。

全文

LoopDVR: Looped Transformer for Efficient Dense Visual Recognition

Sirui Liang1,2 Xuanlong Yu2 Longfei Liu2 Xiaodong Cun1 Xi Shen2

1 GVC Lab, Great Bay University 2 Intellindust AI Lab

Project Page: https://siruuui.github.io/LoopDVR/

Code: https://github.com/Intellindust-AI-Lab/LoopDVR ††thanks: Corresponding author.

Abstract

We propose LoopDVR, a framework for converting pretrained Transformer-based dense visual recognition models into parameter-efficient looped networks. Rather than reducing the network width or depth directly, LoopDVR reuses Transformer blocks across layers in both the ViT backbone and Transformer decoder, reducing the number of parameters while retaining the original computational structure. However, naively sharing parameters can disrupt the distinct transformations learned at different depths. To address this challenge, we identify suitable sharing groups based on inter-layer representation dissimilarity and keep the final backbone block independent for multi-scale feature construction. We then initialize each shared backbone block with the pretrained weights of its group’s terminal layer to better preserve the learned representations. An independent Loop Adapter at each layer further helps retain depth-specific transformations within shared blocks. Subsequently, we distill visual representations into the looped backbone and integrate it with a looped decoder for task-specific training. Experiments demonstrate that LoopDVR achieves the best accuracy–parameter trade-offs across dense recognition tasks. Compared with the reference models, it reduces parameters by approximately 28% while maintaining competitive accuracy. Notably, LoopDet-S achieves 50.9 box AP with only 7.0M parameters, highlighting its effectiveness in compact models.

1 Introduction

Dense Visual Recognition (DVR), including object detection [17], instance segmentation [20], and human pose estimation [4], supports broad applications, e.g., autonomous driving [1], robotics [31] and augmented reality [6]. Transformer-based architectures achieve strong performance via attention-based visual representations and iterative query refinement [5, 72]. But deploying these models on edge devices with limited model-size and GPU memory budgets remains challenging. This motivates extensive research regarding parameter efficiency.

Existing approaches improve model parameter efficiency through compact architecture designs [8, 70, 49, 41] or knowledge distillation to smaller students [24, 7, 9]. Using shallower or narrower networks is a straightforward way to reduce parameter counts. However, it also limits computational depth or representational capacity, and potentially compromises performance, particularly for compact models. This raises a question: Can we reduce parameter counts while preserving the original computational structure, enabling parameter-efficient models to achieve performance comparable to full-sized models? Recent studies on looped Vision Transformers, e.g., MiniViT [68] and Raptor [26], offer a promising solution. These methods reuse the same Transformer weights across multiple layers within each group. This strategy reduces parameter counts while retaining the original computational structure and maintaining competitive performance. However, these classification-oriented methods perform less effectively on dense recognition tasks. Similar ideas have also been explored in object detection: DEQDet [61] and RecursiveDet [69] reuse decoder layers for iterative query refinement. But both leave the backbone untouched, overlooking the substantial parameter overhead associated with this component. Moreover, directly looping the same weights across layers can disrupt the hierarchical representations and depth-specific behaviors, leading to training instability and performance degradation [68].

To overcome these limitations, we propose LoopDVR, a pretrained-model-guided framework for converting dense recognition models into parameter-efficient looped networks. It applies looped Transformers within both the ViT backbone and the query decoder. To enable effective parameter sharing while preserving depth-specific behaviors, we investigate two key questions: 1) Where to Loop? This concerns identifying layers suitable for parameter sharing while minimizing disruption to the hierarchical representations. We adopt a representation-based grouping strategy, which partitions consecutive layers with similar representations into the same sharing group. Furthermore, to better support multi-scale feature construction from the penultimate and final layers, we reserve the terminal block as an independent group. 2) How to Loop? This focuses on enabling the shared network to preserve the depth-specific transformation of different layers. To this end, we use structured initialization, initializing each shared backbone block with the pretrained weights of its group’s terminal layer, which preserves the learned representations of the pretrained model. We further introduce an independent lightweight Loop Adapter for each layer, which performs depth-specific transformation after the shared block. Subsequently, we distill visual representations into the looped backbone before integrating it with the looped decoder for downstream training.

We instantiate LoopDVR as LoopDet, LoopSeg, and LoopPose for object detection, instance segmentation, and human pose estimation, respectively. Across four model scales, LoopDVR reduces parameters by approximately 28% while maintaining competitive accuracy. As shown in Fig. , our models achieve the best accuracy–parameter trade-offs. Notably, LoopDet-S achieves 50.9 box AP with only 7.0M parameters, while LoopSeg-L improves mask AP by 1.0 over its non-looped reference model.

In summary, our main contributions are as follows:

•

We introduce LoopDVR, a pretrained-model-guided conversion framework that combines representation-based grouping, group-end initialization, and feature distillation to enable effective parameter sharing.

•

We design a unified looped architecture by reusing Transformer blocks in both the ViT backbone and query decoder with Loop Adapters, achieving exceptional parameter efficiency while preserving computational depth.

•

We demonstrate the effectiveness of LoopDVR on object detection, instance segmentation, and human pose estimation across four model scales, achieving the most favorable accuracy–parameter trade-offs.

2 Related Work

Transformer-based Dense Recognition. DETR [5] established query-based set prediction for object detection, laying the foundation for a Transformer-based paradigm in dense visual recognition [38, 66, 12, 11, 55]. ViDT [57] extended the role of Transformers to feature extraction by pairing a vision Transformer backbone with a deformable query decoder [72]. This paradigm extends to other dense visual recognition tasks, including instance segmentation with MaskDINO [33] and human pose estimation with ED-Pose [64] and GroupPose [36]. Subsequent work tailored this architecture to real-time detection. LW-DETR [8] pairs a pretrained ViT backbone with a shallow decoder, while RF-DETR [49] builds a real-time detector based on a DINOv2 [43] backbone. DEIMv2 [24] distills DINOv3 [56] features into narrower ViT backbones for real-time detection. EdgeCrafter [37] brings these directions together in a compact framework for edge dense recognition. It distills features from a detection-specialized teacher into ECViT and reuses the resulting backbone for object detection, instance segmentation, and pose estimation. These advances have made Transformer-based models effective across dense recognition tasks. Yet feature extraction and query refinement still rely on independently parameterized blocks, whose parameter cost remains a concern under tight memory budgets.

Looped Transformers in Computer Vision. Looped Transformers introduced a recurrent paradigm which reduces parameter cost by reusing blocks across depth [14, 32], a principle later adopted in computer vision. In Vision Transformers, SReT [54] recursively applies shared Transformer blocks, while MiniViT [68] uses depth-specific transformations to preserve variation across layers that share weights. Raptor [26] introduces the Block-Recurrent Hypothesis and groups consecutive layers by the similarity of their representations in a pretrained ViT, approximating each group with a recurrent block. Recent studies have extended looped Transformers to image super-resolution [71], multi-view 3D reconstruction [3], visual tracking [44], image and video generation [13, 18], and vision-language models [19, 47]. In object detection, RecursiveDet [69] shares decoder parameters across box refinement stages, while DEQDet [61, 62] formulates query refinement as a fixed-point iteration. Together, these studies show that Transformers can build computational depth by repeatedly applying shared blocks. How to exploit this reuse across depth in both the ViT backbone and the query decoder of a compact dense recognition model remains underexplored.

Figure 2: Overview of LoopDVR. Given a dense recognition model, (a) Stage 1 groups the layers of the pre-trained ViT backbone based on inter-layer representation similarity and initializes each looped backbone block using the weights of its group’s terminal layer. (b) Transformer block parameters are shared within each group, while each layer has a Loop Adapter to preserve depth-specific transformations. (c) Stage 2 distills the looped ViT using a DINOv3 teacher. (d) Stage 3 post-trains the resu
Figure 2: Overview of LoopDVR. Given a dense recognition model, (a) Stage 1 groups the layers of the pre-trained ViT backbone based on inter-layer representation similarity and initializes each looped backbone block using the weights of its group’s terminal layer. (b) Transformer block parameters are shared within each group, while each layer has a Loop Adapter to preserve depth-specific transformations. (c) Stage 2 distills the looped ViT using a DINOv3 teacher. (d) Stage 3 post-trains the resu

Figure 2: Overview of LoopDVR. Given a dense recognition model, (a) Stage 1 groups the layers of the pre-trained ViT backbone based on inter-layer representation similarity and initializes each looped backbone block using the weights of its group’s terminal layer. (b) Transformer block parameters are shared within each group, while each layer has a Loop Adapter to preserve depth-specific transformations. (c) Stage 2 distills the looped ViT using a DINOv3 teacher. (d) Stage 3 post-trains the resulting architecture for dense recognition, combining the looped ViT, the hybrid encoder and the looped decoder.

3 Method

We present LoopDVR, a general framework that transforms pre-trained dense visual recognition models into more parameter-efficient looped networks. As illustrated in Fig. 2, LoopDVR reduces parameter cost by reusing Transformer blocks across multiple layers in both the backbone and decoder, while preserving the original computational depth. We first review the common architecture of Transformer-based dense visual recognition models in Sec. 3.1. We then describe the construction of the looped backbone in Sec. 3.2, addressing where to loop through representation-based grouping and how to loop through structured initialization and Loop Adapters. Finally, we describe the adaptation to dense recognition tasks in Sec. 3.3, including backbone distillation, looped decoder construction, and task-specific training.

3.1 Preliminaries: Transformer-based DVR

A Transformer-based dense visual recognition architecture consists of a ViT backbone, a hybrid encoder for multi-scale feature fusion, and a query-based Transformer decoder with task-specific prediction heads [24, 37].

The ViT backbone extracts visual representations by sequentially processing image patch tokens through LL Transformer blocks [15]. Starting from the input patch embeddings 𝐗(0)\mathbf{X}^{(0)}, the ll-th block ℬl\mathcal{B}_{l} transforms the preceding token representations 𝐗(l−1)\mathbf{X}^{(l-1)} into 𝐗(l)\mathbf{X}^{(l)} as

𝐗(l)=ℬl(𝐗(l−1)),l=1,…,L.\mathbf{X}^{(l)}=\mathcal{B}_{l}(\mathbf{X}^{(l-1)}),\quad l=1,\ldots,L. (1)

Dense visual recognition benefits from multi-scale feature representations [72]. To this end, a hybrid encoder transforms the backbone representations into multi-scale features for the decoder [70]. The encoder uses attention to process features within each scale and convolutions to fuse features across scales. Given the final two backbone representations, the encoded features are computed as [37]

𝐅enc=ℰ⁡(𝐗(L−1),𝐗(L)),\mathbf{F}_{\mathrm{enc}}=\mathcal{E}(\mathbf{X}^{(L-1)},\mathbf{X}^{(L)}), (2)

where ℰ\mathcal{E} denotes the hybrid encoder. The resulting features 𝐅enc\mathbf{F}_{\mathrm{enc}} provide multi-scale visual context for the decoder.

Given the encoded features 𝐅enc\mathbf{F}_{\mathrm{enc}}, the Transformer decoder iteratively refines object queries and their reference boxes through TT Transformer blocks [38, 66]. Each decoder block contains self-attention among object queries, deformable cross-attention to encoded features guided by reference boxes, and a feed-forward network [72]. At layer tt, the query representations 𝐐(t−1)\mathbf{Q}^{(t-1)} are updated by the decoder block 𝒟t\mathcal{D}_{t} using reference boxes 𝐑(t−1)\mathbf{R}^{(t-1)} and features 𝐅enc\mathbf{F}_{\mathrm{enc}}:

𝐐(t)=𝒟t​(𝐐(t−1),𝐑(t−1),𝐅enc),𝐐(t)∈ℝNq×C,\mathbf{Q}^{(t)}=\mathcal{D}_{t}\left(\mathbf{Q}^{(t-1)},\mathbf{R}^{(t-1)},\mathbf{F}_{\mathrm{enc}}\right),\mathbf{Q}^{(t)}\in\mathbb{R}^{N_{q}\times C}, (3)

where NqN_{q} denotes the number of object queries, and CC is the query feature dimension. The updated queries are used to further refine reference boxes and generate task-specific predictions.

We instantiate LoopDVR based on a representative family of dense visual recognition models, EdgeCrafter (EC) [37], which is built on pretrained ECViT backbones.

3.2 Looped Backbone Construction

As shown in Fig. 2 (a), given a pretrained ViT backbone, LoopDVR first converts it into a looped ViT. The main challenge in this conversion is that naive parameter sharing may disrupt the original hierarchical representations and depth-specific behaviors [68]. To address this challenge, we optimize the looped architecture from two perspectives, i.e., where to loop and how to loop. Specifically, we determine which layers should share parameters based on representational dissimilarity, while using group-end initialization and Loop Adapters to make parameter sharing more effective.

Representation-Based Grouping. Directly sharing the weights across different layers disrupts the original hierarchical features. Following Raptor [26], we adopt representation-based grouping, which places adjacent layers with similar representations into the same sharing group. All layers within a group reuse a Transformer block, while different groups maintain independent block parameters.

We measure the dissimilarity between layers ii and jj using their mean cosine distance di​jd_{ij} over NN images:

di​j=1N​∑n=1N[1−cos⁡(𝐳i(n),𝐳j(n))],d_{ij}=\frac{1}{N}\sum_{n=1}^{N}\left[1-\cos(\mathbf{z}_{i}^{(n)},\mathbf{z}_{j}^{(n)})\right], (4)

where 𝐳i(n)\mathbf{z}_{i}^{(n)} denotes the average of patch tokens at layer ii for the nn-th input image. A smaller di​jd_{ij} indicates greater representation similarity between the two layers. As shown in Fig. 3(a), the inter-layer similarities of the pretrained ECViT [37] exhibit clear grouping structure, suggesting that adjacent layers within each group learn similar representations. Guided by these patterns, we introduce parameter sharing within each group.

Based on these dissimilarities, we determine the sharing groups by minimizing the total within-group dissimilarity. Unlike Raptor, which uses the last class token for classification, our dense recognition architecture uses both the penultimate and final layer representations to construct multi-scale features. Therefore, we keep the terminal block as a group with independent parameters, and partition the preceding L−1L-1 layers into KB−1K_{B}-1 consecutive groups. Let ΠKB−1L−1\Pi_{K_{B}-1}^{L-1} denote the set of partitions of the L−1L-1 layers into KB−1K_{B}-1 groups. The resulting backbone grouping is

𝒫B=(arg​min𝒫∈ΠKB−1L−1∑𝒞∈𝒫∑i,j∈𝒞i<jdi​j)∪{{L}}.\mathcal{P}_{B}=\Bigl(\operatorname*{arg\,min}_{\mathcal{P}\in\Pi_{K_{B}-1}^{L-1}}\sum_{\mathcal{C}\in\mathcal{P}}\sum_{\begin{subarray}{c}i,j\in\mathcal{C}\\ i<j\end{subarray}}d_{ij}\Bigr)\cup\bigl\{\{L\}\bigr\}. (5)

Here, 𝒞\mathcal{C} denotes a group in the candidate partition 𝒫\mathcal{P}, and arg⁡min\arg\min denotes one minimizing partition.

(a) Backbone
(a) Backbone

(a) Backbone

(b) Decoder
(b) Decoder

(b) Decoder

Figure 3: Grouping via layer-wise representation similarity. Cosine-distance heatmaps of layer representations from (a) the distilled backbone and (b) the post-trained decoder (ECDet-S [37] as an example). Low-distance regions indicate that pairs of nearby layers have similar representations. Boxes mark the selected groups.

Structured Initialization. Unlike approaches that randomly initialize shared blocks, LoopDVR aims to transform pretrained models to fully leverage their prior knowledge. This raises a key question: which pretrained weights should each shared block inherit? For each group, we compare three strategies: copying the weights of its first layer, copying those of its last layer, or averaging the weights across all layers within the group [63, 52].

To examine their effects, we visualize attention maps at the final backbone layer under different initialization strategies, before backbone distillation. As shown in Fig. 4, group-end initialization produces the most discriminative attention patterns among the three strategies, with attention predominantly focused on target objects. This attention pattern also most closely resembles that of the original network. We therefore initialize each shared backbone block with the weights of its group’s terminal layer in the same reference backbone. Appendix C.2 provides layer-wise comparisons of attention maps, while the ablation in Sec. 4.2 confirms its advantage after training.

Formally, let the kk-th backbone group be represented by 𝒞k=[bk,bk+1)\mathcal{C}_{k}=[b_{k},b_{k+1}). We initialize the corresponding shared Transformer block ℬk\mathcal{B}_{k} by copying the parameters of the last reference layer in the group according to

𝜽k←𝜽bk+1−1ref.\boldsymbol{\theta}_{k}\leftarrow\boldsymbol{\theta}^{\mathrm{ref}}_{b_{k+1}-1}. (6)

Here, 𝜽k\boldsymbol{\theta}_{k} denotes the parameters of the shared block ℬk\mathcal{B}_{k}, and 𝜽bk+1−1ref\boldsymbol{\theta}^{\mathrm{ref}}_{b_{k+1}-1} denotes those of the terminal reference layer in group 𝒞k\mathcal{C}_{k}. We transfer all structurally compatible parameters, including attention and FFN modules.

Loop Adapters. Strict weight sharing may disrupt the original depth-specific behaviors of the network, while gradients from different layers acting on the same shared parameters can lead to training instability [68]. To address this, we introduce a lightweight Loop Adapter with unique parameters for each layer of the backbone and decoder [48], enabling depth-specific feature transformations.

As illustrated in Fig. 2(b), each application of a shared Transformer block is followed by a depth-specific adapter that applies a non-linear residual projection, following SReT [54]. Specifically, the intermediate representation 𝐗~(l)\widetilde{\mathbf{X}}^{(l)} produced by the shared block at backbone layer ll is transformed as

𝐗(l)\displaystyle\mathbf{X}^{(l)} =𝒜lB​(𝐗~(l))\displaystyle=\mathcal{A}_{l}^{B}\!\left(\widetilde{\mathbf{X}}^{(l)}\right) (7)

=αl​𝐗~(l)+βl​MLPl⁡(LNl⁡(𝐗~(l))).\displaystyle=\alpha_{l}\widetilde{\mathbf{X}}^{(l)}+\beta_{l}\operatorname{MLP}_{l}\!\left(\operatorname{LN}_{l}\!\left(\widetilde{\mathbf{X}}^{(l)}\right)\right).

Here, αl\alpha_{l} and βl\beta_{l} are learnable scaling coefficients, while LNl\operatorname{LN}_{l} and MLPl\operatorname{MLP}_{l} have parameters specific to layer ll. Different from SReT, we initialize each Loop Adapter as an identity mapping by setting αl=1\alpha_{l}=1 and βl=0\beta_{l}=0 to preserve the pretrained representations at the beginning of training. The MLP parameters are randomly initialized. During training, Loop Adapters are jointly optimized with shared Transformer blocks. We also try a wide range of depth-conditioning strategies and different designs of the adapters in Sec. 4.2.

Figure 4: Qualitative comparison of backbone attention at initialization. Attention maps at the final layer of the ECViT and looped backbones initialized with different strategies. The looped backbones are visualized before distillation and training.
Figure 4: Qualitative comparison of backbone attention at initialization. Attention maps at the final layer of the ECViT and looped backbones initialized with different strategies. The looped backbones are visualized before distillation and training.

Figure 4: Qualitative comparison of backbone attention at initialization. Attention maps at the final layer of the ECViT and looped backbones initialized with different strategies. The looped backbones are visualized before distillation and training.

3.3 Adaptation to Dense Recognition Tasks

After obtaining the looped ViT backbone in Sec. 3.2, we adapt it for dense recognition through backbone distillation and downstream task-specific training.

Backbone Distillation. Although group-end initialization provides a strong starting point, parameter sharing changes the feature transformation process. To adapt the looped backbone to this change, we distill visual representations from a pretrained teacher, as shown in Fig. 2(c). We use a DINOv3 [56], which is adapted for detection following EdgeCrafter [37], as the teacher for distillation [21, 50]. Specifically, we concatenate the features from the teacher’s last two layers and align them with the student’s final-layer features:

ℒdistill=MSE⁡(ϕ⁡(𝐗LS),Concat⁡(𝐗LT−1T,𝐗LTT)),\mathcal{L}_{\mathrm{distill}}=\operatorname{MSE}\left(\mathcal{\phi}(\mathbf{X}_{L}^{\mathrm{S}}),\operatorname{Concat}\left(\mathbf{X}_{L_{T}-1}^{\mathrm{T}},\mathbf{X}_{L_{T}}^{\mathrm{T}}\right)\right), (8)

where ϕ\mathcal{\phi} denotes a linear projector, and 𝐒\mathbf{S} and 𝐓\mathbf{T} denote the student and teacher, respectively. Shared Transformer blocks, their Loop Adapters and the projector are optimized jointly.

Looped Decoder Construction. Similar to the backbone, the Transformer decoder exhibits clear grouping structure in inter-layer representation dissimilarity, as shown in Fig. 3(b). Accordingly, we extend the same group-wise sharing and Loop Adapter design to the decoder, partitioning its TT refinement layers into KDK_{D} groups. The prediction heads are also shared along with the Transformer blocks. To determine the grouping, we compute the dissimilarities using trained, non-looped reference models. The resulting decoder partition is consistent across different models and tasks (Fig. S1 in the Appendix), allowing us to adopt a unified grouping for all decoders. Since ECViT [37] focuses only on optimizing backbones and decoders require task-specific post-training, we train looped decoders from scratch for downstream tasks.

Downstream Task-Specific Training. As illustrated in Fig. 2(d), we integrate the distilled looped ViT with a hybrid encoder and the looped decoder for downstream dense recognition tasks. We train the resulting models for object detection, instance segmentation, and human pose estimation using DETR-style bipartite matching and task-specific supervision [5]. For instance segmentation and pose estimation, we initialize the backbone from the trained detector and extend the architecture with a query-based mask head and a pose head, respectively [33, 27]. Note that implementation details are provided in Appendix A.4.

Table 1: Object detection results on COCO val2017 [35], grouped by parameter budget. Results with † use Objects365 [53] pretraining. ECDet [37] are our reference models for compression. Bold results indicate the best results within each group, excluding ECDet. Orange results indicate that our models outperform the corresponding baseline. More details of evaluation settings are in the Appendix B.1.

Model #Epochs #Params. (M) Peak mem. (MiB) GFLOPs Lat. (ms) APval AP50v​a​l{}^{val}_{50} AP75v​a​l{}^{val}_{75} APSv​a​l{}^{val}_{S} APMv​a​l{}^{val}_{M} APLv​a​l{}^{val}_{L}

DEIMv2-S [24] 132 9.7 21.1 49.5 1.56 50.9 68.4 55.1 31.3 55.3 70.2

YOLO26-S [29] 70 9.5 42.2 20.9 2.59 48.6† 65.8† 52.8† 29.5† 53.2† 65.8†

RF-DETR-P [49] – 8.5 18.8 17.7 0.75 41.6 60.2 44.1 19.2 44.7 61.7

ECDet-S [37] 74 9.8 21.3 50.0 1.51 51.7 69.4 55.8 32.3 56.4 70.5

LoopDet-S (ours) 74 7.0 ↓29%\downarrow 29\% 15.9 ↓25%\downarrow 25\% 53.0 1.62 50.9 68.6 54.9 31.4 55.9 69.8

YOLOv12-M-turbo [60] 600 19.6 51.8 63.1 2.96 52.5 69.9 57.1 35.2 57.8 69.7

DEIMv2-M [24] 102 18.1 37.2 84.1 2.19 53.0 70.2 57.6 34.2 57.4 71.5

RT-DETRv4-M [34] 102 19.4 40.3 57.0 1.53 53.5 71.1 58.1 34.9 57.7 72.1

ECDet-M [37] 62 19.2 39.3 84.9 1.92 54.3 72.2 58.7 35.9 59.1 72.7

LoopDet-M (ours) 62 13.9 ↓28%\downarrow 28\% 29.1 ↓26%\downarrow 26\% 90.3 2.03 54.0 71.9 58.4 34.2 59.1 73.0

YOLOv12-L-turbo [60] 600 26.5 62.2 88.9 3.79 53.8 71.0 58.6 36.9 59.4 71.0

YOLO26-L [29] 60 24.8 65.3 86.8 3.35 55.0† 72.5† 60.0† 38.4† 59.5† 71.1†

ECDet-L [37] 50 32.7 65.7 147.2 2.60 57.0 75.1 61.7 38.7 62.5 75.0

LoopDet-L (ours) 50 23.4 ↓28%\downarrow 28\% 47.3 ↓28%\downarrow 28\% 158.9 2.82 56.6 74.8 61.4 37.4 62.1 75.1

DEIMv2-L [24] 68 32.2 64.9 144.5 2.69 56.0 73.5 61.1 37.6 60.9 74.9

RT-DETRv4-L [34] 58 31.0 61.9 91.6 2.22 55.4 73.0 60.3 37.1 60.1 72.9

RF-DETR-L [49] – 33.8 66.9 99.6 1.67 56.5† 75.1† 61.3† 39.0† 61.0† 73.9†

ECDet-X [37] 50 49.0 96.4 204.5 3.12 57.9 76.0 62.9 38.7 63.4 76.1

LoopDet-X (ours) 50 35.1 ↓28%\downarrow 28\% 69.8 ↓28%\downarrow 28\% 216.2 3.33 57.5 75.7 62.4 40.1 63.5 75.1

Table 2: Instance segmentation results on COCO val2017, grouped by parameter budget. Results with † denote models trained with additional data beyond COCO. ECInsSeg [37] are our reference models for compression. Bold results indicate the best results within each group, excluding ECInsSeg. Orange results indicate that our models outperform the corresponding ECInsSeg with much fewer parameters.

Model #Params. (M) Peak mem. (MiB) GFLOPs Lat. (ms) APval AP50v​a​l{}^{val}_{50} AP75v​a​l{}^{val}_{75} APSv​a​l{}^{val}_{S} APMv​a​l{}^{val}_{M} APLv​a​l{}^{val}_{L}

YOLO-MS-XS-Seg [10] 5.1 46.2 26.2 39.52 36.6 56.7 39.1 15.7 40.5 56.0

YOLOv12-Seg-S [60] 9.8 46.4 33.4 2.88 38.6 60.8 40.7 17.0 42.1 59.2

ECInsSeg-S [37] 10.3 22.3 57.0 1.59 43.0 65.7 46.0 20.8 46.3 65.9

LoopSeg-S (ours) 7.4 ↓28%\downarrow 28\% 16.7 ↓25%\downarrow 25\% 60.0 1.72 43.0 65.3 46.2 20.2 46.5 65.9

YOLO11-Seg-S [30] 10.1 51.2 33.6 2.64 37.8 59.9 40.4 19.8 42.7 55.2

YOLO26-Seg-S [29] 10.4 46.1 35.0 3.07 40.2† 62.0† 43.0† 18.8† 44.0† 61.0†

ECInsSeg-M [37] 20.1 41.0 96.1 2.00 45.2 68.2 48.3 22.9 49.0 68.1

LoopSeg-M (ours) 14.6 ↓27%\downarrow 27\% 30.5 ↓26%\downarrow 26\% 101.4 2.18 45.5 68.4 48.8 22.4 49.3 68.5

YOLO11-Seg-L [30] 27.6 79.2 132.9 4.20 42.9 67.0 46.2 24.6 48.7 60.6

YOLOv12-Seg-L [60] 28.8 70.5 134.7 4.42 43.1 67.3 45.8 22.3 47.9 67.9

YOLO26-Seg-M [29] 23.6 63.8 122.2 3.74 44.2† 67.4† 47.6† 23.0† 48.7† 64.1†

ECInsSeg-L [37] 33.6 67.5 158.3 2.74 47.1 70.9 50.5 24.8 51.1 69.6

LoopSeg-L (ours) 24.1 ↓28%\downarrow 28\% 48.7 ↓28%\downarrow 28\% 170.0 2.98 48.1 71.7 51.7 24.9 52.2 71.0

RF-DETR-Seg-L [49] 36.2 70.5 125.3 2.02 47.1† 70.5† 50.9† 28.4† 52.1† 65.6†

RF-DETR-Seg-X [49] 38.1 75.3 218.4 3.23 48.8† 72.2† 53.1† 30.6† 53.3† 65.9†

ECInsSeg-X [37] 49.9 98.2 215.6 3.27 48.4 72.2 52.0 26.3 52.7 71.1

LoopSeg-X (ours) 35.8 ↓28%\downarrow 28\% 71.2 ↓27%\downarrow 27\% 227.3 3.47 48.9 72.7 51.7 26.0 53.2 71.4

4 Experiments

We evaluate LoopDVR on three dense visual recognition tasks using LoopDet for object detection, LoopSeg for instance segmentation, and LoopPose for human pose estimation. We instantiate these models based on the ECDet, ECInsSeg, and ECPose architectures from EdgeCrafter [37], respectively. Before task-specific training, we distill the looped backbone using unlabeled images from ImageNet-1K [51] and COCO train2017 [35]. We then train four model scales for each task on COCO train2017 and evaluate them on COCO val2017. Training is conducted using 4×4\times NVIDIA RTX 4090 GPUs.

4.1 Main Result

Object Detection. As summarized in Tab. 1, we compare our proposed LoopDet with recent compact object detectors under similar parameter budgets on COCO val2017, including the corresponding ECDet [37] as reference baselines. LoopDet achieves the best accuracy–parameter trade-offs across all four parameter-budget ranges. Specifically, LoopDet-S achieves 50.9 AP on COCO with only 7M params, highlighting strong performance of LoopDVR under a highly constrained parameter budget. LoopDet-L achieves 99.3% of ECDet-L’s AP with 28.4% fewer parameters. Moreover, LoopDet demonstrates favorable peak GPU memory usage during inference compared with competing detectors.

Instance Segmentation. As shown in Tab. 2, we compare LoopSeg with recent instance segmentation models under comparable parameter budgets. LoopSeg achieves the highest mask AP across all four parameter-budget ranges. Notably, all scales of LoopSeg match or outperform their corresponding reference models despite using approximately 28% fewer parameters. In particular, LoopSeg-L achieves 48.1 mask AP, improving upon ECInsSeg-L by 1.0 AP with 28% fewer parameters. These results demonstrate that LoopDVR improves parameter efficiency while preserving or even enhancing instance segmentation performance.

Table 3: Performance comparison of pose estimation models on COCO val2017, grouped by parameter budget. Results with † denote models trained with additional data beyond COCO. ECPose [37] are our reference models. Bold results indicate the best results within each group, excluding ECPose.

Model #Params. (M) Peak mem. Lat. (ms) AP

RTMO-S [40] 9.9 93.2 MiB 7.82 67.7

YOLO11-Pose-S [30] 9.9 30.2 MiB 3.00 58.9

ECPose-S [37] 9.9 30.6 MiB 2.65 68.9

LoopPose-S (ours) 7.7 ↓23%\downarrow 23\% 26.3 MiB 2.98 68.2

YOLO26-Pose-S [29] 10.4 31.0 MiB 2.92 62.4

DETRPose-S [27] 11.5 33.8 MiB 2.33 67.0†

ECPose-M [37] 19.8 49.4 MiB 3.27 72.4

LoopPose-M (ours) 14.6 ↓26%\downarrow 26\% 39.5 MiB 3.24 71.8

RTMO-M [40] 22.6 76.9 MiB 6.51 71.0

YOLO26-Pose-L [29] 25.9 60.7 MiB 4.24 69.6

DETRPose-M [27] 20.8 51.9 MiB 2.71 69.4†

ECPose-L [37] 34.3 77.8 MiB 3.78 73.5

LoopPose-L (ours) 24.6 ↓28%\downarrow 28\% 58.7 MiB 3.98 72.9

RTMO-L [40] 44.8 119.3 MiB 7.62 72.4

DETRPose-L [27] 32.8 74.5 MiB 3.51 72.5†

ECPose-X [37] 50.6 108.8 MiB 4.75 74.8

LoopPose-X (ours) 36.3 ↓28%\downarrow 28\% 82.0 MiB 4.46 74.3

Human Pose Estimation. Tab. 3 compares LoopPose with recent human pose estimation models under comparable parameter budgets, including the corresponding ECPose [37] as reference baselines. LoopPose achieves the best accuracy–parameter trade-offs across all four parameter-budget ranges. Compared with the corresponding ECPose, LoopPose achieves competitive accuracy with fewer parameters and lower memory usage.

4.2 Analysis

Unless otherwise specified, ablations use the LoopDet-S with 66 shared Transformer blocks in the backbone and 22 in the decoder, retaining depths of 1212 and 44 layers, respectively.

Figure 5: Effect of looping. All models follow the same initialization and training protocols, with the Loop Adapters.

Ablation Study on Looping Structure. As shown in Fig. 5, we compare different looping strategies in terms of their parameter–accuracy trade-offs. Compared with the reduced-depth non-looped model, our method preserves the full computational depth and improves AP by 3.0 with only 0.6M additional parameters. Relative to the full-sized baseline, it reduces the parameter count by 3.2M at the cost of only a 1.2 AP drop, demonstrating favorable parameter efficiency. Furthermore, looping both the backbone and decoder achieves nearly identical accuracy to backbone-only and decoder-only looping while requiring substantially fewer parameters. More looping variants are compared in Appendix C.1.

Comparison of Parameter Compression Methods. To further illustrate the effectiveness of looping, we implement several representative parameter compression methods based on the same baseline (i.e., ECDet-X [37]), including neuron merging [58], structured pruning [16], and low-rank decomposition [59]. As shown in Fig. 7, our looping strategy achieves the highest AP of 57.5 while using the fewest parameters, indicating a superior parameter–accuracy trade-off. Implementation details are provided in Appendix B.2.

Figure 6: Comparison with other compression methods. Circle areas denote FLOPs. All variants are trained with the same protocol after initialization.

Figure 7: Comparison of distillation strategies. All variants use the same LoopDet-S backbone and teacher, and are trained with the same protocol.

Ablation Study on the Independent Terminal Block. Tab. 4 evaluates the effect of treating the last layer of the backbone as an independent parameter sharing group. Without reserving the terminal block, representation-based grouping yields uniform grouping and achieves 49.6 AP. Reserving one block for the final layer and grouping the preceding layers raises AP to 50.9. The 1.3 AP gain supports retaining independent parameters in the final backbone layer.

Table 4: Effect of reserving an independent terminal block. † Without terminal block reservation, the result is uniform grouping.

Independent terminal block Group sizes AP

×\times 2–2–2–2–2–2† 49.6

✓\checkmark 2–2–2–3–2–1 50.9

Ablation Study on Structured Initialization. Fig. 8 compares different initialization strategies for the shared backbone blocks. We compare random, group-start, group-average, and group-end initialization, followed by the same distillation for each strategy. All methods initialized from pre-trained models consistently outperform random initialization throughout the entire training process, demonstrating the critical importance of leveraging pre-trained knowledge. Among these initialization strategies, group-end initialization achieves the best performance, consistent with the comparison of attention maps in Fig. 4.

Figure 8: Comparison of initialization strategies. All strategies use the fixed LoopDet-S architecture and training protocol.

Comparison of Depth Conditioning Methods. Prior works have proposed several depth conditioning methods to preserve depth-specific operations of the model. To further validate the effectiveness of the adapter, we implement existing depth-conditioning methods and other PEFT-style transformation approaches [22] on LoopDet-S. As shown in Tab. 5, the Loop Adapter achieves the highest AP among the tested configurations, improving AP by 1.51.5 over the model without conditioning. The implementation details of comparative methods are provided in Appendix B.3.

Table 5: Comparison of depth conditioning methods. We implement weight transformation following MiniViT [68] and depth scaling following Raptor [26].

Method #Params. GFLOPs AP

w/o conditioning 5.8M 50.0 49.4

Depth scaling [26] (dh=64d_{\mathrm{h}}=64) 6.1M 50.0 49.4

Weight transformation [68] 5.8M 51.2 49.4

LoRA [23, 2] (rank=3232) 7.4M 53.7 50.1

LN tuning [46] 5.8M 50.0 49.5

VPT-deep [28] (lp=64l_{p}=64) 6.0M 52.8 49.4

Loop Adapter (dh=192d_{\mathrm{h}}=192) 7.0M 53.0 50.9

Fig. 9 compares pairwise cosine distances among backbone layers under strict parameter sharing (a) and with the Loop Adapters (b). The representation similarity between different layers that reuse the same Transformer block significantly decreases when Loop Adapters are used. This observation indicates that Loop Adapters better preserve depth-specific transformations despite parameter sharing.

Ablation Study on Loop Adapter Design.

Tab. 6 examines the form and capacity of the Loop Adapter. Non-linear adapters outperform the linear projection, while increasing the hidden dimension provides further gains with more parameters. We adopt a two-layer MLP with hidden dimension dh=192d_{h}=192 as a trade-off between accuracy and model size.

(a) w/o Loop Adapters
(a) w/o Loop Adapters

(a) w/o Loop Adapters

(b) w/ Loop Adapters
(b) w/ Loop Adapters

(b) w/ Loop Adapters

Figure 9: Effect of Loop Adapters on layer-wise representations. High-distance regions indicate that pairs of layers learn distinct representations. Boxes indicate the selected groups.

Table 6: Comparison of Loop Adapter designs. dhd_{h} denotes the hidden dimension of the two-layer MLP in the non-linear adapter.

Config. AP APS APM APL #Params. GFLOPs

w/o adapters 49.4 30.0 53.8 68.8 5.8M 50.0

Linear 50.2 29.8 55.2 69.4 6.4M 51.5

dh=96d_{h}=96 50.5 29.8 54.9 70.1 6.4M 51.5

dh=192d_{h}=192 (ours) 50.9 31.4 55.9 69.8 7.0M 53.0

dh=384d_{h}=384 51.7 30.4 56.9 71.3 8.1M 56.0

Ablation Study on Distillation Strategies. Since distillation strategies developed for other looped Transformers may not be optimal for dense visual recognition, we compare our approach with those of Raptor [26] and MiniViT [68]. Raptor aligns intermediate representations with the layer-wise feature trajectory of a ViT, while MiniViT applies supervision at the end of each group. In contrast, our strategy supervises only the student’s final-layer patch tokens. We implement all strategies using the same LoopDet-S backbone and teacher. As shown in Fig. 7, our strategy achieves the highest AP, outperforming Raptor and MiniViT by 6.4 and 5.9 AP.

5 Conclusion

We presented LoopDVR, a pretrained-model-guided conversion framework that improves parameter efficiency by looping Transformer blocks in both the ViT backbone and query decoder without reducing computational depth. To enable effective parameter sharing, it combines representation-based grouping, structured initialization, and Loop Adapters. LoopDVR achieves the best accuracy–parameter trade-offs across dense visual recognition tasks, substantially reducing parameters while maintaining competitive accuracy.

Acknowledgments

We thank Yihao Zhen for valuable feedback and assistance in improving the manuscript, and Yunkang Tao for helpful comments on an earlier draft.

References

[1] E. Arnold, O. Y. Al-Jarrah, M. Dianati, S. Fallah, D. Oxtoby, and A. Mouzakitis (2019) A survey on 3D object detection methods for autonomous driving applications. IEEE TITS. Cited by: §1.

[2] S. Bae, A. Fisch, H. Harutyunyan, Z. Ji, S. Kim, and T. Schuster (2025) Relaxed recursive transformers: effective parameter sharing with layer-wise LoRA. In ICLR, Cited by: Table 5.

[3] A. Burzio, T. Fischer, S. Elflein, Q. Zhou, R. de Lutio, J. Ren, J. Huang, S. Huang, M. Pollefeys, L. Leal-Taixé, Z. Gojcic, and H. Turki (2026) Déjà view: looping transformers for multi-view 3D reconstruction. In NeurIPS, Cited by: §2.

[4] Z. Cao, G. Hidalgo, T. Simon, S. Wei, and Y. Sheikh (2021) OpenPose: realtime multi-person 2D pose estimation using part affinity fields. IEEE TPAMI. Cited by: §1.

[5] N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kirillov, and S. Zagoruyko (2020) End-to-end object detection with transformers. In ECCV, Cited by: §A.4, §1, §2, §3.3.

[6] C. Chan, S. Ginosar, T. Zhou, and A. A. Efros (2019) Everybody dance now. In ICCV, Cited by: §1.

[7] J. Chang, S. Wang, H. Xu, Z. Chen, C. Yang, and F. Zhao (2023) DETRDistill: a universal knowledge distillation framework for DETR-families. In ICCV, Cited by: §1.

[8] Q. Chen, X. Su, X. Zhang, J. Wang, J. Chen, Y. Shen, C. Han, Z. Chen, W. Xu, F. Li, S. Zhang, K. Yao, E. Ding, G. Zhang, and J. Wang (2024) LW-DETR: a transformer replacement to YOLO for real-time detection. arXiv preprint arXiv:2406.03459. Cited by: Table S6, Table S6, §1, §2.

[9] X. Chen, J. Chen, Y. Liu, J. Tang, and G. Zeng (2024) D3ETR: decoder distillation for detection transformer. In IJCAI, Cited by: §1.

[10] Y. Chen, X. Yuan, J. Wang, R. Wu, X. Li, Q. Hou, and M. Cheng (2025) YOLO-MS: rethinking multi-scale representation learning for real-time object detection. IEEE TPAMI. Cited by: Table S8, Table 2.

[11] B. Cheng, I. Misra, A. G. Schwing, A. Kirillov, and R. Girdhar (2022) Masked-attention mask transformer for universal image segmentation. In CVPR, Cited by: §2.

[12] B. Cheng, A. G. Schwing, and A. Kirillov (2021) Per-pixel classification is not all you need for semantic segmentation. In NeurIPS, Cited by: §2.

[13] Y. X. Chng, T. Chen, W. Tong, H. Diao, Z. Cai, L. Yang, Z. Liu, L. Lu, D. Lin, and G. Huang (2026) Looped diffusion transformer. arXiv preprint arXiv:2609.40305. Cited by: §2.

[14] M. Dehghani, S. Gouws, O. Vinyals, J. Uszkoreit, and L. Kaiser (2019) Universal transformers. In ICLR, Cited by: §2.

[15] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby (2021) An image is worth 16x16 words: transformers for image recognition at scale. In ICLR, Cited by: §3.1.

[16] G. Fang, X. Ma, M. B. Mi, and X. Wang (2024) Isomorphic pruning for vision models. ECCV. Cited by: §B.2, §4.2.

[17] R. Girshick (2015) Fast R-CNN. In ICCV, Cited by: §1.

[18] S. Goyal, S. Agrawal, G. G. Anil, P. Jain, S. Paul, and A. Kusupati (2026) ELT: elastic looped transformers for visua

原文配图

(b) ECViT-T+ (for -M models)
(b) ECViT-T+ (for -M models)
(c) ECViT-S (for -L models)
(c) ECViT-S (for -L models)

正文以来源语言显示。

参考来源

← 返回每日AI报告