Document Section Hierarchical Parsing (DSHP-LLM)
- DSHP-LLM is a framework that converts rendered or born-digital documents into structured hierarchies by organizing lines, blocks, and sections based on reading order and parent–child relations.
- It integrates multiple formalisms such as dense parent prediction, hierarchical sequence labeling, relation graph reconstruction, and end-to-end structured decoding to capture complex document structures.
- The approach leverages multimodal feature extraction, hierarchical contextualization, and constraint-based decoding to improve parsing accuracy, efficiency, and cross-page continuity.
Document Section Hierarchical Parsing (DSHP-LLM) denotes LLM-centered methods for converting rendered or born-digital documents into structured representations in which lines, blocks, headings, paragraphs, tables, figures, captions, pages, and sections are organized by reading order, parent–child hierarchy, and, in some systems, cross-element relations. In the current literature, this problem is treated variously as parent prediction, hierarchical sequence labeling, relation-graph generation, and end-to-end structured decoding, with systems ranging from rule-augmented dual encoders to multimodal relation predictors and vision-LLMs that emit markup directly (Kiet, 11 Feb 2025, Ma et al., 2023, Wang et al., 2024).
1. Scope and conceptual boundaries
DSHP-LLM is broader than OCR and broader than page object detection. Recent benchmarks for practical document parsing explicitly evaluate reading order, heading hierarchy recovery, truncated text merging, truncated table merging, and figure extraction, and report that 27.2% of truncated text groups span multiple pages, making document-level continuity a first-class requirement rather than a secondary refinement (Zhou et al., 21 May 2026). In textbook segmentation, the task has been decomposed into three subtasks—Section Title Detection, Hierarchy Level Allocation, and Section Boundary Assignment—with segments represented as , which makes the section tree an explicit parsing target rather than an incidental by-product (Wehnert et al., 31 Aug 2025).
Node-based ingestion systems for retrieval also place DSHP-LLM in a larger structural context. One such pipeline defines a graph whose nodes are typed units such as Header, Text, Table, Image, Page, and Document, and whose edges use next, previous, parent, and child relations; the resulting backbone is a hierarchy of the form (Perez et al., 2024). This suggests that DSHP-LLM is best understood as the joint recovery of document logic, reading sequence, and multimodal attachment structure.
2. Core representational formalisms
Across the literature, DSHP-LLM-relevant systems do not converge on a single formalism. Instead, they instantiate several closely related views of hierarchical structure.
| Formulation | Basic unit | Structural output |
|---|---|---|
| Dense parent prediction | Detected entity | Parent index per child |
| Hierarchical sequence labeling | Line and token | Line labels and token labels |
| Relation graph / tree reconstruction | Region, object, or node | Parent/child, sequence, reference, or pointer structure |
| End-to-end structured decoding | Full page or document | Markup with structural tokens |
In dense parent prediction, the AAAI-25 VRD-IU solution frames the task as direct edge prediction: for every entity requiring a parent, predict the index of its parent. Each entity is represented by bounding box, optional OCR text, category label, and page number, and the output is a set of parent indices whose evaluation metric is accuracy (Kiet, 11 Feb 2025). In hierarchical sequence labeling, résumé parsing is cast as a two-level problem in which a document is a sequence of lines and each line is a sequence of tokens; line-level labels capture section and group structure, while token-level labels capture fine-grained entities (Retyk et al., 2023).
A third family models structure explicitly as graphs or trees. DSG defines entities with semantic categories and bounding boxes, and relations where , so that hierarchy is carried by parent_of and ordered sibling structure by followed_by (Rausch et al., 2023). Graph-based Document Structure Analysis generalizes this into with spatial relations Up, Down, Left, Right and logical relations Parent, Child, Sequence, and Reference, allowing a page to be interpreted as a relation graph rather than merely a set of detected boxes (Chen et al., 4 Feb 2025). HRDoc, by contrast, uses a pointer-style tree: each semantic unit stores text , bounding box , page index 0, category 1, parent index 2, and relation type 3 (Ma et al., 2023).
These formalisms differ in surface syntax, but they all reduce DSHP to typed units plus structural relations. A plausible implication is that DSHP-LLM systems can move between them with relatively small interface layers: a graph can be serialized into pointer labels, a pointer tree can be linearized into markup, and markup can be re-expanded into a graph.
3. Architectural patterns
One recurring pattern is multimodal feature extraction followed by relation prediction. The first-place AAAI-25 VRD-IU system builds a dual-encoder matching model in which each entity receives a textual feature from pre-trained BART-large, a visual feature from pre-trained SwinV2-Tiny, and positional/meta features from bounding box coordinates and page index; the concatenated features are passed through separate parent and child encoders that output 512-dimensional embeddings and are trained with a large margin cosine loss using positive logits 4 and negative logits 5 (Kiet, 11 Feb 2025). The intended effect is stronger separation among highly similar parent candidates.
A second pattern is hierarchical contextualization across granularity levels. In hierarchical sequence labeling for résumé parsing, token features are built from FastText plus handcrafted features or from frozen T5/mT5 embeddings, contextualized by a BiRNN over the whole document, pooled into line representations via 6, passed through a second BiRNN over lines, and decoded with line-level and token-level CRFs in a multi-task architecture (Retyk et al., 2023). This architecture treats lower-level token states and higher-level line states as mutually informative, a design that transfers directly to section-aware parsing.
A third pattern is unified relation prediction over learned queries. Detect-Order-Construct decomposes HDSA into page object detection, reading order prediction, and hierarchical construction, but implements each stage with multimodal encoders and relation heads so that object typing, ordering, and ToC construction are all predictions over structured node sets (Wang et al., 2024). UniHDSA goes further by consolidating page-level and document-level structure analysis into a unified relation prediction label space and a single relation module that handles intra-region, inter-region, and logical-role relations on top of Transformer features (Wang et al., 20 Mar 2025).
A fourth pattern is direct structured generation by VLMs. Youtu-Parsing couples a dynamic-resolution ViT with a prompt-guided Youtu-LLM-2B and expresses hierarchy with explicit markers: parent–child <<, grouping ++, and continuation ||, while also using coordinate tokens and layout-type tokens to prompt region-level extraction (Yin et al., 28 Jan 2026). DocHumming, built on InternVL2-1B, treats document parsing as end-to-end seq2seq with structure tokens such as <table>, <tr>, and <td>, and introduces structure-token-aware optimization with 7 for structured tokens during full-page training (Li et al., 25 Mar 2026). Taken together, these systems suggest two dominant DSHP-LLM design families: relation prediction over detected nodes, and direct generation of structured markup.
4. Structure enforcement, heuristics, and decoding
A persistent result in this literature is that unconstrained scoring is rarely enough. The AAAI-25 VRD-IU system explicitly separates matching from structure enforcement: some categories never receive parents; heading-like categories (section, subsection, subsubsection, subsubsubsection, paragraph) follow a strict sequential rule based on the nearest preceding compatible entity; and fixed type dependencies are imposed for patterns such as table_caption → table and figure_caption → figure. The reported ablation is extreme: validation accuracy rises from 0.79674 with loss only to 0.97369 with loss+greedy, and test accuracy rises from 0.85824 to 0.98904 (Kiet, 11 Feb 2025). A common misconception is therefore that stronger representation learning alone solves DSHP; in this setting, hand-crafted structural constraints dominate the final gain.
DSG reaches a similar conclusion from the opposite direction. Its neural detector and relation classifier predict parent_of and followed_by, but a grammar-based postprocessing stage then enforces a single doc._root, exactly one parent per non-root entity, sibling-only sequential relations, acyclicity, and repair of missing parent links (Rausch et al., 2023). Here the decisive ingredient is not a better local score but a graph cleanup procedure that converts a noisy relation set into a valid tree with ordered siblings.
Detect-Order-Construct makes the decoding logic even more explicit for ToC construction. It predicts parent and sibling scores among section headings, then applies a Tree Insertion Algorithm that processes headings in reading order, restricts insertion to the rightmost subtree, and attaches each new heading as the right-most child of the best-scoring node on that path (Wang et al., 2024). The hierarchy is therefore not merely predicted; it is constructed under an ordered-tree prior.
HiPS shows that constraints can come from metadata as well as from rules. Its TOC-Based PageParser uses PDF outline metadata when available, while LLM-Refined PageParser relies on OCR-selected title candidates plus XML-derived features and LLM hierarchy assignment. The comparative result is conditional rather than absolute: TOC-based methods are especially strong when TOC metadata are deep and accurate, whereas the XML-OCR-GPT5 pipeline is stronger when deeper headings are absent from the TOC and section boundaries must be recovered from page evidence (Wehnert et al., 31 Aug 2025). For DSHP-LLM, this establishes a hybrid principle: structural priors may come from document metadata, hand-coded type rules, or constrained decoding, and the optimal source depends on the document regime.
5. Datasets and evaluation protocols
The dataset landscape shows that DSHP-LLM cannot be reduced to a single benchmark family. HRDoc introduces multi-page hierarchical reconstruction with 2,500 documents and nearly 2 million semantic units, where each unit stores text, box, page index, class, parent index, and relation; its principal tree-level metric is Semantic-TEDS, or STEDS, defined as 8 (Ma et al., 2023). Detect-Order-Construct extends this evaluation logic in Comp-HRDoc by jointly measuring page object detection, reading order via REDS, ToC extraction via Semantic-TEDS, and full hierarchical reconstruction (Wang et al., 2024).
Other datasets expose different aspects of the problem. E-Periodica contains 542 document pages, 11,446 entities, 22 semantic categories, and relation annotations over parent_of and followed_by, enabling strict relation-triplet F1 evaluation in a visually diverse magazine domain (Rausch et al., 2023). GraphDoc scales graph-based structure analysis to 80K document images and 4.13M relation annotations across 11 layout categories and 8 relation categories, with graph-level metrics such as 9 and 0 (Chen et al., 4 Feb 2025). MPDocBench-Parse adds 433 manually annotated documents with 3,246 pages and 15 document types, and explicitly evaluates reading order, heading hierarchy recovery, truncated text merging, truncated table merging, figure extraction, table reconstruction, and formula recognition at document level (Zhou et al., 21 May 2026).
Specialized corpora remain important because they isolate key subproblems. The résumé parsing study builds seven monolingual corpora in English, French, Chinese, Spanish, German, Portuguese, and Swedish, each roughly 500–1200 résumés, with 18 line labels and 17 token-level entity types, and reports micro F1 for both levels (Retyk et al., 2023). HiPS curates 49 law books with 9,812 annotated headings and evaluates section title detection with edit-distance-tolerant precision and recall, hierarchy with Zhang–Shasha edit tree distance, and boundary assignment with 1 and WindowDiff (Wehnert et al., 31 Aug 2025). The AAAI-25 VRD-IU parent-prediction benchmark, by contrast, uses 571 training, 165 validation, and 81 test documents and evaluates the fraction of entities whose predicted parent index exactly matches the gold parent index (Kiet, 11 Feb 2025).
The diversity of these metrics is itself informative. Accuracy over parent indices, micro F1 over sequences, graph mAP, STEDS, REDS, heading-hierarchy TEDS, 2, and WindowDiff each isolate different failure modes. This suggests that DSHP-LLM should not be evaluated only as markup generation or only as object detection; it should be assessed at the level of trees, orderings, and continuity constraints simultaneously.
6. Applications, efficiency, limitations, and future directions
Section-aware parsing is increasingly used as infrastructure rather than as an endpoint. In a node-based RAG ingestion pipeline, LLM parsing produces page-level markdown, which is then split into Header, Text, Table, Image, Page, and Document nodes with parent/child and next/previous links; in the reported retrieval experiments, more than 80% of retrieved nodes are Page and Header nodes, indicating that high-level structural nodes dominate downstream retrieval behavior (Perez et al., 2024). In a similar spirit, the AAAI-25 VRD-IU system is explicitly positioned as a high-precision low-level parser that can feed an LLM, generate pseudo-labels, or serve as a post-hoc constraint repair layer for LLM outputs (Kiet, 11 Feb 2025).
Efficiency has therefore become a central DSHP-LLM concern. Youtu-Parsing introduces token parallelism that concurrently generates up to 64 candidate tokens per inference step and reports a 5–11x speedup over traditional autoregressive decoding, with query parallelism over up to five bounding boxes providing an additional 2x acceleration (Yin et al., 28 Jan 2026). A different line of work applies hierarchical speculative decoding to document parsing VLMs by using a pipeline parser as a drafter and a stronger VLM as verifier, obtaining a 2.42x lossless acceleration for dots.ocr on OmniDocBench and up to 4.89x acceleration on long-document parsing tasks (Liao et al., 13 Feb 2026). These results make speed a structural question: the more regular and hierarchical the output language, the more aggressively it can be decoded in parallel.
Robustness has likewise shifted toward data and objective design. DocHumming uses a Realistic Scene Synthesis pipeline with 576K layout templates and a 3M-page synthetic corpus, then trains with a progressive curriculum and a structure-token-aware loss that assigns 3 to structured tokens; the resulting 1B-parameter model reports 93.75 overall on OmniDocBench and 87.03 on Wild-OmniDocBench (Li et al., 25 Mar 2026). A plausible implication for DSHP-LLM is that section hierarchy recovery may benefit less from ever-larger decoders than from section-aware synthetic layouts, section-specific structure tokens, and curricula that move from local snippets to full pages and multi-page documents.
The literature also converges on several limitations. Heuristic systems depend heavily on correct category labels and reading order, so noisy detection can cause structural rules to misfire (Kiet, 11 Feb 2025). Multi-page continuity remains weak: MPDocBench-Parse reports that most models fail on cross-page truncated text and table merging, and that heading hierarchy scores remain around 50 even for the better specialized models, with deeper hierarchies consistently harder (Zhou et al., 21 May 2026). Metadata quality can be decisive: HiPS finds that TOC-based techniques perform particularly well when PDF heading metadata are high quality, while LLM-based methods are more necessary when metadata are shallow or incomplete (Wehnert et al., 31 Aug 2025). More generally, the evidence does not support the view that general-purpose VLM scale alone solves DSHP; specialized models, relation-centric decoders, and explicit constraints repeatedly outperform unconstrained generation on hierarchy-specific metrics.
Taken together, the cited work supports a hybrid DSHP-LLM architecture: multimodal node discovery, relation prediction or structured decoding for candidate hierarchies, and a final constraint layer that enforces tree validity, heading compatibility, and cross-page continuity. The open research frontier is not the existence of hierarchical parsers, but the unification of layout precision, semantic reasoning, multi-page consistency, and efficient long-form decoding within a single section-aware framework.