← Latest papers
🤖 AI

Projectional Decoding: Towards Semantic-Aware LLM Generation

This paper introduces "projectional decoding," a novel framework that integrates domain semantics directly into LLM generation by maintaining a partial graph model alongside text to enable incremental semantic validation, error detection, and provably valid software artifact creation.

Original authors: Boqi Chen, José Antonio Hernández López, Aren A. Babikian

Published 2026-05-29
📖 4 min read☕ Coffee break read

Original authors: Boqi Chen, José Antonio Hernández López, Aren A. Babikian

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Problem: The "Blind" Writer

Imagine you are asking a very talented but slightly scatterbrained writer (a Large Language Model, or LLM) to build a complex piece of furniture, like a bookshelf.

  • The Current Situation: The writer starts typing out instructions word by word. They know how to spell "wood" and "screw" (syntax), but they don't really "see" the final structure in their head while they write.
  • The Mistake: They might write, "Attach the shelf to the top," but later realize they forgot to write about the legs. Or, they might write instructions that make the shelf wobble because the physics don't work.
  • The Fix (Old Way): Usually, we let the writer finish the whole bookshelf, then we check it. If it's broken, we try to fix it (post-processing). But often, the instructions are so messy that we can't even figure out how to fix them.

The New Idea: The "Architect's Blueprint"

The authors propose a new way of writing called Projectional Decoding.

Instead of just letting the writer type words into a blank page, imagine giving them a digital blueprint that updates in real-time as they type.

  1. Two Tracks Running Simultaneously:

    • Track A (The Text): The LLM still generates the text (the instructions).
    • Track B (The Blueprint): At the same time, the system builds a partial 3D model of the bookshelf based on what has been written so far.
  2. The "Uncertainty" Feature:
    This blueprint is special because it knows what is missing. It doesn't just show the finished parts; it shows "ghost" parts that might be there later.

    • Example: If the writer says "Attach a shelf," the blueprint shows a shelf. If the writer stops there, the blueprint highlights a missing "leg" as a "possible" item that needs to be added next. It captures the uncertainty of what hasn't been written yet.
  3. The "Safety Guard" (Semantic Validation):
    Before the writer is allowed to type the next word, the system checks the blueprint.

    • If the next word would break the rules (e.g., "Attach the shelf to the ceiling" when the blueprint says the shelf needs legs), the system blocks that word.
    • It only allows words that keep the blueprint valid and moving toward a finished, working product.

A Concrete Example from the Paper

The authors tested this on a task where an AI had to write a program to answer a question about a scene (like "How many red objects are to the right of the brown one?").

  • Without the new method: The AI might write a program that looks like English code but is logically broken (e.g., trying to count objects that don't exist).
  • With Projectional Decoding: As the AI writes, the system builds a "program graph" (a map of the logic).
    • If the AI tries to add a step that violates a rule (like using the wrong type of data), the system sees it on the map immediately.
    • It blocks that step and forces the AI to choose a different path that keeps the map valid.

The Results

The paper tested this on different sizes of AI models.

  • The Outcome: The AI using this "blueprint" method made significantly fewer logical errors than the standard AI.
  • The Trade-off: It took a little bit longer to generate the text (about 1.1 to 1.5 times slower), but the results were much more reliable and actually worked when run.

The Core Takeaway

The paper argues that to make AI generate complex, structured things (like software code), we can't just treat the output as a stream of text. We need to treat it as a structure being built.

By keeping a "partial model" (a blueprint) alive alongside the text, we can catch mistakes while the AI is writing, rather than trying to fix a broken house after the walls are already up. This ensures the final output is not just grammatically correct, but logically sound.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →