NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DIRECTOR: Generator-Classifiers For Supervised Language Modeling

Kushal Arora, Kurt Shuster, Sainbayar Sukhbaatar, Jason Weston · DOI

Introduction

Standard Large Language Models (LLMs) are primarily trained using a self-supervised objective: maximizing the likelihood of the next token based on massive web-scale datasets. While this approach produces highly fluent text, it lacks a mechanism to teach the model what not to say. Consequently, models often "hallucinate" contradictions, fall into repetitive loops, or mirror the toxicity found in their training data.

Existing solutions to steer model behavior generally fall into two categories: reranking and guided generation. Reranking generates multiple candidates and uses a separate model to select the best one, which is computationally slow and limited by the quality of the initial candidates. Guided generation methods (e.g., FUDGE, PPLM) use external classifiers to steer the model token-by-token, but these are often 8x to 40x slower than the base model.

This paper introduces DIRECTOR, a unified "generator-classifier" architecture that integrates supervised "negative" signals directly into the training process to steer models efficiently during inference.

The DIRECTOR Architecture

The core innovation of DIRECTOR is its unified architecture. Instead of employing two separate models, it utilizes a single Transformer decoder with two distinct "heads" branching off the final layer:

  1. The LM Head: A standard linear layer followed by a Softmax, predicting the probability distribution of the next token.
  2. The Classification Head: A linear layer followed by a Sigmoid activation for every token in the vocabulary. This head classifies whether a potential next token is "desirable" (e.g., safe, non-contradictory) or "undesirable."

By sharing the internal hidden states of the Transformer between the generator and the classifier, DIRECTOR leverages the model's existing semantic understanding to provide steering capabilities with negligible computational overhead.

Training and Inference

DIRECTOR is trained using a multi-task objective. The model processes standard unlabeled text to train the LM head and labeled datasets—containing both "good" and "bad" sequences—to train the classification head.

During inference, the model calculates the final probability of a token by multiplying the LM probability by the classifier's "safety" score, weighted by a hyperparameter $\gamma$:

$$P(w_t) \propto P_{LM}(w_t) \cdot P_{Cls}(w_t)^\gamma$$

Because the classification happens in parallel across the entire vocabulary using the same internal representations as the generator, the generation speed is nearly identical to a standard language model.

Experimental Setup and Datasets

The researchers evaluated DIRECTOR across three distinct challenges:

  • Safety/Toxicity: Trained on the WikiToxic dataset and evaluated using ConvAI2 for generation quality.
  • Contradiction: Trained on the DECODE dataset, which contains human-labeled contradictions in dialogue.
  • Repetition: Evaluated using the BASE dataset. For this task, the authors automatically labeled repeated n-grams as "undesirable," removing the need for human annotation.

Key Results

  • Superior Safety: In toxicity tests, DIRECTOR achieved a safety accuracy of ~90%, compared to just 60% for the baseline BlenderBot model, while maintaining comparable generation quality (F1 scores).
  • Massive Speedup: DIRECTOR is 8x to 40x faster than previous guided generation methods like FUDGE. It generates approximately 5 samples per second, nearly matching baseline speeds, while FUDGE performance drops below 1 sample per second.
  • Eliminating Repetitive Loops: In repetition tasks, DIRECTOR reduced the "Repeat Score" from 74.75 (GPT-2 baseline) to ~20-25, performing similarly to specialized "unlikelihood training" but with a simpler implementation.
  • Human Preference: In a blind study, human judges rated DIRECTOR's responses as "better" or "safer" significantly more often than the baseline (67 wins vs. 17 losses).

Discussion and Limitations

DIRECTOR demonstrates that explicit "negative" signals are significantly more effective at curbing undesirable behavior than simply training on more "positive" data. Furthermore, the architecture provides a level of explainability; because the classifier provides a probability for every token, developers can visualize exactly why a model chose to suppress a specific word.

However, the authors noted a slight increase in perplexity, suggesting that the dual-task requirement may slightly distract the model from pure language prediction. Additionally, while repetition can be labeled automatically, tasks like toxicity and contradiction still require high-quality human-annotated data. Future research will explore how this architecture scales to "frontier" models exceeding 100 billion parameters.

Summary updated

BibTeX
@inproceedings{arora2022director,
  author = {Kushal Arora and Kurt Shuster and Sainbayar Sukhbaatar and Jason Weston},
  title = {{DIRECTOR: Generator-Classifiers For Supervised Language Modeling}},
  booktitle = {AACL/IJCNLP},
  year = {2022},
  doi = {10.18653/v1/2022.aacl-main.39},
}
Figure