WebSRC: A Dataset for Web-Based Structural Reading Comprehension

Xingyu Chen, Zihan Zhao, Lu Chen, Jiabao Ji, Danyang Zhang, Ao Luo, Yuxuan Xiong, Kai Yu

WebSRC: A Dataset for Web-Based Structural Reading Comprehension

Introduction

The modern web is a rich tapestry of information, yet most Machine Reading Comprehension (MRC) systems are designed for linear, plain text. To bridge this gap, researchers have introduced WebSRC, a large-scale dataset featuring 400,000 question-answer pairs. WebSRC is specifically designed to train models in Structural Reading Comprehension (SRC)—the ability to understand the visual and logical hierarchy of web pages by integrating text, HTML source code, and screenshots.

The Challenge of Structural Reading Comprehension

Traditional MRC models typically process text as a flat sequence. While effective for narrative paragraphs, this approach fails on web pages where information is organized spatially. For example, a model might encounter the text "21 / 26 mpg" but fail to associate it with "Fuel Economy" if the label is located in a separate HTML tag or a different column of a table.

The Structural Reading Comprehension (SRC) task: (a) visual screenshot, (b) HTML source, (c) flattened text, and (d) example Q&A. Text-only models often lose the context linking labels to values.

SRC requires models to leverage the Document Object Model (DOM) and visual cues to resolve these relationships. As shown in the figure above, the logical structure (HTML) and spatial structure (screenshot) provide the necessary context that raw text lacks.

The WebSRC Dataset

WebSRC represents a significant advancement in scale and diversity compared to previous web-based datasets. It consists of:

  • 400K QA Pairs: Derived from 6.4K web page segments.
  • 11 Domains: Including automotive, books, sports, and electronics.
  • Three Layout Types: Key-Value (KV), Comparison, and Table.
Examples of layout diversity in WebSRC, including (c) comparison/key-value pairs and (d) structured tables.

To generate this volume of data, the authors employed a "meta-question" pipeline. Humans wrote base questions for a subset of pages, which were then linguistically diversified via crowdsourcing and automatically mapped to thousands of structurally similar pages.

Modeling Approaches

The researchers evaluated three baseline architectures to quantify the impact of structural information:

  1. T-PLM (Text-only): Uses standard models like BERT or ELECTRA on flattened text, ignoring all HTML and layout data.
  2. H-PLM (HTML-enhanced): Incorporates HTML tags as special tokens, allowing the model to recognize structural boundaries and the DOM hierarchy.
  3. V-PLM (Visual-enhanced): The most sophisticated model, which uses a Faster R-CNN to extract visual features from screenshots and fuses them with text and HTML embeddings via self-attention.

Key Results and Insights

Experiments demonstrate a clear performance hierarchy: V-PLM > H-PLM > T-PLM.

  • The Impact of HTML: On the development set, the ELECTRA-based H-PLM achieved an Exact Match (EM) score of 70.12, a significant improvement over the T-PLM's 61.67.
  • The Visual Advantage: Integrating visual features (V-PLM) further increased the EM score to 73.22, proving that spatial cues are vital for complex layouts like tables.
  • Domain Specificity: A model pre-trained on the plain-text SQuAD dataset achieved only 29.68 EM on WebSRC, highlighting that web-based reading is a distinct skill set from traditional text comprehension.

Conclusion and Future Work

WebSRC establishes that understanding the "semantic map" of a web page—both its logical HTML structure and its spatial visual layout—is essential for accurate information extraction. While current models show promise, they still struggle with complex tables and comparison charts. Future research may focus on pre-training vision models specifically for web UI elements and extending the task from page segments to full-page navigation and generative reasoning.

Summary updated

BibTeX
@inproceedings{chen2021websrc,
  author = {Xingyu Chen and Zihan Zhao and Lu Chen and Jiabao Ji and Danyang Zhang and Ao Luo and Yuxuan Xiong and Kai Yu},
  title = {{WebSRC: A Dataset for Web-Based Structural Reading Comprehension}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.343},
}
Figure