HEAPr

February 20, 2026 ยท View on GitHub

ICLR 2026 License: CC BY-NC 4.0 Python Version

Official implementation of the ICLR 2026 paper: HEAPr: Hessian-based Efficient Atomic Expert Pruning in Output Space


Overview

HEAPr is a structured pruning method for Mixture-of-Experts models that prunes at a finer granularity than experts by decomposing each expert into atomic experts. This enables:

  1. Flexible pruning granularity: structured pruning at the atomic-expert level, yielding practical speedups across different hardware.
  2. Second-order pruning criterion: inspired by Optimal Brain Surgery, leveraging a second-order information matrix to achieve state-of-the-art performance under pruning.
  3. Low calibration cost: pruning can be completed with two forward passes + one backward pass on a small calibration set.
HEAPr overview

Installation

conda create -n heapr python=3.10 -y
conda activate heapr
pip install -r requirements.txt

Usage

--model_path can be set to:

  • deepseek-ai/deepseek-moe-16b-base
  • Qwen/Qwen1.5-MoE-A2.7B-Chat
  • Qwen/Qwen3-30B-A3B
  • Qwen/Qwen2-57B-A14B

Example command:

python main.py \
  --model_path "deepseek-ai/deepseek-moe-16b-base" \
  --compress_ratio 0.2 \
  --cali_data "wiki" \
  --cali_nsamples 128 \
  --cali_batch_size 8 \
  --eval_batch_size 128 \
  --zero_shot \
  --tasks openbookqa arc_easy winogrande hellaswag arc_challenge piqa mathqa \
  --log_dir "./log_pruning"

Main Results

Comparison of perplexity on WikiText2 / PTB and average accuracy across selected zero-shot tasks.

ModelPruning RatioWiki (ppl)PTB (ppl)OBQAARC-eWinoGHellaSARC-cPIQAMathQAAverage
DeepSeekMoE-16B-Base20%6.549.8833.4075.5970.5657.7044.0378.5131.1655.85
40%6.8010.8631.2073.4069.6953.6141.9876.7129.4553.72
Qwen1.5-MoE-A2.7B-Chat25%8.3114.1230.4068.4366.3055.2237.8876.0635.0152.76
50%9.2417.5826.0063.1364.0146.1734.1369.8033.7448.14
Qwen3-30B-A3B25%9.1016.8033.4076.0169.7754.6749.3277.3749.4158.56
50%11.2226.2923.6067.2161.8038.1938.8266.5935.8847.44
Qwen2-57B-A14B40%5.929.3433.2075.2574.4362.8846.3380.7438.4958.76

Citation

If you use this codebase or results in your research or product, please cite:

@inproceedings{
  li2026heapr,
  title={{HEAP}r: Hessian-based Efficient Atomic Expert Pruning in Output Space},
  author={Ke Li and Zheng Yang and Zhongbin Zhou and Xuefeng and Zhonglin Jiang and Wenxiao Wang},
  booktitle={The Fourteenth International Conference on Learning Representations},
  year={2026},
  url={https://openreview.net/forum?id=JAbMgS7gl6}
}

License

This project is licensed under CC BY-NC 4.0.