paper-with-me

Papers

Large Language Models can be Strong Self-Detoxifiers

2024-10-04 · Ching-Yun Ko, Pin-Yu Chen, Payel Das, Youssef Mroueh, Soham Dan, Georgios Kollias, Subhajit Chaudhury, Tejaswini Pedapati, Luca Daniel

Reducing the likelihood of generating harmful and toxic output is an essential task when aligning large language models (LLMs). Existing methods mainly rely on training an external reward model (i.e., another language model) or fine-tuning the LLM using self-generated data to influence the outcome. In this paper, we show that LLMs have the capability of self-detoxification without the use of an additional reward model or re-training. We propose \textit{Self-disciplined Autoregressive Sampling (SASA)}, a lightweight controlled decoding algorithm for toxicity reduction of LLMs. SASA leverages the contextual representations from an LLM to learn linear subspaces characterizing toxic v.s. non-toxic output in analytical forms. When auto-completing a response token-by-token, SASA dynamically tracks the margin of the current output to steer the generation away from the toxic subspace, by adjusting the autoregressive sampling strategy. Evaluated on LLMs of different scale and nature, namely Llama-3.1-Instruct (8B), Llama-2 (7B), and GPT2-L models with the RealToxicityPrompts, BOLD, and AttaQ benchmarks, SASA markedly enhances the quality of the generated sentences relative to the original models and attains comparable performance to state-of-the-art detoxification techniques, significantly reducing the toxicity level by only using the LLM's internal representations.

📄 PDF Abstract BibTeX arXiv:2410.03818

Code (0)

등록된 구현이 없습니다.

Tasks

Language Modelling

Methods 이 논문이 사용한 방법론

SASA 설명 없음

Similar Papers 제목 키워드 기반

Small Language Models Need Strong Verifiers to Self-Correct Reasoning

2024-04-26 · Yunxiang Zhang, Muhammad Khalifa, Lajanugen Logeswaran, Jaekyeom Kim 외

Self-correction has emerged as a promising solution to boost the reasoning performance of large language models (LLMs), where LLMs refine their solutions using self-generated critiques that pinpoint the errors. This work…

Math

Self-AMPLIFY: Improving Small Language Models with Self Post Hoc Explanations

2024-02-19 · Milan Bhan, Jean-Noel Vittaut, Nicolas Chesneau, Marie-Jeanne Lesot

Incorporating natural language rationales in the prompt and In-Context Learning (ICL) have led to a significant improvement of Large Language Models (LLMs) performance. However, generating high-quality rationales require…

In-Context Learning

UniSD: Towards a Unified Self-Distillation Framework for Large Language Models

2026-05-07 · Yiqiao Jin, Yiyang Wang, Lucheng Fu, Yijia Xiao 외 arxiv

Self-distillation (SD) offers a promising path for adapting large language models (LLMs) without relying on stronger external teachers. However, SD in autoregressive LLMs remains challenging because self-generated trajec…

Contrastive Learning

An Empirical Study of Counterfactual Self-Explanations in LLMs

2026-09-15 · Giannis Kalyvas, Giorgos Filandrianos, Orfeas Menis Mastromichalakis, Vassilis Lyberatos 외 arxiv

Large language models can easily generate explanations for their own outputs, but such self-explanations are not necessarily faithful to the model's behavior. We study this issue through counterfactual self-explanations,…

Natural Language InferenceSentiment Analysis

Pretraining for Conditional Generation with Pseudo Self Attention

2019-05-21 · Anonymous

Large pretrained language representation models have changed the way researchers approach discriminative natural language understanding tasks, leading to the dominance of approaches that finetune a pretrained model. Howe…

Conditional Text GenerationNatural Language UnderstandingText GenerationTransfer Learning