Manuscript Offprint

arXiv:2608.22338

AcroMELD: Recovering Interactive PDF Forms with Structure-Aware Graph Set Transformers

Samuel Abramov

Abstract

Interactive PDF form fields are often absent from documents that visually resemble forms, leaving users unable to enter data without printing or external editing tools. Detecting the missing widgets is difficult because a field may be indicated by several overlapping cues, born-digital PDFs expose useful but incomplete drawing structure, and dense pages can contain hundreds of fields. We introduce AcroMELD (AcroForm Multi-source Evidence Linking Decoder), a 39.4M-parameter detector that combines a high-resolution visual transformer with label-free PDF primitives. Its 896-query set comprises 384 visual proposals, 384 structure-seeded proposals, and 128 learned recovery queries. Four graph-set layers exchange information over geometry-biased sparse neighborhoods and cross-attend to PDF structure. A learned same-field relation links co-referent candidates, while a localization-quality head is trained on the containment-aware overlap used by the downstream recovery decision. We define a hash-bound evaluation protocol with disjoint development, calibration, internal-test, and quarantined external-holdout roles. The sealed, single-seed candidate reaches native containment micro- F1F_{1} 0.9344 on the internal test and 0.8477 on the one-shot external holdout (95% PDF-cluster bootstrap interval 0.8339–0.8605). This passes the registered historical FFGBT-v8 reference by 0.0186 absolute F1F_{1}. Under the stricter external adapter, however, performance is 0.7786 IoU-0.5 F1F_{1} and 0.2900 COCO mAP, below a locally evaluated CommonForms-L reference; the signature class receives no prediction at the selected threshold. Thus the result supports the registered operational gate while exposing substantial domain and rare-class limitations.

1 Introduction

A PDF can look like a form without containing interactive form controls. This occurs in scanned paperwork and in born-digital documents whose lines and boxes were authored only as page graphics. The visual appearance is preserved, but the AcroForm widgets needed for direct data entry are absent. Recovering candidate widget geometries is therefore a useful first step toward making such documents fillable. It is also only one step. Accessible PDF forms require keyboard-operable controls, programmatically exposed names, roles, states, and values, a logical tab and reading order, and appropriate instructions and error feedback [1–5][1–5]. We deliberately study the narrower, measurable problem of localizing and classifying missing field controls.

Recent work casts form-field detection as object detection and demonstrates the importance of high-resolution page images [6][6]. A raster, however, discards information that already exists in a born-digital PDF. Text runs, line segments, rectangles, paths, and images carry spatial evidence about candidate fields. That evidence is neither a ground-truth annotation nor universally available: a rectangle may be decorative, a text line may be underlined for emphasis, and a scanned document may expose no useful primitives. Consequently, PDF structure should complement rather than replace visual evidence.

Combining these sources introduces a set-prediction problem that is easy to overlook. The same field can produce a visual proposal, one or more structure-derived proposals, and a learned recovery proposal. Standard one-to-one assignment discourages duplicate final predictions [7][7], but it does not by itself provide an explicit inference-time statement that two source-specific candidates refer to the same field. Dense pages amplify the problem: our sealed corpus contains a page with 849 valid widgets, well beyond a conventional Top-300 detection cap. Aggressive non-maximum suppression is also unsafe because neighboring form controls may legitimately touch or nest.

We propose AcroMELD, an AcroForm Multi-source Evidence Linking Decoder. A compact visual transformer produces 384 proposals, a label-free PDF encoder seeds another 384, and 128 learned queries recover fields missed by both sources. The resulting 896-node set is refined by four graph layers with sparse, geometry-biased self-attention and full cross-attention to the PDF primitives. Each node predicts a field class, a box, a containment-aligned localization quality, and a normalized embedding whose pairwise similarity estimates whether candidates describe the same field. Decoding greedily retains representatives and suppresses spatially eligible candidates inferred to co-refer, without imposing a class-specific duplicate rule.

Our evaluation design treats result provenance as part of the method. Document groups are split into five non-overlapping roles; class thresholds and representative-selection parameters were fit only on calibration data; the candidate was cryptographically frozen before internal test inference; and a quarantined external corpus was evaluated once after the completed training lineage validated. We report both the operational containment criterion and strict COCO-style localization metrics [8]. Keeping them separate prevents a box that merely lies inside a target from being mistaken for precise localization.

This work makes four contributions:

  • A multi-source query formulation that preserves visual, PDF-structural, and unconstrained recovery evidence in one exclusive set whose capacity is derived from measured page density.

  • A geometry-aware graph-set decoder with an explicitly supervised same-field relation, allowing candidates to exchange context and be consolidated at inference.

  • A localization-confidence objective aligned with the containment-aware recovery decision, while retaining L1 and generalized-IoU losses and strict COCO evaluation as precision safeguards [9, 10].

  • A leakage-resistant experimental protocol that binds data, code, configuration, checkpoints, operating points, and final reports by content hashes.

The registered run completed 33 epochs, froze one candidate and operating point, evaluated internal test only after that freeze, and then executed the one-shot external gate. Its calibrated and fixed-threshold external results differ materially. With only this training trajectory, the evidence concerns the complete frozen system rather than the effect of any one component.