[Paper Review] Exploring the Limits of Domain-Adaptive Training for Detoxifying Large-Scale Language Models
The paper studies detoxifying large language models via domain-adaptive training, introducing Self-Generation Enabled domain-Adaptive Training (SGEAT) and comparing adapter- and prefix-tuning to whole-model adaptation across sizes.
Pre-trained language models (LMs) are shown to easily generate toxic language. In this work, we systematically explore domain-adaptive training to reduce the toxicity of language models. We conduct this study on three dimensions: training corpus, model size, and parameter efficiency. For the training corpus, we propose to leverage the generative power of LMs and generate nontoxic datasets for domain-adaptive training, which mitigates the exposure bias and is shown to be more data-efficient than using a curated pre-training corpus. We demonstrate that the self-generation method consistently outperforms the existing baselines across various model sizes on both automatic and human evaluations, even when it uses a 1/3 smaller training corpus. We then comprehensively study detoxifying LMs with parameter sizes ranging from 126M up to 530B (3x larger than GPT-3), a scale that has never been studied before. We find that i) large LMs have similar toxicity levels as smaller ones given the same pre-training corpus, and ii) large LMs require more endeavor to detoxify. We also explore parameter-efficient training methods for detoxification. We demonstrate that adding and training adapter-only layers in LMs not only saves a lot of parameters but also achieves a better trade-off between toxicity and perplexity than whole model adaptation for the large-scale models.
Motivation & Objective
- Investigate how detoxification can be achieved with domain-adaptive training across training corpora, model sizes, and parameter efficiencies.
- Show that self-generated data can outperform curated pre-training data for detoxification with better data efficiency.
- Assess the trade-offs between toxicity reduction and language model quality (perplexity and downstream utility).
- Evaluate parameter-efficient methods (adapter and prefix-tuning) relative to full-model adaptation for detoxification.
Proposed method
- Propose Self-Generation Enabled domain-Adaptive Training (SGEAT) that uses self-generated prompts to create a non-toxic corpus.
- Generate up to 1,000 tokens per document with nucleus sampling (p=0.9, temperature=1) and truncate at end-of-document.
- Filter generated data with Perspective API to retain about 50% of the text for training.
- Fine-tune pre-trained LMs on the curated non-toxic corpus using standard log-likelihood loss.
- Compare SGEAT variants (standard, heuristic, augmented) against DAPT and Jigsaw baselines, plus decoding-time methods.
- Evaluate toxicity with Perspective API (Expected Maximum Toxicity, Toxicity Probability) and LM quality via perplexity and zero-shot utility across tasks.
Experimental results
Research questions
- RQ1How does the detoxification effectiveness of domain-adaptive training scale with model size (from 126M to 530B parameters)?
- RQ2What is the impact of using self-generated versus pre-training corpus data on detoxification efficiency and LM quality?
- RQ3Do parameter-efficient methods (adapter, prefix-tuning) offer a favorable trade-off for detoxification on large LMs compared to full-model adaptation?
- RQ4Can combining SGEAT with decoding-time methods yield superior toxicity reduction without severely harming perplexity or task performance?
Key findings
- Self-generated data via SGEAT consistently outperforms baselines across model sizes, even with a one-third smaller training corpus.
- Large LMs exhibit similar toxicity levels to smaller models when pre-training data is held constant, suggesting toxicity derives from data rather than model size.
- Detoxification effectiveness decays as model size increases, requiring more data or training to achieve similar toxicity reductions on larger models.
- Adapter-based domain-adaptive training provides a better toxicity-perplexity-utility trade-off than full-model adaptation for large LMs, especially as model size grows.
- Prefix-tuning is less effective for detoxification and offers weaker control over perplexity and downstream utility compared to adapters.
- SGEAT augmented with decoding-time methods can achieve the lowest toxicity among evaluated methods, while preserving LM quality and utility.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.