To handle diverse queries with a unified model, we formulate the problem as value retrieval with arbitrary queries for form-like documents.
Under such task formulation, users can extract values from a form by presenting variants of the corresponding keys as queries.
We also set up a benchmark for the task by introducing a simple yet effective method.
The method takes an arbitrary query phrase and all the detected optical character recognition (OCR) words with their locations in the form as inputs.
Then, we model the interactions between the query and the detected words from the document using a transformer-based architecture. The training objective encourages the matching of the positive query-value pairs and discourages that of the negative ones. To further boost the performance, we present simpleDLM, a simple document pre-training strategy that makes it more flexible to learn local geometric relations between words/tokens compared to existing pre-trained models. Experimental results show that our method outperforms the baselines by a large margin under different settings. When initializing using simpleDLM, our method is further improved largely by about 17% F1 score compared to initializing using a state-of-the-art (SOTA) pre-trained model, i.e., LayoutLM [1]}.
