Introduction
In the field of controllable text generation, researchers strive to guide Large Language Models (LMs) to produce text that adheres to specific attributes, such as positive sentiment, specific topics, or non-toxic language. While state-of-the-art methods typically employ a weighted decoding strategy—where a fixed LM ensures fluency and an external "controller" provides a steering signal—they often face a significant "tug-of-war" between control strength and linguistic quality.
Increasing the "control volume" (the weight $\lambda$) to ensure a model stays on topic frequently causes the text to degenerate into repetitive or nonsensical output. This paper introduces CAT-PAW (ControllAble Text generation with Position-Aware Weighted decoding), a framework designed to resolve this trade-off by introducing a dynamic regulator that manages when and how much the controller should influence the generation process.
The CAT-PAW Framework
The core innovation of CAT-PAW is the regulator module ($f$). Unlike traditional methods that apply a constant steering weight at every token, the regulator dynamically adjusts the bias signal based on the current position's context. This addresses the "position-blind" nature of previous controllers, which often forced topic-specific words into grammatically inappropriate slots.
CAT-PAW offers two types of regulators:
- Heuristic Regulator: Designed for low-data scenarios, it calculates the LM's inherent preference for a target attribute using keyword bags. It amplifies the signal if the LM is already leaning toward the topic and suppresses it otherwise.
- Trainable Regulator: A lightweight attention layer trained on "pseudo-data" to predict the optimal moments for attribute expression.
Crucially, CAT-PAW is a "plug-and-play" solution that can be integrated with existing models like PPLM, GeDi, Fudge, and DExperts.
Key Insights: The "Slope" Metric
A primary contribution of this research is the formalization of the control/fluency trade-off through a new metric called Slope. By applying a linear fit to the curve representing the relationship between control strength and perplexity (a measure of fluency), the authors can quantify exactly how much linguistic quality is sacrificed for every unit of control gained.
The data reveals that effective control requires "tact." By allowing the base LM to dominate at certain positions, the regulator prevents the controller from overwriting basic linguistic logic, leading to a much shallower slope compared to baseline methods.
Evaluation and Results
The authors evaluated CAT-PAW across sentiment control, topic control, and language detoxification. Key findings include:
- Reduced Trade-off: CAT-PAW reduced the trade-off slope by up to 73.62% in certain configurations, allowing for high control without model "breakage."
- Performance Peaks: In sentiment tasks, CAT-PAW achieved higher positivity scores (e.g., 57.51% vs 53.08% for PPLM) while simultaneously lowering perplexity.
- Detoxification: For detoxification, the regulator acts as a safety valve, increasing controller power only when the LM is likely to produce toxic content.
- Human Validation: Professional evaluators confirmed that CAT-PAW produces text that is both more on-topic and significantly more fluent than baseline methods.
Conclusion and Future Work
CAT-PAW demonstrates that timing is as important as strength in controllable text generation. While the current token-level approach significantly improves fluency, future work will address limitations such as "token-level myopia"—the inability to handle global styles like clickbait—and the reliance on keyword bags for heuristic regulation. Expanding the framework to handle global constraints and higher-quality training data remains a priority for future iterations.
Summary updated