Standard language models are like painters who start at the top-left corner of a canvas and work their way to the bottom-right, one pixel at a time. This "left-to-right" autoregressive approach works well for general prose, but it struggles when the painter is told they must include a specific, vibrant red flower in the middle of the field. By the time the brush reaches the center, the surrounding colors might not match, or the composition might leave no room for the flower at all.
To solve this, researchers have developed a family of models that change the order of creation. Instead of starting at the beginning of a sentence, these models start with a "must-have" word—an anchor—and grow the sentence outward in both directions.
The Planning Problem in Sequential Generation
In traditional decoding, ensuring a specific word appears later in a sentence requires immense foresight. The model must "plan" the entire prefix so that it leads naturally into the required constraint. If a model is forced to include the word "poured" to create a metaphor, a standard left-to-right decoder might start with "The sun..." and then find itself unable to grammatically integrate "poured" later on.
Xiaojun Wan and colleagues addressed this in How to Avoid Sentences Spelling Boring? Towards a Neural Approach to Unsupervised Metaphor Generation by using an asynchronous bidirectional process. By starting with the verb "poured" as a central anchor, the model can construct a subject to its left and an object to its right, ensuring the metaphor is both creative and grammatically sound.
Growing Outward: The Bidirectional Mechanism
The core mechanism of this research direction involves splitting the generation task into two streams that meet at the anchor. As seen in the BFGAN framework proposed by Dayiheng Liu in BFGAN: Backward and Forward Generative Adversarial Networks for Lexically Constrained Sentence Generation, the system employs two generators:
- A Backward Generator: This module starts at the anchor word and generates tokens in reverse order (e.g., "poured" $\rightarrow$ "trees" $\rightarrow$ "of" $\rightarrow$ "Millions").
- A Forward Generator: This module starts at the anchor and generates tokens in the standard order (e.g., "poured" $\rightarrow$ "out" $\rightarrow$ "of" $\rightarrow$ "the" $\rightarrow$ "area").
By anchoring the generation on the constraint itself, the model guarantees the word's inclusion with 100% certainty. This is particularly useful for tasks like headline generation, where specific brand names or entities must appear. Kosuke Yamada and others demonstrated in Transformer-based Lexically Constrained Headline Generation that an alternating strategy—generating one token to the left, then one to the right—helps maintain global context better than completing one side entirely before the other.
Why It Works: Semantic Stability
Centering the generation process prevents the "vanishing influence" of key information. In a long left-to-right sentence, the influence of a specific intent can fade as the sequence grows. Minlie Huang and the team behind the Personality-Coherent Conversation Machine (Assigning Personality/Profile to a Chatting Machine for Coherent Conversation Generation) found that bidirectional decoding from a factual anchor (like a user's age or location) ensures the response remains grounded in that fact, rather than drifting into generic "chatbot" speak.
This stability is also crucial for visual tasks. In Intention Oriented Image Captions with Guiding Objects, Ya-Li Li showed that standard models often ignore small or unusual objects in an image because they aren't "statistically likely" to appear in a standard sentence structure. By forcing the model to start with a "guiding object," the bidirectional decoder builds a narrative specifically around that item, allowing for much more controllable and descriptive AI.
Applications in Creativity and Precision
This "inside-out" approach has proven effective across diverse domains where constraints are non-negotiable:
- Humor: Devi Parikh and Mohit Bansal used bidirectional generation to create "punny" captions in Punny Captions: Witty Wordplay in Image Descriptions. By forcing a homophone into a sentence, the model ensures the joke "lands" by building a context that justifies the wordplay.
- Dialogue Systems: In CoRE-CoG: Conversational Recommendation of Entities using Constrained Generation, Harshvardhan Srivastava introduced the HopSkip decoder, which initiates sequences from a recommended entity. This ensures that the system doesn't just find the right product but actually mentions it naturally in conversation.
- Summarization: Yi Cai applied this to abstractive summarization in Controllable Abstractive Sentence Summarization with Guiding Entities, showing that anchoring on key entities (like names or places) prevents the model from hallucinating or omitting critical facts.
By shifting the starting point of generation from the first word to the most important word, these researchers have moved text generation away from simple sequence prediction toward a more intentional, constraint-driven process.