Introduction
Vision Transformers (ViTs) have revolutionized computer vision, challenging the long-standing dominance of Convolutional Neural Networks (CNNs). By leveraging self-attention mechanisms, models like ViT, DeiT, and Swin Transformer have achieved remarkable results in classification and detection tasks. However, this performance comes with a hefty price tag: massive parameter counts and high computational overhead.
To deploy these heavy models on edge devices—like smartphones or embedded systems—we need to compress them. The most popular method for this is Post-Training Quantization (PTQ). PTQ converts high-precision floating-point weights (32-bit) into low-precision integers (like 4-bit or 8-bit) without requiring a full, expensive retraining of the model.
However, ViTs are notoriously difficult to quantize. Their activation distributions are irregular, and standard quantization methods often destroy their accuracy, especially at very low bit-widths (like 3-bit or 4-bit).
In this article, we dive into a research paper titled “FIMA-Q: Post-Training Quantization for Vision Transformers by Fisher Information Matrix Approximation.” This paper identifies a fundamental mathematical flaw in how previous methods estimated “parameter importance” and proposes a sophisticated correction called DPLR-FIM (Diagonal Plus Low-Rank Fisher Information Matrix).
If you are interested in how advanced math can directly translate to better, faster, and smaller AI models, this deep dive is for you.
Background: The Challenge of Quantization
Before we get into the solution, we need to understand the problem. When we quantize a neural network, we are essentially adding noise to the weights. We round precise numbers to the nearest integer. Some weights are very robust—you can change them quite a bit without hurting the model’s accuracy. Others are extremely sensitive—even a tiny change can ruin the prediction.
To perform effective quantization, we need a metric to tell us which weights are sensitive and which are not. This is usually done by looking at the Hessian Matrix.
The Hessian and the Fisher Information Matrix (FIM)
The Hessian Matrix represents the second-order derivatives of the loss function. In simple terms, it maps the “curvature” of the loss landscape.
- High curvature (High Hessian value): The loss function is steep. A small change in weights causes a massive jump in error. These weights must be preserved carefully.
- Low curvature (Low Hessian value): The loss function is flat. We can quantize these weights aggressively without much penalty.
Because calculating the exact Hessian for millions of parameters is computationally impossible, researchers use a proxy: the Fisher Information Matrix (FIM).
Current state-of-the-art methods, such as BRECQ, use the FIM to approximate the Hessian. However, to save memory, they make a massive simplification: they assume the matrix is diagonal. They ignore how different parameters interact with each other (the off-diagonal elements) and approximate the diagonal values using squared gradients.
The authors of FIMA-Q argue that this simplification is where existing methods fail.
The Core Method: FIMA-Q
The FIMA-Q paper makes two major contributions that change how we approach this problem:
- Visual Proof of Information Loss: They show that the off-diagonal elements in the Fisher Information Matrix are not negligible.
- Mathematical Correction: They prove that the relationship between the FIM and the loss gradient is linear, not squared (when using KL divergence).
Visualizing the Problem
Let’s look at the actual structure of the Fisher Information Matrix for a class token in a Vision Transformer.

- (a) Complete FIM: This is the ground truth. Notice the diagonal line is bright (high values), but there are also significant purple/green patches off the diagonal. These represent the correlations between different parameters.
- (b) Diagonal FIM: This is what previous methods use. It captures the diagonal line but treats everything else as zero (black). It misses all the inter-parameter correlations.
- (c) Low-Rank FIM: This captures global structure but misses the sharp diagonal details.
- (d) DPLR-FIM (Proposed): This is the FIMA-Q solution. It combines the Diagonal and Low-Rank structures. Notice how closely heatmap (d) resembles the ground truth in heatmap (a).
The authors realized that by ignoring the off-diagonal elements (as seen in b), standard PTQ methods were throwing away critical information needed to preserve accuracy at low bit-widths.
The Framework
The proposed method, FIMA-Q, operates block-by-block through the Vision Transformer. It quantizes a block, measures the error, and reconstructs the weights to minimize that error using their new FIM approximation.

As shown in Figure 2, the process involves:
- Computing the difference between the full-precision output and the quantized output.
- Calculating the KL Divergence (a measure of difference between probability distributions).
- Using the gradients from the KL divergence to construct the DPLR-FIM (Diagonal Plus Low-Rank) approximation.
- Optimizing the quantization parameters using this improved loss landscape.
The Mathematical Breakthrough
This is the most technical but most important part of the paper. Standard methods assume the optimization objective looks like this:

Here, \(\mathbf{H}\) is the Hessian. Previous works approximated this Hessian using squared gradients of the task loss:

The FIMA-Q authors prove that this squared assumption is inaccurate when using KL Divergence as the proxy for task loss. They derived that the Fisher Information Matrix (\(\mathbf{F}\)) is actually linearly proportional to the gradient of the KL divergence.
Mathematically, if we define the KL divergence loss as \(\mathcal{L}_{KL}\), the relationship is:

