Abstract
Controlled text generation remains a significant challenge in natural language processing, often forcing a trade-off between generation speed and output fluency. This paper presents BOLT (Biases Over LogiTs), a novel framework that achieves efficient and fluent controlled generation by applying tunable biases directly to a language model's output logits. By maintaining the model's autoregressive nature and utilizing a Straight-Through Estimator for optimization, BOLT achieves a 7x speedup over existing energy-based methods while significantly improving human-rated fluency.
1. Introduction
Large Language Models (LLMs) demonstrate remarkable capabilities in text generation, yet steering them toward specific constraints—such as sentiment, toxicity avoidance, or keyword inclusion—remains difficult. Existing approaches generally fall into two categories: fine-tuning and inference-time steering. Fine-tuning is computationally expensive and lacks flexibility for changing constraints. Conversely, inference-time steering via Energy-Based Models (EBMs) offers flexibility but is often prohibitively slow. Traditional EBMs frequently rely on iterative sampling methods like Langevin Dynamics, which treat text as a collection of tokens rather than a sequence, often resulting in "word salad" and slow convergence.
BOLT addresses this "fluency-speed tradeoff" by introducing a method that is both fast and preserves the natural linguistic structure of the base model.
2. The BOLT Framework
The core innovation of BOLT is the application of tunable biases to the logits of a pre-trained language model. Unlike methods that optimize internal hidden states or embeddings, BOLT modifies the output distribution directly.
2.1 Logit-level Steering
At each time step $t$, BOLT adds a learnable bias vector $y^b_t$ to the language model's predicted logits $y^{LM}_t$:
$$y_t = y_t^{LM} + w_t \cdot y_t^b$$
This approach provides a direct "nudge" to the probability distribution, allowing for precise control without navigating the complex high-dimensional geometry of the model's internal layers.
2.2 Autoregressive Preservation
A key differentiator for BOLT is its adherence to the autoregressive nature of LLMs. While many EBM baselines optimize entire sequences non-autoregressively, BOLT generates text token-by-token. This allows the model to leverage conditional dependencies between words, which is essential for maintaining grammatical and semantic fluency.
2.3 Optimization and Weighting
To optimize these biases using gradient descent, the authors employ a Straight-Through Estimator (STE) to backpropagate through the discrete token selection process. Additionally, they implement a linear weight decay ($w_t$) for the bias. This prevents the steering mechanism from overwhelming the base model's grammar as the sequence progresses, ensuring that the control effect remains balanced.
3. Experimental Evaluation
The researchers evaluated BOLT across several standard benchmarks to test its versatility and performance:
- Sentiment Control: Using prompts from the PPLM paper and a Yelp Polarity-trained classifier.
- Toxicity Avoidance: Utilizing RealToxicityPrompts and the Jigsaws toxicity detection dataset.
- Keyword-guided Topic Control: Steering generation toward specific domains like "military" or "legal."
- Hard Constraint Satisfaction (CommonGen): Requiring the model to incorporate an average of 4.5 keywords into a coherent sentence.
4. Results and Discussion
BOLT demonstrated superior performance across nearly all metrics compared to state-of-the-art energy-based baselines such as COLD and MuCola.
4.1 Speed and Efficiency
BOLT achieved a significant reduction in latency. In sentiment control tasks, it was 7x faster than COLD and 17x faster than MuCola, reaching a generation speed of approximately 13.8 tokens per second.
4.2 Fluency and Quality
Human evaluations highlighted a strong preference for BOLT. In sentiment control tasks, 74.4% of BOLT’s generations were rated as more fluent than those of the baselines. This is further supported by perplexity (PPL) scores; for instance, BOLT achieved a PPL of 8.12 on sentiment control, compared to 66.75 for the Mix&Match baseline.
4.3 Controllability
Despite the gains in speed and fluency, BOLT did not sacrifice control accuracy. It effectively steered sentiment and avoided toxicity at rates comparable to or better than more computationally intensive methods.
5. Limitations and Future Directions
While BOLT represents a significant step forward, challenges remain. On the CommonGen task, which involves "hard" constraints (multiple mandatory keywords), BOLT required more optimization iterations, leading to a slight decrease in fluency. This suggests that forcing the inclusion of many specific tokens remains a difficult optimization problem. Furthermore, the energy functions currently require manual hyperparameter tuning (e.g., the $\lambda$ weights) to balance control and fluency.
Future research will focus on developing more robust energy functions and automated optimization methods to handle complex, multi-keyword constraints while maintaining the efficiency gains established by the BOLT framework.
Summary updated