FQ-PETR: Fully Quantized Position Embedding Transformation for Multi-View 3D Object Detection

Jiangyong Yu, Changyong Shu, Sifan Zhou, Zichen Yu, Xing Hu, Dawei Yang

TL;DR

This paper introduces FQ-PETR, a novel framework for fully quantizing multi-view 3D object detection models (PETRs) for efficient deployment on resource-constrained autonomous driving systems. By addressing the unique challenges of feature magnitude disparity and non-linear operator quantization in PETRs, FQ-PETR achieves near-floating-point accuracy with significant speedups and reduced memory footprint.

What Problem Does This Paper Address?

Autonomous driving systems rely heavily on accurate 3D object detection from multiple camera views. Models like PETR (and its variants, collectively PETRs) have shown state-of-the-art performance by transforming 2D image features into 3D space using camera-ray positional embeddings (PE). However, these powerful models are computationally expensive and memory-intensive, making them difficult to deploy in real-world vehicles with strict latency and power constraints.

Quantization, a technique to reduce model size and speed up inference by using lower-bit representations for weights and activations, is a promising solution. However, directly applying existing quantization methods to PETRs leads to significant accuracy degradation. This is primarily due to two key issues:

  1. Magnitude Disparity: Camera-ray positional embeddings have a much larger dynamic range (e.g., ±130) compared to image features (e.g., ±4). When these are fused (e.g., via addition), the quantization scale is dominated by the PE, severely compressing image features and losing crucial information.
  2. Non-linear Operator Inefficiency: PETRs use non-linear operations (like Softmax and activation functions) that are computationally expensive and prone to approximation errors when quantized, especially on hardware-friendly implementations.

FQ-PETR aims to solve these problems by developing a quantization-friendly framework specifically tailored for PETRs.

Methods

FQ-PETR introduces three core innovations to tackle the identified challenges:

  1. Quantization-Friendly LiDAR-ray Position Embedding (QFPE): This approach rethinks the PE generation. Instead of multi-point sampling, it uses LiDAR-prior-guided single-point sampling along depth rays. Combined with anchor-based embeddings, this eliminates problematic non-linearities (like inverse-sigmoid) and aligns the PE's scale with image features. This results in a significantly reduced magnitude range for the PE, making it more compatible with quantization.
  2. Dual-Lookup Table (DULUT): To efficiently quantize non-linear functions, DULUT approximates them using two cascaded linear Look-Up Tables (LUTs). This method achieves high fidelity with minimal entries and avoids the need for specialized hardware. It effectively decouples the non-uniform approximation from hardware dependencies.
  3. Quantization After Numerical Stabilization (QANS): This technique addresses the attention distortion issue caused by quantizing large inputs to the Softmax function. By performing quantization after numerical stabilization (specifically, logit subtraction), QANS constrains the inputs to a non-positive range, mitigating attention shift and preserving accuracy even with 8-bit precision.

Datasets

The paper uses the nuScenes dataset for training and evaluation. nuScenes is a comprehensive autonomous driving dataset that includes LiDAR, radar, and camera data, with annotations for object detection, tracking, and segmentation.

Key Insights and Ideas

  • Magnitude Disparity is the Bottleneck: The paper convincingly shows that the vast difference in scale between positional embeddings and image features is the primary culprit for accuracy loss during quantization in PETR models. This insight drives the QFPE design.
  • LiDAR Physics as Inspiration: Leveraging LiDAR's physical characteristics for PE generation (QFPE) is a clever way to create a more quantization-friendly representation without sacrificing geometric fidelity.
  • DULUT's Hardware-Friendly Non-linearity: The DULUT approach is a significant contribution for efficient non-linear function approximation on embedded systems, offering a practical alternative to complex neural network-based or hardware-specific solutions.
  • Softmax Stabilization is Crucial: Quantizing Softmax inputs directly is problematic. QANS's strategy of stabilizing inputs before quantization is a key step in preserving attention mechanisms.
  • FQ-PETR is Model-Agnostic: The framework is shown to be effective across various PETR variants (PETR, StreamPETR, PETRv2, MV2d), demonstrating its broad applicability.

Key Results

FQ-PETR achieves impressive results under full integer quantization (W8A8):

  • Near Floating-Point Accuracy: The framework maintains accuracy very close to floating-point models, with less than 1% degradation in mAP and NDS across tested PETR variants.
  • Significant Speedup: FQ-PETR reduces latency by up to 75% compared to existing methods. For example, Q-PETR (an FQ-PETR variant) runs 3.9x faster than PETR.
  • Reduced Memory Footprint: The model size is reduced by 4x.
  • Outperforms Baselines: FQ-PETR significantly outperforms existing Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT) baselines.
  • QFPE Benefits: QFPE alone provides performance improvements even in floating-point settings, boosting NDS and mATE.
  • DULUT Efficiency: DULUT achieves lossless accuracy with significantly fewer entries (e.g., 64 entries) compared to standard linear LUTs (256 entries) for non-linear functions.

Limitations and Future Work

  • Focus on INT8: The current work focuses on 8-bit quantization. Future work could explore lower or mixed precision.
  • Standard Benchmarks: The evaluation is performed on standard benchmarks. Extending FQ-PETR to large-model pipelines that use PETR as a feature encoder and exploring cross-dataset/camera-rig variations are suggested.
  • QFPE Finetuning: Investigating ways to reduce the finetuning cost of QFPE is mentioned as a future direction.
  • Privacy-Preserving Federated Learning: The authors suggest integrating FQ-PETR with privacy-preserving federated learning.
  • LLM Extension: The paper demonstrates FQ-PETR's effectiveness on large language models (LLMs) with extreme attention inputs, suggesting its broader applicability beyond 3D object detection.

Summary updated

BibTeX
@inproceedings{yu2026fq,
  author = {Jiangyong Yu and Changyong Shu and Sifan Zhou and Zichen Yu and Xing Hu and Dawei Yang},
  title = {{FQ-PETR: Fully Quantized Position Embedding Transformation for Multi-View 3D Object Detection}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i14.38204},
}
Figure