Candidate-Routed LLM Control with Deterministic Reconstruction for Faithful Document Hierarchy Parsing
This paper introduces Constellation, a framework that separates LLM structural reasoning from content generation by using the model to vote on candidate headings while a deterministic decoder reconstructs the document hierarchy, thereby achieving high parsing accuracy and faithful content preservation without the risk of hallucination or token bloat.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the author. For technical accuracy, refer to the original paper. Read full disclaimer
In the digital age, vast libraries of documents exist not as paper, but as files. To make these files useful for search engines, artificial intelligence, or human readers, computers must understand how the text is organized. A document is not just a stream of words; it is a structure of chapters, sections, and subsections, much like a map of a city. For a computer to navigate this map, it must distinguish between a main heading, a subheading, and a regular paragraph. This task, known as hierarchy parsing, is the foundation of modern information retrieval. If a computer cannot tell where one section ends and another begins, it cannot find the right answer to a question or summarize a report accurately.
The challenge lies in the variety of documents. Some files are created with perfect digital styles, where every heading is clearly marked by the software that made them. Others are "born-digital" but messy, where headings are created simply by making text bold, larger, or centered, without any formal label. Traditional computer programs are fast and reliable but often fail when they encounter these messy, manual headings. On the other hand, modern large language models—powerful AI systems trained on huge amounts of text—are excellent at understanding language and can often guess which lines are headings. However, when these AI models try to rewrite a document to show their understanding, they often make mistakes. They might accidentally leave out sentences, rephrase facts, or invent details that were never there. This creates a dilemma: how can we use the smart judgment of an AI to find the structure without letting the AI rewrite the content and risk losing the original information?
A researcher named XiuJian Yan has proposed a solution called Constellation, which separates the job of understanding from the job of moving text. Imagine a librarian who needs to organize a stack of books. Instead of asking a smart assistant to rewrite the titles of every book (which might lead to errors), the librarian asks the assistant only to point out which books belong on the top shelf and which belong on the bottom. The librarian then keeps the original books exactly as they are, simply moving them to the correct shelves based on the assistant's pointers. In this new system, the AI acts as an observer that votes on which lines are headings, but it never touches the actual words of the document. The original text remains in a secure, unchangeable stream, and a separate computer program uses the AI's votes to build the structure.
The researchers tested this idea on hundreds of scientific papers that had hidden their internal table of contents, forcing the system to guess the structure from the text alone. They compared three approaches: a standard computer program that looks for visual clues like bold text, a powerful AI that rewrites the entire document as a new file, and the new Constellation system. The standard program was fast but missed many headings. The rewriting AI was very good at finding the right structure, but it changed the text, sometimes dropping words or altering the meaning. The Constellation system, however, managed to combine the best of both worlds. By using the AI only to identify where sections begin and end, and then copying the original text verbatim into those sections, the system achieved a high level of accuracy in finding the structure while preserving 99.3% of the original words.
The results showed that the AI's ability to say "no" was just as important as its ability to say "yes." The system was designed so that the AI could look at a list of potential headings and simply stay silent if it wasn't sure. This silence acted as a powerful filter, telling the computer program to ignore certain lines that looked like headings but weren't. When the researchers removed this "silence" feature, the system's performance dropped significantly, proving that the AI's refusal to confirm a candidate was a key part of its success. In a direct comparison, the new system found headings with nearly the same accuracy as the rewriting AI, but it used far fewer computer resources and produced a file that was almost a perfect copy of the original.
In a further test, the researchers tried adding a second observer to the mix. They used a different tool that specializes in spotting headings visually and fed its suggestions into the same system. Just as with the first AI, this tool's suggestions were treated as votes, and its silence on certain pages was treated as evidence against a heading. This combination of two different observers, guided by the same strict rules, pushed the accuracy even higher, reaching a level that was better than either tool could achieve alone. The study concludes that it is possible to harness the deep understanding of modern AI for complex tasks like document organization without sacrificing the integrity of the original data. By keeping the AI in the role of an observer rather than a writer, the system ensures that the document's content remains exactly as the author intended, while still gaining the benefit of intelligent structural analysis.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.