arXiv AI

Test-Time Detoxification without Training or Learning Anything

arXiv:2602. 02498v2 Announce Type: replace-cross Abstract: Large language models can produce toxic or inappropriate text even for benign inputs, creating risks when deployed at scale.

arXiv AI
Nov 2

LLM Detoxification via Transition-Aware Reward-Guided Representation Sampling

The paper introduces Transition-Aware Reward-Guided Representation Sampling (TARGRS), a test-time detoxification framework for large language models that learns reward guidance over toxicity transitions in latent representation space. TARGRS constructs trajectories from non‑toxic to toxic states, uses toxicity scores along these paths to train a token‑level reward model, and then guides coarse‑to‑fine sampling in the opposite direction to produce detoxified outputs with minimal perturbation. Experiments on ten LLMs and three LVLMs show that TARGRS consistently outperforms existing baselines, reducing toxicity by up to 69.38% on RealToxicityPrompts and up to 64.23% on LVLMs while maintaining near‑original speed and core capabilities.

By Aishan Liu, Yisong Xiao, Xianglong Liu, Yongxin Huang, Siyuan Liang, Zonghao Ying, Yang Qu, Jian Yang, Yaodong Yang, Dacheng Tao
arXiv AI
Oct 28

Follow the Gradient: Tracing Safety Degradation Back to Training Data

The paper introduces SimpleLoRIF, a scalable gradient‑embedding technique that pinpoints fine‑tuning examples whose gradients align with unsafe behavior in large language models. By applying this method, the authors create SafeTulu, a version of Tulu 3 with the 20 % of most unsafe‑aligned examples removed, which reduces GCG attack success by up to 22 % across several LLMs while largely preserving or improving capability. The study also highlights previously under‑studied safety‑degrading data sources such as tool‑execution failures and narrative arithmetic.

By Saket Reddy, Amro Abbas, Anshuman Suri, Ari Morcos, David Schwab, Pratyush Maini
arXiv Computation and Language
Nov 2

Enhancing Safety of Large Language Models via Embedding Space Separation

The paper proposes Embedding Space Separation (ES2), a fine‑tuning technique that increases the distance between harmful and harmless embeddings in large language models. ES2 uses two regularization losses—a embedding anchor loss and a KL‑divergence loss—to preserve the model’s general capabilities while enhancing safety. Experiments show that ES2 effectively defends against various attack methods with only modest performance loss on some tasks.

By Xu Zhao, Xiting Wang, Weiran Shen
arXiv Computation and Language
Oct 19

AMEND: Constraint-Guided Multi-Agent Text Detoxification with Isolated Critics

AMEND is an inference‑time framework for text detoxification that separates detoxification into role‑conditioned proposal generation, isolated multidimensional criticism, and constraint‑first selection. It evaluates diverse candidates with role‑blind critics, enforces strict semantic and fluency feasibility, and ranks them by utility. The lightweight AMEND Lite variant limits the search to a single targeted repair round when residual toxic spans remain, achieving higher joint scores and reducing inference requests by 28.4% compared to unconstrained multi‑round loops.

By Tianyu Wang
arXiv AI
Oct 28

TextCloak: Safeguarding Data from Unauthorized LLM Fine-Tuning via RL-Driven Unlearnable Examples

TextCloak is a reinforcement‑learning driven framework that generates unlearnable examples (UEs) to protect textual data from unauthorized fine‑tuning of large language models (LLMs). It transforms clean text into perturbations that preserve meaning and naturalness while degrading the utility of models trained on them. Experiments on six datasets and nine LLMs show that TextCloak consistently impairs unauthorized fine‑tuning and remains robust across different architectures, training settings, and adaptive attacks.

By Chengshuai Zhao, Pingchuan Ma, Dawei Li, Bohan Jiang, Zhiyuan Yu, Zhen Tan, Huan Liu