IF-GUIDE: an influence-function-guided large language model detoxification methodIF-GUIDE: Influence Function-Guided Detoxification of LLMs
The researchers propose IF-GUIDE, a proactive large language model detoxification method that uses influence functions to locate and suppress harmful tokens in training data. The paper first points out that standard influence functions struggle to find harmful training records, then proposes an improved method for measuring token-level attribution from training data to model toxicity, along with a toxic document filtering technique and a learning objective that can be incorporated into pretraining and fine-tuning; the method does not rely on the human preference data typically required by existing alignment methods. The authors report that in pretraining and fine-tuning settings, IF-GUIDE reduces explicit and implicit toxicity by up to 10 times compared with uncensored models, and by up to 3 times compared with baseline alignment methods such as DPO and RAD. The method is computationally efficient and does not require billion-parameter models to compute influence scores; a million-parameter model with 7.5 times fewer parameters can effectively serve as a proxy for identifying harmful data. Code is open-sourced at https://github.com/ztcoalson/IF-Guide。