Measuring document-layout diversity for a document AI dataset Define layout families, distinguish branding from structural variation, build a sampling matrix and test held-out template generalization. Document-layout diversity is the variation in how information is arranged and connected across pages. It is not the number of PDF files, logos or colors. For a useful document AI collection, identify layout families, the fields and structures that change, scan conditions and the families reserved for evaluation. This makes “varied documents” a testable sourcing requirement rather than an adjective. Choose the unit you are counting A page, a document and a layout family are different units. One document can contain a cover, repeated invoice pages and a signature appendix; one template can generate thousands of documents. Record counts at each level so page volume does not masquerade as structural breadth. Define a family using the decisions the model must make: location and ordering of key fields, table organization, section hierarchy, reading order and treatment of continuation pages. A logo or background-color change may leave those decisions untouched. Conversely, two pages that look alike can attach different meanings to the same position, so semantic variation needs its own label. What a public layout benchmark establishes [DocLayNet’s publisher repository](https://github.com/DS4SD/DocLayNet) describes human-labeled page layouts from six document categories and a predefined split designed to avoid leakage of distinctive layout styles. It is useful evidence that layout evaluation can track document categories and source groupings. It is not a claim that those documents are Fiund inventory or that a layout-segmentation benchmark evaluates your invoice fields. Layout-region labels answer where elements such as tables or text blocks are. Extraction references answer what a particular business field means and where its supporting evidence occurs. Keep these annotation layers separate when comparing collections, and inspect the actual release terms before using any public benchmark. Worked sampling example: 1,000 pages, four families Consider an illustrative archive with 700 pages from one invoice generator, 200 from a second vendor, 80 purchase-order pages and 20 continuation pages belonging to those same orders. Calling it “1,000 diverse pages” hides a concentration problem. The largest invoice family accounts for 70% of all pages, while continuation examples come from very few documents. Instead, produce a page-to-document-to-family map. Report both total pages and independent source documents for each family. Review whether the 20 continuations actually represent 20 distinct behaviors or repeat the same carry-forward table. These invented counts demonstrate the analysis; they are not a recommended quota or a description of available stock. Review axis Possible values Why it changes the task Field arrangement Fixed header, free-position labels, repeated summary boxes Finding evidence requires different location strategies Table structure Bordered grid, whitespace columns, merged cells, continuation Row/column relationships can change without a new logo Reading order Single column, sidebars, multi-column, mixed direction Linear OCR text can connect the wrong evidence Source condition Native PDF, scan, skew, low contrast Distinguishes perception failures from structural reasoning Document relationship Single page, attachment bundle, revised edition Tests whether context survives beyond one page Build a family register reviewers can apply Store family_id, source_id, document_type, generator or template revision if known, language/script, page role and a short reason for the family assignment. Use unknown for undocumented provenance instead of inferring a generator from appearance. Keep a small set of representative pages and counterexamples with the register. Ask two reviewers to categorize the same pilot subset and compare disagreements. If they repeatedly disagree about whether a changed footer creates a new family, the definition is too vague. Resolve the rule before publishing a headline count. A family register is a practical taxonomy, not a universal standard supplied by this article. Separate scan degradation from layout novelty Create a matrix of layout families against image conditions. If every unfamiliar family is also a low-quality scan, a model failure cannot be attributed cleanly to layout generalization. Seek a readable baseline within major families and document where conditions are naturally confounded. Do not create dozens of “new” families by rotating or recompressing the same document. Those variants can test robustness, but they share underlying content and structure. Record their common parent and keep that lineage visible during evaluation grouping. Hold out the source of the variation A random page split can put adjacent pages or repeated templates in both training and evaluation. Choose the grouping that matches the question: holding out complete documents tests one boundary; holding out an organization or generator family tests a harder one. State the boundary explicitly rather than describing every split as unseen-layout evaluation. The [scikit-learn cross-validation guide](https://scikit-learn.org/stable/modules/cross_validation.html) explains group-aware splitting. For this task, use your family register to define the groups; the library cannot infer business template lineage. After splitting, inspect near-duplicates and parent-child relations to confirm that a group assignment did what the specification intended. Measure extraction behavior within each slice Report the chosen field or region metric by family, language, scan condition and page role, along with the number of examples in each cell. A total score dominated by the 700-page family in the example can conceal failure on rarer purchase orders. Keep small-cell uncertainty visible and avoid ranking models on a handful of examples as if the result were stable. Ask whether a missing field is genuinely absent, unreadable, carried from a previous page or missed by annotation. Those cases need different reference labels. Add adjudicated examples for ambiguous reading order and merged cells so reviewers can reproduce the scoring decisions. What to request from a source Request the family register, source-group counts, readable sample pages, annotations tied to the correct image version and a split manifest. Include the business fields and error types that matter to the model. If a source cannot document template origin, it may still be useful, but the uncertainty must remain part of the evaluation claim. A pilot should demonstrate the register and the proposed split, not only show an attractive montage. Confirm the cost of extra labeling, document grouping and uncommon page conditions separately. Source access and permitted use are reviewed for the selected collection; public examples here do not promise a particular commercial archive. Is a new company logo a new layout? Sometimes, but not by itself. Count it as a distinct structural family only when the definition identifies meaningful changes in arrangement or relationships; track branding separately. Can synthetic distortions increase diversity? They can broaden tested image conditions, but they do not create independent source documents. Preserve their parent lineage and describe the robustness test accurately. How many layout families do I need? There is no universal count. Start with the structures and source groups expected in deployment, measure concentration and pilot errors, then target the gaps that affect your task. Research method: Fiund research desk; public sources, explicit worked-example labels and project-specific availability review. Editorial contact: hello@fiund.com. Sources DocLayNet: publisher documentation: https://github.com/DS4SD/DocLayNet Cross-validation: grouped data: https://scikit-learn.org/stable/modules/cross_validation.html