Beihang University et al. propose the TARGRS detoxification method (TPAMI 2026): without retraining, it models the trajectory of toxicity evolution and adapts to multimodal large models
TPAMI 2026|北航:大模型“解毒”新思路!不靠重训,看懂毒性演变轨迹,还能直接适配多模态大模型
A joint team from Beihang University, Nanyang Technological University and Peking University proposes an inference-time detoxification method, TARGRS, which can reduce toxicity in large model generations without retraining the model; the paper has been accepted by TPAMI. The method advances step by step along the toxic semantic direction in the model's latent space, expands toxic/non-toxic paired annotations into a continuous trajectory with toxicity scores, trains a token-level reward model, and at inference time samples from coarse to fine to find the representation with the smallest modification that is safe. On 10 large models including the LLaMA, Mistral and Qwen2 series, toxicity on RealToxicityPrompts is reduced by up to 69.38%; LLaMA-30B takes 8.24s to generate 128 tokens, close to the native model's 8.14s, and WikiText-2 perplexity increases by only 0.07 on average. The method can also be directly transferred to multimodal models such as Qwen-VL-Chat and LLaVA-1.5, reducing toxicity by up to 64.23% on the ToViLaG dataset. The paper also notes that the method is a white-box approach and is not suitable for closed-source API models, and that a decrease in toxicity scores does not equal complete safety.