Syntactic Templates for Controlled Text Generation

25 concepts21 papers1 proposal

Standard autoregressive language models generate text by predicting the next token based on preceding context. While highly effective, this approach suffers from a fundamental limitation: it conflates what a sentence means (its semantics) with how it is structured (its syntax). When a model relies purely on left-to-right token probabilities, it naturally gravitates toward the most frequent, generic syntactic patterns found in its training data. This leads to a lack of structural diversity, where models struggle to generate varied, stylistically rich, or precisely controlled outputs.

To break this bottleneck, a long-standing line of research advocates for decoupling syntax from semantics by introducing explicit syntactic templates. Instead of forcing a model to learn grammar implicitly through word co-occurrences, these approaches provide a structural "skeleton" or "blueprint" that guides the generation process.

The Anatomy of a Structural Skeleton

The intuition behind syntactic templates dates back to early computational linguistics. Simmons, in THEMES FROM 1972, demonstrated that phrase structure templates could define a rigid grammatical skeleton with variable slots reserved for semantic insertion. Early formalisms like the Functional Generative Description framework explored by Koktova in Towards the Semantics of Sentence Adverbials similarly modeled complex structural behaviors (such as sentence adverbials) as deep syntactic cases rather than surface-level modifications.

In modern deep learning, this skeleton is frequently represented using Part-of-Speech (POS) sequences or constituency parse trees. For example, in image captioning—a task notorious for producing repetitive descriptions—Deshpande et al. demonstrated in Diverse and Controllable Image Captioning with Part-of-Speech Guidance that conditioning generation on a predicted POS sequence allows a model to explore a much wider space of valid descriptions.

Similarly, Pinheiro et al. in Simple Image Description Generator via a Linear Phrase-Based Model and Lebret et al. in Phrase-based Image Captioning exploited the fact that image descriptions often follow predictable phrase patterns. By enforcing these structural priors, systems can ensure grammatical coherence without requiring a recurrent network to learn syntax entirely from scratch.

Overcoming the Autoregressive Trap

Why does explicit syntactic guidance improve text generation? During standard decoding (such as beam search), models prioritize high-probability tokens. This heavily penalizes unusual or complex grammatical structures, pruning them early in favor of safe, generic phrasing.

By enforcing a predefined sequence of grammatical tags, the generation process is forced away from these high-probability traps. As shown by Deshpande et al. in Fast, Diverse and Accurate Image Captioning Guided by Part-Of-Speech, this mechanism ensures the inclusion of specific linguistic attributes (like descriptive adjectives or varied syntax) that standard decoding would otherwise discard.

Furthermore, this decoupling allows models to generate multiple distinct structural variations from the exact same semantic input:

Mechanisms of Structural Conditioning

Researchers have developed several distinct mechanisms to inject these structural priors into neural architectures:

  1. Coarse-to-Fine Sketching: Instead of generating text token-by-token, models can plan the sentence structure first. Li et al. implemented this in Generating Long and Informative Reviews with Aspect-Aware Coarse-to-Fine Decoding by generating a syntactic "sketch" composed of POS tags and semantic placeholders before filling in the surface words, preventing repetitive phrasing in long-form text.
  2. Hierarchical Top-Down Generation: Moving away from left-to-right generation entirely, Cui et al. proposed in Explicit Syntactic Guidance for Neural Text Generation a paradigm that generates sentences by following a top-down constituency parse tree, filling in structural placeholders hierarchically to achieve fine-grained control over grammatical style.
  3. Syntactic Embedding Substitution: For tasks like paraphrase generation, Huang et al. developed a method in Unsupervised Syntactically Controlled Paraphrase Generation with Abstract Meaning Representations that separates meaning from structure using Abstract Meaning Representations (AMR). During decoding, they substitute the syntactic embedding of the source sentence with that of a target template, mapping the original meaning onto a completely new grammatical frame.

Applications and Generalization Benefits

Beyond generating diverse text, syntactic templates provide powerful solutions to several core challenges in NLP:

Bypassing Knowledge Distillation

In non-autoregressive generation, models often suffer from the "multimodality problem" (mixing different valid sentence structures simultaneously, resulting in ungrammatical gibberish). While the standard fix is expensive knowledge distillation from a larger teacher model to simplify the training data, Liu et al. showed in POS-Constrained Parallel Decoding for Non-autoregressive Generation that using explicit POS sequences as a decoding-time prior solves this issue directly, avoiding the performance caps and computational costs of synthetic datasets.

Stylistic and Cross-Lingual Steering

Syntactic templates allow models to inherit complex or historical styles without explicit training. Agnew et al. demonstrated this in The Mechanical Bard: An Interpretable Machine Learning Approach to Shakespearean Sonnet Generation by using POS templates derived from expert corpora to replicate Shakespearean sonnet structures.

In cross-lingual settings, the authors of Cross-lingual Transfer for Automatic Question Generation by Learning Interrogative Structures in Target Languages utilized human-provided question exemplars at inference time to serve as structural templates. This mechanism guides low-resource question generation to adopt the specific grammatical syntax of a target language, effectively preventing "interrogative code-switching" (accidentally injecting source-language question words).

Robustness and Domain Adaptation

Treating syntax as a controllable input variable enables the generation of "syntactic adversarial examples." Iyyer et al. used this approach in Adversarial Example Generation with Syntactically Controlled Paraphrase Networks to isolate the impact of syntax on model performance, exposing the brittleness of standard NLP models to structural changes.

Conversely, because syntactic patterns remain stable across domains, integrating structural constraints enhances zero-shot generalization. For instance, in open-domain keyphrase generation, Do et al. showed in Unsupervised Open-domain Keyphrase Generation that enforcing standard noun phrase structures via POS tags allows models to generalize to entirely new subjects without requiring retraining.

Key Foundational Work

THEMES FROM 1972 (1982) — contributed 1 concept elements to this direction.
Towards the Semantics of Sentence Adverbials (1983) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_syntactic_structural_priors_629882c7,
  title = {syntactic structural priors},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/syntactic-structural-priors/rdr_629882c70e78452b88b3a5210b5e09c4},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_syntactic_structural_priors_629882c7_v1,
  title = {syntactic structural priors},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/syntactic-structural-priors/rdr_629882c70e78452b88b3a5210b5e09c4/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake