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.
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.
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:
- T-PLM (Text-only): Uses standard models like BERT or ELECTRA on flattened text, ignoring all HTML and layout data.
- H-PLM (HTML-enhanced): Incorporates HTML tags as special tokens, allowing the model to recognize structural boundaries and the DOM hierarchy.
- 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