TIE : Topological Information Enhanced Structural Reading Comprehension on Web Pages (2022)

Abstract: Recently, the structural reading comprehension (SRC) task on web pages has attracted increasing research interests. Although previous SRC work has leveraged extra information such as HTML tags or XPaths, the informative topology of web pages is not effectively exploited. In this work, we propose a Topological Information Enhanced model (TIE), which transforms the token-level task into a tag-level task by introducing a two-stage process (i.e. node locating and answer refining). Based on that, TIE integrates Graph Attention Network (GAT) and Pre-trained Language Model (PLM) to leverage the topological information of both logical structures and spatial structures. Experimental results demonstrate that our model outperforms strong baselines and achieves state-of-the-art performances on the web-based SRC benchmark WebSRC at the time of writing. The code of TIE will be publicly available at https://github.com/X-LANCE/TIE .

## introduction with the rapid development of the internet, web pages have become the most common and rich source of information @xcite . therefore, the ability to understand the contents of structured web pages will guarantee a rich and diverse knowledge source for deep learning systems. each web page is mainly rendered from the corresponding hypertext markup language (html) codes. in other words, the understanding of a structured web page can be achieved by the comprehension of its html codes. one of the commonly used tasks to verify the model's ability of comprehension is question answering (qa). however, previous qa models only focus on the comprehension of plain texts @xcite @xcite , tables (pasupat and liang, * the corresponding authors are lu chen and kai yu. 2015; @xcite , or knowledge bases (kbs) @xcite . these sources have either no topological structure or fixed-form structures. on the contrary, the topological structures of web pages are complex and flexible, which are less investigated in previous qa works. specifically, html codes can be viewed as multiple semantic unit separated by tag tokens (e.g. <div>, </@xmath0. an html tag refers to a pair of matched start and end tags and all the content in between, which also corresponds to a part of the web page (illustrated in fig. 1 (a) ). therefore, there are two kinds of topological structures in web pages: logical structures which contain the hierarchical relations and clustering of tags (see fig. 1 (b )); and spatial structures which contain the relative positions between different tags in the web pages (see fig. 1 (c )). these topological structures are as important as the semantics of html codes and screenshots. although previous works @xcite have tried to leverage the topological structures by adopting html tags or xpaths as tokens or position embeddings, only logical structures are encoded implicitly. however, it is obvious for humans to identify key-value pairs if two spans are located in the same row or column, while this relation may take various forms in the logical structures of different web pages. moreover, tables have extremely simple spatial structures but will be super complex in terms of logical structures. therefore, spatial structures are essential and complementary to logical structures. the major obstacle that prevents previous models to leverage spatial relations is that both the two kinds of topological structures are organized at the tag level instead of the token level (fig. 1 (b ) and (c)). as token-level models, whose computation and prediction units are the tokens of web pages, it is extremely hard and anti-natural for them to encode the topological structures. moreover, using token-level models also means that previous works have to implicitly imply the logical structures to the models, which may be less effective than explicitly telling with the help of prior knowledge. to tackle these problems, we propose topological information enhanced model (tie), a tag-level qa model that operates on the representations of html tags to predict which tag the answer span belongs to. by switching from token level to tag level, various structures of web pages can be explicitly encoded into the model easily. specifically, tie encodes both the logical and spatial structures using graph attention network (gat) @xcite with the help of two kinds of graphs. the first kind of graphs is document object model (dom) trees which is widely used to represent the logical structures of html codes. secondly, to encode the spatial structures, we define the node positional relation (npr) graph based on the bounding box of html tags obtained by the browser. detail definition can be found in section 3.2.2. moreover, to accomplish the token-level prediction tasks by a tag-level qa model, we further introduce a two-stage process including node locating stage and answer refining stage. specifically, in the answer refining stage, a traditional token-level qa model is utilized to extract answer span with the constraint of the answer node prediction by tie in the node locating stage. our tie model is tested on the websrc dataset foot_0 and achieve state-of-the-art (sota) performances. to summarize, our contributions are three folds: ## tie in this section, we will first introduce the architecture of the whole src system in sec.3.1, and then the two kind of graph we used in sec. 3.2. finally, the structure of topological information enhance model (tie) is demonstrated in sec.3.3. ## conclusion & future work in this paper, we proposed a tag-level qa model called tie to better understand the topological information contained in the structured web pages. our model explicitly captures two of the most informative topological structures of the web pages, logical and spatial structures, by dom trees and npr graphs, respectively. with the proposed twostage pipeline, we conduct extensive experiments on the websrc dataset. our tie successfully achieves sota performances and the contributions of its key components are validated. although our tie can achieve much high performance compared with traditional qa models on src tasks, more improvements are still needed. specifically, as our two-stage system needs a separated token-level qa model to generate final answer spans, the parameter numbers and computa-tion consumption will be at least doubled. we have tried to tackle this problem by sharing parameters between the context encoder and the token-level qa model used in the answer refining stage. but the results are not promising. therefore, we leave this problem for future work.