Distilling Temporal Knowledge with Masked Feature Reconstruction for 3D Object Detection

Haowen Zheng, Dong Cao, Jintao Xu, Rui Ai, Weihao Gu, Yang Yang, Yanyan LiangarXiv 2024

TL;DR

TempDistiller is a novel knowledge distillation framework that enables lightweight 3D object detectors to "inherit" long-term temporal memory from heavy teacher models. By reconstructing masked temporal features and distilling inter-frame relationships, it allows student models to achieve high accuracy and superior velocity estimation while using fewer input frames, resulting in a significant speed boost of approximately 6 FPS.

What Problem Does This Paper Address?

In the world of autonomous driving, seeing in 3D is crucial. Modern systems often use Bird’s-Eye-View (BEV) representations, which project camera images onto a top-down map. To accurately estimate the speed of other cars or detect objects that are temporarily hidden (occluded), these models need to look at multiple frames over time.

However, there is a major trade-off: more frames lead to better accuracy but slower processing (lower FPS). While Knowledge Distillation (KD)—where a small "student" model learns from a large "teacher"—is a common solution for efficiency, existing methods almost exclusively focus on spatial features (like the shape of a car). They ignore the temporal dimension (how that car moves over time). The authors address this gap by proposing a way to distill temporal knowledge, allowing a student model to perform like it has a long-term memory even when it only sees a few recent frames.

Methods

The authors introduce TempDistiller, which utilizes two primary strategies to bridge the temporal gap:

  1. Temporal Feature Reconstruction (TFR): Inspired by masked image modeling, the student model's features are partially masked. A generator then tries to reconstruct these missing pieces. Crucially, the "ground truth" for this reconstruction comes from the teacher model, which has processed a much longer sequence of frames. By using self-attention to aggregate teacher features across time, the student is forced to learn representations that encapsulate long-term temporal context.
  2. Temporal Relational Distillation (TRD): When the student and teacher use the same number of frames, simple reconstruction reaches a point of diminishing returns. In this case, the authors distill the relationships between frames. They calculate similarity matrices of objects across different timestamps and use KL-divergence to ensure the student’s "understanding" of object motion matches the teacher’s.
Overview of masked feature reconstruction

The framework is built on a sparse BEV representation, which is more computationally efficient than dense grids. As shown in the overall pipeline below, distillation occurs at multiple stages, including the perspective view (camera images) and the final decoded spatio-temporal features.

Figure 2. Overall framework of TempDistiller. The proposed method aims to enable student detector to learn long-term temporal knowledge from teacher detector, particular with fewer input frames. Taking the long-term temporal teacher features as the reconstruction objective, we leverage temporal feature reconstruction (TFR) to force student detector to study enhanced representation of perspective features and BEV features. Additionally, we explore temporal relational distillation (TRD) when the student detector is fed with full frames. Finally, we impose constraints on the features after S&T (Spatio-Temporal) decoder by MSE (mean square error), which encourages the learning of semantically rich spatio-temporal features. SSA refers to the spatial self-attention operation in [20].

Datasets

The researchers evaluated their method on nuScenes, the industry-standard large-scale dataset for autonomous driving. It contains 1,000 scenes of complex city driving, complete with 360-degree camera coverage and precise 3D annotations for 1.4 million objects across 10 categories.

Key Insights and Ideas

  • Temporal "Compression": The most striking insight is that temporal information can be distilled. A student model seeing only 4 frames can achieve performance comparable to a baseline model seeing 8 frames, effectively "compressing" temporal knowledge into a more efficient architecture.
  • Beyond Spatial Cues: Traditional distillation focuses on where things are. TempDistiller focuses on how they change, which is the key to solving velocity estimation—a historically difficult task for camera-only systems.
  • Backbone Independence: The authors found that a student with a smaller backbone (ResNet50) could learn effectively from a teacher with a larger backbone (ResNet101) primarily because it was capturing the teacher's temporal logic, not just its raw feature-extraction power.
  • Relational Learning: By focusing on the similarity of objects across frames (TRD), the model becomes much better at tracking dynamic objects, as shown in the similarity matrix logic below.
Figure 3. Overview of the proposed temporal relational distillation (TRD). ⊙indicates element-wise product. Objects that are related in different frames have high responses in the similarity matrix.

Key Results

  • Accuracy Gains: On the nuScenes benchmark, TempDistiller improved the baseline by +1.6 mAP (mean Average Precision) and +1.1 NDS (nuScenes Detection Score).
  • Efficiency: By reducing the number of input frames while maintaining high accuracy, the model achieved a speedup of roughly 6 FPS on an NVIDIA RTX 4090.
  • Velocity King: The method achieved the most accurate velocity estimation (lowest mAVE) among compared methods, proving the efficacy of the temporal distillation.
  • Qualitative Success: Visualization shows that TempDistiller is significantly better at detecting distant pedestrians and cars merging from occluded side roads earlier than the baseline.
Qualitative results showing improved detection of occluded and distant objects

Limitations and Future Work

While TempDistiller strikes a better balance between speed and accuracy, it is currently constrained by the parallel temporal fusion paradigm. This means that even with distillation, the computational cost still scales linearly with the number of input frames.

The authors suggest that future research should explore sequential temporal fusion (recurrent models). Combining distillation with a recurrent architecture could potentially allow models to maintain an "infinite" temporal memory with a constant, low computational overhead per frame, further solving the problem of temporal knowledge forgetting.

Summary updated

BibTeX
@misc{zheng2024distilling,
  author = {Haowen Zheng and Dong Cao and Jintao Xu and Rui Ai and Weihao Gu and Yang Yang and Yanyan Liang},
  title = {{Distilling Temporal Knowledge with Masked Feature Reconstruction for 3D Object Detection}},
  year = {2024},
  eprint = {2401.01918},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.01918},
}
Figure