[Paper Review] Controllable Text Generation with Neurally-Decomposed Oracle
This paper proposes Neurally-Decomposed Oracle (NADO), a general and efficient framework for controllable text generation that decomposes sequence-level oracle functions into token-level guidance via a neural auxiliary model. Trained on samples from a pre-trained base model, NADO enables precise, high-quality control without fine-tuning, achieving state-of-the-art results in lexical constraint and formality control tasks with significant BLEU score improvements.
We propose a general and efficient framework to control auto-regressive generation models with NeurAlly-Decomposed Oracle (NADO). Given a pre-trained base language model and a sequence-level boolean oracle function, we propose to decompose the oracle function into token-level guidance to steer the base model in text generation. Specifically, the token-level guidance is approximated by a neural model trained with examples sampled from the base model, demanding no additional auxiliary labeled data. Based on posterior regularization, we present the closed-form optimal solution to incorporate the token-level guidance into the base model for controllable generation. We further provide a theoretical analysis of how the approximation quality of NADO affects the controllable generation results. Experiments conducted on two applications: (1) text generation with lexical constraints and (2) machine translation with formality control demonstrate that our framework efficiently guides the base model towards the given oracle while maintaining high generation quality.
Motivation & Objective
- To address the challenge of controlling autoregressive language models with sequence-level attributes such as keywords or writing style.
- To develop a general framework that guides generation using a sequence-level oracle without requiring model refactoring or fine-tuning.
- To improve generation quality and control accuracy by aligning the auxiliary guidance model with the base model's distribution.
- To provide a theoretically grounded method for incorporating oracle signals via posterior regularization.
- To demonstrate effectiveness across diverse control tasks, including lexical constraints and formality control in machine translation.
Proposed method
- The framework decomposes a sequence-level boolean oracle into token-level guidance using posterior regularization to derive a closed-form optimal solution.
- A neural auxiliary model, NADO, is trained on data sampled from the base model to approximate the token-level guidance, requiring no external labeled data.
- The base model's output distribution is reweighted at each generation step using NADO's guidance to satisfy the control objective.
- NADO is trained to predict whether a given prefix and candidate token satisfy the sequence-level oracle, using only the base model's outputs and oracle supervision.
- The method avoids distributional discrepancy by training NADO on the base model's distribution, ensuring better alignment and more accurate control.
- The approach is applied with greedy decoding and leverages temperature-based sampling to diversify training data for NADO.
Experimental results
Research questions
- RQ1Can a neural auxiliary model effectively approximate sequence-level oracle functions for controllable text generation?
- RQ2How does the approximation quality of NADO affect the final generation results and control fidelity?
- RQ3Can NADO achieve better control and generation quality than existing methods that use post-hoc distributional shifts or require external labeled data?
- RQ4Does training NADO on samples from the base model improve alignment and reduce distributional discrepancy compared to off-distribution training?
- RQ5Can the framework generalize across diverse control tasks, such as lexical constraints and style control, without model fine-tuning?
Key findings
- In lexically constrained generation, NADO achieved near-perfect keyword incorporation with a 3-point BLEU score improvement over prior methods.
- In formality-controlled machine translation, NADO improved BLEU by 3 points compared to FUDGE while maintaining or slightly improving formality scores.
- NADO outperformed FUDGE even though both used similar training data size and oracle type, indicating superior alignment and guidance quality.
- The use of temperature in sampling during NADO training improved generation diversity and quality, with optimal performance at T=5/4.
- Theoretical analysis confirms that better NADO approximation leads to more accurate and effective control of the base model's output.
- The framework is robust and generalizable, as it treats the base model and oracle as black boxes, enabling application to various control tasks without architectural changes.
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.