TIE: Topological Information Enhanced Structural Reading Comprehension on Web Pages

Zihan Zhao, Lu Chen, Ruisheng Cao, Hongshen Xu, Xingyu Chen, Kai Yu

Abstract

Structural Reading Comprehension (SRC) on web pages requires models to interpret both logical hierarchies and spatial layouts. Traditional methods often struggle by treating HTML as a flattened sequence of tokens, failing to capture the complex multi-dimensional relationships inherent in web design. This paper introduces the Topological Information Enhanced (TIE) model, which employs a two-stage "node locating and answer refining" approach. By utilizing a Structure Encoder based on Graph Attention Networks (GAT) and dual-graph representations—specifically Densified DOM trees and Node Positional Relation (NPR) graphs—TIE explicitly models the topological structure of web pages. Experimental results on the WebSRC benchmark demonstrate that TIE achieves state-of-the-art performance, particularly in complex tabular environments where spatial reasoning is paramount.

Introduction

Unlike standard document reading comprehension, which typically deals with linear text, web-based Structural Reading Comprehension (SRC) involves navigating a multi-dimensional entity. A web page is defined by its logical structure (the nested HTML tags of the Document Object Model, or DOM) and its spatial structure (the visual arrangement of elements on a screen).

Existing models frequently process HTML as a flattened sequence of tokens or rely on XPaths for context. These approaches often fail to grasp the high-level topology of a page. For instance, while a human can instantly recognize two items in the same column of a table, a token-level model might see these items separated by hundreds of unrelated tokens in the raw HTML string. To address this, the TIE model shifts the focus from word-level processing to tag-level reasoning, allowing for a more sophisticated understanding of web page topology.

Methodology

The TIE framework decomposes the QA task into two distinct stages: Node Locating and Answer Refining.

1. Node Locating

Instead of immediately searching for a text span, the model first identifies the specific HTML tag (node) containing the answer. This is achieved through a Structure Encoder powered by Graph Attention Networks (GAT). To facilitate efficient information flow, TIE constructs two types of graphs:

  • Densified DOM Tree: Standard DOM trees are often sparse, hindering information propagation. TIE "densifies" the tree by adding edges between nodes and all their ancestors and descendants, ensuring faster communication across the hierarchy.
  • Node Positional Relation (NPR) Graph: This novel graph models spatial layout by creating directed edges (UP, DOWN, LEFT, RIGHT) based on the bounding boxes of HTML elements. This allows the model to recognize columns and rows regardless of their position in the underlying HTML code.

2. Answer Refining

Once the candidate "answer node" is identified, a traditional token-level QA model (such as MarkupLM) is employed to extract the exact text span from within that specific node. This two-stage process ensures that the model first understands the global structure before performing local extraction.

Experimental Evaluation

TIE was evaluated on WebSRC, a large-scale benchmark for structural reading comprehension consisting of 0.4 million question-answer pairs across 6.4k web page segments. The dataset includes three primary website types: Key-Value (KV) pairs, Comparison pages, and complex Tables.

Key Results

TIE achieved state-of-the-art (SOTA) performance on the WebSRC test set, with the TIE (Large) variant reaching 75.87% EM and 80.19% F1. Notably:

  • Efficiency: TIE-MarkupLM (Base) outperformed the larger MarkupLM (Large) model, suggesting that superior structural modeling is more effective than simply increasing parameter count.
  • Table Performance: On table-heavy websites, TIE demonstrated a significant +20.30% improvement in Exact Match (EM) scores over the baseline. This highlights the importance of the NPR graph in resolving "long-range" vertical dependencies that are often obscured in raw HTML.

Discussion and Insights

The success of TIE underscores several critical insights in SRC:

  • Tag-Level Reasoning: Moving structural reasoning to the tag level allows Graph Neural Networks to more effectively encode complex topology.
  • Spatial vs. Logical: Spatial relations (NPR graphs) are often more critical than logical ones for interpreting tables, where HTML code can be messy but visual alignment remains clear.
  • Overcoming Verticality: In standard HTML, horizontal neighbors are usually adjacent in code, but vertical neighbors (same column) are often distant. The NPR graph's spatial edges effectively bridge this gap.

Limitations and Future Work

Despite its performance, TIE introduces computational overhead by utilizing a two-stage process, effectively doubling the parameter count compared to single-stage models. Additionally, the model is susceptible to cascading errors; if the Node Locating stage fails, the Answer Refining stage cannot recover. Future research will explore parameter sharing between stages and end-to-end training to mitigate these issues and improve efficiency.

Summary updated

BibTeX
@inproceedings{zhao2022tie,
  author = {Zihan Zhao and Lu Chen and Ruisheng Cao and Hongshen Xu and Xingyu Chen and Kai Yu},
  title = {{TIE: Topological Information Enhanced Structural Reading Comprehension on Web Pages}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.132},
}
Figure