DTPA: Dynamic Token-level Prefix Augmentation for Controllable Text Generation

2508.04047v1 cs.CL 2025-08-09
Авторы:

Jiabing Yang, Yixiang Chen, Zichen Wen, Chenhang Cui, Peiyan Li, Yuan Xu, Bowen Fang, Yan Huang, Liang Wang

Резюме на русском

**Резюме** Controllable Text Generation (CTG) — важный подход в NLP, стремится генерировать текст, соответствующий заданным атрибутам. Однако существующие методы, ориентированные на короткие последовательности, мало рассматривают проблему генерирования длинных текстов. В статье предлагается новый подход DTPA, основанный на Air-Decoding, для решения этой проблемы. Авторы выявили, что снижается управляемость текста с увеличением длины последовательности, что связано с уменьшением внимания к префиксам. DTPA улучшает управляемость длинных текстов, используя динамическую акцентирование префиксов, обеспечивая более сильное влияние на атрибутные распределения. Также используется улучшение предложенных задач и опциональное управление первоначальным текстом для сбалансированной генерации. Эксперименты показывают, что DTPA существенно превосходит другие методы по управляемости, сохраняя высокую читаемость, разнообразие и тематическую привязку. Особо выгоден DTPA в генерации длинных текстов.

Abstract

Controllable Text Generation (CTG) is a vital subfield in Natural Language Processing (NLP), aiming to generate text that aligns with desired attributes. However, previous studies commonly focus on the quality of controllable text generation for short sequences, while the generation of long-form text remains largely underexplored. In this paper, we observe that the controllability of texts generated by the powerful prefix-based method Air-Decoding tends to decline with increasing sequence length, which we hypothesize primarily arises from the observed decay in attention to the prefixes. Meanwhile, different types of prefixes including soft and hard prefixes are also key factors influencing performance. Building on these insights, we propose a lightweight and effective framework called Dynamic Token-level Prefix Augmentation (DTPA) based on Air-Decoding for controllable text generation. Specifically, it first selects the optimal prefix type for a given task. Then we dynamically amplify the attention to the prefix for the attribute distribution to enhance controllability, with a scaling factor growing exponentially as the sequence length increases. Moreover, based on the task, we optionally apply a similar augmentation to the original prompt for the raw distribution to balance text quality. After attribute distribution reconstruction, the generated text satisfies the attribute constraints well. Experiments on multiple CTG tasks demonstrate that DTPA generally outperforms other methods in attribute control while maintaining competitive fluency, diversity, and topic relevance. Further analysis highlights DTPA's superior effectiveness in long text generation.

Ссылки и действия