WorksComputer Science
DAQ: Decision-Aligned Post-Training Quantization for Spiking Transformers
Abstract
Spiking transformers combine attention-based representation learning with sparse spike communication, yet their weights and membrane variables still incur substantial storage and computation overhead. Post-training quantization (PTQ) offers a practical way to reduce these overheads, but preserving neuronal firing under weight and membrane quantization remains challenging. In this paper, we propose Decision-Aligned Post-Training Quantization (DAQ), a method that calibrates the quantizers to align neuronal firing decisions with those of a floating-point reference. We analyze how errors from these quantizers affect firing at decision boundaries and how they propagate over time steps in recurrent neurons. Based on this analysis, we formulate an objective that encourages quantized membrane variables to remain within the reference firing regions along the quantized model's own state trajectory. Experiments across multiple spiking transformer architectures on image classification, semantic segmentation, and event-based tracking demonstrate the effectiveness of DAQ with 4-bit weights and membrane variables. On FE108, DAQ achieves 58.8% AUC and 90.9% PR with SDTrack, while reducing energy by 66.2%.
Introduction
Spiking transformers combine attention-based representation learning with discrete spike communication and have been applied to image classification, semantic segmentation, and event-based object tracking [10, 21, 32, 34]. Their synaptic weights and membrane variables still require substantial storage and processing resources [7, 25]. Post-training quantization (PTQ) reduces numerical precision by calibrating pretrained models on a small dataset, avoiding the cost of full retraining [11, 28].
We study PTQ of both synaptic weights and membrane variables in spiking transformers. The effect of a perturbation on firing depends on its direction and the potential’s position relative to a decision boundary [32, 34]. For a potential just below the firing threshold, a positive perturbation can trigger a spike, whereas a negative perturbation of the same magnitude leaves the neuron silent. Integer-valued neurons exhibit analogous changes at boundaries between adjacent spike counts. Preserving firing therefore requires the quantized potential to remain in the region associated with the original output.
Figure 1. Accuracy versus energy on ImageNet-1K. DAQ achieves 83.4% top-1 accuracy with 4-bit weights and membrane variables (W4/U4). Bubble area represents parameter storage.
In recurrent LIF neurons, the effect of quantization also extends across time [17]. The floating-point and quantized models may both remain silent at one step yet retain different membrane states. These states enter the next integration step and can produce a later firing mismatch even under identical inputs. Weight quantization perturbs the neuronal inputs, while membrane quantization perturbs the retained states.
To address these challenges, we propose Decision-Aligned Post-Training Quantization (DAQ) for spiking transformers. DAQ calibrates weight and membrane quantizers using the firing behavior of the floating-point model as the target. Guided by our analysis, we introduce a decision-aligned objective to preserve firing decisions after quantization. Calibration uses complete quantized forward passes, accounting for the influence of earlier membrane states on subsequent firing in recurrent neurons. As illustrated in Figure 2, DAQ provides a unified calibration framework for neurons.
Figure 2. Overview of DAQ. The frozen floating-point model provides reference firing decisions, while the quantized model follows its own state trajectory. At shared sampled positions, a weighted decision-aligned loss encourages quantized potentials to remain within the reference decision regions. Event losses are averaged within and across groups to calibrate the weight and membrane quantizers.
Our main contributions are summarized as follows:
We derive firing-preservation conditions for neurons, accounting for decision boundaries and the temporal propagation of state errors in recurrent LIF.
We propose a decision-aligned objective for calibrating weight and membrane quantizers and derive an upper bound on weighted firing error in terms of the calibration loss.
We evaluate DAQ across architectures and model scales on image classification, semantic segmentation, and event-based tracking. The results demonstrate competitive W4/U4 performance with substantial storage savings and reduced energy.
Related Work
Spiking Transformers and Neuronal Dynamics
Spiking transformers adapt attention and residual connections to spike-based computation. Spikformer [42] introduces self-attention with binary query, key, and value tensors, while Spike-driven Transformer [32] combines spike-driven attention with membrane-potential residual connections. Subsequent architectures explore hierarchical feature extraction through convolution–attention backbones [22, 33] and efficient token interaction through Q-K attention [40]. These advances support event-based tracking with SDTrack [21] and image segmentation with Spike2Former [10]. TP-Spikformer [25] further reduces computation by pruning tokens according to their spatiotemporal importance.
Neuronal representations provide another dimension of spiking transformer design. LIF neurons integrate inputs through membrane states retained across time, with firing and reset determining subsequent state updates [6, 17]. Spike firing approximation uses integer-valued activations during training and converts them into spike trains for inference, enabling the scaling of spike-driven transformers [34]. Membrane-potential residual connections additionally preserve nonbinary signals within the network [32, 33]. Our study considers recurrent LIF neurons and a stateless integer-valued firing configuration, retaining the original neuronal dynamics and residual paths.
Post-Training Quantization of Spiking Neural Networks
Quantization-aware training (QAT) adapts SNN parameters to low-precision representations during training [20, 24]. Q-SNNs [24] quantizes weights and membrane potentials with weight–spike dual regulation, while SpQuant-SNN [7] combines low-precision membrane potentials with activation sparsity. For spiking transformers, QSD-Transformer [20] introduces information-enhanced neurons and distillation to train low-bit models. HardF-SNN [13] further addresses hardware execution through shared-scale quantization and integer-only batch normalization.
Post-training quantization (PTQ) calibrates pretrained models using limited data without full retraining [5, 8, 11, 12, 15, 16, 27, 31, 36]. AdaRound [16] optimizes weight rounding through layer reconstruction, and BRECQ [11] uses block reconstruction with second-order error weighting. For vision transformers, FIMA-Q [28] formulates the reconstruction objective using a diagonal-plus-low-rank approximation of the Fisher information matrix. Precision selection has also been investigated for spiking transformers: QSViT [18] selects quantization settings through layerwise precision analysis, while AQ4SViT [19] uses membrane-potential drift to screen candidates during quantization search.
Membrane-aware PTQ extends calibration to the recurrent states that participate in subsequent neuronal updates [1, 29]. FlowQ [1] couples weight and membrane scales through power-of-two ratios and calibrates them, allowing scale conversion through bit shifts. PTQ4SNN [29] introduces channel-wise scale coupling and allocates 2-, 4-, or 8-bit membrane precision according to firing activity and quantization sensitivity under an average-bit budget. These approaches establish scale compatibility and precision allocation as key components of weight and membrane quantization [1, 29].
At fixed weight and membrane bit widths, DAQ uses neuronal decision regions to guide calibration and preserve the firing behavior of the pretrained model.
Quantization Error Analysis of Spiking Transformers
Quantization can alter both the potential used for the current firing decision and the state carried into subsequent time steps. We analyze these effects in neurons through their decision regions and state dynamics.
Neuron Models and Quantization
Superscripts and denote the floating-point reference and quantized models, respectively. Let , , , and denote the pre-firing potential, post-reset state carried into the next step, firing output, and neuron input. For
LIF with zero hard reset, the dynamics in real arithmetic are
where is the firing threshold, and and are the leakage and input coefficients.
For the integer-valued LIF (I-LIF) configuration, we follow the definition in [34]. We denote its firing function by and maximum spike count by , and analyze the integer counts before output normalization.
The quantized model applies to weights while retaining the original charging, firing, and reset rules. Membrane quantization acts on the post-reset state carried into the next step in LIF, and on the potential supplied to in stateless I-LIF. Throughout the analysis, denotes the potential supplied to the firing function; for I-LIF, is therefore measured after membrane quantization.
Decision Regions and Firing Preservation
For a firing rule , define the decision region . At a paired neuron evaluation, let . The firing outputs agree if and only if the quantized potential remains in the reference decision region:
The finite boundaries of determine the admissible range of . An upper boundary limits positive perturbations, while a lower boundary limits negative perturbations.
Figure 3(a) illustrates this relation. The line separates the quantized firing outcomes, and the reference output determines which side preserves firing. Perturbations of equal magnitude but opposite directions can therefore produce different firing outcomes. One may move the potential outside the reference decision region, while the other leaves it inside. Firing preservation thus depends on the reference potential’s distance to the decision boundaries and on the direction and magnitude of the perturbation.
Figure 3. Decision boundaries and temporal propagation of quantization errors. (a) Firing preservation depends on the reference potential and the direction of the perturbation relative to the decision boundary. (b) Matching non-firing outputs can leave different post-reset states and lead to a later firing mismatch.
Temporal Error Propagation
For recurrent LIF, the two models may remain silent at the current step yet retain different post-reset states. These state differences can affect later firing decisions, as illustrated in Figure 3(b). Define and . The next pre-firing potential difference satisfies
where contains and the difference between the rounding errors of the two charging operations. The input difference includes changes caused by both quantized weights and upstream activations.
Let denote the difference between the two models’ residuals from reset arithmetic and state storage. When the current firing outputs agree,
Using the input and state-storage perturbations along the paired trajectories, define
and, for ,
As long as the firing histories agree through step , this recurrence yields . The exact residual definitions and derivation are provided in Appendix A. For stateless I-LIF, we use at each evaluation, including the perturbation introduced by pre-firing membrane quantization.
Proposition 1 (Firing preservation). For either neuron configuration, the reference and quantized firing outputs agree over steps if and only if
Proof. We first show by induction that whenever the firing histories agree through step . At , Equations (3) and (5) give . For , suppose the outputs agree through step and . Equations (3) and (4) then yield
where the last equality follows from Equation (6). This establishes the conditional equality.
If the outputs agree over all steps, then at every step. Equation (2) therefore gives Equation (7).
Conversely, assume Equation (7) holds at every step. At , , so Equation (2) gives . If the outputs agree through step , the preceding result gives , and the region condition ensures . Induction proves agreement over all steps.
Under matched firing histories, leakage and reset determine how state errors propagate. During shared non-firing steps, the potential error contributes to the next charging step with coefficient . A shared firing event clears the local saved-state difference when . The signed input and state-storage perturbations contribute to the same firing potential.
These interactions motivate calibration of weight and membrane quantizers using the actual firing potentials along the quantized model’s trajectory.
Method
Figure 2 summarizes DAQ. After initializing the weight and membrane quantizers, we optimize their parameters using the decision-aligned objective on unlabeled calibration data.
Quantized Representations
We use per-channel affine quantization for weights and membrane variables. For bit width , scale , and integer zero point , the quantizer is defined by
with the decoded value
For LIF, quantizes the post-reset state carried into the next time step. We learn its scale and zero point, with the grid constrained to represent reset zero exactly and keep all decoded states strictly below in the source precision.
For I-LIF, quantizes the pre-firing potential. We calibrate the weight and membrane quantizers using a firing-alignment objective defined against the floating-point reference.
Decision-Aligned Calibration
For each paired neuron evaluation , let and denote the reference and quantized firing outputs before normalization. We use for LIF and for I-LIF. The quantized I-LIF potential is read after and before applying . Let denote the index set of firing decision boundaries for neuron evaluation , with denoting the location of boundary .
The reference output specifies the required side of each boundary. We define the signed distance
Positive values place the quantized potential on the reference side, while negative values place it on the opposite side. We penalize distances below to encourage separation from the boundary.
An I-LIF firing error can span several spike counts. To reflect its magnitude, we assign each boundary the weight
These weights sum to the squared count error over disagreeing boundaries, as shown below.
A small perturbation can change firing when the reference potential lies near a boundary. We emphasize these events through the weight , where is the reference distance and keeps the weight finite. For LIF, . For I-LIF, . The resulting event loss is
where is a one-sided Huber penalty: it is zero for , equals for , and equals for . The quadratic branch provides a smooth transition to zero, while the linear branch maintains a constant slope for larger violations. The parameter controls the transition width. We use and , treating and as constants when computing gradients. The loss is zero exactly when for every boundary.
Proposition 2 (Firing-error bound). For either neuron configuration and , each paired evaluation satisfies
For LIF, the squared difference is the spike-mismatch indicator; for I-LIF, it is the squared count error.
Algorithm 1 Decision-Aligned Quantization.
Input: Reference model , unlabeled calibration set .
Output: Quantized model .
Initialization
Initialize and under the grid constraints.
Decision alignment
for each calibration update do
Select a batch and uniformly sample positions shared across channels and time.
Obtain reference targets at the sampled positions.
Run the full quantized forward pass using its own states and compute over the sampled events with Equation (16).
Update the parameters of and using local surrogate gradients, retaining temporal state gradients within nodes and detaching firing outputs between nodes.
Project the quantizers onto their grid constraints.
end for
Fix the calibrated quantizer parameters and return .
Proof. Let indicate whether exactly one of and is at least . The boundary weights satisfy
Only boundaries between the two outputs contribute. Their weights are , which sum to . At each disagreeing boundary, . Since , the corresponding Huber term is at least . Multiplying by , summing over boundaries, and dividing by proves Equation (14). □
We group sampled events by node, invocation, and time step, with denoting the events in group . Averaging within each group and equally across the groups gives
Let denote the same group average of . Proposition 2 then gives . Algorithm 1 summarizes the calibration procedure.
Experiments
We evaluate DAQ under W4/U4 quantization on event-based object tracking, image classification, and semantic segmentation across different architectures and model scales. We compare task performance and resource costs with floating-point counterparts and existing methods. We then examine the calibration design through ablation studies and report the wall-clock quantization time.
Experimental Setup. We calibrate weight and membrane quantizers using unlabeled data while keeping the pretrained weights fixed. Both use per-channel affine quantization, as described in § 4.1. Throughout the experiments,
denotes -bit weights and -bit membrane variables. The datasets, model configurations, and evaluation protocols are specified in the corresponding subsections.
Event-Based Object Tracking
We evaluate DAQ on FE108, FELT, and VisEvent using SDTrackTiny [21]. We consider LIF neurons with and I-LIF neurons with , quantizing both weights and membrane variables to 4 bits. Tracking performance is measured by the area under the success curve (AUC) and precision rate (PR).
As shown in Table 1, DAQ reduces energy to 2.91 mJ for LIF and 2.76 mJ for I-LIF, corresponding to reductions of 64.3% and 66.2% relative to their floating-point counterparts. Across the three benchmarks, the quantized LIF model stays within 1.0 percentage point of its floating-point reference in AUC and within 1.3 points in PR. For I-LIF, DAQ reaches 58.8% AUC and 90.9% PR on FE108, giving up 0.2 points in AUC and 0.4 points in PR. AUC falls by 1.2 points on FELT and by 1.1 points on VisEvent.
| Method | Precision | Energy (mJ) | FE108 AUC (%) | FE108 PR (%) | FELT AUC (%) | FELT PR (%) | VisEvent AUC (%) | VisEvent PR (%) | |
| STARK [30] | FP | 58.88 | 57.4 | 89.2 | 39.6 | 51.7 | 34.1 | 46.8 | |
| SimTrack [3] | FP | 93.84 | 56.7 | 88.3 | 36.8 | 47.0 | 34.6 | 47.6 | |
| OSTrack [35] | FP | 98.90 | 54.6 | 87.1 | 35.9 | 45.5 | 32.7 | 46.4 | |
| ARTrack [26] | FP | 174.8 | 56.6 | 88.5 | 39.5 | 49.4 | 33.0 | 43.8 | |
| SeqTrack-B [4] | FP | 302.7 | 53.5 | 85.5 | 33.0 | 42.0 | 28.6 | 43.3 | |
| HIPTrack [2] | FP | 307.7 | 50.8 | 81.0 | 38.2 | 48.9 | 32.1 | 45.2 | |
| ODTrack [39] | FP | 335.8 | 43.2 | 69.7 | 29.7 | 35.9 | 24.7 | 34.7 | |
| STNet [37] | FP | 103.53 | – | – | – | – | 35.0 | 50.3 | |
| SNNTrack [38] | FP | 8.25 | – | – | – | – | 35.2 | 50.4 | |
| SDTrackTiny [21] | FP | 8.15 | 56.7 | 89.1 | 35.8 | 44.1 | 35.4 | 48.7 | |
| FP | 8.16 | 59.0 | 91.3 | 39.3 | 51.2 | 35.6 | 49.2 | ||
| TP-Spikformer () [25] | FP | 6.65 | 59.0 | 91.2 | 39.1 | 50.4 | 35.3 | 49.7 | |
| TP-Spikformer () | FP | 6.51 | 58.4 | 90.6 | 38.9 | 50.0 | 35.2 | 49.4 | |
| DAQ (Ours) | W4/U4 | 2.91 | 56.6 | 88.7 | 34.8 | 42.8 | 35.0 | 48.2 | |
| W4/U4 | 2.76 | 58.8 | 90.9 | 38.1 | 48.8 | 34.5 | 48.0 |
Table 1. Event-based object tracking results on FE108, FELT, and VisEvent. Ratios beside TP-Spikformer indicate average token retention. The three best distinct values per metric are highlighted as first, second, and third. Ties share the same highlight; a dash denotes an unavailable result. denotes the number of time steps, and denotes the maximum spike count per time step.
DAQ also consumes the least energy among the compared methods. Relative to TP-Spikformer () [25], the quantized I-LIF model cuts energy use by 57.6% while gaining 0.4 points in AUC and 0.3 points in PR on FE108. It gives up 0.8 points of AUC on FELT and 0.7 points on VisEvent.
Image Classification
We evaluate DAQ on ImageNet-1K, CIFAR-10, and CIFAR-100 using top-1 accuracy. All DAQ models use W4/U4 quantization.
ImageNet-1K
We apply DAQ to pretrained SDT-V3-19M, SDT-V3-83M, and SDT-V3-171M models [34] with . We also adapt BRECQ [11] to SDT-V3-19M under W4/U4 using their official implementations. For BRECQ, we use block reconstruction to optimize weight rounding and membrane scales.
Table 2 shows that DAQ preserves the accuracy advantage of larger backbones under low-bit quantization. The 83M and 171M models remain within 1.3 percentage points of their floating-point counterparts, while the 19M model incurs a decrease of 2.1 points and outperforms our reproduced BRECQ baseline by 0.8 points. Across these models, energy is reduced by 79.7%–87.1%.
Table 2. ImageNet-1K classification results. Parameter storage is expressed in millions of FP32-equivalent parameters. * denotes results reproduced by us with W4/U4 adaptations of the official implementations.
| Method | Bits (W/U) | Param. (M) | Energy (mJ) | Top-1 (%) | |
| Spikformer [42] | 32/32 | 66.3 | 21.5 | 74.8 | |
| SDT-V1 [32] | 32/32 | 66.3 | 6.1 | 77.1 | |
| Spikingformer [41] | 32/32 | 66.3 | 16.3 | 77.6 | |
| SpikingResformer [22] | 32/32 | 60.4 | 14.8 | 79.4 | |
| SNN-ViT [23] | 32/32 | 53.7 | 35.8 | 80.2 | |
| SDT-V2 [33] | 32/32 | 55.4 | 52.4 | 79.7 | |
| QSD-Transformer [20] | 4/32 | 6.8 | 8.7 | 80.3 | |
| SDT-V3 [34] | 32/32 | 19.0 | 5.9 | 79.8 | |
| 32/32 | 83.0 | 19.1 | 83.2 | ||
| 32/32 | 171.0 | 35.6 | 84.7 | ||
| TP-Spikformer () [25] | 32/32 | 19.0 | 4.7 | 79.0 | |
| TP-Spikformer () | 32/32 | 19.0 | 4.3 | 77.6 | |
| BRECQ* [11] | 4/4 | 2.5 | 1.3 | 76.9 | |
| DAQ (Ours) | 4/4 | 2.5 | 1.2 | 77.7 | |
| 4/4 | 10.7 | 2.5 | 82.0 | ||
| 4/4 | 21.9 | 4.6 | 83.4 |
Table 2.
These energy savings also make a larger quantized backbone competitive with a smaller floating-point model. The quantized SDT-V3-171M achieves 83.4% accuracy at 4.6 mJ, slightly exceeding the 83.2% accuracy of floating-point SDT-V3-83M at 19.1 mJ. At a fixed backbone size, DAQ also provides a favorable accuracy–energy tradeoff relative to token pruning. On SDT-V3-19M, DAQ achieves 77.7% accuracy, compared with 77.6% for TP-Spikformer () [25], while reducing energy from 4.3 to 1.2 mJ.
CIFAR-10 and CIFAR-100. To evaluate DAQ with recurrent membrane dynamics, we quantize pretrained Spike-driven Transformers (SDT-2-512) [32] with LIF neurons and on both datasets.
As shown in Table 3, DAQ achieves 95.3% and 77.8% accuracy on CIFAR-10 and CIFAR-100, respectively. It also remains competitive with the listed floating-point token-pruning methods. On CIFAR-10, DAQ achieves the highest accuracy among the compared methods. On CIFAR-100, it is 0.7 percentage points below TP-Spikformer while using 4-bit weights and recurrent membrane states.
Table 3. Top-1 accuracy (%) on CIFAR-10 and CIFAR-100 at . † uses 4-bit weights and mixed-precision membrane quantization under an average 4-bit membrane budget. Numbers in method names denote token retention ratios.
Table 3.
Semantic Segmentation
We evaluate DAQ on ADE20K using the pretrained SDT-V3-10M backbone [34] with an FPN neck and a segmentation head. We apply W4/U4 quantization to the backbone weights and membrane variables and measure segmentation performance by mIoU.
As shown in Table 4, backbone quantization provides substantial parameter storage savings in the segmentation model. DAQ achieves 38.9% mIoU, a decrease of 1.2 percentage points from the floating-point baseline, while reducing parameter storage from 11.0M to 3.0M FP32 equivalents. The energy is also 44.1% lower, at 15.2 mJ per image compared with 27.2 mJ for the floating-point baseline.
Table 4. Semantic segmentation results on ADE20K.
Table 4.
Figure 4 presents qualitative comparisons between FP32 and DAQ for semantic segmentation and event-based object tracking.
Figure 4. Qualitative comparison of FP32 and DAQ (W4/U4) for (a) semantic segmentation and (b) event-based object tracking. Ground truth is shown for reference.
Ablation Studies
We compare membrane reconstruction MSE with DAQ’s decision-aligned objective while keeping all other calibration settings fixed. As shown in Table 5, replacing MSE with the decision-aligned objective improves mean top-1 accuracy from 74.05% to 75.98% and reduces both weighted and unweighted squared count errors. The accuracy improvement is thus accompanied by closer agreement with the reference firing outputs.
| Objective | Top-1 (%) | |||
| MSE | 5.83 | 1.79 | 0.39 | 74.05 0.16 |
| DAQ | 5.46 | 1.70 | 0.36 | 75.98 0.11 |
Table 5. Comparison of calibration objectives on SDT-V3-10M. is the DAQ loss, is the weighted firing error, and is the unweighted squared count error.
Table 6 further separates the contributions of the calibration components, with Initial grids reporting accuracy before quantizer optimization. DAQ without distance weighting sets the reference-distance weights to one, leaving the rest of the objective unchanged. On SDT-V3-10M, the accuracy gain over MSE largely persists in this setting; distance weighting adds 0.08 percentage points to the mean accuracy. Its contribution is larger on recurrent SDT, where the gain is 0.65 points. DAQ with reference states uses quantized reference states during calibration and its own recurrent states during evaluation. Calibrating along the quantized model’s own state trajectory improves mean SDT accuracy by 0.23 points over this variant, supporting calibration with the state evolution used at inference.
| Model | Configuration | Top-1 (%) |
| SDT-8-768 | Initial grids | 61.87 0.27 |
| DAQ without distance weighting | 73.32 0.24 | |
| DAQ with reference states | 73.74 0.04 | |
| Full DAQ | 73.97 0.10 | |
| SDT-V3-10M | Initial grids | 68.44 0.17 |
| DAQ without distance weighting | 75.90 0.08 | |
| Full DAQ | 75.98 0.11 |
Table 6. Ablation study on ImageNet-1K under W4/U4 quantization. Values are reported as mean sample standard deviation.
Storage and Quantization Time
Table 7 shows that membrane quantization provides a substantial storage benefit beyond weight quantization for recurrent SDT-8-768. At fixed W4, U4 reduces the combined parameter and membrane buffer storage from 93.4 to 47.5 MiB, nearly halving the footprint. This reflects the need to retain a separate recurrent state for each neuron node.
| Backbone | W4/ | W4/U4 | DAQ time (GPU min) | |
| SDT-V3-10M | 40.5 | 7.3 | 5.6 | 5.9 |
| SDT-V3-19M | 75.5 | 12.4 | 10.1 | 6.3 |
| SDT-V3-171M | 664.5 | 92.7 | 85.7 | 8.3 |
| SDT-8-768 | 314.3 | 93.4 | 47.5 | 19.6 |
Table 7. Packed parameter and membrane buffer storage at batch size one, and W4/U4 quantization time on ImageNet-1K. and denote the original floating-point precisions.
For SDT-V3, the storage estimate assumes reuse of a single membrane buffer across layers. Its contribution to total storage becomes smaller as parameter storage grows, so the relative benefit of U4 decreases with model size. The complete quantization procedure takes 5.9–8.3 minutes for SDT-V3 and 19.6 minutes for SDT-8-768 on a single NVIDIA RTX 4090.
Conclusion
We presented DAQ, a post-training quantization method for spiking transformers. Guided by the analysis of firing boundaries and state propagation, DAQ uses firing preservation as a shared calibration objective along quantized trajectories. Experiments on image classification, semantic segmentation, and event-based tracking demonstrate competitive performance under W4/U4 quantization, with substantial storage savings and reduced energy.
Acknowledgments
This work was supported in part by the National Natural Science Foundation of China under grant 62304203 and in partby the International Campus of ZJU International Research Collaboration Seed Project under grant GJ202509.
Additional Analysis and Proofs
We provide the exact decision regions, derive the error recurrences, and prove Propositions 1 and 2. Notation follows the main paper, with neuron and channel indices omitted.
Exact Decision Regions
For LIF, the firing rule gives
Thus, firing preservation requires when , and when . Equality belongs to the firing region.
The admissible perturbations are obtained by translating by :
Error Recurrences and Firing Preservation
Arithmetic and storage residuals. For , define residuals from the realized charging and state-update operations:
The charging residual captures arithmetic rounding. The state-update residual includes reset arithmetic and state storage, including membrane quantization in the quantized model. The perturbations used in the main paper are
Both are evaluated along the paired model trajectories. In particular, includes changes caused by quantized weights and upstream activations.
In exact arithmetic apart from quantization, , and
Equation (20) also accounts for the source execution precision.
Error recurrence. Subtracting the two charging equations gives
Let . Subtracting the state updates and rearranging yields
When the outputs agree, , so
During a shared silent step, the potential difference and storage perturbation remain in the saved state. A shared firing event clears the saved-state difference under zero hard reset and . The next potential difference then equals .
Using the paired perturbations, define
and, for ,
This is the conditional recurrence used in Proposition 1.
Proof of Proposition 1. For LIF, Equation (22) gives . Suppose the firing histories agree through step and . Equation (24) then gives
Substitution into Equation (22) yields . Hence this equality holds whenever the preceding firing histories agree.
If the outputs agree over all steps, throughout the trajectory. Since lies in the reference decision region,
This proves necessity.
Conversely, assume Equation (28) holds at every step. At , , so the region condition ensures agreement. Agreement through step gives by the preceding induction, and the region condition then ensures agreement at step . This proves sufficiency.
For stateless I-LIF, at every evaluation, so the result follows directly from Equation (2).
In particular, if the first firing mismatch occurs at step , then because the preceding histories agree. The first violation of the region condition therefore identifies the first firing mismatch.
Firing-Error Bound
Using the boundary weights and signed distances defined in § 4.2, let
indicate disagreement across boundary . Then
If , only boundaries contribute, with weights . Their sum is . If , the same odd integers appear in reverse order over . When , all terms vanish. Binary firing is the single-boundary case with unit weight.
Proof of Proposition 2. At a disagreeing boundary, either and , or and . The first case requires , and the second requires .
Since , each disagreeing boundary satisfies
All remaining boundary terms are nonnegative. Combining this observation with Equation (30) gives
Averaging over the same events and groups as Equation (16) yields .
Experimental Settings
Initialization. We initialize per-channel weight and membrane quantizers by minimizing reconstruction error over percentile-based candidates. Membrane initialization uses all positions and time steps of 128 calibration samples.
Sampling and optimization. We use 1,024 calibration samples and uniformly sample up to eight positions per sample and neuron invocation, shared across channels and time. Calibration uses AdamW with zero weight decay and cosine learning-rate decay for 320 updates at batch size 32. VisEvent uses 1,280 updates at batch size 8.
Image classification. On ImageNet-1K, we evaluate pretrained SDT-V3 models [34] with 224 224 inputs and . The SDT-8-768 model used in the ablations takes 288 288 inputs with . For CIFAR-10 and CIFAR-100, we use pretrained SDT-2-512 models [32] with LIF neurons and . We follow each model’s original preprocessing and report top-1 accuracy on the standard validation or test set.
Semantic segmentation. We evaluate SDT-V3-10M with an FPN neck on ADE20K, using . W4/U4 quantization is applied to the backbone, while the neck and segmentation head retain their original precision. We follow the original evaluation pipeline and report mean intersection over union (mIoU) on the validation set.
Event-based tracking. We evaluate SDTrackTiny [21] on FE108, FELT, and VisEvent, following its original event representation and tracking protocol. The template and search resolutions are 128 128 and 256 256, respectively. We consider LIF neurons with and I-LIF neurons with . Performance is measured by success AUC and precision rate (PR) at a center-error threshold of 20 pixels.
Comparison with ViT PTQ
Table 8 summarizes four-bit PTQ results on ImageNet-1K, with floating-point baselines reported for each architecture. The ViT methods quantize weights and activations (W4/A4), while DAQ quantizes weights and membrane variables at fixed bit widths (W4/U4). PTQ4SNN [29], listed in Table 3, combines 4-bit weights with mixed-precision membrane quantization under a 4-bit budget, so comparisons with DAQ reflect differences in both precision allocation and calibration.
| Method | Bits | DeiT-T | DeiT-S | Swin-S | ViT-B |
| Full-Precision | 32/32 | 72.71 | 79.85 | 83.23 | 84.54 |
| PTQ4ViT [36] | 4/4 | 36.96 | 34.08 | 76.09 | 30.69 |
| APQ-ViT [5] | 4/4 | 47.94 | 43.55 | 77.15 | 41.41 |
| RepQ-ViT [12] | 4/4 | 57.43 | 69.03 | 79.45 | 68.48 |
| AdaLog [27] | 4/4 | 63.52 | 72.06 | 80.77 | 79.68 |
| IGQ-ViT [15] | 4/4 | 62.45 | 74.66 | 80.98 | 79.32 |
| DopQ-ViT [31] | 4/4 | 65.54 | 75.84 | 81.71 | 80.95 |
| UQ-ViT [8] | 4/4 | 59.71 | 72.13 | 79.93 | 72.07 |
| FIMA-Q [28] | 4/4 | 66.84 | 76.87 | 81.82 | 83.04 |
| Full-Precision | 32/32 | 78.5 | 79.8 | 83.2 | 84.7 |
| DAQ (Ours) | 4/4 | 76.0 | 77.7 | 82.0 | 83.4 |
Table 8. Four-bit PTQ results on ImageNet-1K. All entries report top-1 accuracy (%). W/A and W/U denote weight/activation and weight/membrane bit widths, respectively. ViT results follow the comparison in FIMA-Q [28], with UQ-ViT results from [8]. All SDT-V3 models use .
Among the listed ViT methods, FIMA-Q achieves the highest accuracy on all four architectures. It obtains 81.82% on Swin-S and 83.04% on ViT-B, corresponding to accuracy drops of 1.41 and 1.50 percentage points. DAQ achieves 82.0% on SDT-V3-83M and 83.4% on SDT-V3-171M, with drops of 1.2 and 1.3 points from their respective floating-point baselines. For the smaller SDT-V3-10M and SDT-V3-19M models, DAQ obtains 76.0% and 77.7%, with drops of 2.5 and 2.1 points, respectively.
Storage and Energy
Storage
We estimate the ideal-packed storage of model parameters and membrane buffers at batch size one. SDT-V3 uses inputs with , while SDT-8-768 uses inputs with . Let denote the number of weights assigned bits and the remaining FP32 parameters.
Membrane buffer capacity follows the neuron configuration. For recurrent LIF, each node retains one post-reset state for the next time step. These buffers are reused across time steps, so their capacity is independent of . For stateless I-LIF, we assume layerwise reuse of a single buffer for pre-firing membrane potentials. Its capacity is determined by the largest such tensor.
Let and denote the sets of LIF and I-LIF nodes, respectively. For node , let be the number of elements in its retained post-reset state for LIF, or its pre-firing potential tensor for I-LIF. Let denote the corresponding storage precision. The storage costs are
These quantities are measured in bits and converted to MiB for reporting. Other activations, operator workspaces, and quantizer metadata are excluded.
denotes FP32 weights, and follows the native precision of each membrane tensor. Under U4, each membrane element is assigned four bits.
Energy Estimation
Following SDTrack and TP-Spikformer [21, 25], we estimate arithmetic energy from multiply–accumulate (MAC) and accumulate (AC) operations. We adopt the 45 nm reference costs and .
For a spike-driven convolutional or linear layer, let be its dense operation count per time step and its average presynaptic firing output. The synaptic operation count is
For LIF, is the average firing rate. For I-LIF, it is the mean integer spike count before output normalization. We measure this activity in the quantized model.
Following the four-bit operation weighting in QSD-Transformer [20], we estimate the inference energy as
Here, and are the raw synaptic operation counts for W4 and unquantized convolutional or linear layers, respectively. counts dense MAC operations, and accounts for spike-driven attention. The factor applies only to the W4 synaptic operations; dense operations and attention retain their respective costs.
Operation counts follow the corresponding architecture’s energy model. For SDT-V3, we use its logical projection structure and the SDSA operation count, assuming W4 execution of the logical projections. Tracking follows SDTrack’s temporal accounting. Segmentation energy is evaluated at , including the floating-point neck and prediction head. We report energy per image or tracked frame. Membrane quantization affects this estimate through the measured firing activity.
References
- [1]Faaiz Asim, Sanhtet Aung, and Jongeun Lee. Flowq: Fixed-point low-precision post-training quantization framework for efficient and accurate snn inference. In 2026 31st Asia and South Pacific Design Automation Conference (ASP-DAC), pages 119–125. IEEE, 2026. 3DOI
- [2]Wenrui Cai, Qingjie Liu, and Yunhong Wang. Hiptrack: Visual tracking with historical prompts. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 19258–19267, 2024. 6arxiv.org/abs/2311.02072
- [3]Boyu Chen, Peixia Li, Lei Bai, Lei Qiao, Qiuhong Shen, Bo Li, Weihao Gan, Wei Wu, and Wanli Ouyang. Backbone is all your need: A simplified architecture for visual object tracking. In European conference on computer vision, pages 375–392. Springer, 2022. 6arxiv.org/abs/2203.05328
- [4]Xin Chen, Houwei Peng, Dong Wang, Huchuan Lu, and Han Hu. Seqtrack: Sequence to sequence learning for visual object tracking. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 14572–14581, 2023. 6
- [5]Yifu Ding, Haotong Qin, Qinghua Yan, Zhenhua Chai, Junjie Liu, Xiaolin Wei, and Xianglong Liu. Towards accurate post-training quantization for vision transformer. arXiv preprint arXiv:2303.14341, 2023. 2, 13DOI
- [6]Wulfram Gerstner and Werner M Kistler. Spiking neuron models: Single neurons, populations, plasticity. Cambridge university press, 2002. 2
- [7]Ahmed Hassan, Jian Meng, Anupreetham Anupreetham, and Jae-sun Seo. Spquant-snn: ultra-low precision membrane potential with sparse activations unlock the potential of on-device spiking neural networks applications. Frontiers in Neuroscience, 18:1440000, 2024. 1, 2
- [8]Tao Jiang, Yucheng Jiang, Xiwen Yao, Gong Cheng, and Junwei Han. Uq-vit: Harmonizing extreme activations with hardware-friendly uniform quantization in vision transformers. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 22354–22362, 2026. 2, 13DOI
- [9]Donghwa Kang, Youngmoon Lee, Eun-Kyu Lee, Brent Kang, Jinkyu Lee, and Hyeongboo Baek. At-snn: Adaptive tokens for vision transformer on spiking neural network. arXiv preprint arXiv:2408.12293, 2024. 7arxiv.org/abs/2408.12293
- [10]Zhenxin Lei, Man Yao, Jiakui Hu, Xinhao Luo, Yanye Lu, Bo Xu, and Guoqi Li. Spike2former: Efficient spiking transformer for high-performance image segmentation. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 1364–1372, 2025. 1, 2
- [11]Yuhang Li, Ruihao Gong, Xu Tan, Yang Yang, Peng Hu, Qi Zhang, Fengwei Yu, Wei Wang, and Shi Gu. Brecq: Pushing the limit of post-training quantization by block reconstruction. arXiv preprint arXiv:2102.05426, 2021. 1, 2, 6, 7arxiv.org/abs/2102.05426
- [12]Zhikai Li, Junrui Xiao, Lianwei Yang, and Qingyi Gu. Repq-vit: Scale reparameterization for post-training quantization of vision transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 17227–17236, 2023. 2, 13arxiv.org/abs/2212.08254
- [13]Hanwen Liu, Kexin Shi, Jieyuan Zhang, Yimeng Shan, Jibin Wu, Wenyu Chen, and Malu Zhang. Hardf-snn: Hardware-friendly quantization for spiking neural networks with efficient integer-arithmetic-only inference. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 1937–1945, 2026. 2
- [14]Yue Liu, Shanlin Xiao, Bo Li, and Zhiyi Yu. Sparsespikformer: A co-design framework for token and weight pruning in spiking transformer. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 6410–6414. IEEE, 2024. 7arxiv.org/abs/2311.08806
- [15]Jaehyeon Moon, Dohyung Kim, Junyong Cheon, and Bumsub Ham. Instance-aware group quantization for vision transformers. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 16132–16141, 2024. 2, 13arxiv.org/abs/2404.00928
- [16]Markus Nagel, Rana Ali Amjad, Mart Van Baalen, Christos Louizos, and Tijmen Blankevoort. Up or down? adaptive rounding for post-training quantization. In International conference on machine learning, pages 7197–7206. PMLR, 2020. 2arxiv.org/abs/2004.10568
- [17]Wachirawit Ponghiran and Kaushik Roy. Spiking neural networks with improved inherent recurrence dynamics for sequential learning. In Proceedings of the AAAI conference on artificial intelligence, pages 8001–8008, 2022. 1, 2
- [18]Rachmad Vidya Wicaksana Putra, Saad Iftikhar, and Muhammad Shafique. Qsvit: A methodology for quantizing spiking vision transformers. In 2025 International Joint Conference on Neural Networks (IJCNN), pages 1–8. IEEE, 2025. 3DOI
- [19]Rachmad Vidya Wicaksana Putra, Saad Iftikhar, and Muhammad Shafique. Aq4svit: An automated quantization framework with search gating policy for compressing spiking vision transformers. arXiv preprint arXiv:2606.15523, 2026. 3
- [20]Xuerui Qiu, Malu Zhang, Jieyuan Zhang, Wenjie Wei, Honglin Cao, Junsheng Guo, Rui-Jie Zhu, Yimeng Shan, Yang Yang, and Haizhou Li. Quantized spike-driven transformer. arXiv preprint arXiv:2501.13492, 2025. 2, 7, 13arxiv.org/abs/2501.13492
- [21]Yimeng Shan, Zhenbang Ren, Haodi Wu, Wenjie Wei, Rui-Jie Zhu, Shuai Wang, Dehao Zhang, Yichen Xiao, Jieyuan Zhang, Kexin Shi, et al. SDtrack: A baseline for event-based tracking via spiking neural networks. arXiv preprint arXiv:2503.08703, 2025. 1, 2, 6, 12, 13arxiv.org/abs/2503.08703
- [22]Xinyu Shi, Zecheng Hao, and Zhaofei Yu. Spikingresformer: Bridging resnet and vision transformer in spiking neural networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 5610–5619, 2024. 2, 7arxiv.org/abs/2403.14302
- [23]Shuai Wang, Dehao Zhang, Ammar Belatreche, Yichen Xiao, Yu Liang, Yimeng Shan, Qian Sun, Enqi Zhang, and Malu Zhang. Spiking vision transformer with saccadic attention. In The 13th International Conference on Learning Representations, pages 72872–72893. International Conference on Learning Representations (ICLR), 2025. 7arxiv.org/abs/2502.12677
- [24]Wenjie Wei, Yu Liang, Ammar Belatreche, Yichen Xiao, Honglin Cao, Zhenbang Ren, Guoqing Wang, Malu Zhang, and Yang Yang. Q-snns: Quantized spiking neural networks. In Proceedings of the 32nd ACM international conference on multimedia, pages 8441–8450, 2024. 2arxiv.org/abs/2406.13672
- [25]Wenjie Wei, Xiaolong Zhou, Malu Zhang, Ammar Belatreche, Qian Sun, Yimeng Shan, Dehao Zhang, Zijian Zhou, Zeyu Ma, Yang Yang, et al. Tp-spikformer: Token pruned spiking transformer. arXiv preprint arXiv:2603.00527, 2026. 1, 2, 6, 7, 13arxiv.org/abs/2603.00527
- [26]Xing Wei, Yifan Bai, Yongchao Zheng, Dahu Shi, and Yihong Gong. Autoregressive visual tracking. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9697–9706, 2023. 6DOI
- [27]Zhuguanyu Wu, Jiaxin Chen, Hanwen Zhong, Di Huang, and Yunhong Wang. Adalog: Post-training quantization for vision transformers with adaptive logarithm quantizer. In European Conference on Computer Vision, pages 411–427. Springer, 2024. 2, 13
- [28]Zhuguanyu Wu, Shihe Wang, Jiayi Zhang, Jiaxin Chen, and Yunhong Wang. Gma-q: Post-training quantization for vision transformers by fisher information matrix approximation. In Proceedings of the Computer Vision and Pattern Recognition Conference, pages 14891–14900, 2025. 1, 2, 13
- [29]Hui Xie, Tong Shi, Haotong Qin, Aishan Liu, Xiaolee Liu, and Jinyang Guo. Ptq4snn: Membrane-aware post-training quantization for spiking neural networks. arXiv preprint arXiv:2608.07066, 2026. 3, 7, 12arxiv.org/abs/2608.07066
- [30]Bin Yan, Houwen Peng, Jianlong Fu, Dong Wang, and Huchuan Lu. Learning spatio-temporal transformer for visual tracking. In Proceedings of the IEEE/CVF international conference on computer vision, pages 10448–10457, 2021. 6arxiv.org/abs/2103.17154
- [31]Lianwei Yang, Haishong Gong, Haokun Lin, Yichen Wu, Zhenan Sun, and Qingyi Gu. Dopq-vit: Towards distribution-friendly and outlier-aware post-training quantization for vision transformers. arXiv preprint arXiv:2408.03291, 2024. 2, 13arxiv.org/abs/2408.03291
- [32]Man Yao, Jiakui Hu, Zhaokun Zhou, Li Yuan, Yonghong Tian, Bo Xu, and Guoqi Li. Spike-driven transformer. Advances in neural information processing systems, 36:64043–64058, 2023. 1, 2, 7, 12arxiv.org/abs/2307.01694
- [33]Man Yao, JiaKui Hu, Tianxiang Hu, Yifan Xu, Zhaokun Zhou, Yonghong Tian, Bo Xu, and Guoqi Li. Spike-driven transformer v2: Meta spiking neural network architecture inspiring the design of next-generation neuromorphic chips. arXiv preprint arXiv:2404.03663, 2024. 2, 7arxiv.org/abs/2404.03663
- [34]Man Yao, Xuetian Qiu, Tianxiang Hu, Jiakui Hu, Yuhong Chou, Keyu Tian, Jianxing Liao, Luziwei Leng, Bo Xu, and Guoqi Li. Scaling spike-driven transformer with efficient spike firing approximation training. IEEE Transactions on Pattern Analysis and Machine Intelligence, 47(4):2973–2990, 2025. 1, 2, 3, 6, 7, 12DOI
- [35]Botao Ye, Hong Chang, Bingpeng Ma, Shiguang Shan, and Xilin Chen. Joint feature learning and relation modeling for tracking: A one-stream framework. In European conference on computer vision, pages 341–357. Springer, 2022. 6arxiv.org/abs/2203.11991
- [36]Zhihang Yuan, Chenhao Xue, Yiqi Chen, Qiang Wu, and Guangyu Sun. Ptq4vit: Post-training quantization for vision transformers with twin uniform quantization. In European conference on computer vision, pages 191–207. Springer, 2022. 2, 13arxiv.org/abs/2111.12293
- [37]Jiqing Zhang, Bo Dong, Haiwei Zhang, Jianchuan Ding, Felix Heide, Baocai Yin, and Xin Yang. Spiking transformers for event-based single object tracking. In Proceedings of the IEEE/CVF conference on Computer Vision and Pattern Recognition, pages 8801–8810, 2022. 6DOI
- [38]Jiqing Zhang, Malu Zhang, Yuanchen Wang, Qianhui Liu, Baocai Yin, Haizhou Li, and Xin Yang. Spiking neural networks with adaptive membrane time constant for event-based tracking. IEEE Transactions on Image Processing, 34:1009–1021, 2025. 6DOI
- [39]Yaozong Zheng, Bineng Zhong, Qihua Liang, Zhiyi Mo, Shengping Zhang, and Xianxian Li. Odtrack: Online dense temporal token learning for visual tracking. In Proceedings of the AAAI conference on artificial intelligence, pages 7588–7596, 2024. 6
- [40]Chenlin Zhou, Han Zhang, Zhaokun Zhou, Liutao Yu, Liwei Huang, Xiaopeng Fan, Li Yuan, Zhengyu Ma, Huihui Zhou, and Yonghong Tian. Qkformer: Hierarchical spiking transformer using qk attention. Advances in Neural Information Processing Systems, 37:13074–13098, 2024. 2arxiv.org/abs/2403.16552
- [41]Chenlin Zhou, Liutao Yu, Zhaokun Zhou, Han Zhang, Jiqi Wang, Huihui Zhou, Zhengyu Ma, and Yonghong Tian. Spikingformer: A key foundation model for spiking neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 2236–2244, 2026. 7
- [42]Zhaokun Zhou, Yuesheng Zhu, Chao He, Yaowei Wang, Shuieng Yan, Yonghong Tian, and Li Yuan. Spikingformer: When spiking neural network meets transformer. arXiv preprint arXiv:2209.15425, 2022. 2, 7arxiv.org/abs/2209.15425
- [43]Zhengyang Zhuge, Peisong Wang, Xinting Yao, and Jian Cheng. Towards efficient spiking transformer: a token sparsification framework for training and inference acceleration. In Forty-first International Conference on Machine Learning, 2024. 7



