PAHQ: Accelerating Automated Circuit Discovery through Mixed-Precision Inference Optimization

Xinhai Wang, Shu Yang, Liangyu Wang, Lin Zhang, Huanyi Xie +2 more
10/27/2025
cs.LGcs.AI

Official code: 626619403/PAHQ (0 stars, MIT, last commit 2026-04-07).

Abstract

Circuit discovery, which involves identifying sparse and task-relevant subnetworks in pre-trained language models, is a cornerstone of mechanistic interpretability. Automated Circuit Discovery (ACDC) has emerged as a pivotal methodology in circuit discovery, but its application to large language models is severely limited by computational inefficiency and prohibitively high memory requirements. Although several accelerated approaches have been proposed, they primarily rely on linear approximations to ACDC, which significantly compromises analytical faithfulness. Our proposed method for accelerating automated circuit discovery, Per Attention Head Quantization (PAHQ), takes a fundamentally different approach by optimizing the efficiency of each individual patching operation. PAHQ leverages a fundamental alignment between activation patching and mixed-precision quantization (MPQ): interpretability analysis through patching essentially performs targeted ablation studies. Therefore, we can maintain high precision exclusively for investigated components while safely reducing precision elsewhere in the network. PAHQ-accelerated ACDC reduces runtime by up to 80\% and memory consumption by up to 30\% compared to unaccelerated ACDC while maintaining faithfulness. Importantly, our method readily integrates with existing edge-based circuit discovery techniques by modifying the attention computation mechanism. This training-free approach provides a practical and novel pathway for accelerating mechanistic interpretability methods. Our code is available at https://github.com/626619403/PAHQ.

View on arXivView PDF

Code Implementations(1)

626619403/PAHQOfficial100%
MIT
00Shell, PythonMay 28, 20256 months agoMIT

Similar Papers

Cite this paper

@article{wang2025pahq,
  title  = {PAHQ: Accelerating Automated Circuit Discovery through Mixed-Precision Inference Optimization},
  author = {Xinhai Wang and Shu Yang and Liangyu Wang and Lin Zhang and Huanyi Xie and Lijie Hu and Di Wang},
  year   = {2025},
  eprint = {2510.23264},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.23264v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.23264.svg)](https://codeofpaper.com/paper/2510.23264)

Discussion