Evaluating the Smooth Control of Attribute Intensity in Text Generation with LLMs

Shang Zhou, Feng Yao, Chengyu Dong, Zihan Wang, Jingbo Shang

Abstract

This research introduces Smoothly Controllable Text Generation (SCTG), a framework designed to move beyond binary constraints in Large Language Models (LLMs) toward fine-grained intensity control. By adjusting attributes like "anger" or "formality" on a continuous scale of 0 to 9, the study evaluates model performance using a novel Elo-based rating system. Findings indicate that while GPT-4 demonstrates superior calibration, larger models do not necessarily guarantee smoother transitions, and simple prompting often outperforms complex internal representation editing.

Introduction

Standard Controllable Text Generation (CTG) typically focuses on binary constraints—determining whether a model can, for instance, "make this text polite." However, human communication is inherently nuanced, requiring varying degrees of formality or sentiment depending on the context. Current LLMs often struggle with this "smoothness," frequently jumping between extremes rather than providing a steady gradient of intensity.

Conceptual overview of Smoothly Controllable Text Generation (SCTG) for the attribute 'Understandability'.

The primary challenge lies in the lack of standardized metrics to measure if a model responds linearly to intensity values. Existing evaluation methods often rely on expensive human judgment or classifiers that lack the sensitivity required to detect subtle stylistic gradations.

Methodology

The authors propose a dual approach focusing on both the evaluation and execution of smooth control.

The Evaluation Framework

To quantify intensity without constant human intervention, the study employs GPT-4 as a surrogate judge to perform pairwise comparisons between generated texts. These comparisons are processed through an Elo rating system to calculate absolute intensity scores. To optimize efficiency, a "library" of pre-rated sentences is utilized, significantly reducing the number of required comparisons.

Control Techniques

Two training-free methods were evaluated:

  1. Prompting with Semantic Shifters: Utilizing adverbs such as "slightly," "moderately," or "extremely" within the system prompt.
  2. Representation Engineering (RepE): A surgical approach that identifies the internal "direction" of an attribute within the model's hidden layers and nudges activations during inference.

Experimental Setup

The benchmark dataset consists of 1,500 open-ended queries across five attributes: Anger, Happiness, Formality, Understandability (clarity), and Conciseness. Each query is tested at ten distinct intensity levels (0–9).

Results and Discussion

The evaluation revealed several critical insights into how different models handle intensity scaling.

Calibration curves for GPT-4 and Llama2-70B across five attributes, comparing Universal vs. Selected Semantic Shifters against ideal calibration.

The Model Size Paradox

Surprisingly, increasing model size does not inherently improve smoothness. In the Llama-2 family, the 70B model exhibited higher calibration error (Mean-MAE) compared to the 13B model. Larger models appear more prone to "collapsing" toward extreme values rather than maintaining a steady gradient.

Performance of Control Methods

Simple prompting with well-chosen "semantic shifters" consistently matched or exceeded the performance of Representation Engineering. However, the effectiveness of specific descriptors is highly model-dependent; a term that triggers a specific intensity in GPT-4 may not have the same effect on Llama-2.

GPT-4 Dominance

GPT-4 emerged as the most "smooth" model, achieving the lowest calibration error across nearly all tested attributes. Furthermore, the automated Elo-based rating system demonstrated a high correlation with human annotators, validating the use of LLM-based evaluation for nuanced stylistic tasks.

Conclusion

This work establishes a robust framework for evaluating and achieving fine-grained control in text generation. While GPT-4 sets a high bar for calibration, the findings suggest that future research should focus on model-specific prompting strategies and potential fine-tuning (such as RLHF) to further refine the "smoothness" of attribute control in smaller or open-source models.

Summary updated

BibTeX
@inproceedings{zhou2024evaluating,
  author = {Shang Zhou and Feng Yao and Chengyu Dong and Zihan Wang and Jingbo Shang},
  title = {{Evaluating the Smooth Control of Attribute Intensity in Text Generation with LLMs}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.258},
}
Figure