Controllable Text Generation (CTG) Refers to the task of generating text according to the given controlled element. A CTG system consists of three elements:

  • A Source Text as the input (I); 
  • A Generative Model as the process (P);
  • A Generated Text that satisfies the control condition as the output (O);

The control conditions can vary in form and connotation depending on the application of the CTG system. They could range from text attribution (sentiment, topic, or presence of certain keywords in the output), author style and identity of the person writing (such as writing an output in the style of a certain author or more generally as a specific gender or age),  text genre and formats (poetry, poems, etc.), ordering of events (such as story-lines) to structured data description (such as table-to-text systems or Knowledge Graph (KG)-to-text generation). 

All of these can be mathematically unified and formalized as:

Given a vocabulary , the goal of CTG is to generate a target text where with respect to a control element detonated as :

The specifics of C vary according to the task and are commonly divided in three categories, i.e. semantic, structural and lexical constraints @zhangSurveyControllableText2024.

The sentence Y generated by the CTG is expected to satisfy C while conforming to the general natural language characteristics, such as fluency, rationality and readability, to the greatest extent.

Task Involving CTG

Attribute-based Generation is a task where the CTG aims to generate natural language sentences that satisfy specific attributes such as topic, emotion or keywords. 

Dialogue Generation is a task where the goal is to build a conversational agent who can mimic the human conversation using NL. Usually have high standards of consistency, semantics and interactiveness. 

Storytelling is the task of generating text that has a complete narrative logic, needing a high level of control over long text generations. 

Data-to-text is a task where the objective is to convert non-linguistic structured data (tables, graphs, etc.) into natural language text.

Data Augmentation is the task of using a CTG system to generate near-realistic text, expanding existing datasets or creating new ones by identifying or replacing entities in the text or generating new sentences according to given attributes.

Debiasing is a task where texts are rewritten by the CTG model to remove bias in the original texts. This can be used to control the data-distribution of the generated text controlling aspects such as gender, race or toxicity. 

Format control tasks are a family of objectives where the CTG controls the format of the generated text, such as text length and rhythm.

Possible Approaches to CTG