WebFormer: The Web-page Transformer for Structure Information Extraction
Qifan Wang, Yi Fang, Anirudh Ravula, Fuli Feng, Xiaojun Quan, Dongfang Liu
TL;DR
WebFormer tackles structure information extraction from web pages by integrating HTML layout into a Transformer via HTML tokens and a set of rich attentions (HTML-to-HTML, HTML-to-Text, Text-to-HTML, Text-to-Text) plus field-token interactions. The model jointly encodes field, HTML, and text tokens in a unified encoder and predicts field spans from the text sequence, enabling scalable cross-domain extraction and handling long documents. Experiments on SWDE and Common Crawl show superior performance over state-of-the-art baselines and demonstrate robustness to long inputs and zero-shot/few-shot scenarios. The work highlights the importance of exploiting web layout for accurate field extraction and suggests future multimodal extensions.
Abstract
Structure information extraction refers to the task of extracting structured text fields from web pages, such as extracting a product offer from a shopping page including product title, description, brand and price. It is an important research topic which has been widely studied in document understanding and web search. Recent natural language models with sequence modeling have demonstrated state-of-the-art performance on web information extraction. However, effectively serializing tokens from unstructured web pages is challenging in practice due to a variety of web layout patterns. Limited work has focused on modeling the web layout for extracting the text fields. In this paper, we introduce WebFormer, a Web-page transFormer model for structure information extraction from web documents. First, we design HTML tokens for each DOM node in the HTML by embedding representations from their neighboring tokens through graph attention. Second, we construct rich attention patterns between HTML tokens and text tokens, which leverages the web layout for effective attention weight computation. We conduct an extensive set of experiments on SWDE and Common Crawl benchmarks. Experimental results demonstrate the superior performance of the proposed approach over several state-of-the-art methods.
