NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DiD It in 87 Minutes: A Label-Free Softmax-to-Linear Adaptation of Vision Transformers for Object Detection

Huaiyuan Qin, Gabriel James Goenawan, Zihang Lin, Muli Yang, Hongyuan ZhuarXiv 2026

TL;DR

Standard Softmax attention in Vision Transformers (ViTs) scales quadratically with image resolution, making dense prediction tasks like object detection computationally expensive. This paper introduces Detector-Interface Distillation (DiD), a label-free method that converts a trained Softmax ViT backbone into an efficient linear-attention backbone in just 87 minutes. The resulting model slashes inference latency by ~62% and peak memory by ~49% while matching the accuracy of fully supervised, from-scratch linear models.

What Problem Does This Paper Address?

While Vision Transformers (ViTs) excel at object detection, their standard Softmax attention mechanism suffers from $O(N^2)$ computational complexity relative to the number of image tokens ($N$). This quadratic bottleneck becomes severe in dense prediction tasks like aerial object detection, where high-resolution images are required to spot small objects.

Linear attention mechanisms offer an elegant $O(N)$ alternative by swapping the order of matrix multiplications. However, you cannot simply swap a trained Softmax operator for a linear one; doing so completely destroys the model's performance. Furthermore, retraining a linear-attention detector from scratch is computationally grueling and requires massive amounts of labeled data. Existing label-free distillation methods (which work well for image classification) also fail here because they don't preserve the highly structured, multi-scale feature distributions that downstream object detection heads expect.

Methods

The authors propose Detector-Interface Distillation (DiD), a lightweight, label-free conversion pipeline.

Instead of forcing the linear-attention student backbone to mimic every internal hidden state of the Softmax teacher, DiD focuses entirely on the detector-facing interface.

Figure 1: Overview of the label-free Softmax-to-linear detector conversion setting. (a) Starting from a trained detector with a Softmax-attention ViT backbone, we construct a student by replacing the backbone attention operator with linear attention. During conversion, the Softmax teacher and the linear student receive the same unlabeled images; only the student backbone is updated, while the downstream detector remains fixed. Snowflake symbols indicate frozen modules, while the fire symbol indicates the trainable module. (b) After conversion, the distilled linear backbone is used directly in the detector without additional fine-tuning.

The process works as follows:

  1. Architecture Swap: The quadratic Softmax attention operator in a pre-trained detector's backbone is replaced with a linear attention operator (e.g., using ReLU or ELU feature maps).
  2. Frozen Pipeline: The original Softmax backbone (teacher), the downstream feature pyramid network (neck), and the detector heads are all frozen.
  3. Interface Alignment: Unlabeled images are fed into both the teacher and student networks. DiD minimizes a weighted Mean Squared Error (MSE) loss between the multi-scale tensors produced after the neck/FPN pathway.

By optimizing only the student backbone to satisfy the exact feature contract expected by the fixed downstream detector, the backbone learns to internally compensate for the operator swap.

Datasets

The method was trained and evaluated using entirely unlabeled images during the adaptation phase:

  • DOTA-v1.5: A challenging, high-resolution aerial object detection benchmark featuring complex scenes and tiny objects.
  • Pascal VOC: Used to evaluate the generalization capability of the conversion behavior beyond aerial imagery.
  • FAIR1M & ImageNet: Utilized in ablation studies to test the impact of out-of-domain data during conversion.

Key Insights and Ideas

  • Internal Compensation Over Exact Imitation: Trying to match every single hidden state across all transformer layers actually hurts performance. The linear backbone doesn't need to duplicate the teacher's exact internal trace; it just needs to deliver the correct final representations to the detector.
  • The "Detector-Facing Interface" is King: Object detectors are highly sensitive to multi-scale spatial features. Aligning representations after the neck/FPN ensures the downstream detector heads receive compatible inputs.
  • Early-Heavy Weighting Matters: Tensors from earlier interface levels (closer to the backbone output) contribute more heavily to successful conversion than later, deeper interface levels.

Key Results

  • Supervised Performance, Unsupervised Speed: On the DOTA-v1.5 dataset using a RetinaNet detector, a direct operator copy yields a broken model (1.7 mAP). DiD recovers this completely, achieving 31.1 mAP—matching a fully supervised linear model trained from scratch (30.9 mAP).
  • Massive Efficiency Gains: The linearized backbone cuts average inference latency by ~62% and peak memory consumption by ~49% compared to the original Softmax backbone.
  • Fast Adaptation: The entire label-free conversion process takes roughly 87 minutes on 4 GPUs for a conservative 40k-step schedule, with significant recovery occurring in just the first 20k steps (approx. 44 minutes).

Limitations and Future Work

While DiD demonstrates remarkable efficiency and accuracy recovery, the authors note a few areas for expansion:

  • Scale: The evaluation was primarily focused on the ViT-Small (ViT-S) backbone scale. Testing on larger architectures (ViT-Base or ViT-Large) remains an open direction.
  • Scope of Architectures: The study focuses on standard anchor-based (RetinaNet) and proposal-based (Faster R-CNN) detectors. Future work could explore more modern transformer-based detectors (like DETR variants) and broader architecture-conversion tasks beyond the Softmax-to-linear paradigm.

Summary updated

BibTeX
@misc{qin2026did,
  author = {Huaiyuan Qin and Gabriel James Goenawan and Zihang Lin and Muli Yang and Hongyuan Zhu},
  title = {{DiD It in 87 Minutes: A Label-Free Softmax-to-Linear Adaptation of Vision Transformers for Object Detection}},
  year = {2026},
  eprint = {2608.22368},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.22368},
}
Figure