Abstract
Large Language Models (LLMs) excel at instruction following, yet fine-grained control over attribute intensity remains a significant challenge. This paper formalizes the task of Smoothly Controllable Text Generation (SCTG), moving beyond binary constraints to modulate attributes like sentiment, formality, and understandability across a continuous spectrum. We introduce a robust evaluation framework using GPT-4-based Elo ratings and benchmark training-free methods, including semantic shifter prompting and Representation Engineering (RepE). Our findings reveal that while GPT-4 demonstrates superior calibration, simple prompting often rivals complex internal editing, and larger models do not necessarily yield smoother control.
Introduction
Standard Controllable Text Generation (CTG) typically focuses on whether a model hits a binary target (e.g., "positive" vs. "negative"). However, real-world communication requires a "dial" rather than a switch. A user might need an explanation tailored specifically for a 5-year-old, a teenager, or a PhD student—each requiring a different, calibrated level of "understandability."
This paper addresses two primary challenges: mathematically defining "smoothness" for subjective text attributes and achieving fine-grained control without the prohibitive costs of retraining or fine-tuning.
Methodology
The researchers proposed a comprehensive pipeline for implementation and evaluation:
- Elo Rating System for Text: To measure intensity without constant human intervention, GPT-4 performs pairwise comparisons between generated responses. These "wins" and "losses" are converted into Elo ratings, providing a continuous scale for subjective attributes.
- Control Techniques: Two training-free approaches were tested:
- Prompting with Semantic Shifters: Utilizing adverbs or descriptive phrases (e.g., "slightly annoyed" vs. "livid") within the system prompt.
- Representation Engineering (RepE): Identifying a 1D vector in the model's internal activations corresponding to an attribute and "nudging" activations along that vector during inference.
Experimental Setup
The study utilized a new benchmark dataset of 1,500 open-ended queries across five attributes: Anger, Happiness, Formality, Understandability, and Conciseness. Each query was designed to be answerable at ten distinct intensity levels (0-9).
Key Results and Insights
The Superiority of GPT-4
GPT-4 significantly outperformed open-source models in both calibration (the ability to hit a target intensity) and relevance (the ability to answer the prompt accurately). It achieved Mean Absolute Error (MAE) scores as low as 0.45 on a 0-9 scale for sentiment attributes.
Prompting vs. Internal Editing
Surprisingly, carefully tuned prompts (semantic shifters) were often as effective as, or superior to, the more invasive RepE method. This suggests that for many practitioners, model-specific prompting is the most efficient path to smooth control, especially when internal model weights are inaccessible via APIs.
The Model Size Paradox
In the Llama-2 family, larger models (70B) frequently showed worse calibration than smaller versions (7B or 13B). This suggests that larger models may possess more rigid internal representations, making them less susceptible to subtle nudges compared to their smaller counterparts.
Conclusion
Achieving smooth control in LLMs is feasible through training-free methods, with GPT-4 currently leading in performance. The study highlights a trade-off between extreme attribute intensity and response relevance. Future research may explore "baking in" smooth control during the Reinforcement Learning from Human Feedback (RLHF) phase to make models natively more adjustable.
Summary updated