atlas

Research map / Detection and segmentation / CNN features

PTQ4SAM: Post-Training Quantization for Segment Anything

CVPR 2024 · Detection and segmentation › CNN features · approach: Convolution-transformer backbones · 27 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes PTQ4SAM, a post-training quantization framework for the Segment Anything Model that removes post-Key-Linear bimodal distributions via a sign-based equivalent transformation and uses an adaptive power-of-two-base log quantizer for post-Softmax attention.

Problem

Post-training quantization of Segment Anything Model (SAM) is hampered by bimodal post-Key-Linear activations and highly varied post-Softmax distributions across self- and cross-attention, causing large accuracy loss at low bit-width.

Approach

A Bimodal Integration strategy multiplies query and key linears by a channel-wise sign factor so the bimodal key distribution becomes normal (mathematically equivalent, absorbed offline), and an Adaptive Granularity Quantization searches a power-of-two log base (tau in {2^0,2^1,2^2}) per post-Softmax quantizer by minimizing the error of the attention-value product.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add Bimodal Integration and Adaptive Granularity Quantization (ablation)PTQ4SAM on SAM-L · COCO instance segmentationmAP: 25.8 -> 32.1Helped
add Bimodal Integration (ablation)PTQ4SAM on SAM-L · COCO instance segmentation, W4A4mAP: 25.8 -> 29.2Helped
add Adaptive Granularity Quantization (ablation)PTQ4SAM on SAM-L · COCO instance segmentation, W4A4mAP: 25.8 -> 27.3Helped
replace uniform post-Softmax quantization with AGQ (ablation)SAM-L · COCO instance segmentation, W4A4mAP: 25.3 -> 27.8Helped
replace Log2 post-Softmax quantization with AGQ (ablation)SAM-L · COCO instance segmentation, W4A4mAP: 26.5 -> 27.8Helped
replace uniform post-Softmax quantization with AGQ (ablation)SAM-B · COCO instance segmentation, W4A4mAP: 13.3 -> 15.0Helped
replace Log2 post-Softmax quantization with AGQ (ablation)SAM-H · COCO instance segmentation, W4A4mAP: 37.3 -> 37.6Helped

Surprising findings

Limitations

Experimental setup

Datasets: SA-1B MS-COCO ADE20K DOTA-v1.0

Benchmarks: MS-COCO ADE20K DOTA-v1.0

Metrics: mAP mIoU FLOPs storage

Baselines: MinMax Percentile OMSE AdaRound BRECQ QDrop Log2 quantizer Uniform quantizer FastSAM

Builds on: OMSE QDrop AdaRound BRECQ

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy