FRAGMENT: Factorized Graph Representations for Document Generation and Editing via Entity-Aware Transformations

Ayoub El Bouchtili, Guilhaume Leroy-Meline
8/19/2026
cs.CVcs.CL
transformer-attention

No confident code implementation found for this paper.

Abstract

Structured documents such as invoices, forms, reports, and scientific articles derive meaning from the interplay between spatial layout, textual content, and logical structure. Generative models operating at the pixel or token level often struggle to capture these dependencies effectively.

Show full abstract

We explore FRAGMENT, a generative framework that represents a document as a typed relational graph and factorizes its distribution as p(structure, content) = p(structure) * p(content | structure). The framework consists of two stages. The first stage, the Architect, is a causally masked Transformer conditioned on document category that autoregressively generates the graph topology and typed spatial relations. The second stage, the Builder, is a GATv2-based graph attention network that enriches the graph with normalized bounding boxes, text, and visual style attributes. Both stages define explicit likelihood models, yielding a tractable document-level likelihood that serves as an anomaly score for forgery detection. For controlled editing, a prompt-conditioned extension injects instruction embeddings into the Builder through cross-attention, enabling semantic and entity-aware modifications. We describe training on DocLayNet and fine-tuning on FUNSD and SROIE. Experiments on DocLayNet, FUNSD, and SROIE evaluate FRAGMENT alongside representative autoregressive, layout-only, and graph-based baselines, providing an empirical analysis of the characteristics and trade-offs of the proposed factorized graph generation framework.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bouchtili2026fragment,
  title  = {FRAGMENT: Factorized Graph Representations for Document Generation and Editing via Entity-Aware Transformations},
  author = {Ayoub El Bouchtili and Guilhaume Leroy-Meline},
  year   = {2026},
  eprint = {2608.18679},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.18679v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2608.18679.svg)](https://codeofpaper.com/paper/2608.18679)

Discussion