[Paper Review] Controlled Text Generation as Continuous Optimization with Multiple Constraints
MuCoCO decodes from pretrained models by continuous optimization with differentiable constraints, using a Lagrangian-based approach to steer attributes like formality, style, and cross-lingual similarity during generation.
As large-scale language model pretraining pushes the state-of-the-art in text generation, recent work has turned to controlling attributes of the text such models generate. While modifying the pretrained models via fine-tuning remains the popular approach, it incurs a significant computational cost and can be infeasible due to lack of appropriate data. As an alternative, we propose MuCoCO -- a flexible and modular algorithm for controllable inference from pretrained models. We formulate the decoding process as an optimization problem which allows for multiple attributes we aim to control to be easily incorporated as differentiable constraints to the optimization. By relaxing this discrete optimization to a continuous one, we make use of Lagrangian multipliers and gradient-descent based techniques to generate the desired text. We evaluate our approach on controllable machine translation and style transfer with multiple sentence-level attributes and observe significant improvements over baselines.
Motivation & Objective
- Motivate controllable text generation without retraining or fine-tuning pretrained models.
- Propose MuCoCO to formulate decoding as a continuous constrained optimization problem.
- Allow multiple sentence-level attributes to be incorporated as differentiable constraints.
- Demonstrate improvements over baselines on translation and style-transfer tasks.
Proposed method
- Represent each token as a simplex over the target vocabulary to enable continuous optimization.
- Formulate controllable decoding as a multi-objective problem and convert to a constrained optimization via a Lagrangian with constraints f_i and g_j.
- Use a modified differential method of multipliers to jointly update the output sequence and the Lagrange multipliers.
- Employ a soft-relaxation with exponentiated gradient descent to optimize token distributions while keeping the model fixed.
- Introduce an annealing schedule to gradually tighten constraints and mitigate adversarial-like behavior.
- Decode by selecting the argmax token after optimization over the relaxed distributions.
Experimental results
Research questions
- RQ1Can controllable decoding be achieved from pretrained models without retraining, using differentiable attribute constraints?
- RQ2How does a Lagrangian-based constrained optimization compare to linear combination or dual-formulation methods for multi-attribute control in text generation?
- RQ3What performance gains arise when applying MuCoCO to style transfer and formality-controlled machine translation?
- RQ4What are the trade-offs in fluency, content preservation, and attribute transfer when using multiple constraints?
Key findings
- MuCoCO improves formality transfer and content preservation in informal-to-formal style transfer over baselines.
- Cross-lingual similarity constraints alone raise BLEU and BERTScore slightly; adding formality constraints boosts formality with some BLEU trade-off.
- Combined constraints (xsim and formal) recover some BLEU loss while maintaining higher formality and similarity metrics.
- In MT, using cross-lingual similarity without model changes yields +0.6 BLEU and +0.6 BertScore; adding formality increases formality but can reduce BLEU, with xsim+formal partially mitigating the BLEU drop.
- Human evaluation shows MuCoCO translations are favored over beam search in faithfulness and formality for informal-French to English translation.
- MuCoCO supports inserting multiple, differentiable constraints, enabling flexible control across several attributes simultaneously.
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.