This linear relationship allows them to construct a much more accurate approximation of the FIM without the computational cost of a full Hessian.
The DPLR Approximation Strategy
To capture both the sharp local sensitivity (diagonal) and the global parameter interactions (off-diagonal), the authors propose the Diagonal Plus Low-Rank (DPLR) approximation.
1. The Diagonal Component They first compute the diagonal component using the linear relationship derived above. This captures the individual sensitivity of each parameter.

2. The Low-Rank Component To capture the off-diagonal correlations (the “purple patches” in the heatmap), they use a rank-\(k\) approximation. This allows them to store the interaction data efficiently without computing the full \(N \times N\) matrix.

3. The Combination (DPLR) Finally, they combine these two components using a weighting factor \(\alpha\). This results in a loss function that accounts for both individual weight sensitivity and group interactions.

By optimizing this \(\mathcal{L}_{DPLR}\) loss, the algorithm adjusts the quantized weights to minimize the damage done to the model’s accuracy.
Experiments & Results
The theory sounds solid, but does it work? The researchers tested FIMA-Q on ImageNet classification and COCO object detection using various architectures (ViT, DeiT, Swin).
ImageNet Classification
The most impressive results appear in the aggressive 3-bit quantization setting. 3-bit quantization is extremely difficult because it leaves very little room for error.

Key Takeaways from Table 1:
- 3-bit Performance: Look at the ViT-S column under the 3/3 bit-width section.
- PTQ4ViT: 0.10% accuracy (The model completely broke).
- QDrop: 41.05% accuracy.
- FIMA-Q (Ours): 64.09% accuracy.
- Consistency: Across ViT, DeiT, and Swin transformers, FIMA-Q consistently outperforms competitors.
- Hardware Friendliness: Note the “SQ” column. Many competitors require “Specific Quantizers” (SQ = \(\checkmark\)), which are complex to implement on hardware. FIMA-Q uses standard uniform quantizers (SQ = \(\times\)), making it much easier to deploy on real chips, yet it still achieves higher accuracy.
Object Detection on COCO
The authors also extended their method to object detection using Mask R-CNN and Cascade R-CNN.

In Table 2, under the 4-bit (W4/A4) setting, FIMA-Q achieves the highest Average Precision (AP) scores, beating methods that rely on complex, specialized quantizers. For example, on Swin-S with Cascade Mask R-CNN, FIMA-Q reaches 50.4 AP, surpassing the previous best of 50.3 AP while being more hardware-efficient.
Ablation Study: Why DPLR?
Is it the Diagonal part or the Low-Rank part that helps? The authors ran an ablation study to isolate the contributions of each component.

Table 3 reveals:
- BRECQ-FIM (Old Way): Performing poorly (e.g., 14.65% on ViT-S 3-bit) confirms that the old “squared gradient” approximation is flawed for ViTs.
- Diag-FIM (New Way): Using the new linear relationship improves accuracy to 60.02%.
- DPLR-FIM (Combined): Combining Diagonal and Low-Rank pushes accuracy to 64.09%. This confirms that capturing those off-diagonal correlations is essential for recovering model performance.
Sensitivity to Rank
How complex does the Low-Rank approximation need to be? The parameter \(k\) determines the rank.

Figure 3 shows that accuracy generally improves as the rank \(k\) increases, but it plateaus quickly. A relatively small rank (around \(k=15\)) captures enough information to maximize performance without causing memory issues.
Conclusion and Implications
The FIMA-Q paper highlights a crucial lesson in deep learning research: assumptions matter. For years, quantization methods relied on a Hessian approximation that assumed a squared relationship between gradients and parameter importance. While this worked reasonably well for CNNs, the unique distribution and sensitivity of Vision Transformers exposed the cracks in that theory.
By revisiting the mathematical foundations of the Fisher Information Matrix and proving its linear relationship with the KL divergence gradient, the authors of FIMA-Q unlocked a more accurate way to measure sensitivity.
Key Takeaways:
- Better Math, Better Models: FIMA-Q outperforms state-of-the-art methods by up to 23% in accuracy on 3-bit ViTs.
- Hardware Efficient: It achieves these results using standard uniform quantization, avoiding the need for complex, custom hardware logic.
- Global Awareness: The DPLR approximation proves that we cannot treat weights in isolation; understanding their correlations (off-diagonal elements) is key to extreme compression.
For students and practitioners, FIMA-Q demonstrates that even “established” techniques like PTQ have room for fundamental improvements. As we push for smaller, faster AI on edge devices, methods like this will be the bridge that allows powerful Transformers to leave the data center and enter our pockets.
](https://deep-paper.org/en/paper/2506.11543/images/cover.png)