Manuscript Offprint

arXiv:2608.24758

RACE: Scalable Statistical Estimation of Functional Consistency in LLM Neurons

Runyu Wang, Bo Liu, Xiaxin Zhang, Yu Han, Jiawei Cao, Xiaoye Zhang, Zhe Zhang, Yifan Yang, Peng Ping

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Discovering stable neuron behavior across entire domains remains a challenge in mechanistic interpretability. Existing methods often rely on instance-level point estimates or computationally expensive procedures, which either obscure population-level variability or limit scalable domain-wide analysis. We present RACE (Residual Alignment for Consistency Estimation), a forward-pass statistical framework that evaluates the domain-wide functional consistency of Transformer neurons. Compared with gradient-based point estimates, RACE produces neuron rankings that yield more domain-specific effects under perturbation. Token-distribution shifts support the connection between the selected neurons and the target domain, while scoring requires roughly one-hundredth of the computational overhead of the gradient-based methods. Code is available at https://github.com/Nexround/RACE.

1 Introduction

Recent advances in mechanistic interpretability have improved our understanding of Transformer-based Large Language Models (LLMs) (Zhao et al., 2024; Rai et al., 2024). Three dominant approaches have emerged: causal tracing and knowledge localization techniques that identify critical model pathways (Dai et al., 2022; Meng et al., 2022), gradient-based attribution methods that quantify parameter importance (Sundararajan et al., 2017; Achitbat et al., 2024), and sparse autoencoders that extract interpretable neuron activations (Bricken et al., 2023; Shu et al., 2025).

While these methods excel at providing instance-level explanations, they face a limitation: many real-world applications, including model capability auditing, domain-specific pruning, and behavioral steering, demand population-level characterizations of model components. Specifically, these

Figure

Figure 1: Overview of Residual-Direction Alignment (RDA), the per-observation evidence stage of RACE. RDA decomposes each module update into neuron writes and projects them onto the normalized update direction, yielding signed evidence em,j(t)e_{m,j}^{(t)}. RACE aggregates this evidence across observations to estimate functional consistency.

tasks require rankings of task-relevant neurons that remain consistent across diverse inputs.

Recent work has attempted to bridge this gap through task-neuron mapping strategies: causal gradient variation localizes neurons that selectively affect target tasks (Song et al., 2024), while gradient attribution links task-specific neuron overlap to cross-task generalization (Leng and Xiong, 2025). However, existing pipelines suffer from two constraints: computational inefficiency stems from iterative gradient calculations and intervention operations, creating prohibitive overhead. Meanwhile, statistical oversimplification emerges when aggregating neuron contributions into task-level averages, which obscures sample-to-sample variation patterns.

To overcome these limitations, we draw upon two empirical observations: specific LLM capabilities rely on sparse subsets of neurons (Frankle

∗^{*}Corresponding author.

and Carbin, 2019; Frantar and Alistarh, 2023), and these neurons respond uniquely to semantically coherent inputs (Voita et al., 2024; Huang et al., 2025). Since neuron activations directly modulate the residual stream, we hypothesize that during the forward pass, neurons serving consistent domain-specific functions will deposit contribution distributions over this stream that differ from those of non-domain-specific neurons in a statistically significant manner.

Accordingly, we introduce RACE (Residual Alignment for Consistency Estimation), a statistical estimation framework that scores every neuron at every layer for functional consistency with respect to a target-domain observation set ( §2.1§2.1). RACE consists of two stages: (1) decomposing each module's residual stream update into per-neuron contributions and evaluating their alignment with the module's output direction via Residual-Direction Alignment (RDA) at forward-pass cost; and (2) distilling noisy per-observation signals into posterior distributions over each neuron's mean alignment and variance through Bayesian aggregation.

We evaluate RACE on 4B–32B LLMs across code generation, mathematical reasoning, and fine-grained behavioral control. Targeted suppression shows RACE selectively disrupts target capabilities while preserving non-target behaviors. Empirical results confirm RACE’s computational efficiency and demonstrate its superiority over gradient-based baselines. Ablation studies validate the contribution of each RACE component.

References (43)