[Paper Review] DIRECTOR: Generator-Classifiers For Supervised Language Modeling
This paper introduces Director, a unified language model architecture with shared decoder parameters and dual heads—one for language modeling and one for classification—enabling joint training on both standard text and labeled examples of desirable/undesirable generations. The method achieves superior safety and coherence with minimal speed cost, outperforming reranking and guided generation techniques in both accuracy and efficiency.
Current language models achieve low perplexity but their resulting generations still suffer from toxic responses, repetitiveness and contradictions. The standard language modeling setup fails to address these issues. In this paper, we introduce a new architecture, {\sc Director}, that consists of a unified generator-classifier with both a language modeling and a classification head for each output token. Training is conducted jointly using both standard language modeling data, and data labeled with desirable and undesirable sequences. Experiments in several settings show that the model has competitive training and decoding speed compared to standard language models while yielding superior results, alleviating known issues while maintaining generation quality. It also outperforms existing model guiding approaches in terms of both accuracy and efficiency.
Motivation & Objective
- Address the limitations of standard language models in generating toxic, repetitive, or contradictory text.
- Enable training on both positive (desired) and negative (undesired) generation examples using supervised data.
- Improve generation quality and safety without sacrificing inference speed or model efficiency.
- Provide a general-purpose framework applicable to multiple undesirable behaviors, including toxicity and repetition.
- Demonstrate that joint training with a classifier head can outperform separate reranking or model-guiding methods.
Proposed method
- Introduce a dual-head decoder architecture: a standard language modeling head and an additional classifier head at each decoder layer.
- Train the model jointly using standard language modeling loss on unlabeled text and cross-entropy loss on labeled data indicating desirable vs. undesirable generations.
- During decoding, combine predictions from both heads using a learnable mixing weight to guide token generation.
- Share the majority of the transformer decoder parameters between the two heads to maintain efficiency and parameter sharing.
- Apply explicit label norm regularization to improve generalization on out-of-distribution or unlabeled labels.
- Use automatic labeling for repetitive sequences (e.g., via n-gram repetition detection) to train the classifier without human-annotated data.
Experimental results
Research questions
- RQ1Can a unified model architecture jointly optimize for language modeling and classification of desirable/undesirable generations?
- RQ2Does incorporating labeled examples of toxic or contradictory responses improve generation quality and safety compared to standard language modeling?
- RQ3How does the performance of Director compare to reranking and model-guiding methods like FUDGE and PACER in terms of accuracy and inference speed?
- RQ4Can the model effectively reduce repetition without human-annotated negative examples, using automatic labeling instead?
- RQ5What is the impact of weight sharing and freezing strategies on the model’s ability to maintain language modeling quality while improving safety?
Key findings
- Director achieves competitive training and decoding speed, matching standard language models despite the dual-head architecture.
- On safety and contradiction tasks, Director significantly reduces toxic and contradictory generations compared to standard language models.
- Director outperforms FUDGE and PACER in both accuracy and speed, with inference 8–40x faster than these methods due to not requiring separate models.
- The model with frozen language model weights performs poorly, indicating that joint fine-tuning of both heads is essential for effective classification.
- Explicit label norm regularization improves performance across tasks, suggesting it enhances robustness to ambiguous or missing labels.
- When using automatically labeled repetitive sequences, Director successfully reduces repetition without human-annotated data, demonstrating broad applicability.
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.