Removing Spurious Correlation from Neural Network Interpretations
Milad Fotouhi, Mohammad Taha Bahadori, Oluwaseyi Feyisetan, Payman Arabshahi, David Heckerman
TL;DR
This work tackles spurious correlations in neural network interpretation caused by topic confounding when attributing toxicity to internal units. It introduces a causal mediation framework with an entropy-balancing estimator to compute the natural indirect effect of internal units on harmful outputs, conditioning on topic, and demonstrates a single forward-pass approach that avoids retraining. Empirically, the method applied to two LLMs on RealToxicityPrompts shows that correcting for topic makes toxicity attribution more widespread across units, challenging the notion of localized toxicity. The approach offers a principled, generalizable way to debias interpretability analyses and can extend to other confounders beyond topic, enhancing safety and transparency in language models.
Abstract
The existing algorithms for identification of neurons responsible for undesired and harmful behaviors do not consider the effects of confounders such as topic of the conversation. In this work, we show that confounders can create spurious correlations and propose a new causal mediation approach that controls the impact of the topic. In experiments with two large language models, we study the localization hypothesis and show that adjusting for the effect of conversation topic, toxicity becomes less localized.
