← Latest papers
💻 computer science

CLHA: Cross-Layer Hessian Aggregation for Quantizing Weight-Shared Mixture-of-Experts Transformers

This paper introduces CLHA, a cross-layer Hessian aggregation method for post-training quantization of weight-shared Mixture-of-Experts transformers that minimizes total reconstruction error by combining Hessian statistics across shared layers, significantly outperforming existing per-layer calibration approaches while also addressing critical implementation pitfalls in Hessian estimation.

Original authors: Kunal Dhanda

Published 2026-06-25
📖 5 min read🧠 Deep dive

Original authors: Kunal Dhanda

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Picture: Shrinking a Giant Library

Imagine a massive library (a Large Language Model) that is too big to fit on a small shelf. To make it fit, we need to "compress" the books. In the world of AI, this compression is called quantization. It's like taking a high-definition photo and shrinking it to a thumbnail. If you do it poorly, the picture becomes blurry and unrecognizable.

This paper tackles a specific type of library called a Mixture-of-Experts (MoE) model. These libraries are special because they don't read every book for every question; they have "experts" (specialized sections) that only open when needed.

Recently, engineers invented a clever trick called Cross-Layer Weight Sharing (CLWS). Imagine two different floors in the library (Layer A and Layer B) that use the exact same set of reference books for their experts. This saves a huge amount of space because you don't need to buy two copies of the same books.

The Problem:
When people tried to shrink (quantize) these libraries, they made a mistake. They treated the shared books as if they only belonged to the first floor. They looked at the questions asked on Floor A, decided how to shrink the books, and applied that shrinkage to the books on Floor B as well.

But here's the catch: The people asking questions on Floor A are different from those on Floor B. The "vibe" of the questions changes as you go up the stairs. By only looking at Floor A, the shrinkage plan was wrong for Floor B, causing the library to lose its ability to answer questions correctly.

The Solution: CLHA (The "Double-Check" System)

The authors propose a new method called CLHA (Cross-Layer Hessian Aggregation).

The Analogy: The Tailor and the Twin Suits
Imagine a tailor making suits for a pair of identical twins.

  • The Old Way (PLIC): The tailor measures Twin A, cuts the fabric, and assumes Twin B is exactly the same size. But Twin B has slightly different posture. The suit fits Twin A perfectly but is tight on Twin B.
  • The CLHA Way: The tailor measures both twins. They take the measurements from Twin A and Twin B, average them out (giving more weight to whoever stands in the room more often), and create a "super-suit" pattern that fits both twins perfectly.

In technical terms, the paper says you shouldn't just look at the data from one layer. You must combine the "sensitivity" (mathematically called the Hessian) of both layers. This creates a combined map that tells you exactly how to shrink the shared weights so they work well for both floors of the library.

The Special Upgrade: CLHA-MP

The paper also introduces a "Mixed Precision" version called CLHA-MP.

The Analogy: The VIP Lounge
In these libraries, there are two types of experts:

  1. Routed Experts: They only open their doors for specific, rare questions.
  2. Shared Experts: They are "always open" and handle the most common, everyday questions.

Because the "Shared Experts" are used so much more often, they are more sensitive to errors. If you shrink them too much, the whole library breaks.

  • The Fix: CLHA-MP gives these "always-open" experts a little extra space (one extra bit of precision). It's like giving the VIP lounge a slightly wider door while keeping the regular doors narrow. This tiny extra space makes a huge difference in how well the library works.

The Hidden Trap: The "Ghost" Hook

The authors also found a sneaky bug in the software tools (PyTorch) used to build these models.
The Analogy: Imagine two people trying to write in the same notebook at the same time. If they both use the same pen without a label, their notes get mixed up, and you can't tell who wrote what.
In the code, when two layers share the same expert, the software's "forward hooks" (tools that track activity) would mix the data from both layers together, corrupting the measurements. The authors fixed this by creating a "layer-aware" system that labels the notes so the tailor knows exactly which twin is which.

What Did They Prove?

They tested this on a small model trained on a dataset called WikiText-2.

  • At 2-bit compression (very small size): The old method (PLIC) made the model very confused (high "perplexity").
  • The CLHA method: Made the model significantly smarter (4.3% to 5.4% better).
  • The CLHA-MP method: Made it even smarter (18.6% better) by giving the "always-open" experts that extra bit of space.

They also ran a test where they made the difference between the two floors (the layers) more extreme. The old method got worse and worse, but the new method stayed stable, proving that their "double-check" system is essential when the two floors are very different from each other.

Summary

  • The Issue: Sharing weights between layers saves space, but standard compression tools ignore the second layer, causing errors.
  • The Fix: Combine the data from both layers to create a better compression plan (CLHA).
  • The Bonus: Give the most-used experts a tiny bit more precision (CLHA-MP).
  • The Result: Much smarter, smaller models that don't lose their "brainpower" when shrunk down.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →