🤖 AI Summary
This work addresses the propensity of large language models to generate toxic content, a challenge exacerbated by limited understanding of their internal mechanisms. By analyzing activation differences between toxic and neutral prompts, the study identifies—without any model retraining—that toxicity primarily originates from specific neurons in early MLP layers. Leveraging the Meow2X and TRNE frameworks, the authors employ activation difference analysis, inference-time scaling, and rank-one weight editing to precisely suppress toxic outputs. Evaluated across five models, two benchmarks, and 90 configurations, the approach significantly reduces toxicity while preserving language modeling performance. Furthermore, the research demonstrates that reliance on a single toxicity evaluator systematically underestimates risk, thereby underscoring the necessity of multi-evaluator safety assessments.
📝 Abstract
Large language models frequently generate toxic, hateful, or harmful content, yet existing mitigation methods rely on costly retraining or output-level filtering with no mechanistic insight into where toxicity originates internally. We introduce Meow2X and TRNE, two complementary retraining-free frameworks that localize toxicity to specific layers and neurons by analyzing activation differentials between toxic and neutral prompts, then suppress them via inference-time scaling or minimal rank-one weight edits -- without any gradient descent. Evaluations across five LMs, two benchmarks, and 90 configurations using dual safety evaluators demonstrate consistent toxicity reduction while preserving language modeling quality. Our analysis reveals that toxicity is disproportionately encoded in early MLP layers, varies across architectures, and is systematically underestimated by single-evaluator setups -- underscoring the need for multi-evaluator safety assessment. By bridging mechanistic interpretability with practical detoxification, our framework offers a principled path toward safer, more transparent language models.