DSCD: Large Language Model Detoxification with Self-Constrained Decoding

Ming Dong, Jinkui Zhang, Bolong Zheng, Xinhui Tu, Po Hu +1 more
10/15/2025
cs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Detoxification in large language models (LLMs) remains a significant research challenge. Existing decoding detoxification methods are all based on external constraints, which require additional resource overhead and lose generation fluency. This work proposes Detoxification with Self-Constrained Decoding (DSCD), a novel method for LLM detoxification without parameter fine-tuning. DSCD strengthens the inner next-token distribution of the safety layer while weakening that of hallucination and toxic layers during output generation. This effectively diminishes toxicity and enhances output safety. DSCD offers lightweight, high compatibility, and plug-and-play capabilities, readily integrating with existing detoxification methods for further performance improvement. Extensive experiments on representative open-source LLMs and public datasets validate DSCD's effectiveness, demonstrating state-of-the-art (SOTA) performance in both detoxification and generation fluency, with superior efficiency compared to existing methods. These results highlight DSCD's potential as a practical and scalable solution for safer LLM deployments.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{dong2025dscd,
  title  = {DSCD: Large Language Model Detoxification with Self-Constrained Decoding},
  author = {Ming Dong and Jinkui Zhang and Bolong Zheng and Xinhui Tu and Po Hu and Tingting He},
  year   = {2025},
  eprint = {2510.13183},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.13183v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.13183.svg)](https://codeofpaper.com/paper/2510.13183)

Discussion