- Rating
- 4
- Clarity
- 3
- Confidence
- 3
- Originality
- 3
- Quality
- 3
- Significance
- 3
Read review
Summary
This paper intorduces Post training Quantization (PTQ) techniques specifically geared towards Monocular Depth Estimation (MDE). Two main ideas that are contributed in this paper are:
- Attention-Preserving Calibration (APC) that calibrates query and key quantizers with an attention-level KL objective.
- Channel-wise Distribution Alignment (CWDA) scheme that helps correct intermediate feature distribution shifts and helps with accumulated quantisation errors.
The main motivation behind these contributions for MDE is that the current PTQ methods have been designed around classification tasks whereas in case of MDE authors observe that the multi-scale intermediate features are more sensitive to quantisation errors and existing PTQ methods do not address it.
Authors conduct experiments on Deep Anything v1 and v2 models and evaluate their method on 5 different MDE benchmarks.
Strengths and weaknesses
Strengths:
- Paper is well-written and very easy to follow. It addresses the quantization challenges specific to MDE application.
- Authors do a good job with evaluations and results.
Weaknesses:
- The title of the paper has PTQ in the name, since the CWDA technique requires seems to require e2e fine-tuning, I find the title a bit misleading.
- The qualitative results show lack of properties including depth smoothness and geometry continuity. It also seems that this method struggles with high-frequency regions and edges. It looks to me that only optimising for features to look similar between quantized and unquantized models does not guarantee good quality depth maps. Maybe authors can comment on this.
Questions
- How sensitive is this technique to calibration data? How does domain shift affect the performance?
- Have the authors observed specific failure cases of this technique depending on objects or distant regions in the data?
- I am also curious to understand how authors arrive at the observation that improvements in attention mechanism imply improvement in depth quality.
Limitations
Yes.
Paper formatting concerns
No concerns.
A1: To address both questions, we conducted three additional studies: two sensitivity studies on the calibration and optimization data, and a cross-domain study on the effect of domain shift. All experiments use Depth Anything v1, and the two sensitivity studies are evaluated on NYUv2.
Sensitivity to the amount of calibration and optimization data.
SPA-Q involves two sets of data, namely the calibration set used by APC and the unlabeled optimization subset used by CWDA. We vary each while holding the other fixed.
The first study varies the calibration set while fixing the optimization subset at 5%:
ViT-S
ViT-B
Performance remains stable across all sizes, indicating that APC does not require careful tuning of the calibration set.
The second study varies the optimization subset for CWDA while fixing the calibration set at 16 images:
ViT-S
ViT-B
Performance improves quickly up to 1% and then saturates. Notably, even the smallest subset of 0.1% already outperforms every W4A4 baseline in Table 1. We report 5% in the paper to follow the training pipeline of QSCA for a fair comparison.
Effect of domain shift.
To examine domain shift, we calibrate and optimize on one domain and evaluate on the other, in both directions.
First, transferring from outdoor to indoor is robust. On ViT-B, a model calibrated on KITTI and evaluated on NYUv2 still outperforms every baseline in Table 1 that was calibrated in-domain on NYUv2.
Second, the effect is asymmetric. Outdoor scenes span a much wider depth and activation range that an indoor calibration set does not cover, whereas outdoor calibration subsumes indoor statistics.
Third, the degradation is driven mainly by activation quantization rather than by the learned alignment. Raising the activation precision from 4 to 6 bits recovers most of the loss in the outdoor-to-indoor direction, where on ViT-B the cross-domain result even surpasses the in-domain W4A4 result.
A2: We did observe a consistent pattern, and it relates to the depth range of the scene rather than to particular object categories.
On indoor datasets such as NYUv2, the depth range is bounded at around 10 meters, and quantization error remains well controlled across the scene. Outdoor datasets such as KITTI are considerably harder. The depth range extends to 80 meters, the ground truth is sparse, and the output head of the DPT decoder has to represent this much wider range. Since the quantization step size scales with the activation range, the same bit-width incurs substantially larger absolute error at large depths, which is where we see the degradation concentrate.
We note, however, that this is not specific to SPA-Q but is commonly observed across quantized MDE models. All PTQ baselines in Table 1 show the same degradation on outdoor scenes, and SPA-Q remains the strongest method in both settings. Raising the activation precision from 4 to 6 bits recovers a large part of the loss on KITTI, which indicates that the bottleneck lies in representing a wide activation range.
A3: To examine the relationship between attention distortion and depth quality, we conducted a controlled experiment with two configurations: one quantizes only the attention modules while keeping the MLPs at full precision, and the other quantizes only the MLPs while keeping the attention modules at full precision. We report depth accuracy on Depth Anything v1 with ViT-B, and the boundary and ordering metrics at W4A4 on NYUv2.
ViT-B
At W8A8, where quantization error is negligible, the two configurations are nearly identical. As the precision decreases, however, quantizing the attention modules degrades depth accuracy far more than quantizing the MLPs at the same bit-width, and the gap widens as the bit-width shrinks. The structural metrics of edge, boundary, and ordering quality suffer even more heavily. This is what motivated us to preserve the attention distribution explicitly, and the ablation in Table 2 confirms that doing so improves the final depth.
A1: We agree that our wording may have caused this misunderstanding. In Sec 4.1 we omitted the word "unlabeled" when describing the optimization data, and we will fix this in the revision.
Unlike fine-tuning, CWDA does not update any pretrained weight. It optimizes only the per-channel affine parameters α and β, and the optimization is driven by distillation from the full-precision model on unlabeled images, with no ground-truth depth involved. These parameters are then folded into the preceding weights and biases (Eq. 10), so the deployed model is identical to the original quantized network. Distilling from full-precision outputs on unlabeled data is standard practice in PTQ, as in reconstruction-based methods such as BRECQ and QDrop.
A2: We conducted a quantitative evaluation of boundary and geometric quality. We report edge accuracy, boundary F1, and relative depth ordering error on NYUv2 with Depth Anything v1, and we include W4A6 alongside W4A4 to isolate the cause of the degradation.
ViT-S
ViT-B
At W4A4, the gap between methods is largest in geometric continuity. SPA-Q substantially reduces the ordering error relative to the compared methods and preserves boundaries better, particularly on ViT-B. Some degradation at edges remains, but it is much smaller.
At W4A6, SPA-Q comes close to the full-precision model on both edge and boundary metrics, whereas a gap in depth ordering remains.
Since the two settings differ only in activation precision, this recovery indicates that the boundary degradation at W4A4 stems primarily from the limited representational capacity of 4-bit activations. The prediction head is also quantized, so the output is drawn from a discrete set of values, and because activations change most abruptly at boundaries, the degradation concentrates there. Even a well-aligned quantized model cannot avoid this loss once the activation representation becomes too coarse to preserve high-frequency detail. Ordering consistency, on the other hand, is limited by factors beyond activation precision, which we regard as an important direction for future work.