[Paper Review] Quark: Controllable Text Generation with Reinforced Unlearning
Quark introduces Quantized Reward Konditioning, an online-offline framework that unlearns undesirable language-model behaviors by conditioning on reward tokens and using a KL-divergence penalty, outperforming PPO baselines on toxicity, sentiment, and repetition control.
Large-scale language models often learn behaviors that are misaligned with user expectations. Generated text may contain offensive or toxic language, contain significant repetition, or be of a different sentiment than desired by the user. We consider the task of unlearning these misalignments by fine-tuning the language model on signals of what not to do. We introduce Quantized Reward Konditioning (Quark), an algorithm for optimizing a reward function that quantifies an (un)wanted property, while not straying too far from the original model. Quark alternates between (i) collecting samples with the current language model, (ii) sorting them into quantiles based on reward, with each quantile identified by a reward token prepended to the language model's input, and (iii) using a standard language modeling loss on samples from each quantile conditioned on its reward token, while remaining nearby the original language model via a KL-divergence penalty. By conditioning on a high-reward token at generation time, the model generates text that exhibits less of the unwanted property. For unlearning toxicity, negative sentiment, and repetition, our experiments show that Quark outperforms both strong baselines and state-of-the-art reinforcement learning methods like PPO (Schulman et al. 2017), while relying only on standard language modeling primitives.
Motivation & Objective
- Motivate and address misaligned behaviors in large language models (toxicity, repetition, unwanted sentiment).
- Develop a post-hoc unlearning method that preserves core generation capabilities while steering outputs away from undesired properties.
- Create a lightweight, differentiable training loop using standard LM primitives without full RL apparatus.
- Demonstrate robustness across toxicity, sentiment control, and repetition tasks with comparisons to strong baselines.
Proposed method
- Propose Quantized Reward Konditioning (Quark), an online, off-policy algorithm for (un)learning via three stages: exploration, quantization, and learning.
- Collect samples from the current LM and assign each to a reward quantile by prepending a reward token to the input.
- Train on samples from each quantile using standard conditional LM loss with a KL-divergence penalty to stay close to the original model.
- Condition on the highest-reward token during exploration and at test time to steer generations toward undesired-property reduction.
- Represent rewards with learned control codes (embeddings) tied to quantiles, enabling iterative guidance of the model.
- Relate to PPO, Decision Transformer, and control codes while relying on standard LM training objectives without extra reward-model burdens.
Experimental results
Research questions
- RQ1Can Quark effectively unlearn toxic, repetitive, and undesired sentiment properties while preserving base language modeling capabilities?
- RQ2How does quantizing rewards and KL regularization influence stability and performance compared to PPO and other detoxification methods?
- RQ3What are the effects of the number of quantiles, exploration frequency, and exact KL implementation on unlearning efficacy?
- RQ4Can conditioning on high-reward tokens during both exploration and inference reliably reduce undesirable outputs across domains?
- RQ5What are the practical ethical considerations and potential dual-use risks of reward-based unlearning in LM systems?
Key findings
- Quark substantially reduces toxicity compared to baselines and PPO on RealToxicityPrompts and WritingPrompts, with maintained fluency and diversity.
- Quark more effectively steers sentiment and achieves higher topical coherence while preserving generation quality relative to strong baselines.
- Ablations show the exact token-level KL term provides advantages over approximations, more quantiles improve reward maximization, and exploration strategies critically affect outcomes.
- Combining Quark with unlikelihood objectives further reduces repetition and improves human judgments of fluency and coherence.
- Human evaluations corroborate that Quark outputs are consistently less toxic and more aligned with desired sentiment and topic than prior methods.
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.