Skip to main content
QUICK REVIEW

[Paper Review] Chargrid: Towards Understanding 2D Documents

Anoop R Katti, Christian Reisswig|arXiv (Cornell University)|Sep 24, 2018
Handwritten Text Recognition TechniquesComputer Science21 references15 citations
TL;DR

This paper introduces Chargrid, a 2D grid representation of documents that preserves spatial layout by encoding characters in a 2D grid, enabling a fully convolutional encoder-decoder model to perform instance-level semantic segmentation and bounding box prediction for structured documents. The method significantly outperforms both NLP and computer vision baselines on invoice information extraction by leveraging spatial and textual context simultaneously.

ABSTRACT

We introduce a novel type of text representation that preserves the 2D layout of a document. This is achieved by encoding each document page as a two-dimensional grid of characters. Based on this representation, we present a generic document understanding pipeline for structured documents. This pipeline makes use of a fully convolutional encoder-decoder network that predicts a segmentation mask and bounding boxes. We demonstrate its capabilities on an information extraction task from invoices and show that it significantly outperforms approaches based on sequential text or document images.

Motivation & Objective

  • To address the limitations of sequential NLP models and purely visual computer vision approaches in understanding structured documents with inherent 2D layout.
  • To preserve and exploit spatial relationships between text elements (e.g., positioning, alignment, size) that are critical for semantic understanding.
  • To develop a generic, end-to-end deep learning pipeline for document understanding that operates directly on 2D text representations.
  • To demonstrate the superiority of the 2D representation in complex information extraction tasks requiring layout-aware reasoning.

Proposed method

  • Represent each document page as a sparse 2D grid of characters (chargrid), where each character is mapped to its spatial coordinates.
  • Use an encoder-decoder architecture with fully convolutional layers to predict pixel-wise segmentation masks and object bounding boxes.
  • Train the model using a joint loss function combining cross-entropy for segmentation and box loss for object detection.
  • Integrate both visual and textual features by fusing the chargrid representation with an image encoder in hybrid models.
  • Encode characters as 1-hot vectors to preserve categorical nature, resulting in a highly sparse input representation.
  • Optimize the model end-to-end using stochastic gradient descent with weight decay and label smoothing.

Experimental results

Research questions

  • RQ1Can a 2D grid representation of text preserve spatial relationships critical for document understanding?
  • RQ2How does the chargrid-based model compare to sequential NLP models and image-based computer vision models in structured document understanding?
  • RQ3To what extent does the 2D spatial structure improve performance on complex information extraction tasks like line-item recognition?
  • RQ4Does the chargrid representation generalize across different document types and layout complexities?
  • RQ5What is the contribution of the chargrid branch versus the image encoder branch in hybrid models?

Key findings

  • The chargrid model significantly outperforms state-of-the-art NLP and computer vision models on invoice information extraction, especially for complex fields like Vendor Address and Line-item Quantity.
  • The model achieves high accuracy in detecting both text content and spatial layout, outperforming sequential models that fail to exploit 2D structure.
  • The hybrid model with a chargrid encoder and image encoder does not improve performance over the chargrid-only model, indicating that the chargrid captures most discriminative information.
  • The chargrid-hybrid-C32 model, with fewer channels in the chargrid branch, shows significantly reduced accuracy, confirming that the chargrid representation is the primary source of performance.
  • Error analysis reveals that the model struggles with line-items that have unusual structures, but many errors are due to ambiguous ground truth annotations.
  • The model requires up to three days to converge, reflecting higher computational cost compared to sequential models, which converge in hours.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.